Op Amp Contest: Generate Spirograph Shapes Using Only Op Amps and Math

Front and back views of a square, purple PCB with op amps and BNC outputs

If you’re a child of the ’80s or ’90s, chances are you’ve spent hours tracing out intricate patterns using the pens and gears of a Spirograph kit. Simple as those parts may be, they’re actually a very clever technique for plotting mathematical functions called hypotrochoids and epitrochoids. [Craig] has spent some time analyzing these functions, and realized you can also implement them with analog circuits. He used this knowledge to design a device called Op Art which generates Spirograph shapes on your oscilloscope using just a handful of op amps.

A spirograph shape shown on an oscilloscope screenTo draw either a hypotrochoid or an epitrochoid, you need to generate sine and cosine waves of various frequencies, and then add them with a certain scaling factor. Generating sines and cosines is not so hard to do with op amps, but making an adjustable oscillator that reliably churns out matching sine and cosine waves over a large frequency range turned out to be tricky. After a bit of experimentation, [Craig] discovered that a phase-shift oscillator was the right topology, not only for its adjustability but also because it generates sine, cosine and inverted sine terms that all come in handy when drawing various Spirograph shapes.

The resulting waves are added together in a mixer, consisting of a dual-gang potmeter that implements adjustable scaling factors for both the sine and cosine channels simultaneously. Finally, a pair of non-inverting amplifiers buffer the output signals and drive two coax cables connected to an oscilloscope. All op amps are low-power MCP6004 types that consume just 100 uA per channel, allowing the whole thing to run off a pair of AAA batteries.

The Op Art system is pretty easy to use: just set your ‘scope to XY mode and start playing with the frequency and gain adjustment pots. [Craig] shows some examples of the shapes it can draw, which vary from simple triangles to all kinds of spirals and flower-like patterns. Most automated spirograph machines try to replicate the mechanics of the original toy using contraptions holding a pen or mirrors manipulating a laser, but as [Craig] shows, going down to the basic maths can yield great results, too.



Op Amp Contest: Generate Spirograph Shapes Using Only Op Amps and Math
Source: Manila Flash Report

Post a Comment

0 Comments