Electronic – Random time timer

555piezo-buzzertimer

I'm constructing a simple circuit that beeps a beeper on a given time interval, using a 555 timer. Is there any simple way to randomize the time on the 555 timer between two given intervals, say, any time between 30 seconds and two minutes? I'm not even looking for true randomization, just something simple to make the interval different between each pulse. Ideally, this would be simple/small enough that I can put two of them in one circuit with a 556 timer – the second one would be sub-second timing to create a different 'beep' every time. Any ideas?

Thanks.

P.S. – bonus if the intervals can be adjusted with a potentiometer?

Best Answer

I agree with Olin: ditch the 555 and get a microcontroller. The PIC10F200 is the first one which comes to mind if you only need a couple of I/Os and a simple program. Thanks to the internal oscillator it doesn't need any of the external components required by the LM555. The 10F200 is only a few cents more than the LM555 and can easily replace two of them. The LM556 is no competition either: it costs twice what you pay for the 10F200.

So Olin's answer is the right one? No :-). I'm going for the bonus! I recently found the Atmel ATTiny5, which is comparable with the PIC10F200: same SOT23 package, same 512 bytes program memory, internal oscillator. BUT! The ATTiny5 has an ADC, which the PIC doesn't have! Connect the potentiometer to it and the bonus is mine! :-)

(You can also make a crude ADC with the PIC, but it needs 2 pins which you can use as outputs, and since we already have two outputs and one I/O of the 10F200 is only input, you'll have to give up that buzzer output. Edit. On second thought, you can do it with one I/O, but you'll need two resistors an a capacitor instead of one resistor and a capacitor.)

The software will be very much the same as for the PIC: program an LFSR (Linear Feedback Shift Register):

enter image description here

An 8-bit LFSR can cycle through up to 255 combinations before it repeats, a 16-bit LFSR through 65535. Use the potentiometer reading to define the clipping values for the timer.