The lamp that WAS meant to be! (WS2812B LED Box)

A little while ago, I was experimenting with a WS2812B LED and toying with the idea of making a basic lamp. Things didn’t work out and the project was scrapped but I still had the internals of it ready on a breadboard so I gave it another go, while taking in some inspiration from the comments on that post which mentioned a product that’s more or less a small table-top spotlight.

20150822_151542

From my previous experiments, I already had a WS2812B LED soldered to some wires. For this project, I used only 22AWG stranded wire. For isolation and to hold things in place, I used hot glue.

20150822_151553

With the LED ready, I started by putting one of my Attiny85 breakout boards onto the perfboard.

20150822_200005

I then completed the soldering of the LED and potentiometers to the perfboard. The potentiometers are all connected to each other by Vcc and Ground. It seems like the connections in between one another weren’t very good as the LED would go wild at times, changing color or blinking for no reason. After some wiggling with the wires, I found which connections were weak and reflowed them.

20150822_202840
… But even reflowing the connections didn’t work. The only thing that did fix the problems was putting force on the connections in a certain way. Once I got it working, I quickly hot glued everything. I know that’s horrible, but, being such a no frills project, I’m not very concerned. After the circuit was completed, I trimmed down the perfboard since the rest of it wasn’t needed.

20150822_204337

The potentiometer and LEDs were all 5mm^2 so it wasn’t difficult cutting out appropriate sized holes for them. I first put in the LED and taped it to hold it in place before adding hot glue.

20150822_204355

After the LED was in place, I fed the power supply wires (female jumper wires) through a hole I cut near the bottom corner of the box. The potentiometers come with a washer and nut so I didn’t need any hot glue to keep those in place. This is my first time using these kind of potentiometers in a project and, even without fancy knobs, I think they look great. They certainly look better than tiny trimpots, which is what I would have used otherwise.

20150822_204657

And that’s it! The placement of the potentiometers was planned specifically to double as a way to lay the box down on an angle.

I hope you liked this simple project of mine. I recently ordered a set of these LEDs for an idea for the next Light Show.

PS. My main website, www.mwhprojects.com, was recently updated!

Advertisements

The lamp that wasn’t meant to be

Some time ago, I bought a few WS2812B addressable RGB LED modules. I’m still committed to using them in the next Light Show, whenever I get around to designing and building the next one. In the meantime, I wanted to make a simple project to play around a little more with these LEDs.

I decided to make a makeshift lamp. The lamp would be controlled by at Attiny85 board with a few potentiometers to control the intensity of each color.IMG_20150627_201909 After many thought out cuts, I abandoned the project. It became apparent that it would just look too silly and be too large for my limited desk space. Pictured above is the post and the top that would hang out on the top to hold the LED module.

IMG_20150718_131232I still wanted to test the LED modules out with the Attiny85 to see for myself that they can work on the small microcontroller (in comparison to the Atmega328p/Uno). I used the Adafruit Neopixel library and a USBtinyISP to program it. The code wouldn’t upload unless I burned the bootloader to use the internal 8MHz clock instead of the 1MHz clock. Otherwise, it worked great.

I would still like to make a small project with these LED modules, outside of the Light Show project. I need to brainstorm a little more.

Thanks for reading!

A look at a cheap USBtinyISP board

On my most recent revisions of my breakout boards for the Atmega328p and Attiny85, I added a 6-pin ISP header. ISP stands for In System Programming, which, as the name suggests, means that the header is used to program the microcontroller as it sits in a circuit, which is especially handy for boards without a way to plug directly into your computer’s USB port or a board with a surface-mount microcontroller.

I’ve never actually used these headers since I was used to using my Arduino Uno to program the microcontroller for both of my breakout boards. To make sure I could add the 6-pin ISP header to the boards correctly, I read up on it from different sources to understand how to make the connections.

attiny85pinoutisp

On the pinout of the microcontrollers, there are pins labelled SCK, MISO, and MOSI. These are three of the six pins of the 6-pin ISP header. The other three pins on the header are pins we all know well: Reset, Vcc, and Ground. The asterisk on my boards signify the first pin of the ISP header, which should be the MISO pin. The illustration of mine uses the pinout image in the Attiny datasheet where the six pins are underlined. I also drew up a simple diagram of the header pinout.

