Need hardware advice: ULN2003A


Closed Thread
Page 1 of 2 12 LastLast
Results 1 to 40 of 50
  1. #1
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425

    Default Need hardware advice: ULN2003A

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    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.
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  3. #3
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    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.

  4. #4
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default 77mA - Still a problem?

    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

  5. #5
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Chris,

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


    ----------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  6. #6
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default

    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.

  7. #7
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    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.
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  8. #8
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default Good idea!

    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?

  9. #9
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    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.


    ------------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  10. #10
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default

    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

  11. #11
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Post

    Your thinking is "technically" correct of course.

    Practically it "should" be correct. Since Melanie has a practical experience, so I say go for it.
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  12. #12
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    if you only use 2 driver... why not using SOT transistors/Mosfet instead?
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  13. #13
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default

    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.

  14. #14
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    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.

    -----------------------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  15. #15
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    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

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

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  16. #16
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default

    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?

  17. #17
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    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
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  18. #18
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    I quote myself "go for it"
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  19. #19
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default

    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?

  20. #20
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    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).


    (Click to enlarge the picture)


    (Click to enlarge the picture)

    Best regards,

    Luciano
    Last edited by Luciano; - 27th September 2006 at 12:57.

  21. #21
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    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.
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  22. #22
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    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

  23. #23
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default

    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?

  24. #24
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    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)


    (Click to enlarge the picture)

    (About SMD package)

    (Click to enlarge the picture)
    Last edited by Luciano; - 28th September 2006 at 09:38.

  25. #25
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default

    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.

  26. #26
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    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
    Last edited by Luciano; - 28th September 2006 at 10:36.

  27. #27
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Christopher4187
    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
    Keith

    www.diyha.co.uk
    www.kat5.tv

  28. #28
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    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.
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  29. #29
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default

    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!

  30. #30
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    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

  31. #31
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Luciano
    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.
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  32. #32
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default

    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.

  33. #33
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    With your example Chris,

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



    ---------------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  34. #34
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default

    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.

  35. #35
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Ok. I see.

    So what did you do?
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  36. #36
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default

    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.

  37. #37
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Christopher4187
    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.


    (Click to enlarge the picture)

    Best regards,

    Luciano
    Last edited by Luciano; - 28th September 2006 at 22:42.

  38. #38
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Really interesting stuff I have been learning ....
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  39. #39
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default

    @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.

  40. #40
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default

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

Similar Threads

  1. Need "PIC16F84A" Controler schematic Advice...
    By Kyo_89 in forum Schematics
    Replies: 1
    Last Post: - 27th May 2009, 23:03
  2. Hardware I2C
    By Kamikaze47 in forum mel PIC BASIC Pro
    Replies: 21
    Last Post: - 13th March 2008, 13:24
  3. using hardware ports
    By sebapostigo in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 19th November 2007, 22:01
  4. Advice needed on 'neat' Project!
    By vacpress in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th February 2007, 06:21
  5. PBP hardware oriented?
    By mpavlica in forum PBP Wish List
    Replies: 7
    Last Post: - 15th June 2005, 06:18

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts