0

I designed a really simple circuit that's supposed to detect when my car is running.

schematic

simulate this circuit – Schematic created using CircuitLab

I expect while the engine is off output to be 0V and when running to switch to ~4.5V or something. What I observe is about right when running but when turned off the output does not drop to 0 but rather stays at between 1.8 and 2.0 volts.

Looking at reasons not to use LM741 I'm suspecting any combination of those may be the cause of this.

Given that my above statement is correct and I haven't made any mistakes in my design, what is a good and also cheap op-amp that I can replace the LM741 with?

php_nub_qq
  • 930
  • 9
  • 30

2 Answers2

3

A LM741 is not suitable for use with 5V supply.

It is not rail-to-rail input or output, you are violating many of its requirements. You need to provide it with both a negative and positive supply to operate as shown.

A single supply device such as LM358 will work better but even then the output will not go to 5V and it also is not rail-to rail input so will not function with the input tie to its own positive supply rail.

As mentioned in the comments, a better solution would be a comparator. the LM393 would be a good fit for this task. It would also need a slightly different circuit with the reference input fed from a voltage within the common mode range (ie not the positive supply rail). As simple divider from the 5V rail would suffice.

Kevin White
  • 33,153
  • 1
  • 48
  • 78
1

The LM393 that you've found should work nicely with some modifications to the circuit.

First, it has an open-collector output -- meaning that it'll pull its output down to 0.2V or so, but you need to use a pull-up resistor to hold the output up.

Second, it only works when its inputs are 2V below its VCC supply. For that circuit, you'd need the negative input to be held at 3V or lower (I'd use a resistive divider down to 2.5V).

You could also go digging some more, for a rail-rail comparator with a push-pull output. It may be that such a device, even if it's more expensive by itself, will save you enough money in extra components and circuit board space to pay the difference.

TimWescott
  • 46,144
  • 1
  • 42
  • 107
  • Thank you so much for the pointers. No doubt you just saved me a lot of head banging. I don't see pulling up and adding some dividers as too much extra work but I'm guessing that's not all that has to be done? As I mentioned, for some reason (probably being a noob) it's really hard for me to find parts that are not super obvious. I'm going to go ahead and try to do it with an LM393 taking into consideration what you have written but in case that doesn't work could you mention an IC that you're referring to as "rail-rail with a push-pull output" – php_nub_qq Apr 02 '20 at 21:59
  • 1
    Also I can just power it with 12V this way I would still be able to use the inputs as they are right now, right? And the output will be at whatever voltage I pull it to so I wouldn't have to worry there. As a push-pull option I found MCP6541 but I'm pretty sure they wouldn't have it in my local store and I'll have to wait for delivery which is quite slow in these circumstances we are in right now.. – php_nub_qq Apr 02 '20 at 22:07