CrazyEngineers Archive
Old, but evergreen and popular discussions on CrazyEngineers, presented to you in read-only mode.
@PrinceTan • 06 Nov, 2012
Hi fellow CEians,

I have a project currently requiring to compare a voltage to 24V reference and it must trigger a relay output when the input voltage is lower than 24V reference. Both voltages are DC supply. I planned to use LM393 and provide it with the same 24V reference as supply. Can it be done? Does the parameter of input common mode voltage range affect my application? I'm guessing it does, meaning I need to use a voltage divider to drop both input and reference voltage to below 24V? Any help is appreciated.

Regards,
Prince.
@arunchary • 08 Nov, 2012 yes it can be ,please follow the circuit as in pdf
@Vishal1485 • 09 Nov, 2012 can't get your terms because you seems to use comparator and then reference voltage as 24V. then relay would be triggered when the input voltage threshold voltage or reference
voltage
@PrinceTan • 12 Nov, 2012 I wanted to compare an input voltage (variable voltage from a battery, around 24V) to a reference voltage of 24V dc which will also serve as the supply voltage to the comparator. Then the output will be on (trigger the relay) when the input voltage (from battery) is lower than the reference voltage of 24V.
@PrinceTan • 12 Nov, 2012
arunchary
yes it can be ,please follow the circuit as in pdf
Dear Mr. Arunchary
Do you mind explaining why does it have to be that complicated? Can I just connect the relay to the output of the comparator, LM393; and have the 24V reference connected to the non-inverting terminal while the input voltage connected to the inverting terminal? Sorry I don't know how to draw out the circuit and post it here. I'm just an engineering student with little to no experience in constructing analog circuits.

On another note, a comparator or op-amp with 24V supply cannot accept a 24V input through either of the differential inputs right? That is defined by the input differential common mode voltage range is it?
Regards,
Prince.
@arunchary • 12 Nov, 2012 thank you Mr prince u r the engineering guy, sorry for that ,i dont know u know better than me, and one more thing i had given an idea more over its not lm339 its lm358 and lm339 can be operated till 24v,please go through the data sheet there its mentioned till vcc we can compare the voltage.any ways its not my advice or suggestion, i did an experiment on proteus simulator,.. circuit diagram which i tested is mentioned in pdf. thank you
regards
arun.
@PrinceTan • 13 Nov, 2012
arunchary
thank you Mr prince u r the engineering guy, sorry for that ,i dont know u know better than me, and one more thing i had given an idea more over its not lm339 its lm358 and lm339 can be operated till 24v,please go through the data sheet there its mentioned till vcc we can compare the voltage.any ways its not my advice or suggestion, i did an experiment on proteus simulator,.. circuit diagram which i tested is mentioned in pdf. thank you
regards
arun.
Dear Mr. Arunchary
I get the impression that you are not very happy when you type the reply, maybe its just me. But I am indeed blur about this, and that is the reason why I posted here SEEKING FOR HELP. Most circuits I found online are quite complicated like the ones you posted and I ended up scratching my head wondering why all the extra components are needed. If you don't feel like babysitting me, I wouldn't mind it as well. Thanks again anyhow for the reply and the circuit.
Regards,
Prince.
@PrinceTan • 16 Nov, 2012 Can anybody please answer this question: Can a voltage comparator (or op-amp) IC like LM393 or LM358's output directly be fed into driving a 24V relay? This is the problem that I encountered: I fed reference voltage into non-inverting terminal while the voltage that I intend to compare is fed into the inverting terminal. I had a voltage divider to drop both input voltages down to half of the supply voltage and directly fed the output through a resistor to a 24V relay. But I get 0V output all the time. There's nothing wrong on the pin connection, I also checked to see that the comparator received the correct voltages at all points. If you don't mind babysitting me, please do reply; thanks in advance.
@Jeffrey Arulraj • 17 Nov, 2012 Why not implement a zener diode in the input side to serve such a purpose
@Jeffrey Arulraj • 17 Nov, 2012 I am not a great expert in this field but friends just solved this issue I guess here is his word verbatim

