2

I am looking to power a Trinket Pro 5V microcontroller using a 9V voltage source. I have logic running on this controller to gather the data from an accelerometer (powered off of the 5V pin on the controller) and output it to three strands of 21 RGB LEDs (https://www.adafruit.com/products/1655).

RGB LEDs cannot exceed a power source of 5V and after passing through the Trinket voltage regulator the 5V pin on the Trinket just does not have enough power for all three strands.

Please, advise on the appropriate hardware for this case. What is the maximum voltage that RGB LEDs can handle and how does the schematic look on the protoboard.

Thank you for your expertise.

ksenia
  • 61
  • 9

2 Answers2

1

First of all: 9V means that you are using a 9V "transistor" battery (like this), right?

If so it won't last very long: I suggest you to use a different approach (e.g. four AA batteries in series).

As for your question, I couldn't find the power consumption for these leds. Try to measure it yourself, setting the max brightness and white color. I think that, anyway, the max current for each LED should be 60mA (20mA for each color). This means that each strand absorbs 1.2A (quite a lot!).

This power requires you to use at least a switching regulator. I always used some small modules I found on ebay (they have a LM2596 IC, so just search LM2596 on ebay to find them). They are rated for 3A, so you should put at least two of them (1.2 * 3 strands = 3.6A > 3A).

The connections are quite straightforward: the board has four pins: IN+, IN-, OUT+ and OUT-. IN+ of all the modules go to the positive terminal of the battery, IN- and OUT- of all the modules go to the common ground node (negative terminal of trinket, battery and leds), OUT+ is the 5V regulated output. Oh, by the way, they are adjustable modules, so BEFORE ATTACHING THE LEDS use a multimeter to set the correct voltage (if you attach the leds without regulating the voltage you can destroy them).

Since you will have a lot of current left on the second module, you can power the trinket from there (so you will not waste a lot of power).

One last thought: 9V batteries usually have a capacity of around 600mAh; if you use one of them with the switching modules and drain 4A from the 5V your battery will last 0.6Ah / 4A * 9/5 = 0.27h = 16 minutes; if you switch to 4 AA batteries (around 2000mAh) it will last 2Ah / 4A * 6/5 = 0.6h = 36 minutes. More than double (calculations made rounding up the power drained by 21 leds set at max brightness and white color)

frarugi87
  • 2,731
  • 12
  • 19
1

According to the link you supply you might either receive the WS2812 or the SK6812, datasheet on Ws2812 claims you can supply up to 7V , but this is still less than 9V , the SK6812 is lacking in max voltage but says 5v typical.

If you still want to use the 9V supply you will need a extra voltage regulator.

A little math: each pixel can max draw 60mA, if you have 21 of them we multiply and get 1260mA, thats 1.26 Amps but thats max values we might divide by two and still be relative safe. Let's not. So we need a 1.26A source from 9V to 5V then we can calculate the power we need to dissipate. (9-5) x 1.26 = 5.04W of heat. Ok you need a regulator that can dissipate that kind of heat.

A 7805 regulator will not do, you need a switching buck converter.

As to driving this on battery power I don't think alkaline will be able to deliver 1.3A (adding for the MCU) without loosing voltage to inner resistance, some rechargeable might. Lipo can deliver but at a different voltage that will need a new calculation of potential waste using linear regulation, or a buck regulator. In my opinion the charging of lipos require special attention and are not my preference, but might be option here.

Hans Neve
  • 466
  • 4
  • 11