Hi I would like to fit a (motion sensor/IR sensor) sensor switch to a machine in my catering van. The machine is a 12v machine.

I would like to start the machine using the sensor switch and would like to work for 60 seconds. Once 60 seconds have passed, I’d like it to turn off.

however, it gets a little more complicated,I would only like it to turn off, if there is no power going to compressor (again 12v). If the compressor is getting power, I’d like to leave the machine on.

so once the sensor switch start, the machine would turn on:

it should only turn off if 60 seconds have passed and the compressors is NOT getting power.

If the compressor is getting power, the machine should stay on, until it (the compressor) stops getting power.

....And it gets more complicated... Above a certain temperature inside the machine, I would like it turn back on, the compressor will automatically kick back in.

Any ideas, and knowledge in how to set this up will be much appreciated. Ideally it will be a reliable system and have minimal circuit boards as I need something that’s I can rely on and will work in hot weather.

I will also have a bypass switch so I can control the power to the machine and compressor manually.(This is how I currently control the machine.)

  • \$\begingroup\$ Seems like something that could be accomplished relatively easily using pretty much any microcontroller. You might look into Arduino platform, it's very user friendly even for people who never programmed micros before. Once you prototype something on a breadboard you can create a simple final-version PCB. For the precision you need with a micro temperature will be a non-issue (within reason at least). \$\endgroup\$ Jun 20, 2020 at 14:55

1 Answer 1


For combinational logic we usually use a truth table. Where timing is involved we use a timing diagram and try to show all the cases in the diagram.

               __                   __
sensor      __|  |_________________|  |_____________________________________
over-temp   _________________________________________________|          |___
                                 _____________________        __________
compressor  ____________________|                     |______|          |___
               __________           __________________        __________
machine     __| < 60 s > |_________|                  |______|          |___

Figure 1. Timing diagram.

If this is what you require then please copy it into your question and format it as 'code' using the {} button and make any corrections you need to.

  1. Your question omits details on what turns on the compressor.
  2. What's different between your manual switch and the over-temperature switch? Do they do always do the same thing? (If so then make that clear because it simplifies things.)


simulate this circuit – Schematic created using CircuitLab

Figure 1. A simple solution for the information given. Note that '????' represents whatever turns on the compressor.

Dual switch contacts are required on some of the switches to avoid back-feed from one circuit to the other. If dual contacts aren't available add a relay to "repeat" the signal.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.