Continue to Site

Using analogue components to generate a random voltage to vary the time for capacitor charging

undelivered

New Member
Hi,

I am a student of EEE.

I want to generate a random voltage 0-6V to charge a capacitor for a reaction timer game I am designing only using simple analogue components. I need to vary the charging time of the capacitor randomly.

For learning, I wanted to avoid using digital logic so I attempted to do this with an CE amplifier with 2 stages of BC108C's trying to amplify the noise from a 4V7 Zener diode but whilst the noise is random, the rate of change is so fast that I end up with an average voltage that is the same and therefore the capacitor charges in the same time, each time.

Pommie

Well-Known Member
How does the "timer" start?

Mike.

Active Member
Chaotic Oscillator .....attached.

Also see the references at end of paper for other possibilities.

Regards, Dana.

Attachments

• S0218127414501557.pdf
636 KB · Views: 46

undelivered

New Member
Hi, apologies for the delay in response, I had to draw up the circuit in Proteus from the iterated steps I've completed over the past weeks. See the schematic here.

The previous revision of the circuit used the capacitor C1 to provide a timer circuit and once a reference voltage of 2.7V has been achieve the comparator turns on U3 SCR and D3 lights, signalling that you can now press one of the press buttons to be first to react in this game. The use of MOSFETS there is to ground the gate of U1 and U2 SCR's until the capacitor is charged so that you can't cheat and keep the button pressed down (to be first!) Once the capacitor is charged and someone pressed their button first, U1 or U2 will be latched and it's respective LED lit, showing who won.

So this gives around a 4 second timer but I wanted to make it random, maybe 1-10 seconds or more so it is less predictable. I don't want to use digital logic as I'm focussed on learning analogue techniques (even if not so efficient here). I attempted to use the zener diode D5 to generate noise, which I amplified, to give a voltage to charge the timing capacitor C1....but I always get around 12 seconds. Looking at the waveform, it is amplified and random, but perhaps the speed of change is so high that I still get an average after all. I need a random amount of time to charge C1 and I'm using a single rail source of 6V.

Thanks for any help or ideas. I am a student and my knowledge is limited but I am learning.

rjenkinsgb

Well-Known Member
The only thing I can think of is to add a comparator to the output of the noise generator, with the other input from a pot across the supply, to set an adjustable reference level, so you can get just the rarer high amplitude noise spikes.

Then feed that to a voltage doubler - a series cap & two diodes to charge the existing C1.
That would act as a kind of charge pump, adding a small amount to C1 every time a spike above the set threshold occurred.

C2 on this would be the input from the comparator, and C1 is C1; no RL as it's manual discharge.

dougy83

Well-Known Member
Sounds like you want a sample-and-hold circuit, which can be as simple as a switch from the output of the noise source to a capacitor to 0V. When the switch is closed, the capacitor voltage tracks the noise source voltage; when the switch is opened, the capacitor retains the whatever voltage it last had. An opamp can buffer the capacitor voltage to the next stage. If you use a double-pole switch, you can enable the sampling, and your present 'reset' function with a single switch.

Pommie

Well-Known Member
A triangle wave generator might be a better source than a noise generator as that will be at a random voltage when you press the button.

Mike.

undelivered

New Member
All great ideas thanks danadak, rjenkinsgb, dougy83, and Pommie. I'm not sure at this point which will be the best one to start experimenting with and I might have to work through all of them to find that out. Any more detail schematics would be appreciated but I've got quite a bit to go on there already I think!

Tony Stewart

Well-Known Member
Keep thinking about the problem and define ALL input variables and outputs with time , voltage etc tolerances. Write a better design spec. for an acceptable solution. Then the implementation will be easier without guesswork. Stop thinking about specific implementations until that part is done. Separate MUST HAVE from NICE TO HAVES in a list. Then budget ,time, cost and anything else that matters.

Regards, Dana.

undelivered

New Member
That's a great video thanks Dana, and something to experiment with, but I am still hoping to only use analogue components.

Nigel Goodwin

Super Moderator
That's a great video thanks Dana, and something to experiment with, but I am still hoping to only use analogue components.
But it only uses analogue components? - a couple of opamps.

undelivered

New Member
Ah yes, I was looking at the Lorenz chaos video but I see that the instructable only uses 2 op amps.

undelivered

New Member
That's brilliant thanks Tony! What do you mean your S&H circuit won't work since I don't have detailed specs?

Replies
4
Views
2K
Replies
16
Views
2K
Replies
13
Views
4K
Replies
74
Views
9K
Replies
7
Views
3K