How can I make a switch that when electricity stops flowing, another circuit turns on?

I'm trying to make a small bot with IR proximity sensor shown here. I want the robot to turn on when the proximity sensor activates, but when the sensor activates the electricity stops flowing. How can I activate the robot when the sensor turns off?


How can I make it so that when the proximity sensor activates, it activates the robot instead of cutting power?

kelseymh6 years ago
You will need a separate power supply for the robot, of course, which is different from the supply for the proximity sensor. Then, you use a normally closed relay (Google that term) with the coil connected to the sensor, and the robot's power connected to the normally closed contacts.

As long as the coil has power, it will hold the contacts open. When the coil loses power, the contacts close (like a switch), and the robot gets power.

If you are modifying an existing circuit, you could also look at the datasheet for the proximity sensor itself. It may have both NC and NO contacts, and you could just switch the wiring.
Adding, you can use something like this.

This is recycled from an old answer, so pretend the USB connector is the external power source and the LED is whatever you need to power.
Untitled Sketch_schem.png
jackmcd0076 years ago
You need to create a transistor circuit. A PNP transistor to be exact, it does just wat you want when voltage drops on the base voltage flows from the emitter to the collecter creating an on switch when there is no voltage present in this case comming from the proximity sensor . google PNP transister to find out more.