Maker Pro
Maker Pro

Random timer!

B

Baron

Jan 1, 1970
0
Hi John,

John Fields inscribed thus:

Just remove the .nospam
 
B

Baron

Jan 1, 1970
0
Hi Jason,

Jasen inscribed thus:
I'd probably do it software, but if pressed to do it in hardware
it'd be based around this:

here's the variable-rate bit done using a LM555 tiomer chip,

(it's not perfect one time in 1000 (or so) it'll fire immediately
instead of waiting "randomly" 0-14 seconds but I'm guessing from
your description that's not an issue...

.-------------------------------------------------------------.
| This is an ascii schematic, if the diagram appears garbled |
| try switching to a fixed-pitch font (courier works well) |
| pasting it into notepad works well on ms-windows. |
| or in google groups "view source" (found under options) |
`-------------------------------------------------------------'

500K slow rate
\
/\
.-\/\/\--+--------+--- +5V
| / | |
/ | . . . .|. . . .
\ | . VCC(8) .
/ 1.2M | . .
\ `--RES(4) OUT(3)--------->
| . 555 .
go-fast ----\/\/\-->|-+--------+--TH(6) DIS(7)-----.
10K 1N914 | . . |
+--TR(2) CV(5)-- |
| . . |
| . GND(1) . |
| . . . .|. . . . |
| | |
+--------|-----\/\/\-'
| | 33
===== |
10uF | |
--+--------+-- 0V

Can you confirm the resistor value between pin 2 and 7 please !
I read it as 33 Ohms ?
 
B

Baron

Jan 1, 1970
0
Hi Bob,

Bob Masta inscribed thus:
Jasen's original suggestion makes a great pseudo-random generator.
Just have a 4-bit counter counting a fast clock. When the START
button is hit, the counter will be at some random value (random
due to the random timing of the START press relative to the
high-speed clock). You just have to switch off that clock and
switch to a low-speed clock for your count-down. (You can
switch the timing values in a single clock, or have 2 separate
clocks for this.)

Best regards,

Bob Masta

D A Q A R T A
Data AcQuisition And Real-Time Analysis
www.daqarta.com
Scope, Spectrum, Spectrogram, Signal Generator
Science with your sound card!

Right lets see if I've got this right !

I've breadboarded the 555 timer circuit from Jason. This is the clock
input to a SN74194 via an AND gate. The outputs are OR'ed so that if
any one is high the output is high. This output starts the counter
when it goes low.

The 555 goes fast incrementing the 74194 until the button is pressed.
When this happens the 555 runs slow and the 74194 is decremented.
When the 74194 hits all zeros the OR'ed output starts the counter,
turns on a light and gates off the 555 output.

Pressing the second button resets everything.

I hope that it makes sense ! It does to me now that I realised that
the random element was the time between button presses !
 
J

John Fields

Jan 1, 1970
0
Hi Bob,

Bob Masta inscribed thus:


Right lets see if I've got this right !

I've breadboarded the 555 timer circuit from Jason. This is the clock
input to a SN74194 via an AND gate. The outputs are OR'ed so that if
any one is high the output is high. This output starts the counter
when it goes low.

The 555 goes fast incrementing the 74194 until the button is pressed.
When this happens the 555 runs slow and the 74194 is decremented.
When the 74194 hits all zeros the OR'ed output starts the counter,
turns on a light and gates off the 555 output.

Pressing the second button resets everything.

I hope that it makes sense ! It does to me now that I realised that
the random element was the time between button presses !

---
I think you've still got it wrong. Consider:

Using Jasen's method, at startup the 555 will be oscillating at,
say, 1000 Hz and it'll be clocking a free-running 4 bit binary
counter (not a shift register) so that its outputs change every
millisecond. That's fast enough that a random number between 0 and
15, inclusive, will be captured when the start button is pressed.

Now, when the START button is pressed, the 555's speed will be
changed to 1Hz and the counter's TERMINAL COUNT (TC) output will be
connected to the counter's ENABLE input so that when the counter
gets to 1111 it'll freeze.

When that happens, the 555's speed will be changed back to 1000Hz,
the lamp will light, and the reaction time counter will be enabled,
allowing it to accumulate 1000Hz clocks until the STOP button is
pressed. At that time the reaction time counter will be stopped and
its output frozen.

The 555 will be allowed to remain oscillating at 1000 Hz, however,
and the 4 bit binary delay counter will once again start
free-running until the START button is pressed, renewing the cycle.

Want a schematic?
 
B

Baron

Jan 1, 1970
0
John Fields inscribed thus:
---
I think you've still got it wrong. Consider:

Using Jasen's method, at startup the 555 will be oscillating at,
say, 1000 Hz and it'll be clocking a free-running 4 bit binary
counter (not a shift register) so that its outputs change every
millisecond. That's fast enough that a random number between 0 and
15, inclusive, will be captured when the start button is pressed.

Now, when the START button is pressed, the 555's speed will be
changed to 1Hz and the counter's TERMINAL COUNT (TC) output will be
connected to the counter's ENABLE input so that when the counter
gets to 1111 it'll freeze.

When that happens, the 555's speed will be changed back to 1000Hz,
the lamp will light, and the reaction time counter will be enabled,
allowing it to accumulate 1000Hz clocks until the STOP button is
pressed. At that time the reaction time counter will be stopped and
its output frozen.

The 555 will be allowed to remain oscillating at 1000 Hz, however,
and the 4 bit binary delay counter will once again start
free-running until the START button is pressed, renewing the cycle.

Want a schematic?

Yes please. By the way I sent a mail to you at the address in the
from line. Hope thats Ok.
 
J

Jasen

Jan 1, 1970
0
Jasen's original suggestion makes a great pseudo-random generator.

that 555 circuit was my original suggestion, at the time I wasn't aware of
a need for an an the delay to be a whole number of seconds...
(I still haven't seen a requirement for that)

Bye.
Jasen
 
J

Jasen

Jan 1, 1970
0
Can you confirm the resistor value between pin 2 and 7 please !
I read it as 33 Ohms ?

that's right the LM555 has a maximum current into the discharge pin
of 200mA, (and the CMOS version TLC555 or 7555 only 100ma)

33ohms is enough to keep the peak discharge current to a
sensible value with a 5V supply the capacitor will charge to 3.33V
so the peak dischharge current will be about 100mA

Bye.
Jasen
 
B

Baron

Jan 1, 1970
0
Jasen inscribed thus:
that 555 circuit was my original suggestion, at the time I wasn't
aware of a need for an an the delay to be a whole number of
seconds... (I still haven't seen a requirement for that)

Bye.
Jasen

There isn't ! I am just feeding a shift register which gives 1, 2, 4,
8, outputs. OR'ed together gives a high out while the count is not
zero. Stepping the register backwards with a 1 second clock causes
the OR'ed output to go low when zero is reached.

Your 555 dual speed clock works as advertised.

Thankyou.
 
J

John Fields

Jan 1, 1970
0
John Fields inscribed thus:

Yes please. By the way I sent a mail to you at the address in the
from line. Hope thats Ok.

---
Yes, that's fine.

I just emailed you the schematic and also posted it to abse in case
anyone else is interested. If you have any questions about how it
works, please post them here instead of emailing them to me so that
the discussion will remain public.
 
B

Baron

Jan 1, 1970
0
John Fields inscribed thus:
---
Yes, that's fine.

I just emailed you the schematic and also posted it to abse in case
anyone else is interested. If you have any questions about how it
works, please post them here instead of emailing them to me so that
the discussion will remain public.

Hi John.
I don't know if there is a problem or not with the mail ? I haven't
received anything from you yet !
Thanks.
 
J

John Fields

Jan 1, 1970
0
John Fields inscribed thus:


Hi John.
I don't know if there is a problem or not with the mail ? I haven't
received anything from you yet !
 
Top