I received a cheap USBtinyISP board from China which took quite a while to get here. Thankfully it didn’t take much longer to get up and running.
IMG_20150704_125604The board came with a 6-pin ribbon cable and a USB cable. The USB cable is so short that it’s virtually unusable since the cable isn’t long enough to get the board to my desk from my computer. Thankfully, I have a longer cable I can use instead.

The first thing I did was to check the pinout of the cable so I don’t plug it in the wrong way on my boards. The easiest way the figure out the orientation of the header is to find Vcc and Ground with a multimeter, where you should see 5v across. It’s a 50/50 chance… so of course I got it wrong the first time as I saw the voltage reading fluctuate in the mV range.

Once I got the orientation of the connector right, I plugged it into one of my boards. I marked the first pin with a little sticker, as shown in the picture above.

Surprisingly, the Adafruit USBtinyISP drivers works with this board. I opened up Device Manager and updated the drivers with their files. The seller of this board had their own hosted driver files, though some poking around showed it was just the Adafruit drivers anyway.

IMG_20150704_124751First up was my Attiny85 Breakout Board. It’s not meant to fit into these half-sized breadboards but bending the power pins a little bit got it in. (If you bought one of these boards, don’t do this. This is a test unit, after all.)

I was able to upload the blink sketch directly from the Arduino IDE, with the Attiny85 settings and setting the programmer to “USBtinyISP “. The timing of the blink sketch was weird the first time I tried it, which made me realize I must have previously burnt the bootloader to use the 8MHz internal clock instead of the default 1MHz. I decided to try burning the bootloader so it would go back to using the 1Mhz clock. The USBtinyISP was able to do it and the sketch ran perfectly.IMG_20150704_124905Now for the Atmega328p Breakout Board. To upload through the USBtinyISP and the Arduino IDE, I can’t just click Upload like I did with the Attiny85 board. I have to hold shift when I click the Upload button to Upload Using Programmer. This is supposed to upload the sketch to the microcontroller without needing a bootloader. Once I upload a sketch with the USBtinyISP, I can’t upload a sketch if I place it in an Arduino Uno, so I guess that uploading with a programmer erases the bootloader…? To be able to use the microcontroller on an Arduino Uno again, I have to burn the bootloader with the USBtinyISP board. It’s not a big deal, but it’s something I have to remember to do so I don’t get confused why things aren’t working later on.

So with the FTDI and USBtinyISP programming tools at my disposal, I’m very excited to get the next revision of my Atmega328p Breakout Boards as they have headers for both devices. Stay tuned for news on that! Thanks for reading!

New products you already know

Yesterday I released two “new” products. They are both revisions of projects you’ve seen on the blog before.

IMG_0001

They are both the second revisions. They are the Attiny85 Programmer & Breakout Board and the Atmega328p Breakout Board. They’ve both been completely redesigned (ie. manually routed this time) with new features!

IMG_20140916_123258

Remember this clunky old thing? This is the original Attiny85 Programmer & Breakout. I really wanted to go for something more compact and breadboardable.

1I really like how the new one turned out because my measurements worked out! The board can sit on the edge of an 830-point breadboard so that the programming and breakout pins fit into the prototyping area, with the input power pins fitting nicely on the side power rails.

IMG_20140918_192836

To the right is the old Atmega328p Breakout. There’s not much change to the way it looks but the new board does have a few nice changes to it.

1The new board now breaks out the reset pin so that you can add an external reset.

Both boards now have LED power indicators, SMD components, and 6-pin ISP headers.

Head on over to my Tindie store to check them out!

So that’s what’s been going on. I’ve been meaning to do a new light show (possibly sans fountains for now). I mostly just want to use my new shift register boards with the PWM control it now allows… Stay tuned and thanks for visiting!

And now for something new! (Store blog category)

The blog’s viewship has already surpassed January, so we’re on our way to getting back to how it was at the old blog. This is mostly thanks to my ESP8266 project. I feel like I’ve been neglecting the blog because I haven’t had much to talk about in terms of new Arduino projects… That’s why I’m here to start a new blog category called Store, which will give you some insight on how my experience selling my products online is like, which is what has been taking up all of my time. Sorry if you’re not into big walls of text, but I hope to include pictures where ever I can.

