RGB Tumbler parts

6. November 2011 22:54 by Jens Willy Johannsen
Categories: Projects

This is what my parts search has yielded so far:


The MCU, LED driver and accelerometer will be powered directly from a 3V coin cell. But for the blue and green LEDs, 3 volts is just not enough since the LEDs require 3.2V forward voltage and the LED driver requires a further 0.4V for the current regulator. So about 4V would be perfect. I've used the NCP1400 DC-DC converter before but it provides only 100 mA and since each LED draws 50 mA I will need more than that. The NCP1402, however, provides up to 200 mA. And even though it exists in a 4.0V version I've been unable to find that in stock anywhere so I'll probably go with a 5V version instead.
Note that with 5V I can't run multiple LEDs in series so I'll either have to make do with a single LED or use parallel LEDs.


This one looks nice: Optek OVSTRGBB1CR8. It's an RGB LED with 50 mA per LED in a PLCC6 package. PLCC are pretty easy to hand-solder even though the leads are bent in under the device. Flux and a tinned tip will do the trick. And it has a generous 2.1 mm pitch.


I use AVR MCUs because that's what I'm familiar with. I will need three PWM channels and three A/D channels. This AVR Quick Reference gives a good overview of the features of the various ATtiny, mega and Xmega devices.

The ATtiny's have either not enough PWM or A/D channels or not enough pins to utilize both PWM and A/D at the same time or they only come in SOIC-14 packages (too big) or QFN-20 (don't wanna). The ATmega168 and -328 however have enough PWM and A/D channels and plenty pins to use both at the same time and come in a TQFP-32 package. And I already have a couple of TQFP '328s laying around so an ATmega 328P-AU it is.

LED Driver

This one was tricky. First off: do I even need an LED driver? Driving the LEDs directly from the MCU ports is not possible because the MCU cannot supply enough current for three 50 mA LEDs (and the MCU is running at too low a voltage in this case). I could have the MCU drive MOSFETs and use current-limiting resistors. But that would waste too much power in the resistors and the whole thing would eat up quite a bit of PCB real estate. So yes: I need a driver.

I spent several hours looking at and dismissing LED drivers because they were BGA or LGA package only or they were for low-current LEDs only (10 or 25 mA) or they had no current regulation at all. This one looked promising: ON Semi NCP5623. It's an I2C controlled three channel 175 mA controller in a TSSOP package. I don't even need to use PWM from the MCU. However, I only found it at Digi-Key where it was "non-stocked" with a minimum quantity of 2500 pcs. I don't think so.

I finally settled on this one: On Semi CAT4109. It doesn't inlcude PWM controller so the MCU will have to do the PWM'ing. Also it needs three resistors instead of only one for setting the current and it exists only in a SOIC-16 package which is kinda bulky. But it will have to do.


For the last critical part I settled on an Analog Devices ADXL335. It is +/- 3G with three analog outputs. The only problem is that it is in a LFCSP-16 package which is intended for reflow soldering only. It may have visible connections on the side of the package. I hope it does because then it should be possible to hand-solder it. I will make sure the pads extend 0.5 to 1 mm beyond the case itself so I can flux-and-tinned-tip solder it. I'll keep my fingers crossed and we'll see. Note that the chip has a pad on the bottom (which is impossible to hand-solder) but according to the datasheet, the "exposed pad is not internally connected but should be soldered for mechanical integrity". Which means that I should be able to get away with not soldering it.


No comments No comments »

RGB Tumbler

5. November 2011 19:40 by Jens Willy Johannsen
Categories: Projects

For a new project I thought I'd like to do some RGB LED stuff. And I got the idea of making a small circuit (small enough to be put inside a ping-pong ball) that controlled one (or more) RGB LEDs from its physical orientation. Simply put, acceleration on the X, Y and Z axes would translate to intensity of the red, green and blue LED. And since there is always an acceleration of 1G towards the center of the Earth (also known as "gravity"), the color of the RGB LED would depend on its orientation.

So the system will comprise the following "blocks":

  1. Power
  2. MCU
  3. 3 axis accelerometer
  4. LED driver. Or maybe the LEDs can be controlled directly from the MCU.
  5. RGB LED. One or two.

When looking for parts there's a few things to keep in mind:

  1. Size matters. It must be as small as possible. I only recently started working with SMD components but already I can't imagine having to deal with those clunky, Soviet tractor-like through-hole components. But I still haven't gone all the way into reflow soldering. So I'm looking for primarily SOIC, TSSOP and TQFP packages. QFN packages are actually possible to hand-solder but it's not fun at all and LGA and BGA are pretty much impossible. For many-pin devices, SOIC is actually kinda big with their huge 1.27 mm pitch and 0.5 mm pitch TSSOP would be preferable.
  2. Power. As little as possible. I plan on running everything off a single 3V coin cell so voltage should be 2.7 to 3 volts and amps should be as few as at all possible.
  3. Availability. I much prefer to be able to get everything from one, local provider.

So off to the intertubes for some Googling…

Comments 2 comments »