Driving bank of 12vdc relays with a UL2803a - Page 1
Forum section: electronics / beginners

author: K1JOS
author_rank: Regular Contributor
timestamp: February 13, 2017, 04:01:58 pm
content: I want to add some relay control (four 12vdc relays drawing about 20mA per relay) to an existing basic stamp (BS2) device. I only have two remaining output pins output on the BS2 so I was going to add a 74HC139a that will increase my output options to 4. I was thinking of then taking the 74HC139 outputs directly to a Darlington array like a ULN2803a. I am picking these parts because that's what I have in my parts box. However, the maximum output current per pin for the 74HC139 is 25ma which seems too narrow a margin. Should I add a 74HC240 driver between the ULN2803A and 74HC139a or is that overkill?Jerry NY2KW

author: Buriedcode
author_rank: Super Contributor
timestamp: February 13, 2017, 04:48:59 pm
content: The 74xx139 has active low outputs - they default to high when not selected. And the ULM2803 like most darlington transistor arrays are NPN, active high. So unless you want all relays to be on, except the one selected, you'll need to invert the signals. Although harder to find the 74HC238 has active high outputs.As for the ULN2803 requiring higher input current? naa 25mA is more than enough if you're switching 20mA per relay. The initial current will be higher but for the most part, TTL is fine for driving these darlington arrays.So, plenty of options. You have two IO's and want to drive 4 relays. The darlington arrays are pretty standard for this, just a question of the 2-4 decoder/line selector.

author: Benta
author_rank: Super Contributor
timestamp: February 13, 2017, 04:51:51 pm
content: The ULN2803 inputs draw around 1 mA each, no reason to worry. But the inverting logic is an issue. Since it's only 4 lines, you could place inverters or NAND/NOR gates before the ULN.

author: K1JOS
author_rank: Regular Contributor
timestamp: February 13, 2017, 05:25:23 pm
content: thanks for the quick replies. To keep chip count down, is there a different 2 to 4 line decoder other than the 74HC239 who has a logic that has active high outputs so I can go direct to the ULN2803A?Jerry

author: Ian.M
author_rank: Super Contributor
timestamp: February 13, 2017, 06:02:08 pm
content: Use a 74HC595 controlled by the BS2's SHIFFTOUT command to provide eight latched, individually controllable outputs. Its DS pin (14: serial data in) would be driven by the SHIFTOUT Data pin, its SH_CP pin (11: shift clock) by the SHIFTOUT Clock pin, and its ST_CP pin (12: store clock AKA latch) driven via Schottky diode, cathode to the Clock pin, feeding ST_CP with a small capacitor to ground and a pullup resistor with a RC time constant such that it ignores the short high going pulses between bits of the byte sent by SHIFTOUT.Start with the Clock pin high, do the SHIFTOUT to transfer the byte to the '595 then set the Clock pin back high and the '595 will transfer the byte to its output pins approximately one RC time constant later. without the need for a separate BS2 pin to control latching the data byte.

author: Zero999
author_rank: Super Contributor
timestamp: February 13, 2017, 06:38:13 pm
content: Quote from: K1JOS on February 13, 2017, 04:01:58 pmQuote from: Benta on February 13, 2017, 04:51:51 pmYes, there is not need for any additional buffering. I think the original poster is confusing the input current with the output current. The maximum input current for the UL2803A at 5V is 1.8mA. See figure 18 on page 10 of the data sheet.http://www.st.com/content/ccc/resource/technical/document/datasheet/e4/fa/1c/16/4e/39/49/04/CD00000179.pdf/files/CD00000179.pdf/jcr:content/translations/en.CD00000179.pdf