uln2003 vs relay with arduino

Thread Starter

Big Sammy

Joined Jan 28, 2012
44
I'm looking at building a circuit that utilizes an Arduino to turn on and off a 12v - 5m strip of 5050 LED lights. The entire 5m won't be used...the lights will be separated into sections of 3....15 of them, so only 45 LED's. My original plan was to use +12 v to LED's. Arduino out to the uln2003, and out of uln2003 to the -12v of LED's. My concern was the amount of heat that is generated by the uln2003. My question is would a relay be a better option? (this circuit is being installed in a house)
Thanks for any input!
 

dl324

Joined Mar 30, 2015
16,937
My concern was the amount of heat that is generated by the uln2003. My question is would a relay be a better option?
What is the total current the darlington will be passing? How many of the darlingtons in the package will be used simultaneously and what is the maximum current they'll be passing? What is the frequency that the LEDs will be switched on and off?
 

Thread Starter

Big Sammy

Joined Jan 28, 2012
44
What is the total current the darlington will be passing? How many of the darlingtons in the package will be used simultaneously and what is the maximum current they'll be passing? What is the frequency that the LEDs will be switched on and off?
Only one pin would be used....input from the Arduino to an input on the 2003, and an output from the 2003 to the first section of 3 led's. Each section will be wired in series. (At least this is my original idea). I was considering separatiing the sections of led into two, so the first section would have 8 sections of led's (*3, so 24), and 7 sections (*3, so 21), and powering them separately, so two inputs to 2003, and two out, if this would reduce the heat dissipation? I'm not sure of the current or frequency right now....I'm not at home, and not sure how to measure that honestly. I suppose the maximum current would be the max current output of the arduino?
 

dl324

Joined Mar 30, 2015
16,937
I was considering separatiing the sections of led into two, so the first section would have 8 sections of led's (*3, so 24), and 7 sections (*3, so 21), and powering them separately, so two inputs to 2003, and two out, if this would reduce the heat dissipation?
With the ULN2003, you have two power dissipation parameters to be concerned about; the individual transistor and total package. Using two of the transistors would only help if you were near the maximum dissipation figure for a single transistor. To know if that's the situation, we need to know the maximum current through the LEDs. 5050 refers to the LED package size, not whether or not they're COB and how much current they can tolerate.
I'm not sure of the current or frequency right now....I'm not at home, and not sure how to measure that honestly.
If the switching frequency is high, that would eliminate mechanical relays.
I suppose the maximum current would be the max current output of the arduino?
No. The Arduino outputs are low power. That's why you need to use the darlington to drive the LEDs.
 

dendad

Joined Feb 20, 2016
4,478
Although both a relay and the ULN2003 could work, a better idea would to to drive a high current logic level FET from the Arduino so to enable use of the PWM feature therefore having brightness control.
The ULN2004 can only handle 500mA per driver, and even if you use all together, it still is just a few amps.
If you use something like this... 60V 30A FQP30N06L https://www.sparkfun.com/products/10213
you now can switch a lot higher currents.
Google Arduino driving a FET to see how to connect it up if you need to.
For example, see https://www.gammon.com.au/motors that tells a bit about driving motors but the same applies to just about any load type.
 

Thread Starter

Big Sammy

Joined Jan 28, 2012
44
That makes sense....how can I measure the current through the LED's?
Thanks again for your input!

With the ULN2003, you have two power dissipation parameters to be concerned about; the individual transistor and total package. Using two of the transistors would only help if you were near the maximum dissipation figure for a single transistor. To know if that's the situation, we need to know the maximum current through the LEDs. 5050 refers to the LED package size, not whether or not they're COB and how much current they can tolerate.
If the switching frequency is high, that would eliminate mechanical relays.
No. The Arduino outputs are low power. That's why you need to use the darlington to drive the LEDs.
 

dl324

Joined Mar 30, 2015
16,937
how can I measure the current through the LED's?
If you're not using a power supply that has a current meter, you can use a DVM; though that will show a smaller current than actual due to the shunt resistance inserted by the meter.

Another option is that you could post a schematic showing how the LEDs are connected (and their part numbers) and we can estimate current.
 

dendad

Joined Feb 20, 2016
4,478
EDIT>
Oops! I misread your original post so just noticed you are not going to use all the LEDs. According to the ebay add referred to below, each LED will be about 10 to 12mA so you could work out the current by adding the numbers up. So you could use the ULN2003 to run parts of the strips after all.
Just the same, the info below may be of help...

I just had a look on ebay for "5m strip of 5050 LED" and one addvert said the current would be 2.5 to 3.5 Amps if you used the full string.
So the ULN2003 is probably out. The max total current is 2.5A and it is best not to run so close to the limits. You will need to make sure the power supply is large enough to handle this. Maybe a 5A one?
If you cannot solder the FET circuit yourself, one of these will be the way to go...
http://www.ebay.com.au/itm/DC-3V-5V...255582?hash=item43fa3f369e:g:OTcAAOSwImRYQn3E
This one looks good as it has an opto isolated drive on it and that helps protect the Arduino in case of mishap.
Have fun :)
 
Last edited:

Thread Starter

Big Sammy

Joined Jan 28, 2012
44
Thank you for the assistance!! I did order the mosfet board you suggested. One further question if I may...would the relay at this link be sufficient as well? Pros/cons?
Solid State Relay Module MGR-1 DD220D25 DC-DC 3-32VDC to 5-220VDC

