Electronic – arduino – Driving a 12V LED strip with an Arduino

arduinoled striptotem-pole

I have 60 watt LED strip I want to control with an Arduino (the Genuino Mega 2560 actually). I found this tutorial which shows you how to do it for a white LED strip, but I am not sure whether I can just connect the same circuit three times or whether there is a better way. Also, the web store I wanted to buy components from said some parts, the BC639 in particular, are "outdated", suggesting the BC63916 instead.

The article's circuit:
the article's circuit

Schematic of my (probably very bad) attempt:
my attempt

As you may notice I am quite inexperienced and I doubt that my "just slam everything together" approach above will work. My questions:

  • Is it even smart to use the totem-pole driver recommended in the article or should I stick to a more simple solution?
  • If so, how can I connect three of these circuits together for my RGB strip (or how can I adjust my attempt)?
  • Finally, are the components and resistor values named in the article sufficient?

"For the transistors a BC639 NPN and a BC640 PNP do the job. R is 3.3Ω. RB is 22Ω. RGATE is 4.7Ω. C is a big 1000μF electrolytic."

I have one last question, but it is not as important. I could buy a 12V power supply, but the power supply of my PC (which I intend to control the Arduino with) can also deliver this. Is this a good idea or will I destroy my PSU?

Best Answer

I recently made myself an LED driver very similar to the one in your linked tutorial.

  • Is it even smart to use the totem-pole driver

Using a dedicated MOSFET driver is probably more economical, and arguably a more rational and/or professional solution, but the totem pole solution can be achieved with jellybean parts, and AFAIU there's nothing wrong with it per se.

As long as you tune the components reasonably, it will give you a plenty fast and powerful PWM driver.

  • how can I connect three of these circuits together

In parallel, just like you've shown.

  • are the components [...] sufficient

I think 22 Ω for the base resistor seems a bit small. I used a ~300 Ω base resistor that should give a base current (and microcontroller output current) of about 15 mA, well within spec of the Atmel I was using, and enough to drive my 2n2222 and 2n2907 transistors, and by extension my IRLB3034 power MOSFET, reasonably hard.

I did not use a resistor between VCC and the totem pole.

4.7 Ω for the gate resistor seems OK to me, I used only slightly larger values, and got an acceptable amount of ringing at the gate.

Last but not least, do put a flyback diode across the output. I initially thought a flyback diode wouldn't be necessary with a "non-inductive" load like a LED strip, but my oscilloscope proved me wrong: It showed more than 40 V spikes at my MOSFET under load, enough to theoretically damage it. Bodging a Schottky diode onto it fixed the problem.

  • the power supply of my PC

The specs for the PSU should tell you how much current you can draw from the 12 V rail. Generally, a modern PSU of decent quality should be able to handle 60 W just fine.