Not too long ago, I decided to take designing circuit boards more seriously so I could start an online store. Since then, I’ve listed some of these boards on Tindie, as well as some used parts from my PLC trainer on eBay. The money raised by the sales on eBay is going directly toward the development of a couple products that will be hitting Tindie in the coming weeks. Planning it all, even though it doesn’t seem like a lot, has taken up a lot of my time, which is why all of my Arduino projects have taken a backseat.

I’ve raised just enough money so far to cover the costs of doing a relatively small run of some new boards. They are the second revisions of my Attiny85 Programmer and Breakout board, and my Atmega328p Breakout Board. They both got some important changes. They’re both manually routed and include a power LED indicator. They also include ISP headers for advanced users with their fancy 6-pin ISP cables (but you can still use jumper wires). Most of the components have changed to SMD.

alone

The Atmega328p Breakout now breaks out the Reset pin where you can easily add in an external button. It covers two pads so you basically want to short the connection, using a button or switch, to reset the microcontroller. It’s slightly more friendly than the single Reset pin like on the Arduino.

Like I said before, the boards are also getting power indicator LEDs and ISP headers, which you can see in the top left corner of the board. Originally, I left that area open because my AMS1117 voltage regulator was supposed to line up with the input power pins of this board but it didn’t work out right.

alone

The Attiny85 Programmer & Breakout sticks to its roots as being a simple-to-use programmer, so it still includes a section that tells you what pins to connect to the Arduino, in addition the new ISP header. The size is also much smaller and is designed to fit into a breadboard (830 point, and similar) where the input power pins fit into the power rails of the breadboard, and the Program and Breakout pins fit into the prototyping area of the breadboard. The ISP header is typically sticking out from the top so it shouldn’t interfere with this plan.

That’s it for now! These boards should be ready sometime near the middle or end of March. Fingers crossed it all goes well!

Shelf Lighting: A year later

Almost a year ago, I installed white strip lights on a home entertainment unit with a dimmer system that uses an ATmeag328p. Yesterday, we found it wouldn’t power on, so it was time to reopen this time capsule. I like to think of it as a time capsule because it reflects on what I knew a year ago. In this quick post, you’ll see what I mean by that.

IMG_20150214_105906After a few pokes with my multimeter, I found that there was no power getting to the ATmega328p microcontroller. I thought it may have been a problem with the LM7805 regulator so I swapped it out (which is why it’s missing in this picture). That wasn’t it. With a few more pokes from my multimeter, I found it was a problem with the switch. For whatever reason, the switch wouldn’t close between the two pins I was using. The other side still opened and closed fine so I just moved one of the wires over to use that side of the switch.
IMG_20150214_114450While I had the project open, I decided to do a little updating to it. At the time, I was experimenting more with standalone ATmega328p’s so naturally this project ended up being powered by one. It was overkill since the system only uses one PWM output and one analog input. I switched the ATmega328p out for an ATtiny85. You could still say it’s overkill since I could use a 555 timer, but it’s a cleaner and simple solution. I also hot glued some of the connections as a way of insulating them, instead of using electrical tape that sometimes falls away and gets gross after a while. I was considering trying to solder this circuit onto a perfboard, but I’ll leave that for another time.

So that’s the update! I always like revisiting projects where I can make meaningful improvements and optimizations. Thanks for reading!

Attiny85 Programmer/Breakout Rev B3 Preview

Let’s go back to basics, shall we?preview1_frontI decided to throw out the whole breakaway section idea. It complicated things and there’s always the chance of a bad break. I put everything back on one board, which is now down to a 3x3cm footprint, 38% smaller than Rev A. The space savings come from less silkscreen text (removed the word “Pin” for the pin numbers) and using SMD components for the power LED indicator and resistor. I would have gone with an SMD capacitor but it costs more than the usual through-hole electrolytic capacitor, at least from where I get my components for these boards. With the price appearing to go up to get these boards manufactured, I’m looking for savings.

preview1_backAnother thing that changed with this sub-revision is that all of the pads are circles and are bigger than they have been on previous boards. They were kind of a pain to solder because any circular pads were really thin. I’m still working out the right size but I’m happy that I know  out how to address that issue now.

To date, the Attiny85 board was my most “Watched” item on eBay so I take that as an indicator of interest for this kind of thing so I’m set on getting these made. Being 3x3cm, I can’t fit two on one 5x5cm board which is what I have to work with to get manufactured. I’ll probably do something simple with the rest of the space but I want to nail down this one first. Thanks for reading!