PDA

View Full Version : Need hardware advice: ULN2003A



Christopher4187
- 24th September 2006, 22:01
Hi everyone,

I have a device where I am driving two relays (Digikey PN#PB110-ND) with a ULN2003A (Digikey PN#296-1368-5-ND) from a 16F688. I have tested this layout quite extensively from January of this year without using flyback diodes to supress the voltage when the field collapses. I have not seen any failures yet and it does appear that the ULN2003A protects itself. I read the data sheet and it says, "Each consists of seven npn Darlington pairs that feature high-voltage outputs with common-cathode clamp diodes for switching inductive loads." Forgive me for not really understanding this situation as I don't have an EE degree but I would like to know if I really NEED to add flyback diodes. I know it's common practice when using a simple NPN transistor but again, do I really NEED them with a ULN2003A.

Thanks in advance for the help.

Chris

sayzer
- 25th September 2006, 03:36
Hi Chris,


Those internal diodes are not reliable for driving relatively large bobbins.

I always use 1N4001 in parallel.


If you are diriving a tiny relay, I do not think you will REALLY need an external diode.
Otherwise, I would not play a gamble. You never know when that flyback will occur.

Melanie
- 25th September 2006, 14:08
For driving inductive loads (eg Relays or Solenoids) up to say 50mA those internal protection diodes are just fine. I use the ULN2003, 2004 and 2803 extensively without problems.

Christopher4187
- 25th September 2006, 17:43
Thanks for the reply Melanie. I checked the data sheet and the coil current is 77mA. Have you ever tested the ULN at this coil current with no external diode or is this in the region of unknown?

Thanks,

Chris

sayzer
- 25th September 2006, 17:50
Chris,

Are you avoiding a diode from being used on the PCB board?


----------

Christopher4187
- 25th September 2006, 17:54
Well, it's a long story but I can't fit a 1N4001 diode on the board. However, if I need to, I can fit an SMT SOT-23 diode on the board for this purpose. I have some units in service now and my main reason for asking was to know if I should expect problems later on. Like I said, I can't add a thru-hole diode but I can add an SMT verision. It's 500ma SOT-23.

sayzer
- 25th September 2006, 18:00
If you are not using all of the available arrays, you may want to make a parallel connection of the empty ones; thus providing a higher current both through the transistors and diodes.

Christopher4187
- 25th September 2006, 18:07
Actually, I am only using two of the seven available outputs. Are you saying to "gang" together something like 3 inputs and 4 inputs then 3 outputs and 4 outputs? Would this provide better protection if the collapsing field is in question?

sayzer
- 25th September 2006, 19:28
Since the load will be divided by the number of arrays you make in parallel, technically it would.

Datasheet has no detailed info on the diodes though, but the darlingtons support parallel connection and datasheet confirms this.


------------

Christopher4187
- 25th September 2006, 20:09
So, here is what I am thinking. If the field is 77mA and it is ganged together with three outputs, it is esentially like switching a coil current of approximately 26mA and the collapsing field has three different paths to go. This is below the 50mA that Melanie said she has used before. Is my thinking correct?

Thanks,

Chris

sayzer
- 25th September 2006, 20:15
Your thinking is "technically" correct of course.

Practically it "should" be correct. Since Melanie has a practical experience, so I say go for it.

mister_e
- 26th September 2006, 05:10
if you only use 2 driver... why not using SOT transistors/Mosfet instead?

Christopher4187
- 26th September 2006, 12:19
I am a creature of habit. If I have used an IC that I know works well and I have not had no problems with it, I will use it in future designs.

sayzer
- 26th September 2006, 14:59
Chris,

What you say is similar to having a PIC in a circuit in which the same job can be done very easily with two-three transistors etc.

So that using PICs has become an addiction. Just as you use one chip instead of two Transistors.

-----------------------

mister_e
- 26th September 2006, 15:10
Sure, sometimes i use some 10F to replace those 'old timer' 555, some 12F as crystal clock generator (when a simple gate would work), etc etc, etc. Internal comparator are just so usefull too.

I agree, they're addictive once you know exactly what you can do with...Also so useful when you need to reduce board space or reduce the experiment/developpement time.. well i guess.

LMAO! We all losing some old electronic basics...or changing the eay to design stuff. One thing is great... if the unit become faulty, we're the only one (or close to) who can fix it without hardware modifications :D

Is anyone else have this... "if i want to do that... i'll use a PIC for sure" saying?

Christopher4187
- 26th September 2006, 16:39
I use PIC's for EVERYTHNING!!

Anyhow, can anyone confirm my thinking for the use of a ULN2003A with more outputs to spread the flyback voltage?

mister_e
- 26th September 2006, 16:49
in theory... it's suppose to work. In real-world... maybe yes maybe no.

Personnally i would use 2 mosfet or transistor for about the same price and board space... but it's my own opinion :D

sayzer
- 26th September 2006, 16:55
I quote myself "go for it"

Christopher4187
- 26th September 2006, 22:33
So, it looks like the general consensus is that I can "gang" together some outputs and the potential issue of the flyback voltage should be mitigated. Are there any objections?

Luciano
- 27th September 2006, 12:00
Hi,

When you use only one output of the ULN2003A you can drive a relay with
a coil current up to 500mA. (450 mA with 100% duty cycle, N package).
The internal protection diode will suppress the self-induction current when
you deenergise the relay. Do not forget to connect PIN9.
All unused inputs must be tied to GND.

If you use two outputs simultaneously, then the current of each
output is limited to 280 mA. (100% duty cycle, N package).
See the picture below if you use more than two outputs simultaneously.
(The picture is from the datasheet of the ULN2003A).

http://img7.picsplace.to/img7/26/thumbs/current_ic.PNG (http://img7.picsplace.to/img7/26/current_ic.PNG)
(Click to enlarge the picture)

http://img9.picsplace.to/img9/21/thumbs/uln2003a.PNG (http://img9.picsplace.to/img9/21/uln2003a.PNG)
(Click to enlarge the picture)

Best regards,

Luciano

sayzer
- 27th September 2006, 15:10
Nice explanations Luciano. But I am confused.

You are saying, actually, 500mA is only valid when we use one output at a time. Interesting! because if we make a parallel connection as the data sheet says, then this statement can not be correct.

In a parallel connection, we will be using two outputs at the same time.
In that case, we multiply the current capacity so we get 2x500=1000mA, but according your information, "If you use two outputs simultaneously, then the current of each output is limited to 280 mA". So we get back to where we started.
No change!

Isn't this interesting?




Also, what about the protection diodes? I checked the datasheet but very poor information there.

Luciano
- 27th September 2006, 18:08
Hi,

The IC package can only dissipate a certain amount of heat.
If you use only one output the max current for the package is 480mA.
If you use two outputs, the current is 280 mA per output so the total
current for the package is 560 mA. This small difference is because
some of the heat is dissipated by the metal of the pin connected to
the PCB.

There is no need for a parallel connection.
Do not use a parallel connections with this IC.

Best regards,

Luciano

Christopher4187
- 28th September 2006, 00:14
Luciano,

Thanks for the information. I was looking at one of the pictures and it says that you have to connect pin 9. I have NEVER used pin 9 and if you look at figure 17, they show it as not being connected. Other figures show it connected. Did I miss something in the data sheet?

Luciano
- 28th September 2006, 08:50
Hi,

PIN 9 must be connected to V+.
(See picture below).

Figure 17 shows 7 lamps on my datasheet. Lamps are resistive loads.
There is no self-induction when you open a circuit with resistive loads
so there is no need for the protection diodes. The figure 17 is probably
a pinball circuit, when you press the button you can verify that all the
lamps are working.

Your case is the figure 19 on the datasheet.

Best regards,

Luciano

The Datasheet I have:
http://focus.ti.com/lit/ds/symlink/uln2003a.pdf
(See page 11, fig. 19)

http://img10.picsplace.to/16/thumbs/prot_diode.PNG (http://img11.picsplace.to/img10/16/prot_diode.PNG)
(Click to enlarge the picture)

(About SMD package)
http://img4.picsplace.to/img4/26/thumbs/current_ic_smd.PNG (http://img4.picsplace.to/img4/26/current_ic_smd.PNG)
(Click to enlarge the picture)

Christopher4187
- 28th September 2006, 10:02
Luciano,

Thanks. The current output was always clear to me. However, it appears I am using the incorrect ULN model. If pin 9 needs to be connected to V+, I need the CMOS version. The relay I am using is a 12 volt version. What is evident to me, even thought I thought I was protected by the ULN, I have NEVER used that flyback didoe all of this time! I have used this IC for 5 years and NEVER used it! I am surprised that I have never had any problems in the last 5 years.

Luciano
- 28th September 2006, 10:33
Hi,

There is no CMOS or TTL version for the ULN2003A.
If the relay is 12V, connect +12V to the pin 9.
If the relay is 48V, connect +48V to the pin 9.
(The outputs of the ULN2003A work up to 50V).

What you see on the datasheet (Fig. 18 and 19) is
what you have when the input of ULN2003A is connected
to a CMOS IC or a TTL IC. What you see on the left of
fig. 19 represents an output inside a TTL IC. What you
see on the left of fig. 18 represents an output inside
a CMOS IC.

On the first page of the datasheet you car read
"Inputs Compatible with various types of logic".

Best regards,

Luciano

keithdoxey
- 28th September 2006, 10:34
However, it appears I am using the incorrect ULN model. If pin 9 needs to be connected to V+, I need the CMOS version. The relay I am using is a 12 volt version.

You dont need to change at all.

Pin 9 is the pin which all the clamping diodes are connected. This should be connected to the supply voltage of the relays/lamps that you are driving. Irrespective of which chip you are using this can be upto 50V.


The TTL/CMOS versions feature different inputs for driving from those logic families. The PIC can drive either type. The supply voltage for the relays/lamps has no bearing on which input type you need.

Just make sure that you dont accidently connect your load supply to your logic supply or the magic smoke will escape :)

