Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC project for relay control with voltage hysterysis

martin fox

New Member
Hi all,

This is my first post on here as I just joined the forum!

I need to make a small controller that will switch on a 12V relay based on the input voltage from a sensor. Its to control a small compressor in my rally car for pneumatic gear change actuation of the sequential gearbox from a steering wheel paddle.

Upon power up, if the voltage from the sensor is less than 850mV (could be as low as 10mV) then the relay should pull in and stay energised until the sensor reaches 1250mV (11bar) at which point it should switch off. As the air gets used the sensor voltage will drop so when it drops to 850mV (6bar) the relay should become energised again. It needs to be imune to triggering from any spikes that might get on the supply from the compressor brushes!

I have tried to make a suitable device using an LM393 comparator IC but I just cant get the output switching cleanly, I thought this might be a possible application for a PIC but I dont have enough knowledge or experience to design one, can any body help?
 
Last edited:
Welcome to the forum!
The 393 ought to be able to do the job. If not, it suggests there is interference affecting it. So a PIC would also be subjected to interference. You might be able to overcome that in software, but IMO it would be better to track down and eliminate the interference.
 
Thanks, I dont think its interference since its only been tested on the bench, no compressor. I find that the output is not changing suddenly from low to high, it seems to gradually go in an analogue fashion. I have got the required amount of hysterysis OK.
comparator circuit0001.jpg
 
The output of the comparator needs a pull-up resistor (try 3k3) to the 5V rail.
 

Latest threads

Back
Top