Using one 555 to control a second timer

Thread Starter

wayneh

Joined Sep 9, 2010
17,498
I want to run a 555 astable to produce an output that varies "randomly" over time, within a ~2-fold range.

A while ago I built a circuit with a 556 where the first timer applies a slowly varying voltage onto the control pin of the second timer, via an RC tank. The second timer runs about 5X faster than the first timer. The circuit works to a degree. The schematic is in this post here.

Since then I've learned LTspice and now I've started to look at my circuit in simulation. I'm not happy with what I'm finding. With the timers disconnected and thus independent of each other, it looks fine. The control timer (red line) looks like it should "randomize" the timing of the second one (blue).
A 4017 counter then produces the final waveform seen in green below.
Red = voltage on C6
Blue = output of 2nd timer
Green = voltage of 4017 "2" minus "0"
Screen Shot 2015-10-28 at 1.40.29 PM.png

But when they are connected, they quickly synchronize and instead of a varied waveform, I get the same distorted waveform recurring over and over.

Screen Shot 2015-10-28 at 1.41.21 PM.png

Any ideas how to better control the 2nd timer? Am I seeing an artifact of the simulation? (I don't have an oscilloscope that can handle these low frequencies.) One thing I see is that the control timer should be going slower, since my total waveform requires 4 clock cycles.

Screen Shot 2015-10-28 at 2.32.44 PM.png
 

Attachments

Last edited:

Thread Starter

wayneh

Joined Sep 9, 2010
17,498
Well I may have answered my own question. Slowing the timing of the first timer (changing R4 and C5) gives me a waveform much closer to what I wanted.

Screen Shot 2015-10-28 at 3.35.51 PM.png
Screen Shot 2015-10-28 at 3.40.11 PM.png
 

ScottWang

Joined Aug 23, 2012
7,399
Using two different frequencies of 555 and set the duty cycle smaller, and two outputs of 555 connecting to an AND gate, this new pulse maybe more unpredictable(just a thought), or you want to using XOR gate to replace the AND gate.
 

AnalogKid

Joined Aug 1, 2013
11,038
Scott beat me to it. You never will get much randomness by gating one oscillator with another, because that is not actually combining the two uncorrelated frequencies; it is closer to amplitude modulation, and what you want is some kind of frequency modulation.

If you AND or OR the two outputs together you will be much happier with the results. These circuits are the digital equivalent of an analog mixer, and produce sum and difference products. Note that the result will not be truly random, just better than before. If you want true randomness with very little extra effort, search for noise generator circuits. There are many based on a transistor or diode intentionally biased to make random noise. This plus an amplifier will give you a much better random frequency squarewave.

If the analog circuits make you nervous, look into a Linear Feedback Shift Register (LFSR). Wikipedia has a nice explanation. More parts than a pair of 555's, but way better randomness.

ak
 

ScottWang

Joined Aug 23, 2012
7,399
If you want to do more complicated then do as following:
1. 555 → CD4017 → 10 different values RC → 10 inp OR gate → AND gate (or XOR) ┐
2. 555 → CD4017 → 10 different values RC → 10 inp OR gate → AND gate (or XOR) ┴ → pulse out
 

Thread Starter

wayneh

Joined Sep 9, 2010
17,498
Actually I'm quite happy with the result in #2. Now I'm thinking of a more elegant method of driving the control pin - the red trace - so that the big capacitor can be replaced. I think a trapezoid wave would be ideal, and I'm thinking I could use an op-amp to amplify and clip the voltage wave on top of the timing capacitor.
 
Top