sayzer
- 28th September 2006, 11:47
Among these information, I am still confused about the parallel connection and what benefits it has.

I am sure Luciano has a point there but if I will get only 60mA more in two-parallel connection, then it makes no sense. Why would I need a parallel connection then? 500mA current path can already handle 560mA. It is only about %10 over driving.

I am saying this because the datasheet says that higher current can be achieved by parallel connection. Only 60mA with two, not double? even if I add all arrays parallel, it makes no sense either. No benefit at all.

Christopher4187
- 28th September 2006, 12:12
If I understand the data sheet correctly, you can have 7 outputs at a duty cycle of 100% but only 120mA per output (if you have the N package). Or, you can have 3 outputs at 100% duty cycle at 220mA. You can follow the curve on the data sheet to determine what you are allowed to use. As a general statement, it would appear to me that the max output at 100% duty cycle is approximately 840mA. Can someone confirm what I just wrote?

I will connect pin 9 to the +12V supply and test it. Again, I am surprised that I have not had any issues without connecting the pin 9. I guess I have just been lucky!

Luciano
- 28th September 2006, 13:57
Hi,

@Sayzer:

The use of a parallel connection was your suggestion.
Why use a parallel connection when the current of the relay coil is 77mA?

My advice is:

There is no need for a parallel connection.
Do not use a parallel connections with this IC.

