Voltage Comparator on Automotive application help

Thread Starter

antoniogamu

Joined Oct 10, 2017
1
I am working on a project on my car to activate/deactivate the Vehicle Cylindres Management system (VCM) based on the engine temperature. For this I need to monitor the engine coolant temperature sensor and then drive a relay based on the sensor voltage reading to anable or bypass a 100 ohm resistor (Rx). I am using a simple comparator circuit (with hysteresis feedback resistor) U1 = LM324 (see schematic attached) when I tested this circuit on my home garage using a dual power supply and a potentiometer to simulate the temp sensor output, the circuit worked as expected including the hysteresis. But when I connected the circuit on my car engine and run a test the comparator output oscillates a lot when it is getting close to the Vref, also I noticed that the hysteresis window doesn't work as the relay open and close almost at the same Vin (only 2-3 mV) difference when the hysteresis should be at ~ 40 mV.
Vref is coming from a voltage divider using a 10K pot to have Vref = 0.465 V as mentioned the hysterisis supposed to be ~ 40 mV, T1 is a 2N2222 and D is a 1N4007.
Some other observations that might help to get your advise are: The Vcc is the car battery and it fluctuates from 12.0 to ~ 13.5 V (depending on the engine load and operating conditions), the temp sensor voltage changes in very small intervals of 1 mV, during either ramp condition (up or down) the sensor output varies 1mV up/down but it follow the ramp trend. When Vin gets close to the Vref i can hear the relay cycling for about 2-3 seconds before it moves to the right state based on the Vin.Comparator.jpg
Some of the modifications that think can help are: using a real comparator such as LM239 and adding a capacitor ~ 0.1 uF between Vcc and GND.
Any advise will be greatly appreciated.
Thanks,
Antonio
 

wayneh

Joined Sep 9, 2010
16,398
Some of the modifications that think can help are: using a real comparator such as LM239 and adding a capacitor ~ 0.1 uF between Vcc and GND.
Those are both good ideas. Don't forget the comparator output is open collector, so it needs a pull-up resistor to go high.

Note that your voltage reference at the comparator is proportional to the raw vehicle 12V, which varies and is noisy. I recommend putting a voltage regulator there to isolate the reference voltage.
 
Top