Driving Relays with TTL logic

GroupDIY Audio Forum

Help Support GroupDIY Audio Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

RSRecords

Well-known member
Joined
Jun 8, 2009
Messages
320
Trying to wrap my head around using a uln2803 or uln2003 to control a series of normally open relays.
I need to energize the relay from a TTL low signal (0V).
TTL output is normally 5v but goes low when activated . Anybody have a schematic where something like this is done?

I'm trying to avoid using more components to invert the TTL signal.

Thanks!
 
TTL outputs are normally high for true and low for false. What exactly are you driving the ULN2003 with?

A high output will turn on the Darlington and energise the relay.

Cheers

Ian
 
Have you considered using digital drive? I have used L9823 in two projects with great results. It is 5V with sinks like you're looking for. But it is SPI so you would need a controller. But if you have more than 20 or so relays it's almost a must because you can control many relays from one bus which drastically cuts down on control lines. I use little 8 conductor FPC cables for data (not the fat IDC ones) and it's all very compact.
 
Thanks guys.

Control unit is a for remote control. The receiver uses TTL but is low activated. I'm trying to control an system that is -15v activated. Seven relays total.  I just threw a schematic together of what I was thinking but I don't think it's that simple.
 

Attachments

  • uln20035vrelay.pdf
    10 KB · Views: 30
JohnRoberts said:
you could drive the low side of a 5V relay...  so logic high is off, logic low is on.

JR

Ok, that's kind of what I was thinking. Would that be accomplished like the schematic I posted or am I just way off base here?
 
RSRecords said:
Ok, that's kind of what I was thinking. Would that be accomplished like the schematic I posted or am I just way off base here?
did you try reading the data sheet for the uln2003?  It is inverting  (that's what the little circle means after the triangle). So logic low input would he high impedance (off) output.

You mention TTL logic, what is the impedance of your relay? You might be able to drive it directly with TTL as I first posted if it only draws modest coil current.

JR

 
JohnRoberts said:
did you try reading the data sheet for the uln2003?  It is inverting  (that's what the little circle means after the triangle). So logic low input would he high impedance (off) output.

You mention TTL logic, what is the impedance of your relay? You might be able to drive it directly with TTL as I first posted if it only draws modest coil current.

JR

I did look at the data sheet but I didn't realize the uln2003 is inverting. That makes more sense and should work for my needs. I should probably just pick up a few and experiment.

I tried to drive the relay with the TTL output but it didn't work. 

I really appreciate the help.
Thanks,
 
Interesting but I was hoping to avoid the discrete approach since ultimately there will be 7 relays.
Frustrating thing about this is I know as soon as I settle on a design, I'll discover a chip that does exactly what I need.

Anyway, if the 2003 is connect at the common to +5v, when the input goes low the output should go high, correct?

Which was what I was originally planning but then I realized that chip can only sink current so I'm not sure if the 2003 can handle the task of driving the high side of a relay. I'm not sure where to look in the data sheet for that info.

This sort of design is new territory for me.
I ordered some uln2003s and will be experimenting. Luckily they are about $1/piece!
 
do some more research, there may be a cheap non-inverting relay driver (where second inversion is built in).  Alternately you can drop a simple inverter in front of your inverting driver.

JR
 
JohnRoberts said:
may be a cheap non-inverting relay driver (where second inversion is built in)

https://toshiba.semicon-storage.com/info/docget.jsp?did=30523&prodName=TBD62783AFG
http://ww1.microchip.com/downloads/en/DeviceDoc/mic2981.pdf
 
Maybe a more direct approach:

Screenshot%2Bfrom%2B2018-07-11%2B11-05-19.png


Yes, it's descrete but is that not better than using a bunch of ICs and relays?

I have not even sanity checked this circuit. It could be horribly wrong. This is just a dirty EagleCAD sketch. An opto isolator in place of the PNP would probably important.

UPDATE: p-chan mosfet is drawn upside down and R2 should be more like 22K or mosfet could spuriously flip off if there were a burst of EMI like from a flourescent light switching on.
 
squarewave said:
Maybe a more direct approach:

===

Yes, it's descrete but is that not better than using a bunch of ICs and relays?

I have not even sanity checked this circuit. It could be horribly wrong. This is just a dirty EagleCAD sketch. An opto isolator in place of the PNP would probably important.
Modern manufacturing math has flipped the calculus where more complex ICs can be cheaper to use than inexpensive discrete devices.  Consider a $0.05 cost per pop (touch)...  The 7x5 pops could easily be more expensive than a single driver IC.

For hobby DIY there is a different calculus... the 7x5 discrete components become almost 100 solder connections and opportunities to fail.

The OP is doing the right thing for a different right reason.

JR

PS: I love discrete design and have done tons of it over the decades but then was then and now is now.
 
JohnRoberts said:
Modern manufacturing math has flipped the calculus where more complex ICs can be cheaper to use than inexpensive discrete devices.
It's not about expense. Are you really recommending that he use a mechanical relays where simple mosfet would work fine?
 
Thanks for all the input! I'm sure there is more than one way to skin this cat.

I am using relays mainly because I understand them a little better. I'm open to other suggestions as this is a learning experience for me.
 
RSRecords said:
I tried to drive the relay with the TTL output but it didn't work. 

I really appreciate the help.
Thanks,

Cheap and 'dirty' but you can simply parallel logic to increase output drive - literally solder ics on top of each other. Though not so easy if SMT rather than thru hole. You probably 'shouldn't' - current sharing etc etc but you can  :eek:
 
If you don't explicitly need a relay, then a solid state approach can save space, power, and money.  8)

A year or two ago I built a simple little battery-backup sump pump controller based on a microcontroller. Spent some time struggling to get a relay to work, then finally switched to a MOSFET which worked much better in the application. I was able to switch that with an optoisolator and avoid dealing with all the crap that happens when you switch a big inductive load on and off.
 
So now I've put my foot in a little far... next project is a microcontroller-controlled lamp using those LED "filaments" found in vintage-style bulbs. They run at 80vdc or so, and in the typical bulb there's a bridge rectifier on the 120vac (USA power) producing some 160vdc, into two filaments in series.

In a nutshell, I'm going to want to have a FET switching 160+ DC volts, really not very much current at all (maybe 10 watts = 62mA), at PWM dimming speeds, and from a 3v logic output.  I guess the party starts with an optoisolator.
 

Latest posts

Back
Top