Single Mains Power Source: LED & Arduino

Hi, I'm after some advice. I'm new to electronics and the Arduino although I'm experienced programming so hopefully I'll have that side covered. I've spent the last week playing with the Arduino and I want to start my first project which would be of some use.

I've been doing plenty of research round the net but unfortunately I've got a little confused on one topic: Power. I want to build a Lamp using RGB LEDs so I can display different colours (bit like Philips Hue - I plan to code a small web app just for myself to control it if I get far enough into the project). The two best sources I've found are:

Video (1 & 2): http://vimeo.com/26780617 http://vimeo.com/27533370

Based on these videos: http://www.jerome-bernard.com/blog/2013/01/12/rgb-led-strip-controlled-by-an-arduino/

In the video the guy uses a 12v battery powered supply, I was wondering if it was possible to replace this with a mains power supply like one below (I'm based in the UK)?

http://www.amazon.co.uk/Switching-Power-Supply-Charger-Camera/dp/B0082JFHTK/ref=sr_1_2?ie=UTF8&qid=1380292609&sr=8-2&keywords=12v+power+supply

I'd just cut the wire open and have a working power supply (I know I'd need to be careful working with mains power)

The other question is relating to the Arduino needing a separate power supply, is there a way to power both from the same source?

If you have any advise at all I'd appreciate it, maybe a good article or part I should look into. I'm really keen to learn.

Cheers Jason

Hi Jason,

Why not just plug your power supply into the uno and connect power to your leds from Vin & gnd outputs?

Paul

PaulRB:
Hi Jason,

Why not just plug your power supply into the uno and connect power to your leds from Vin & gnd outputs?

Paul

I would imagine as you add more and more lights, eventually the VIN pin would not be able to handle the amperage that is going through it. Also, if you are using external power and using 7-12 volts, you might burn out your leds, that might not be tolerant of the higher voltage. I recall that Adafruit says for their Neopixels, to give a regulated 5v of power, and each 16 lights or so can draw about 1 amp when all of the lights are on.

Thank you for the replies. I'd like to use these RGB LEDs:

http://www.maplin.co.uk/rgb-led-strip-515851

1 metre (10 units) uses 600mA, 12V DC. As I understand it the Arduino couldn't output this much. Am I mistaken?

Cheers Jason

jagnew: I'd like to use these RGB LEDs:

http://www.maplin.co.uk/rgb-led-strip-515851

1 metre (10 units) uses 600mA, 12V DC. As I understand it the Arduino couldn't output this much. Am I mistaken?

The Arduino simply doesn't "do" 12V, so it's not a matter of "outputting" it. What you can do, is to use the Arduino to control some FETs to control the 12V RGB strips which have LEDs arranged in series sets of three. Other RGB strips contain control ICs and operate at 5V in which case you power them directly from a 5V switchmode power supply.

MichaelMeissner: I would imagine as you add more and more lights, eventually the VIN pin would not be able to handle the amperage that is going through it.

Does anyone know how much current could safely be drawn from Vin (and sunk by GND) connectors on an uno, assuming an adequate 12V supply?

jagnew: I'd like to use these RGB LEDs

Jason, its not clear how those leds are wired and how to drive them. Maplin don't give much info other than volts & amps.

You said you wanted to build a lamp, so are led strips really the best thing? An alternative would be to use a number of separate but high brightness leds such as "pirahnas" in a cluster. You could easily drive these with 3 BC337 transistors.

http://www.ebay.co.uk/itm/5-x-Red-Piranha-Super-Flux-LED-5mm-Dome-UK-1st-Class-Postage-/300876043193?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item460d9c13b9

http://www.ebay.co.uk/itm/5-x-Green-Piranha-Super-Flux-LED-5mm-Dome-UK-1st-Class-Postage-/300799396640?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item46090a8b20

http://www.ebay.co.uk/itm/5-x-Blue-Piranha-Super-Flux-LED-5mm-Dome-UK-1st-Class-Postage-/290861099833?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item43b8ac2b39

http://www.ebay.co.uk/itm/10x-General-Purpose-Transistors-BC337-BC327-2N4401-BC548B-1st-Class-Post-/290725471286?pt=UK_BOI_Electrical_Components_Supplies_ET&var=&hash=item8962fb66e6

Paul

PaulRB: Why not just plug your power supply into the uno and connect power to your leds from Vin & gnd outputs?

The current needed by RGB LEDs adds up very quickly. 10 LEDs is 600mA - already close to overheating. Better to find an old phone charger or something.

jagnew: Thank you for the replies. I'd like to use these RGB LEDs:

http://www.maplin.co.uk/rgb-led-strip-515851

1 metre (10 units) uses 600mA, 12V DC. As I understand it the Arduino couldn't output this much. Am I mistaken?

Nope. Arduino can't produce 12V. I'm sure Maplin has a 12V power supply though.

To control those you'll need some sort of transistors. Maplin isn't real big on those, their TIP3055 would do in a pinch.

If it was me though, I'd go on eBay and buy some WS2811 LEDs. It will be far cheaper and easier. You can also set each LED to a different color (which you won't be able to with those strips).

http://www.ebay.com/sch/i.html?_nkw=WS2811+strip

:(

Jason alread said in his original post that he was considering buying a 12V switching (=regulated) supply on ebay.

My suggestion of discrete leds would mean they could be connected in series to 12V, reducing the current required. For example 4 red could probably be connected in series, 3 green/blue in series etc. You might need only around 200~300mA for 30 of those leds I linked to.

For a lamp, you would probably not need individual colour control, just connect 3 transistors up to 3 pwm outputs to control the color & brightness of the whole cluster. A much more suitable project for a noob (no offence) than 2811 etc. Leave that for a later project.

Paul

PaulRB: My suggestion of discrete leds would mean they could be connected in series to 12V, reducing the current required. For example 4 red could probably be connected in series, 3 green/blue in series etc. You might need only around 200~300mA for 30 of those leds I linked to.

True, but a single 5V switching supply off eBay would solve all power problems - Arduino plus LEDs.

Hey everyone,

Thanks for your replies, I really appreciate the time you taken to think things through. I guess the next step to plan it out and give it a go. Hopefully I'll finish it soon and I can post a bit information on what I used.

Thanks again, Jason