Not sure what your actual circuit is, but LM393 has an open collector output, the output voltage will be always 0 unless you connect a pullup. With exact equal input voltages, the comparator output will reflect the offset voltage. There should be at least a small voltage difference. To control a relay, you'll usually want to add hysteresis to the comparator circuit to avoid relay chatter.​
Hope this clears you my friend
@Jeffrey Arulraj • 17 Nov, 2012 The comparator will give 0 V which is the difference between the two ip Voltages that is what He means

I think you get it

Other wise post the schematic then I can be of a little more help to you
@grsalvi • 17 Nov, 2012
PrinceTan
Hi fellow CEians,

I have a project currently requiring to compare a voltage to 24V reference and it must trigger a relay output when the input voltage is lower than 24V reference. Both voltages are DC supply. I planned to use LM393 and provide it with the same 24V reference as supply. Can it be done? Does the parameter of input common mode voltage range affect my application? I'm guessing it does, meaning I need to use a voltage divider to drop both input and reference voltage to below 24V? Any help is appreciated.

Regards,
Prince.
I cant help you much with comparator and transistor part,but as far as
relay is concerned , read below :
relay


Please refer to circuit above.

a) The point B and point A of relay is connected to circuit which you want to control
by closing and opening relay.

b) Through point 1 ,we feed DC voltage which energies coil of relay labeled number 2.
Whenever a 12V DC is fed into this coil (2) ,the relay switch (6) is closed ,hence
closing circuit and completing the main circuit (which you connected to point B and point A) .

c) Now how to control closing and opening of relay switch (6) ???
For that a transistor is connected in series with relay coil (2). The transistor is labeled (3).

d) So ultimately , you can control relay by switching ON or OFF transistor (3).

e) You have to give a small signal to base of Transistor (3), to turn it ON or OFF .
In Our case we would give it through PLC.

f) You can use anything to supply a small signal enough to turn ON transistor.
This signal is fed at point (4).

f) As base of transistor gets signal,transistor current flows and the relay coil circuit (2) gets
completed.
This eventually closes relay switch (6).


If this concept fits with your project and you have doubts ,feel free to ask here.😀

Note :i) don't search for label 5 , i skipped it by mistake.😉
ii) The relay is electromagnetic type.
@PrinceTan • 19 Nov, 2012
jeffrey samuel
I am not a great expert in this field but friends just solved this issue I guess here is his word verbatim


Hope this clears you my friend
Dear Mr. Jeffrey Samuel,

Yes, I did connect a 2k7 resistor to act as a pullup. Still there's no output. I even attempted to connect the output to a transistor acting as a switch to activate the relay, still, no results. A friend of mine helped me do similar testing and the output even shows negative voltage. I'm so lost. However, I do note something: when the inverting input > non-inverting input, I measured 1.7M ohm resistance on the output side; when the non-inverting input > inverting input, the output resistance is measured to be 110 ohm. Is it possible that all 3 IC that I purchased are all faulty? Anyways, I appreciated your feedback. Thanks.

Sincerely,
Prince.
@PrinceTan • 19 Nov, 2012 • 1 like
grsalvi
I cant help you much with comparator and transistor part,but as far as
relay is concerned , read below :
relay


Please refer to circuit above.

a) The point B and point A of relay is connected to circuit which you want to control
by closing and opening relay.

b) Through point 1 ,we feed DC voltage which energies coil of relay labeled number 2.
Whenever a 12V DC is fed into this coil (2) ,the relay switch (6) is closed ,hence
closing circuit and completing the main circuit (which you connected to point B and point A) .

c) Now how to control closing and opening of relay switch (6) ???
For that a transistor is connected in series with relay coil (2). The transistor is labeled (3).

