Random Timer

Thread Starter

huffhuff

Joined Jun 14, 2011
2
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
 

Wendy

Joined Mar 24, 2008
23,415
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.
 

Thread Starter

huffhuff

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

Thank you from 'square' across the pond ;)
 

SgtWookie

Joined Jul 17, 2007
22,230
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.
 
Top