Random Timer

Discussion in 'The Projects Forum' started by huffhuff, Jun 14, 2011.

  1. huffhuff

    Thread Starter New Member

    Jun 14, 2011
    2
    0
    Hi guys,

    Thanks for reading. I am looking to design/make/buy a small random timer. I will explain what it needs to do;

    I have a micro servo running on a direct 3v (x2 AA) feed. At present, I switch this on/off by physically unplugging the battery holder (snap cap). But, I would like the motor to switch on and off at random times and for random durations.

    What is the easiest way to achieve this? All help greatly appreciated. Even if it's to point towards an existing kit to do so. I do have basic electronics knowledge and have a PCB UV bath to make simple boards up. But, i'd much rather a small, neat and tidy solution.

    Thanks in advance guys and gals,

    Ben
     
  2. Wendy

    Moderator

    Mar 24, 2008
    20,765
    2,536
    You are probably going to need a random generator, which isn't really, but close enough. Basically something like a µC with a table inside of random numbers. True random is harder than it sounds.
     
  3. huffhuff

    Thread Starter New Member

    Jun 14, 2011
    2
    0
    Hi Bill. I will look down that route... as in, I will google what you just typed :)

    Thank you from 'square' across the pond ;)
     
  4. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    One approach you might consider is the LFSR (Linear Feedback Shift Register).
    http://en.wikipedia.org/wiki/Linear_feedback_shift_register
    Such a circuit requires relatively few parts, and you get a pretty good pseudo-random output from it.

    You might use a fairly high-speed oscillator (like a 555 timer) to increment a counter or series of counters to generate a random "seed value" to start the LFSR off; pressing a button to load the value from the counter(s) into the LFSR.

    If you used a microcontroller, you would just have one part for the circuit; the uC itself - but you would have to program it. Learning to program a uC can have a long learning curve. If this would be your first uC project, you might consider something like a PICAXE; they run a version of BASIC, which is much easier to learn than Assembler or C.
     
Loading...