d) So ultimately , you can control relay by switching ON or OFF transistor (3).

e) You have to give a small signal to base of Transistor (3), to turn it ON or OFF .
In Our case we would give it through PLC.

f) You can use anything to supply a small signal enough to turn ON transistor.
This signal is fed at point (4).

f) As base of transistor gets signal,transistor current flows and the relay coil circuit (2) gets
completed.
This eventually closes relay switch (6).


If this concept fits with your project and you have doubts ,feel free to ask here.😀

Note :i) don't search for label 5 , i skipped it by mistake.😉
ii) The relay is electromagnetic type.
Dear Mr/Mrs grsalvi,

Thank you for the detailed explanation. I am aware of the transistor usage for switching on and off the relay. Have taken this into consideration when troubleshooting the comparator circuit but still, no positive results. Either I have damaged the comparator IC by reversing the polarity (which I'm quite sure I haven't) or all 3 IC that I have purchased are faulty.

Sincerely,
Prince.
@Jeffrey Arulraj • 19 Nov, 2012 Faulty IC's are so lame just test individual IC's if they are working or not.

Then pls put the circuit you are using then we can help you more easily ..
@PrinceTan • 20 Nov, 2012 Dear all CEians,

I have successfully got the circuit up and running. My final circuit uses LM358 as the LM393 output is open drain configuration and I don't know how to use it to perform my requirements. Will upload the circuit sometime later as I can't upload it using this current computer. Thanks so much for those who care to enlighten me on this matter, I appreciated it very much.

Regards,
Prince.
@PrinceTan • 21 Nov, 2012 Here it is as promised.. Hope this can help others..
@Shadn • 11 May, 2015 Hi all,

I have a also a similar problem. I have got two voltage sources in my circuit; a 9V Battery and a super-cap charged by a solar cell which provides about 5 V. I need a comparator circuit which always pick and connect the higher voltage as the power supply of the circuit. (Infact it must switch to the super-cap as the battery is below 5V).
Can I use the same circuit?
Hi all,

I have a also a similar problem. I have got two voltage sources in my circuit; a 9V Battery and a super-cap charged by a solar cell which provides about 5 V. I need a comparator circuit which always pick and connect the higher voltage as the power supply of the circuit. (Infact it must switch to the super-cap as the battery is below 5V).
Can I use the same circuit?
@Shadn • 11 May, 2015 Hi all,

I have a also a similar problem. I have got two voltage sources in my circuit; a 9V Battery and a super-cap charged by a solar cell which provides about 5 V. I need a comparator circuit which always pick and connect the higher voltage as the power supply of the circuit. (Infact it must switch to the super-cap as the battery is below 5V).
Can I use the same circuit?
7.9k views

Related Posts

@Dipankar Ganguly · Nov 13, 2017

The Facebook-owned WhatsApp Messenger with around 1 billion users in over 180 countries, is the most popular cross-platform instant messaging service for smartphones. It offers a lot of useful features...
11k views

@Abhishek Rawal · Aug 19, 2013

Few days back, I switched to latest Elementary OS Luna, elegant-beautiful-most stable distro I've ever used after Linux mint. I am seriously in love with this distro, even though it...
6.8k views

@avii · Mar 9, 2012

I like to know career opportunities for BE, CSE passouts in Gov Sector. So far I have found out these : NIC​DRDO​OFB​HAL​ONGC​NTPC​GAIL​INDIAN OIL CORPORATION​
27.9k views

@madhu27 · Jul 5, 2013

Hi... I'm a final year EIE student. My interest is in the field of image processing. Here are some other ideas which came to my mind. Do these already exist?...
4.7k views

@Ankita Katdare · Sep 15, 2014

Just as promised, Spice Mobility Ltd. is going to launch its first Android One phone in India with 'Spice Android One Dream UNO Mi-498' - a phone with an abnormally...
4.4k views