I want to design a circuit where I flip a switch, which then starts the circuit turning off then on every 15 seconds 10 times.

After this "boot up sequence", (after the 10th time) I want it to stay on for 12 minutes, then turn on a solenoid valve, then stay on again for 12 minutes, then turn itself off.

How do I do this?

  • 2
    \$\begingroup\$ You probably need to explain what 'flip a switch' means as in what exactly you're trying to control? But in general it sounds like an application for a small microcontroller. \$\endgroup\$ – PeterJ Feb 8 '14 at 11:57
  • \$\begingroup\$ I agree with @PeterJ, a tiny microcontroller (PDIP-8 or even smaller) can do this easily. A discrete logic alternative would be at least half a eurocard size full of timers, decoders and interconnecting logic ports. The microcontroller option is easy to troubleshoot and implement changed requirements; the discrete logic alternative is a drama in that respect. \$\endgroup\$ – jippie Feb 8 '14 at 12:06
  • \$\begingroup\$ could you point me to a source that could teach me how to use a microcontroller in a circuit? \$\endgroup\$ – user36867 Feb 8 '14 at 12:10
  • \$\begingroup\$ One of many examples online: ladyada.net/library/avrdevtut/index.html \$\endgroup\$ – jippie Feb 8 '14 at 12:11
  • 1
    \$\begingroup\$ If you want a low entry-level introduction and don't mind paying couple $ for the hardware, you could consider starting with Arduino. arduino.cc Advantage is that most of the boards can be programmed directly through USB \$\endgroup\$ – jippie Feb 8 '14 at 12:13

The most obvious solution to this is a microcontroller. Writing the program you describe: waiting for a switch, then turning things on and off after fixed delays, is a trivial task for any microcontroller.

Common microcontrollers for hobbyists are the Microchip PIC and the Atmel AVR. These are available in small quantities at reasonable price from most electronics distributors that will sell to the public and the development tools are free or cheap. There are also small, inexpensive computers or microcontroller based platforms sometimes used for these purposes. Examples: Raspberry Pi, Gumstix, and Arduino.

While one could conceive of implementing the same functionality without a microcontroller, it would probably be harder to implement. Research the multivibrator class of circuits to create the delays, and digital logic to implement the logic deciding what to do after each delay, when to begin, etc.

Neither a microcontroller nor common digital logic will be able to drive your solenoid directly, so you will need to employ a transistor to have enough current available to run the solenoid. Also keep in mind common pitfalls when a high-current or inductive load is added to a digital circuit.


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