Introduction: Build a Chaos Generator in 5 Minutes!

Picture of Build a Chaos Generator in 5 Minutes!

The circuit shown is a simple chaotic oscillator that is based on the resistor-capacitor ladder phase shift oscillator. You can use it to show nice pictures (called attractor projections) on your analog oscilloscope in XY mode and impress your friends.

Chaos is defined as long term deterministic and aperiodic behavior, which is bound to a certain region in phase space. What this means is that the circuit oscillates, but not in a regular, repeating fashion. In fact, in theory (ignoring noise) it will never repeat the same path, but it will get arbitrarily close to all points it passes through in phase space.

The phase space here is four dimensional, because the circuit has 4 energy storing elements (the capacitors). Specifying the voltages on all these capacitors, fixes the state, and thus the deterministic evolution of the circuit. What we show in the oscilloscope is actually only a 2D projection, of something that goes on in 4D. If all this seems mind boggling: it is.

The circuit can be build using any number of methods, from air-wiring or breadboarding the components to designing a PCB using for example Eagle, so use your imagination. On a breadboard you can slap this together in mere minutes.

As far as the component values go, none are critical. In fact, poking around with the values will change the shape of the attractor (what you see on your oscilloscope) and experimentation with the values and supply voltage is highly recommended.

For the values of the capacitors as shown (C=1nF, C2=360pF) the free running frequency I got was about +-45kHz. Scaling the capacitor values, allows to reach other frequencies.

Compared to many other chaotic oscillators (such as the Chua's circuit), this one does not need inductors (great for those suffering from Helixaphobia), needs only a single supply voltage and no opamps, just plain general purpose transistors. It will work from 3 or 4 Volts up to 15 Volts, although the attractor shapes will change with the supply voltage too.

Step 1: How Does It Work?

Picture of How Does It Work?

As long as R3 is very high, Q2 will not conduct and the bottom half of the circuit doesn't interact with the RC ladder. the RC ladder provides 180 degrees of phase shift and Q1, being switched as a common emitter amplifier, gives you another 180 degrees. Together, they fulfill the round-trip condition for oscillation.

This will give you a regular oscillation, as shown in Fig. A (R3=60k, Vp=5V).

Lowering the resistor, Q2 can get some base drive, and thus it will interact with/disturb the exact phase relation in the RC ladder, see Fig. B (R3=40k). This leads to what is called a period doubling.

Still lowering R3, band-shaped chaos is reached, Fig. C (R3=39k). At R3=36.5k, the structure is temporarily periodic again. This is called a periodic window. Lowering R3 still further leads to the attractor of the pictures in step one of this instructable. In the center of the 'eyes' of the attractor, there are unstable equilibria, around which the oscillations grow. The circuit jumps erratically between two states of Q2 conducting or not.

(your mileage will vary with these values, depending on component tolerances and exact values etc..)

Explore and have fun!


EmmanuelM50 made it! (author)2016-07-09

Most excellent circuit. Simple, no IC's, no inductances, helps understand how chaos can appear even in this simplest RC oscillator via a non-linear component added to the feedback path.

I've breadboarded this and shot a short video on an old tek analog scope. The attractor is beautiful:

Kajnjaps (author)EmmanuelM502016-07-09

Thank You! Nice Clip. By Playing with the supply voltage and the resistors to Q2, it is possible to get band-shaped chaos too.

EmmanuelM50 (author)Kajnjaps2016-07-09

Very glad you enjoyed the clip :

Bunch of questions:

- Have you tried to couple two (or more) of these via - say - a cap to get hyper-chaos, or do they synchronize ?

- How fast do you think this can get to ? Do you think it can get to MHz range with smaller caps ?

- What do you mean by band-shaped ?

Kajnjaps (author)EmmanuelM502016-07-10

Hi EmmanuelM50,

- Haven't tried coupling them. Interestingly, there exists this paper:

Yasuteru Hosokawa, Yoshifumi Nishio and Akio Ushida

"Analysis of Chaotic Phenomena in Two RC Phase Shift Oscillators Coupled by a Diode,"

IEICE Transactions on Fundamentals, vol. E84-A, no. 9, pp. 2288-2295, Sep. 2001

,in which the authors reach chaos by using two normal RC oscillators, coupled unidirectionally by a diode.

- This kind of oscillator is (with these common-garden variety transistors) is good to about a MHz. Don't know if the circuit will stay chaotic by scaling the caps, as the transistors own parasitic capacitances will come into play. Since Q2 is mostly switched on/off, storage effects will dominate. Maybe still faster can be done by using RF transistors (something like BF199, BFS17 etc.) or small-signal MOSFETS.

- The attractor as it is shaped now has two 'eyes', at the center of which you will find unstable equilibria. By band shaped, I mean an attractor with only one 'eye'.

tomheylen (author)2016-05-26

Cool Instructable.

Kajnjaps (author)tomheylen2016-06-12

Thanks Tom!

jrybak made it! (author)2016-06-11

This is a great project for those wanting to learn about chaotic electronic circuits. Build the circuit out of real components or simulate it using one of the SPICE simulators. Either way, the circuit is practically foolproof.

Any common general purpose NPN transistors (such as the 2N3904, 2N2222, or 2N2222A) will work fine although you may have to "tweak" some of the other component values a bit to get the same strange attractors that the author did. Remember, SPICE models are never perfect and the properties of real transistors vary slightly from one to another. That's why you sometimes have to "tweak" resistor and capacitor values.

Kajnjaps (author)jrybak2016-06-12


Also, SPICE models differ a bit per manufacturer, even for the same type of transistor. Even so, indeed the circuit is pretty much foolproof.

magkopian (author)2016-05-28

This looks like an interesting and fun project, I'm definitely going to give that a go. I was wondering though if there are any practical uses for such a circuit. A random number generator maybe? But, you can do the same thing by just sampling some random noise which is much easier, so I'm not seeing any point using it for something like that.

Kajnjaps (author)magkopian2016-05-28

For the time and money this takes to build, this is about as much fun as you can get ;-)

Random number generation is one application. Chaos encryption is another one. It works by hiding (adding) a low-amplitude message in a chaotic signal at the transmitter end. At the receiver end, another chaotic circuit synchronizes with the transmitter chaotic system and the chaos is subtracted, leaving the message. Other schemes exist too.

The main difference with random noise is that the dynamical behavior here is in principle deterministic. Short term it is predictable, long term it isn't. There is a kind of predictability horizon. This is because chaotic systems show sensitive dependence to initial conditions (in fact, that's one way of defining chaos). This means that however close two equal systems start in terms of initial conditions (the initial capacitor voltages here), at some point in the future their signals will diverge and become totally different. This can and is applied in novel computing architectures (see for example the work of Nigel Crook on Nonlinear Transient Computation).

However, even without applications, it still is an intriguing natural phenomenon :-)

Kajnjaps (author)Kajnjaps2016-05-28

"close but unequal initial conditions" is more precise...

vazgen_e (author)2016-05-27

good job. very interesting concept in math and engineering

Kajnjaps (author)vazgen_e2016-05-28


pinheadBE (author)2016-05-28

Good explanation.

Just to be complete: where exactly do you connect the scope's probes?

Kajnjaps (author)pinheadBE2016-05-28

Thanks! The scope connections are in the annotations on the pictures.

About This Instructable




More by Kajnjaps:Dual-Band Guitar/Bass Compressor"Long Earth" Stepper Night Light*NOT* Like a BOSS Distortion
Add instructable to: