To detect 12V using Opamp

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

Discussion Overview

The discussion centers around detecting a 12V supply using an LM358 op-amp, with additional considerations for detecting CAN signals. Participants explore circuit designs, the appropriateness of using op-amps versus comparators, and the implications of various component choices for LED indicators.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Experimental/applied

Main Points Raised

  • One participant proposes using the LM358 op-amp to detect a 12V supply and drive an LED, selecting 3V as a threshold for detection.
  • Another participant notes issues with using the same 12V supply for the op-amp, suggesting that it leads to self-referential logic and may not function correctly if the supply is absent.
  • Concerns are raised about the input voltage levels being outside the common mode input specifications for the LM358, particularly near the positive supply rail.
  • Some participants argue that op-amps are not ideal for comparator functions, suggesting that a comparator might be more suitable for digital signal detection.
  • Alternative circuit designs are proposed, including using a current regulator and an LED instead of an op-amp.
  • Participants discuss the need for clarity on what exactly is being measured, including whether the goal is to detect supply voltage or signals on a data bus.
  • One participant expresses that there is no particular requirement for precision, only the need to indicate whether 12V is available or not.
  • Another participant suggests using a filament lamp instead of an LED, while others counter that LEDs are more modern and reliable for this application.
  • Clarifications are requested regarding the specific application context, including the nature of the signals being monitored and the intended use of the detection circuit.

Areas of Agreement / Disagreement

Participants express differing opinions on the use of op-amps versus comparators, the necessity of precision in detection, and the choice of components for the circuit. No consensus is reached on the best approach, and the discussion remains unresolved regarding the optimal design for the detection circuit.

Contextual Notes

Participants highlight limitations related to the common mode input range of the LM358 and the appropriateness of using op-amps for the intended application. The discussion also reflects varying assumptions about the requirements for the detection circuit.

Who May Find This Useful

This discussion may be useful for individuals interested in circuit design for voltage detection, particularly in automotive applications or for those exploring the use of op-amps and comparators in practical scenarios.

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.
 
  • 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
6K
  • · 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