3
\$\begingroup\$

I'm developing a light display thing using a Teensy 2 and a digitally addressable LED string that draws quite a bit of power, more than can be provided over USB. I have ordered a switched wall-wart style power supply that more than adequately meets the power needs of the system, and should serve me well in production.

During firmware development however the Teensy will be connected over USB to the host computer. The methods recommended by the manufacturer are a bit invasive. I like that the Teensy is powered over USB, and I plan to keep using that function after this project is done. Also, I don't really feel comfortable taking a razor to my Teensy, let alone soldering an additional component to those tiny tiny pads.

Question:

Is it possible to power the Teensy off the USB connection and the load off a separate power supply if I make sure they share a common ground potential? Do I need to take any special precautions? Is this just a really really bad idea?

I can't shake the feeling that I should not be doing this, but I can't think of a reason why. Can anyone settle this one way or the other?

UPDATE

Thanks to your excellent answers, I now have 50 individually addressable 24-bit color RGB LEDs in my Christmas tree. Read more about it here and here!

Tree with lights

\$\endgroup\$

3 Answers 3

4
\$\begingroup\$

Since the digital RGB pixel strand uses a 5V SPI-like interface, and the Teensy 2 is also running off of 5V USB power, then as long as the grounds are connected in common you should be able to run the two off of separate supplies and just route the two digital leads (green and yellow) plus ground (blue) to the Teensy, and the +5 (red) plus ground (blue) to the separate wall-wart power supply.

They give an example of this using an Arduino.

As they mention in their writeup, wire colors can vary from batch to batch so the above instructions may need to be adjusted.

\$\endgroup\$
2
  • \$\begingroup\$ I can't believe I missed that. I looked at that picture myself today, but I was not worrying about that specific problem then so it escaped my attention. \$\endgroup\$
    – drxzcl
    Nov 10, 2011 at 21:43
  • \$\begingroup\$ I'm accepting this answer as it presents a complete and accurate solution to my specific problem. The other answers are also very good, read those too if you ended up on this page! \$\endgroup\$
    – drxzcl
    Nov 11, 2011 at 11:30
4
\$\begingroup\$

It's difficult to give a blanket answer. There are many things that can go 'strange' with multiple supplies.

For example, imagine you have an IC that gets +5V from supply #1, and some downstream circuitry that gets power from supply #2, both with a common ground. If you lose supply #1 but still have supply #2, there sometimes can be sneaky paths backwards through the downstream circuitry back to the IC, which can lead to weird effects like partially powering it up (most I/O lines are diode clamped to the supply rails).

For your situation, it appears that you'll be OK so long as the LED string CKI and SDI lines aren't stiffly pulled up to the 5V supply you'll be using for the LED strings. If they are pulled up, you may need to put schottky diodes or some form of FET isolation on those data lines, to isolate the LED strings from the micro if the 5V from the USB is lost.

\$\endgroup\$
1
  • \$\begingroup\$ Good advice, thanks! Assuming the circuit matches the reference schematic on the first page of the data sheet (adafruit.com/datasheets/WS2801.pdf) the SPI lines should not be connected to any pull-ups. I'll try and verify it by peering through the silicone ;) \$\endgroup\$
    – drxzcl
    Nov 10, 2011 at 21:48
2
\$\begingroup\$

Yes, it's possible to use two different power supplies as long as they share the same ground. If the wall wart doesn't have a third safety ground prong, you won't even create a ground loop, since its output will be floating. For lighting LEDs, ground loop probably won't matter anyway.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.