Update Please evaluate this third attempt: Third attempt This is my first electrical project, so please be gentle with me. I know very little about electronics.

I'm building a machine that has a crank that users pull. The ideal behavior is that when a user releases the crank from its lowered position, the circuit will drive the load (represented by the lamp) for a few seconds, then turn off. Translated: When S1 is first opened, C1 drives X1 for a few seconds, then X1 shuts off. When S1 is closed momentarily, the cycle repeats. To be clear, X1 isn't driver while S1 is closed. I expect that there are better solutions with a different type of switch than S1 (instantaneous button), but in the greater mechanical context, it seems like the only practical choice for the project.

Here's a diagram of my first attempt at the circuit. Please ignore the actual quantitative values, I just want to get the circuit working conceptually. Please let me know if I got the diode directions right. Also, the load is actually a relay, I just wasn't able to find the symbol for that.

My conception is that when S1 is closed, C1 charges via D1. When S1 opens, C1 discharges via X1. I think the main weakness is that C1 is connected in parallel with the short circuit to V1. What do you think?

2nd attempt: My attempt

  • \$\begingroup\$ In your circuit, C1 is in parallel with D1. When S1 is closed, it puts a short circuit across the battery. Things to the right of C1 will never receive power. \$\endgroup\$ Jan 18, 2020 at 16:42
  • \$\begingroup\$ Yes, short circuit is a problem. Pushing button will short circuit the voltage source, so the rest of the circuit does nothing. \$\endgroup\$
    – Justme
    Jan 18, 2020 at 16:43
  • \$\begingroup\$ Hi Peter, I figured that'd be the case. Would it work if I were to eliminate that connection that puts them in parallel? ie remove the wire that starts at the junction between S1 and C1. \$\endgroup\$ Jan 18, 2020 at 16:47
  • \$\begingroup\$ The second attempt does charge up the capacitor via diode D1 when button is pushed. When released, capacitor stays charged forever. Lamp never lights up, the D2 is always blocking current. \$\endgroup\$
    – Justme
    Jan 18, 2020 at 17:00
  • \$\begingroup\$ I suspected that too. Could I ask for suggestions on what to do? \$\endgroup\$ Jan 18, 2020 at 17:11

1 Answer 1


We can simplify your requirement specifications with a simple timing diagram.

           __                    __________             __    __
Button ___|  |__________________|          |___________|  |__|  |_________
              _____                         _____          __    _____
Output ______|     |_______________________|     |________|  |__|     |___

Figure 1. Timing diagram. This shows us that the load is off while the button is pressed and turns on for a preset time when the button is release unless the button is pressed again (as shown on the right of the diagram).

The challenge, as you have discovered, is to do this with a single-pole, single-throw (SPST) switch or simple push-button. A common solution to the limits of a switch - it might not have adequate current or voltage rating or may have the wrong contact arrangement - is to use a relay.


simulate this circuit – Schematic created using CircuitLab

Figure 2. Using a relay to convert an SPST button into a SPDT (single-pole, double-throw) device.

How it works:

  • SW1 you have already.
  • RLY1 is a 12 V relay with a changeover contact. You should be able to find one in a car parts shop or at the scrapyard.
  • In the normal position C1 is discharged into the load.
  • When SW1 is pressed the relay is energised and C1 is charged via R1 which limits the current into C1. (When C1 is completely discharged it appears as a short-circuit at the moment of switch-on.) Note that the load is completely disconnected during the charging cycle.
  • When SW1 is released C1 discharges through the load.
  • Note also that if SW1 is pressed again before C1 is completely discharged that the load will be switched off as shown on the right side of the timing diagram.
  • D1 protects the contacts of SW1 from sparking that would be caused by the inductance of RLY1 during releasing of the switch.

One big problem with this circuit is that the voltage will fall as the capacitor discharges and in the case of a bulb, for example, it will flash brightly and then fade away over a period of time determined by the lamp resistance and the capacitor value.

  • \$\begingroup\$ Thanks a ton! this makes a lot of sense. \$\endgroup\$ Jan 18, 2020 at 18:06

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.