A set of solderless breadboards with op amps and their functions annotated

Op-Amp Challenge: Virtual Ball-in-a-Box Responds To Your Motions

With the incredible variety of projects submitted to our Op-Amp Contest, you’d almost forget that operational amplifiers were originally invented to perform mathematical operations, specifically inside analog computers. One popular “Hello World” kind of program for these computers is the “ball-in-a-box”, in which the computer simulates what happens when you drop a bouncy ball into a rigid box. [wlf647] has recreated this program using a handful of op amps and a classic display, and added a twist by making the system sensitive to gravity.

All the physics simulation work is performed by a set of TL072 JFET input op amps. Four are configured as integrators that simulate the motion of the ball in the X and Y directions, while four others serve as comparators that detect the ball’s collisions with the edges of the box and give it a push in the opposite direction. Three more op amps are connected to form a quadrature oscillator, which makes a set of sine and cosine waves that draw a circle representing the ball.

A miniature CRT viewfinder showing a small circleThe simulator’s output signals are connected to a tiny viewfinder CRT as well as a speaker that makes a sound whenever the ball hits one of the screen’s edges. This makes for a great ball-in-box display already, but what really makes this build special is the addition of an analog MEMS accelerometer that modifies the gravity vector in the simulation.

If you tilt or shake the sensor, the virtual box experiences a similar motion, which gives the simulation a beautiful live connection to the real world. You can see the result in a demo video [wlf647] recently posted.

The whole setup is currently sitting on a solderless breadboard, but [wlf647] is planning to integrate everything onto a PCB small enough to mount on the viewfinder, turning it into a self-contained motion simulator. Analog computers are perfect for this kind of work, and while they may seem old-fashioned, new ones are still being developed.

One Chip Does It All In This MacGuyver Synth

When you think of simple synths, what components come to mind? All you really need to make one is an oscillator, an amplifier, and some kind of input such that you can play different notes. Our favorite go-to for churning out square waves is probably the 40106 IC, which has six inverting Schmitt triggers, and then usually a 386 to amplify the output.

But it’s possible to go even simpler than that, and school is in session with [Jule] giving the lesson. [Jule]’s little analog synth uses a single IC for both the oscillator and the amplifier — a TL072 op-amp. The rest is made of purely discrete components.

[Jule] says those momentary switches are sub-par, and will add a vibrato effect if properly wiggled while pressed. To us, the buttons looks pretty nice, and much easier to jam out with than the ones with 1/8″ diameter actuators. Plus, whenever you press multiple buttons, the additive resistance unlocks the synth’s inner R2D2 voice. We really see no downsides here.

By default, this is an eight-button synth tuned to C major. But there’s a surprise — you can plug different capacitors into a piece of header and change the octave on the fly. Check it out after the break.

Making pitch-correct frequencies requires weird resistor values, which we can usually satisfy with two resistors in series. But wait, what’s up with resistor values, anyway? And why do they have a color code?

Continue reading “One Chip Does It All In This MacGuyver Synth”