EDIT>
Oops! I misread your original post so just noticed you are not going to use all the LEDs. According to the ebay add referred to below, each LED will be about 10 to 12mA so you could work out the current by adding the numbers up. So you could use the ULN2003 to run parts of the strips after all.
Just the same, the info below may be of help...

I just had a look on ebay for "5m strip of 5050 LED" and one addvert said the current would be 2.5 to 3.5 Amps if you used the full string.
So the ULN2003 is probably out. The max total current is 2.5A and it is best not to run so close to the limits. You will need to make sure the power supply is large enough to handle this. Maybe a 5A one?
If you cannot solder the FET circuit yourself, one of these will be the way to go...
http://www.ebay.com.au/itm/DC-3V-5V...255582?hash=item43fa3f369e:g:OTcAAOSwImRYQn3E
This one looks good as it has an opto isolated drive on it and that helps protect the Arduino in case of mishap.
Have fun :)
 

dendad

Joined Feb 20, 2016
4,478
You need to be careful with the Solid State Relays to make sure you actually get one that can switch DC. That one does look ok, but if you get one that is for switching AC, and run it on DC load, it will turn on but not off!
Are you doing some code for the Arduino to control the LEDs? What form of control are you aiming for?
 

Thread Starter

Big Sammy

Joined Jan 28, 2012
44
I have an old house with a very dark staircase. I plan on using an IR LED/receiver at tip and bottom to trigger the LED's. LED strip (12v-5050 warm white) will be cut into 15 pieces (3 LED's per piece), as there are 15 stairs. No fading is needed, simply turning them all on for a pre-determined amount of time, then off.

You need to be careful with the Solid State Relays to make sure you actually get one that can switch DC. That one does look ok, but if you get one that is for switching AC, and run it on DC load, it will turn on but not off!
Are you doing some code for the Arduino to control the LEDs? What form of control are you aiming for?
 

Thread Starter

Big Sammy

Joined Jan 28, 2012
44
You need to be careful with the Solid State Relays to make sure you actually get one that can switch DC. That one does look ok, but if you get one that is for switching AC, and run it on DC load, it will turn on but not off!
Are you doing some code for the Arduino to control the LEDs? What form of control are you aiming for?
I have an old house with a dark staircase. Im looking to use two IR led/receivers (top and bottom) to trigger the lights Im using 12v, 5050, warm white led strips cut into 3-led sections. Theres 15 stairs, so 15 3-led sections, wired in series. The lights will be triggered on, and stay on for a pre-determined kength of time. So I'll use an Arduino...not sure which model, to read the sensors and trigger the lights. Don't need fading, just on/off....
 

Thread Starter

Big Sammy

Joined Jan 28, 2012
44
So I am thinking of a simple code which reads the two IR receivers, and if either reads HIGH, turn the lights on for 30 secs or a minute (havent decided yet). Im new to all this... I havent written the code yet...I'm hoping to get away with a Nano or just a Attiny 85....again, havent figured that part out yet.....again, I'm welcome to suggestions!!
 

Thread Starter

Big Sammy

Joined Jan 28, 2012
44
That sounds like a good project.
Well, it works in my head...hopefully it turns out that way!! I've prototyped it using momentary pushbuttons for triggers, as I'm still waiting for IR led/receivers. It works as it should with the buttons, but I've never worked with the IR stuff before....fingers crossed!!
 

hp1729

Joined Nov 23, 2015
2,304
I'm looking at building a circuit that utilizes an Arduino to turn on and off a 12v - 5m strip of 5050 LED lights. The entire 5m won't be used...the lights will be separated into sections of 3....15 of them, so only 45 LED's. My original plan was to use +12 v to LED's. Arduino out to the uln2003, and out of uln2003 to the -12v of LED's. My concern was the amount of heat that is generated by the uln2003. My question is would a relay be a better option? (this circuit is being installed in a house)
Thanks for any input!
Just a thought. Why an Arduino? Would just a timer work?
How long does it take to go up the stairs? You would still need sensors at the bottom and top of the stairs and the same LED driver. All that changes is an LM555 versus an Arduino you need to program. Some changes might need to be made to meet your needs. This wasn't originally made to fit your needs.
 

Attachments

Last edited:

eetech00

Joined Jun 8, 2013
3,957
Hi

Just as an FYI...

The ULN2003 can only handle about 600ma continuous DC max (I tested 300ma on two separate output pins). I wouldn't allow more current without a heat sink.
 

Thread Starter

Big Sammy

Joined Jan 28, 2012
44
Just a thought. Why an Arduino? Would just a timer work?
How long does it take to go up the stairs? You would still need sensors at the bottom and top of the stairs and the same LED driver. All that changes is an LM555 versus an Arduino you need to program. Some changes might need to be made to meet your needs. This wasn't originally made to fit your needs.
I like the idea...haven't worked much with 555, as I'm just delving into the hobby electronics...yeah, instead of IR sensors, I'm going to use ultrasonic sensors, but I expect they would work the same way in the 555 circuit. With the ultrasonic sensors, I find they are very accurate, and I only have access to one side of the stairs, so I think these are they best triggers for my situation. I'm looking at having the led lights remain on for 15-20 seconds...is this possible with the 555? I've got it working on a proto board with an Arduino, but the 555 would be much more compact!! The other problem I'm having with the setup I currently have is that the led strip remains dimly lit when they should be off.
If you can tell me if the timing can be adjusted with the 555 I'd love to try it! As well, if you have any suggestions for the leds-remaining-dimly-lit problem, I'd be grateful!!
Thanks!
 
Top