To detect 12V using Opamp

  • Thread starter Thread starter PhysicsTest
  • Start date Start date
Click For Summary
SUMMARY

The discussion centers on detecting a 12V supply using the LM358 op-amp, with additional considerations for monitoring CAN signals. Key issues identified include the inappropriate use of the op-amp for voltage detection, as it operates poorly near the positive supply rail. Participants suggest alternatives such as using a current regulator with an LED or employing a TL431 for better precision. The consensus is that simpler circuits can effectively indicate the presence of 12V without the complexity of op-amps.

PREREQUISITES
  • Understanding of LM358 op-amp specifications
  • Knowledge of LED forward voltage characteristics
  • Familiarity with CAN signal voltage levels
  • Basic circuit design principles for voltage detection
NEXT STEPS
  • Research the use of TL431 for voltage monitoring applications
  • Explore current regulator circuits for LED indicators
  • Learn about comparator circuits as alternatives to op-amps
  • Investigate best practices for designing simple voltage detection circuits
USEFUL FOR

Electronics engineers, automotive technicians, and hobbyists involved in vehicle diagnostics and circuit design will benefit from this discussion.

PhysicsTest
Messages
256
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.
 
  • 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.
 
  • 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.
 
Where is the LED in the circuit?
I think you are forgetting that a couple of volts will be dropped across an 'on' LED.
 
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?
 
  • #10
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
 
  • #11
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
 
  • Like
Likes   Reactions: PhysicsTest
  • #12
PhysicsTest said:
in the expected range
What range? What precision?
 
  • #13
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.
 
  • #14
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.
 
  • #15
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
 
  • #16
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.
 
  • #17
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.
 
  • #18
Then the circuit by DaveE in post #11 above would do the job.
https://www.physicsforums.com/posts/7251874

I would suggest that their be a connector on your test circuit to mate with the cable connector. That way you are not depending on the operator to get the right pins.

Cheers,
Tom
 

Similar threads

  • · Replies 32 ·
2
Replies
32
Views
5K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 8 ·
Replies
8
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 15 ·
Replies
15
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K