I'd like to design a circuit such that it is powered on by a short press of a switch, performs some action, and then turns itself off when it has done its purpose.
I suppose I could do this using a FET, but it has surely been done millions of times and I'd like not to reinvent the wheel. Could you give me a suitable example of such a circuit, or resources to inform me on the subject ?
Look for the 555 timer, It has 2 inputs, trigger and threshold that are part of a RS (Reset/Set) flip flop circuit. Pulling the trigger low will latch the output on, pulling the threshold high will unlatch the output. etc.
It's smaller and more versatile than employing a flip flip chip when you only need one switch. On top of that, you can also place some timing activity in that same lay out.
Thanks for your precious advice. I was not clear enough. Let me explain again : at first, the circuit is completely powered off. The user pushes a button, which injects power into the circuit. Then a mechanism maintains the power active, even if the switch has been released. At a later undetermined moment, when the circuit does no longer need power, it cuts its own power and sleeps until the user chooses to push the button again. I'm pretty sure a 555 can't do this.
Sorry I really did not phrase my question well it seems. By "power on" and "power off", I meant really the power to the circuit, maintaining power while needed and cutting its own power after the desired action has been performed. It is intended to save as much power as possible when the circuit doesn't do anything.
A 555 circuit would not do since it would need to be powered on permanently.
That's why I said a FET would do. Probably any other transistor, but the FET is closer to my energy saving goal. Here's what I imagined :
When the user presses the switch, the circuit is powered and in turn pulls the FET gate up. The user can release the switch at this time. At some other time in the future, the circuit decides it does no longer need power and lets the gate go down, cutting power and hopefully consuming zero current. I need to figure out if this would work and what kind of transistor to use.
Use a 555 as diagrammed (not a schematic, just to present the idea) above. The pushbutton causes the npn to put a negative on the 555 trigger, and provides plus to the
555 while it is pressed. The 555 output goes high, and operates the relay, which takes over the role of providing
to the 555. The 555 stays high for however long you set it, then drops, removing power. No reason you have to use a relay - you can use the idea with a fet or bipolar if you want.
More important: the asumption is that you want a timed delay. However, that may not be the case. You might, for example, have a motor that opens and closes a window, and you want the circuit to run until the window is fully open (or fully closed), then shut off. Or a circuit that is indended to bring temperature up to some point, then shut off. The problem is that the subject of your post says "delay", but the requirement specifies that some action has been completed. So to make it a bit more generic: S1 or Sensor +12 ---+---+ N/C | | | V | -------o---- Rly1-1 N/O | o---^ | | +----o o---+ | [Rly1] | Gnd --------------+
S1 is a microswitch or a sensor that interrupts the circuit when the action is complete.
Use a PMOS fet as a pass element. Connect the source to the input voltage, and the gate to the input voltage through a 1MEG transistor. Use the drain as the supply for your circuit.
Have two connections to the gate of the FET, one to a normally open switch connected to ground, and the other to a port on your microcontroller.
Push the button to power up. When the uc initializes, have it set the port to 0 output.
When you want the circuit to turn off, have the uc set the port to high impedance.
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.