* * * * * * * * *

@Christopher4187:

N-package
7 x 120 mA = 840 mA if the TA is <= 70°C.
TA = Ambient temperature, the temperature inside the enclosure where the PCB resides.
Note that you can see TA = 85°C on the figure 15, but for the ULN2003A the
maximum TA is 70°C (See page 4).

* * *

D-package
(Based on the Digikey # in your first post, this is the SMD version you are using).
7 x 60 mA = 420 mA if the TA is <= 70°C.

Best regards,

Luciano

sayzer
- 28th September 2006, 14:21
Hi,

@Sayzer:

The use of a parallel connection was your suggestion.
Why use a parallel connection when the current of the relay coil is 77mA?

My advice is:

There is no need for a parallel connection.
Do not use a parallel connections with this IC.

* * * * * * * * *



For sure, from now on, I will not suggest parallel connection.
In fact, I wonder what benefit it has; why is it there? Lets leave it to the engineer who designed it.

Christopher4187
- 28th September 2006, 14:47
The reason for the parallel connection is clear. Here is a real world example using the "N" package at 60 degrees C:

I have a relay that takes 700mA to close and your duty cycle is 100%. If I am using one output, the maximum current supply is about 450mA and that won't be enough. If I ganged two together, the supply will be about 580mA; still not enough. If I gang three together, the supply will be about 660mA; still not enough. If I gang four together, the supply will be about 720mA; this would just be enough. For a buffer, I would gang five together and the supply would be about 750mA.

As you can see, as you increase the number of outputs used, the overall current increases but the individual current per pin decreases.

sayzer
- 28th September 2006, 15:01
With your example Chris,

I would use a single mosfet; even BD139 (NPN tr) can do the job for 750mA.



---------------

Christopher4187
- 28th September 2006, 15:05
The example was to provide you an explanation of using parallel outputs on the ULN2003A, not to select a better device to do the job.

sayzer
- 28th September 2006, 15:22
Ok. I see.

So what did you do?

Christopher4187
- 28th September 2006, 15:56
To go back to the origninal question I had, I wanted know if using a ULN2003A would OK without using a clamp diode to suppress the flyback voltage on a relay that needs a current of 77mA to close.

The concensus is, for the most part, I should be OK. The only correction I need make is to connect pin 9.

In addition, to be sure of myself, I will set the PIC up to cycle the relay every second and let it run for a week. The cycle of the relay is something like 6-8 times per day and if I let it cycle for one week, it should get something like 300,000 cycles. I think if it passes that test, there should not be a problem with reliability.

Luciano
- 28th September 2006, 17:49
The reason for the parallel connection is clear. Here is a real world example using the "N" package at 60 degrees C:

I have a relay that takes 700mA to close and your duty cycle is 100%. If I am using one output, the maximum current supply is about 450mA and that won't be enough. If I ganged two together, the supply will be about 580mA; still not enough. If I gang three together, the supply will be about 660mA; still not enough. If I gang four together, the supply will be about 720mA; this would just be enough. For a buffer, I would gang five together and the supply would be about 750mA.

As you can see, as you increase the number of outputs used, the overall current increases but the individual current per pin decreases.


The propagation delay time of the ULN2003A is from
0.25 to 1 μs. This means that if you connect more
buffers in parallel, the outputs might not commute
at the same time. When you energize the relay coil this
is not a problem because the current grows slowly
in the relay coil. The problem is when you deenergize
the relay, where you could have a situation that due
to the propagation delay you could have only one output
with a 700mA load which is too much for a single output.
Will that reduce the life of the output or damage the output
driver? I am sorry I cannot answer this question.

http://img6.picsplace.to/img6/26/thumbs/par_out_2.PNG (http://img6.picsplace.to/img6/26/par_out_2.PNG)
(Click to enlarge the picture)

Best regards,

Luciano

sayzer
- 28th September 2006, 19:28
Really interesting stuff I have been learning ....

Christopher4187
- 28th September 2006, 21:39
@Luciano,

If your field is large, I guess it could. The problem is that the clamp diodes within the ULN2003A are most likely not matched and you are forcing that large field into one diode for a very short time. Maybe one way to mitigate that problem would be to put discrite resistors on each output to ensure the current does not go above an acceptable level. I don't have formal education to confirm this but it sounds like it may work.

Christopher4187
- 28th September 2006, 21:41
But why would TI say you could gang together outputs. I mean, it's in the data sheet.....should we believe everything we read? :-)

Luciano
- 28th September 2006, 22:33
@Luciano,

If your field is large, I guess it could. The problem is that the clamp diodes within the ULN2003A are most likely not matched and you are forcing that large field into one diode for a very short time. Maybe one way to mitigate that problem would be to put discrite resistors on each output to ensure the current does not go above an acceptable level. I don't have formal education to confirm this but it sounds like it may work.

The diode is not a problem because when the outputs are paralleled you will
have from two up to seven protection diodes in the circuit.

The datasheet says that: (Sorry I did not see that).

The collector-current rating of a single Darlington pair is 500 mA.
The Darlington pairs can be paralleled for higher current capability.

The datasheet says that, go head and connect the buffers in parallel
following the rules of figure 14 and figure 15 of the TI datasheet.

To put resistors on each output to ensure the current does not go above
an acceptable level is a good idea. (For the buffers and for the diodes
if they are not matched).

Best regards,

Luciano

Christopher4187
- 29th September 2006, 01:58
Luciano,

Thanks for pointing out the pin 9. I setup one of my alarms to cycle the relays every second and I measured the voltage when the field collapses. Based upon what we discussed here, I should have expected this. The voltage when the field collapses is 64 volts but when pin 9 is connected, it is only 12.5 volts. Of the 90 units I have in the field, none of them have pin 9 connected. I guess it is not a matter of if but when they will fail.

I will let this test alarm cycle until the ULN2003A fails. At least I will have an idea when I should expect them be returned for warranty repair. Also, I will post when the ULN2003A fails if anyone is curious. If there is anything positive to come out of this, at least I caught the issue now with 90 alarms in service as opposed to 1000 alarms in service.

Thanks again for pointing that out. You probably saved me a lot of headaches wondering why my alarms are going to fail in the future!

Luciano
- 29th September 2006, 19:07
Hi,

Some interesting stuff.

http://www.circuitcellar.com/library/details/0999/c99cdpdf.pdf
http://www.circuitcellar.com/library/details/1099/c109cdpdf.pdf
http://www.circuitcellar.com/library/details/1299/c1299cd.pdf

(In the first link they talk about the ULN2003A).

Best regards,

Luciano

Christopher4187
- 29th September 2006, 23:01
Thanks for the info. I actually read this yesterday when doing a search on the ULN2003. My test alarm has been cycling on and off for over 21 hours and has simulated 11 years (26,000 cycles) of operation. The ULN2003 and the relays are still working great; it's not what I would have expected without connecting pin number 9.

Christopher4187
- 16th October 2006, 23:22
Just a follow up to all that are interested.

I tested the ULN2003 with the PB-110ND, with and without pin number nine connected. Both tests ran 30,000 cycles with no problems. Strange but everything works fine. I guess I answered my own question!

sougata
- 17th October 2006, 05:06
Hi,

1. The peak cuurent of a single array is 500ma and if your application needs for you can parallel the outputs. Keep in mind not to exceed the overall dispation of the device. Thus it is technically possible to parallel outputs for higher peak current at a lower duty cycle . For constant driving (100% duty cycle) it doesn't make much sense to parallel outputs as it will increase the overall dissipation of the device.

2. When you turn off a relay the voltage collapses much rapidly than the magnetic field in the coil and is manifested as a large reverse peak voltage [read BACK EMF]. This could kill the transistor array as it is likely to exceed the VCEO (collector emitter voltage) of them. So the clamping diodes come handy to eat this up. You can find in the datasheet that the clamping diodes can handle upto 2.5A (Iok). But to complete the circuit you need to connect them to the other pin of the relay coil which is most likely to be the relay supply. Thus connecting pin 9 to the supply completes the figure. The peak current through the clamping diodes would be high but for a short time and would not let reverse voltage buildup (limited to diode voltage).

So Chritopher it is always a good idea to connect the clamping diodes (pin 9). It does not mean essentially that your transistors will fry immmediately but may reduce operation life.

As for personal experience I use the ULN2803 in my designs. They are neat, saves PCB space and reliable. I parallel the ouputs in my LED Matrix design with no problem as the duty cycle is much less. In your application I suggest the use of pin 9 and you can rest assure that for a coil current of 77ma your product will not fail. You can parallel the outputs if you like. Even if you leave your unused input floating the transistors are unlikely to switch on as they have inbuilt base to emitter resistors. But as Luciano suggested it is a good paractice to gnd your unused inputs.

rwskinner
- 27th November 2006, 04:10
I've been using ULN2803's on about 200 systems for 3 years now driving 24 volt relays which mine require 80 ma, using only the ULN2803's onboard freewheeling diodes and had absolutley no problems.

But I most likely have been lucky according to what you folks are saying.

The only problem I had was when they drive filliment type lamps, the element burns out, shorts, and causes 24 volts to directly sink via the 2803 and fry it.

We're going to fix that by limiting the current going to the 2803 for protection.

mvs_sarma
- 27th November 2006, 09:28
I've been using ULN2803's on about 200 systems for 3 years now driving 24 volt relays which mine require 80 ma, using only the ULN2803's onboard freewheeling diodes and had absolutley no problems.

But I most likely have been lucky according to what you folks are saying.

The only problem I had was when they drive filliment type lamps, the element burns out, shorts, and causes 24 volts to directly sink via the 2803 and fry it.

We're going to fix that by limiting the current going to the 2803 for protection.
Hi
what is the wattage of the filament lamps you are trying to drive with ULN2003--
the issue is with cold resistance of filament lamp and the surge currewnt that flows before the filament becomes HOT-- the driver device should haVE DOUBLE THE CAPACITY OF THE INRUSH CURRENT II believe.

rwskinner
- 28th November 2006, 00:19
Hi
what is the wattage of the filament lamps you are trying to drive with ULN2003--
the issue is with cold resistance of filament lamp and the surge currewnt that flows before the filament becomes HOT-- the driver device should haVE DOUBLE THE CAPACITY OF THE INRUSH CURRENT II believe.

It's not an overload issue, well, it is, but not caused by normal operation. It's when a lamp burns out and we get unlucky enough that the element rolls around or puddles and causes a direct short. We have done two things to stop this.

1) Changing all the Lamps with LED replacements
2) Active current limiting circuit

When I was researching 2803's "after" the fact, I found that lots of arcade games used them to control light arrays, and they too had many problems with lamps shorting and burning up the 2803. There were some pretty neat ideas on the net on how to avoid it.

mvs_sarma
- 28th November 2006, 19:23
Hi Rwskinner

If the failure rate is not high and things are running-- i feel no need to change ULN2003 unless it gives you an advantage-- like cost reduction-- etc,

perhaps you need not change for technology upgradation - as far as failure is occasional and tolerable without letting reputation down-- please continue

even the diode matrix inside need be used only when load is inductive like a relay coil.