Which Comparator will best suit my needs?

Thread Starter


Joined Feb 26, 2017
Hello all,
First off, what a great site! I've been a lurker here for a while and am finally stumped to where I need to ask a question of my own. Here goes.

I have built an automotive circuit in my drag car, and the 40A bosch relay I'm using, needs a switching supply of 12V @ 30mA.

I am going to use a 0-5v variable output sensor to determine when to close the relay. I need a 12V ignition supply wire that runs into a series of capacitors @ X-ohms to bring the reference voltage down to 5V. Then on that same wire I want to run an adjustable X-ohm potentiometer to scale the reference voltage to an operator set value ~0-5v. This will then go into an on-board LED voltage display for ease of operation.

Here's where I get lost.

The comparator I started with is an LM2903. It seems that I should have V+ be the operator-set reference voltage, and V- be the variable sensor voltage, so any time the the variable sensor voltage exceeds the operater-set voltage, it starts to output. The one issue is, I have to use a TIP120 transistor with this comparator, in order to complete the ground-side of my relay @ 12V DC, 30mA.

Is there a comparator out there, that can take a V+ at operator-set ~0-5V, a V- at actual variable sensor output 0-5V, AND a 12V supply in, so that when V+<V-, it pushes 12V out of the comparator instead? Is that what Vcc supply is for?

Or am I stuck using a transistor....

Thanks in advance, any help is much appreciated.
Most comparators have an open drain/collector output. This is to primarily interface with CMOS logic levels. It also facilitates interfacing with voltages greater than the supply voltage.

You have to be careful about input voltages in instances when the supply is turned off.

In the automotive environment, you have to protect against high positive and negative transients. In modern cars, the transients are lower. -200 and +50 V are common numbers. Reverse polarity (improper jump) is also your responsibility.

This http://www.linear.com/product/LT6700 series might be better for you and it may not be. This has a fixed reference and you may not want that.

Power supplies are not to be tapped as references UNLESS the sensor is ratiometric. A lot of automotive sensors are.
A 0-5V automotive sensor is not really ZERO to 5 Volts. They never reach zero, and never reach 5V.
The scaling is such that 100% is close to the supply voltage. If it's 5.000, it's 5.000, if it happens to be 5.1, it's 5.1 at that instant in time, that's what it is. The AD converters may typically use 1/2 the supply voltage as a reference and that reference is dynamic/

IC's called precision rail splitters exist.

You may be better off using a FET, particularly a logic FET, but the sense of the comparator will change. Always use a gate resistor 100 to 200 ohms is good. If you pull the gate up to say +12 V with a small amount of current (before the 100 ohm resistor), the the FET will be on. The FET needs very little current to turn on. The comparator can turn it off, shunting that current to ground.+ Quote

Are you using your own 5V supply? Is the sensor ratiometric?

So, if you are, you can create a reference by diving the supply voltage, BUT you generally have to buffer it to be compatible with a comparator's input.

Using the car's sensor and 5V supply may be a little more complicated.

You also need diodes on the coils of your relays.

I covered a lot and probably not real well.

Thread Starter


Joined Feb 26, 2017
Thanks for the additional options, I'll have to read into those.

Here's what I was going to use:

The V+ terminal of the comparator, is a separate 12V fused ignition wire that is resisted down to 5V. Then, that now 5V supply wire is connected to a potentiometer to be adjustable from ~0-5V per the operator turning the dial. This adjustable supply voltage will run through a on-board LED voltage display. (Example; operator turns the dial until he/she sees 2.0V on the LED)

The V- terminal of the comparator, is a sensor driven signal wire that operates from ~0-5V, in relation to manifold absolute pressure (MAP sensor). A 3-bar MAP sensor is used, and I have a chart supplied by the manufacturer, giving me pressures, in relation to voltage. (Example; 2.0 volts from this sensor, equals 4psi of positive manifold pressure that was 'sensed'. Turbocharged car.)

When the car goes into boost, and that '2.0V' dial that the operator set, is exceeded by the MAP signal (V+<V-), then the comparator opens the output side to feed the base of the TIP120.

The TIP120s Emitter goes to ground, and the Collector goes to the ground side of the 40A relay I'm trying to switch.

I know this config may work, I'm just wondering if there is a comparator that I can use, that doesn't require a transistor to act as my switch for the 12V portion of the circuit.

If there is a comparator, that can take a;
V+: 0-5V
V-: 0-5V
12V supply IN
When V- exceeds V+, 12V comes out the output, rather than voltage equal to V-.

Hope that makes sense :p
You really need a 5V regulator. The typical Bosh relay takes a lot more than 30 mA for the coil. Verify that.
The sensor is likely ratiometric.

The 2903 won't work IF it's powered by 5 V because of the V (common mode specification). It should work with 12 V power. I'll use 13.8 to be power of car. 12 V is a nominal voltage. The problem is you have to protect the components from the spikes. This http://www.littelfuse.com/~/media/electronics/application_notes/littelfuse_tvs_diode_automotive_circuit_protection_using_automotive_tvs_diodes_application_note.pdf.pdf is a blurb about car electrical systems, so they are messy,

This is "real world" here and not where everything works right.

Just with connecting a 12 V source to a derived 5 V source, you have power/up; power/down issues with maximum voltages.
When an IC is powered down, Vcc is 0V and not the operating voltage.

Little things like bypass capacitors start to matter, If you search for "surge stopper" at linear technology, all sort of topologies show up to help you in a car.

With a 13.8 V source, 12 V is hard to come by. You may be able to regulate that for your comparitor. Your relay may need, yet another power source.

So, call it 5V, 8V, and 13.6 just to satisfy everyone. 5V for the sensor. 8V for the comparator and 13.8 is the unregulated battery voltage.

The 0-5V output from the sensor, could be buffered (x1 OP Amp). This would give you a 0-5 V buffered signal that has a lower input Z,
The 5 V power can be fed to a divider and then buffered again. That would feed your pot. Then the wiper gets buffered and you now have two signals that will work the comparitor. These would likely be rail to rail OP amps.

Now, they all play nice, because you have two lowZ sources that make the comparitor work.

SO,now it's time to turn something on or off. OPTOMOS relays can help, so can FETS and relays. Leakage currents kick in. You needs paths for these leaks to go, They are not wires anymore. Eventually, you get your relay to turnon.

These http://www.texmate.com/media/pdf/2011/03/BX-B31-BX3-L7-10-03.1.pdf devices can do a lot of stuff. Peak hold doesn't seem to be one of them, but you may not needs peak hold.

So, as I see it, you need a 5V regulator from 13.8 or whatever that powers your sensor. You can run the comparitor off 13.8.

It's not Lego.

Thread Starter


Joined Feb 26, 2017
Thank you so much,
I think I should be able to get something together now that I can at least bench test! I'll keep reading up on the links you submitted, but I think I understand enough to start doing some development. Since I'm so new to this, I'm sure it will be a lot trial and error!

Thanks again,