To detect 12V using Opamp

  • Thread starter Thread starter PhysicsTest
  • Start date Start date
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
17 replies · 2K views
PhysicsTest
Messages
260
Reaction score
27
TL;DR
i want to detect 12V supply is ON or OFF using the operational amplifier
I want to detect the 12V supply using the LM358 opamp, the schematic is as below and i also want to drive the LED. I have attached the asc file. As of randomly i have selected 3V for 12V detection.
1743152533044.png


Similar circuit i want to use for detecting the CAN signals, the CAN_H voltage is 3.5V and CAN_L is 1V and turn ON the LED accordingly. Please let me know if the above circuit works.
 

Attachments

Engineering news on Phys.org
When simulating i observed that i cannot use the same 12V supply, i have updated as
1743154459830.png

another 12V supply which is the actual signal. I get output as 10.8V.
 
There are a few problems.
1. You are using the 12V supply for the op-amp. If the supply is not there, the op-amp will not work. This is what I call self-referential logic.
2. The input to the (+) input is from the supply rail, which is probably outside the common mode input specs of the intended LM358 op-amp. The LM358 works well near the neg supply rail, not well within 2 volts of the pos supply rail.
3. Op-amps do not work well as comparators. Op-amps like their input voltages to be within about 100 mv of each other. Comparators don't care what the inputs do.

There is probably no need for an op-amp here. It could be done with a current regulator and an LED.
 
Reply
  • Like
Likes   Reactions: PhysicsTest
Can i use the below circuit
1743154939921.png

with 10K resistor (for low current consumption) and when 12V is available the LED will be ON.
 
PhysicsTest said:
Can i use the below circuit ...
Yes.
The LED will start to glow at about 3 volts and get brighter as the supply voltage rises.
 
Reply
  • Like
Likes   Reactions: PhysicsTest
To detect CAN-H and CAN-L is properly communicating i need to verify if the CAN-H line at 3.5V and CAN-L line at 1V. I will use the below 2 circuits
1743155801110.png

will it be ok? For D2 the forward voltage drop i will select as 0.7V.
 
1743157760570.png


I actually mean to put an LED in place of Diode i took wrong part number from LTSpice. I never intended to put a diode.
 
To detect 12 volt B+, CAN-Hi and CAN-Lo, will require different circuits.
Are you trying to detect a missing CAN signal with an LED indicator?
 
Yes i will have different circuits, this is basically for field support in the vehicles under break down to get an idea if voltage is in the expected range for persons without technical background.

1743158250372.png
 
Why do you want to use an op-amp to do this?
Here's an alternative:
1743218225891.jpeg

You might just leave out the zener if you really only care about on/off.

Normally, this sort of digital signal would use a comparator instead of an op-amp. If I thought I needed op-amp features, then I would include some positive feedback/hysteresis. But, then, I don't really know what your application requires. If you want a simple approach to precision, look into the TL431. It's a great, old, common, and cheap part for this sort of circuit. If you don't use it here, you'll probably want to use it another time.

At the other end of the spectrum, there are ICs designed to monitor PS voltages accurately for microprocessors and such. They are nearly as cheap as an LM358.

https://www.ti.com/lit/an/slva987a/slva987a.pdf?ts=1743140609250
 
Reply
  • Like
Likes   Reactions: PhysicsTest
DaveE said:
Why do you want to use an op-amp to do this?
When i thought of comparing with 12V then i got the idea of op-amp, there is no particular reason to use op amp.

What range? What precision?

I only want to check if 12V available or not, there is no particular requirement of precision. I want to turn on LED if 12V is available and OFF if 12V not available.
 
PhysicsTest said:
I only want to check if 12V available or not, there is no particular requirement of precision. I want to turn on LED if 12V is available and OFF if 12V not available.
That is a good application for a 12 volt, 5 watt, filament lamp.
 
Baluncore said:
That is a good application for a 12 volt, 5 watt, filament lamp.
Near 1/2 Amp to detect signal on a data bus?

Or is the test to see if there is a 12V supply to the circuit?

Or something else?

Can not really tell from the original question.

@PhysicsTest, can you please clarify where/what you want to measure -
1) supply voltage to the bus driver and receiver
2) the signals on the data bus while in normal operation
3) signals on the data bus when is some sort of test mode
if so, please define the test mode​
4) if something else, please detail it

The more information you can supply us, the better we can help you.

Thanks,
Tom
 
Baluncore said:
That is a good application for a 12 volt, 5 watt, filament lamp.
Expensive, failure prone, and aren't standard for pick and place machines. Better off with an LED and resistor, IMO. You pretty much won't find incandescents on the front panel of anything designed in the last 20-30 years.
 
The application is in a commercial vehicle where many ECUs are connected and in case the vehicle is break down, the first thing is to ensure that 12V is coming to all the ECUs, so open each ECU connector identify the pins where 12V shall come, then insert the detection circuit with 2 wires (which is planned to do) one in positive and the other ground and verify with LED if the 12V supply is coming or any loose contact.