Powering all those little glowy things
In my previous post, I talked about what kind of component we needed in order to control a large number of LEDs. But what about powering all those LEDs? The Arduino Uno can provide a maximum of 200mA through the VCC pin and it can sink a total of 400mA through the GND pins, and each I/O pin can supply up to 40mA. We don’t want to fry the Arduino by apply too much current through it. So we need to work with transistors which will act as a switch controlled by the Arduino in order to provide high enough power to the LEDs safely. The Arduino will be in a separate circuit loop and will not be affected by the high current circuit loop needed to power the LEDs. Follow this link for a quick introduction to transistor basics.
There are tons of different transistors, each with different specifications such as the base current, gain, collector current, and power dissipation. We’ll be looking at three candidates; STP16NF06 MOSFET, TIP120 Darlington, and the ULN2803 8 Channel Darlington Driver.
N-Channel MOSFET
For basic, low-cost usage the N-Channel MOSFETs are very popular and costs only $0.92-0.97 per unit. This transistor consists of a TO-220 package which means the case is mounted to a heatsink to dissipate more heat than the regular TO-92 cases. The STP16NF06 MOSFET can provide up to 16A! Adafruit.com has a tutorial page about using the STP16NF06 transistor in a circuit to drive an RGB LED Strip and bildr.org has a tutorial as well.
http://tinyurl.com/aqwbluy $0.92 (Mouser)
http://www.digikey.com/product-detail/en/STP16NF06L/497-2765-5-ND/603790?cur=USD $0.97
http://tinyurl.com/b223bwe (datasheet)
TIP120 Darlington Transistor
The TIP120 Darlington transistor can provide up to 5A, consists of a TO-220 package and they are even cheaper ($0.66) than the MOSFETs. They are widely available and they can even be picked up from Radioshack and Adafruit.com. Instructions on how to use the TIP120 can be found here.
http://www.digikey.com/product-detail/en/TIP120/TIP120-ND/1052441 $0.66
https://www.adafruit.com/products/976 3pack $2.50
http://www.adafruit.com/datasheets/TIP120.pdf (datasheet)
ULN2803: 8 Channel Darlington Driver
Bring in some muscle to your output pins with 8 mighty Darlingtons! This DIP chip contains 8 drivers that can sink 500mA from a 50V supply and has kickback diodes included inside for driving coils. The chip is $1.95 per unit, and a video explaining how the chip works can be found here.
https://www.sparkfun.com/products/312 $1.95
https://www.adafruit.com/products/970 $1.95
http://www.sparkfun.com/datasheets/IC/uln2803a.pdf (datasheet)
These three are all good choices for making prototypes. We ended up ordering the TIP120 Darlington and ULN2803: 8 Channel Darlington Driver from Adafruit.com. The MOSFET is a bit more expensive per unit compared to the other two and I doubt we would be needed a maximum of 16A for our circuit. The TIP120’s 5A will do just fine, but I’m not sure if the 500mA from the 8 Channel Darlington Driver will be enough. Nevertheless, they might come in handy since it is 8 darlington transistors in packed into 1 chip!
We actually ordered those before we switched to using the RGB LED chain. We won’t be using them now, but I’m positive we will be using them in future prototypes.