Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How to send timed voltage

  1. Jun 24, 2010 #1
    Hey guys, I'm basically extremely new to all this sort of stuff -- the most advanced thing I've done is wire up some electronics on my car (nitrous kit with extra safety electronics, etc, basically just splicing in and cutting wires)

    Anyway, I've got an idea for something I wanna try out on the car, but I'm a bit out of my realm, and not even sure what to search for.

    Long story short, I would like to be able to hit a switch that would then send voltage X number of times for Y seconds at an interval of every Z seconds (say, it would close the circuit 5 times for 1 second each, every 3 seconds).

    Is this something that would require a microcontroller or something of that sort, or could I do it with some sort of circuit involving only capacitors? Go easy on me, I barely know what I'm talkin about here, lol!
  2. jcsd
  3. Jun 24, 2010 #2


    User Avatar
    Science Advisor

    Hi and welcome to the Forum.

    You probably could do that with discrete components, (although sending 5 one second pulses every 3 seconds seems a bit difficult !), but a simple micro could do it much more easily.

    Do you have an actual project in mind? Why would you want to do this?

    If you click on this link, you will see a discussion from last year, where different micros were mentioned.

    Don't be frightened of micros. They take a little getting used to, but they have good help available and you don't need to know all the possible commands to use them.

    Especially, look at the Picaxe range. They use a language like Basic, but heavily modified to cater for all the special tricks the chips can do.
  4. Jun 24, 2010 #3
    Cool, thanks for the info, will check it out!

    Micros don't scare me too much -- I'm a programmer by trade, but just never work that close to the hardware.

    As for the project itself, I'm being intentionally vague to be honest -- largely because this is something I think there is a decent (yet niche) market for, and if its so simple, I don't wanna lose out to someone who could whip this thing up in a few minutes!
  5. Jun 24, 2010 #4
    you could also do it with a CPLD and a state machine or logic as well. The CPLD could at least be programable and reprogramed. It should be able to do anything discrete logic can do and more. With the uP you should be able to easily have user input to adjust the 3 parameters that you mentioned. In a CPLD it would be harder but could still be done. Look for Xilinx , Altera, or Lattice for the CPLDs
  6. Jun 25, 2010 #5


    User Avatar
    Science Advisor

    As a programmer, you should enjoy micros. There is a strange satisfaction in seeing a LED flash because you typed a few lines on the keyboard.

    Here is a Picaxe program to send five 1 second pulses with a 1 second gap between them, followed by a 3 second gap before repeating.


    For b1 = 1 to 5

    High 2
    pause 1000
    low 2
    pause 1000


    pause 2000

    goto start


    High 2 and Low 2 are switching output pin 2 to either 5 volts or zero volts out. These pins can supply up to 20 mA which is enough to drive a LED or the base of a switching transistor.

    Pause 1000 means pause for 1000 milliseconds, or 1 second.
    The last pause is 2000 mS because there is a 1000 mS pause at the end of the for-next loop, making 3 seconds.

    You have probably written more complex programs than that.
  7. Jun 25, 2010 #6
    Awesome info, guys. Definitely getting me on the right path here! Thanks a ton!
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook