Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

REAL NOOB: I want to trip a relay based on voltage

Status
Not open for further replies.

davedave1234

New Member
I want to be able to trip a relay every time a line hits say 3VDC but I want to be able to change the voltage that it reacts to. Do I need to use a processor of some sort or is there a way to do this with resistors and pot's? It will be used in a car so I will need the relay to run off of a 12VDC line but react to a Throttle Position Sensor (TPS) that is 0V - 4.5VDC. I will need it to not pull any power from the TPS just use it as a tap to know when to flip the relay. What is the easiest way to accomplish this? I am mechanically capable and pretty good at soldering but I am not so good at designing, it has been at least 10 years since my digital/analog electronics classes in college.

Any Help would be greatly appreciated,
Dave
 
LM339 voltage comparator IC chip, with an NPN transistor to drive the relay. If you can wait a few hours, I can help you with a circuit.
 
Last edited:
What supply voltage do you have available? What type of relay? Do you need some hysteresis (so the relay doesn't chatter)?
 
Thank you for helping out, sorry it took so long to respond but I got involved in some personal stuff last night and couldn’t get to a computer.

It is for a car so it will have 12vdc for the main supply voltage and the voltage I want it to respond to will be 0-4.5vdc (hopefully selectable with a pot or something). I will need some hysteresis because chatter could really screw some things up. And a dry contact capable of handling 12vdc.

EDIT: so I looked up the LM339 and from what I can gather I can connect the regulated 5v (stepped down from 12v) supply from the car to pin 3 for the reference 5v and then ground to pin 12, then the input from the TPS to pin 5 and ground again to pin 4 and then the output from pin 2 to the transistor to drive the relay? I got that from this picture. **broken link removed** Am I on the right path? Or completely lost? :)

Thanks again,
 
Last edited:
That is a very good explanation of the basis for your circuit.

Another design issue: While your car is running, the voltage regulator in the charging system will keep the battery voltage between 14.0V to 14.5V. A simple voltage divider can reduce this to the reference voltage against which the TPS signal will be compared. However, that reference voltage would have the same percentage fluctuation as the battery voltage, i.e. when the battery goes from 14.0 to 14.5, the reference voltage would go from 4.00V to 4.14V, so if that is compared to the TPS voltage, there would be a slight shift in the trip point. Is that enough of a shift to warrant regulating the reference voltage?
 
Here is my hack at it. Pot adjusts the trip point form 0 to ~4.4V. Relay is pulled in if V(TPS) > V(ref). Relay coil is 12V, >100Ω. Loading of TPS is ~1uA. Zener regulates trip point. Has modest amount of hysteresis.
 

Attachments

  • TPS.png
    TPS.png
    50.7 KB · Views: 346
Last edited:
Thanks for the drawing, it looks to be perfect, I will try to get all the parts today or tomorrow from the local electronics store and let you know. You have been a really big help and I appreciate it. From what I am seeing the D1 is the Zener Diode and is limiting the ref voltage, correct? Just so I understand what I am looking at.
 
Last edited:
Yes, I designed it around an 8.2V Zener. If you have trouble getting one, with a few resistor changes, we could use one between ~5.6V and 9V. The Zener is also protecting the LM339 against transients coming from the car...

You realize that the "drawing" is actually a running simulation using LTSpice?
 
Last edited:
Thanks again, I will see what I can come up with and let you know.

Yes I did notice that it was a running sim and was going to ask what software it was but forgot.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top