close-circle
Close
0%
0%

MicroKits: Theremin Electronic Kit

Let's inspire the next generation with exciting and educational kits that anyone can build. Want to create your own theremin?

Similar projects worth following
close
Microkits makes building electronics accessible to anyone. This is an opportunity for budding engineers, hobbyists, and students to learn science, practice engineering, and build something cool.

These kits are electrically simple, and can be put together less than an hour. No tools are needed, as the kit is built on a solderless breadboard. But because of the pre-programmed microprocessor, the final result is a fully functional theremin. Step by step instructions show how to assemble the kit, reinforces good troubleshooting, and explains how different parts work.

The 2017 HackADay prize is "Build Something That Matters". Teaching the next generation matters. If my kit sparks someone's interest in building hardware, my project will have been a success.

See the building process and final theremin in the ~90 second video below:

And here's a handy GIF that shows how the kit is assembled step by step:

Read below to learn more about the design and assembly that's gone into these kits. Currently, we're preparing our first batch of 100 kits. Some of these kits will go directly to schools, and some will be sold at the MicroKits website MicroKits.cc

See the "Files" section just below to check out the instructional booklet!

Sample of Instuctional Booklet.pdf

Step by step instructions on how to build your theremin, plus explanations on how the circuit works. Not necessarily final.

Adobe Portable Document Format - 4.75 MB - 04/25/2017 at 02:47

eye
Preview
download-circle
Download

  • 1 × CVS-1708 Small Magnetic Speaker
  • 1 × CY8C24123A-24PXI Micro, a PSoC 1 Microprocessor
  • 1 × TLC556CN Tick, A Dual 555 Oscillator
  • 1 × SBH331AS AA x3 Battery Holder with Switch
  • 1 × Breadboard Holds everything together

View all 9 components

  • How to Connect to an External Amp

    David Levi04/29/2017 at 23:19 1 comment

    I've had a few early testers ask how they could connect their theremin kit to an external amp. I decided to not require external speakers or headphones for the base kit, but with a few extra parts you can connect to pretty much any audio amplifier.

    You will need:

    • A completed MicroKit theremin
    • Hookup Wire
    • A capacitor (22uF or higher will work well)
    • Two Alligator Clip Cables
    • A 3.5mm or 1/4" audio cable
    • Your amp

    Here's what you'll need to do:

    1. Remove the speaker from the breadboard.
    2. Connect the Negative side of the capacitor (the side with the white stripe and minus signs) to an alligator clip cable. This will carry the signal from the theremin to the amp.
    3. Connect the Positive side of the capacitor to where the speaker was, point E22.
    4. Using hookup wire (or the orange wire at J22), connect the other alligator clip cable to ground (the blue minus strip). This cable connects ground between the theremin and amp.
    5. Connect the signal cable to the tip of the audio cable. Connect the ground cable to the outer ring. In this case, green is ground and red is signal.

    The capacitor isn't strictly necessary, but it's a good idea since the theremin creates a signal with a DC bias of 2.5V. Also, if your amp sensitivity is too high, you might pick up the pitch signal even when it should be muted by the volume antenna. I had this issue, but got around it by adjusting the volume and gain settings on my amp. Let me know if this works for your amp!

  • Check Out the Theremin Kit Video

    David Levi04/24/2017 at 17:10 0 comments

    I just edited together a short video which shows how the theremin it is built and how it plays. I hope you enjoy!

  • A Circus of Cartoon Chips

    David Levi04/20/2017 at 05:45 1 comment

    Good Evening! I just completed the following, 100 times each:

    • Bent the Pins
    • Programmed the Microprocessor
    • Applyed Eyes Sticker to Microprocessor and Oscillator
    • Placed in Foam with Speaker

    I now have 100 microprocessors, oscillators, and speakers prepared for use in a kit. These parts are stuck in foam for ESD and mechanical protection. They'll go into bags with the rest of the kit parts once I sort those, and then I'll be able to get the batch of the first 100 kits out into the world!

    Images of the world's largest pile of cartoonified integrated circuits are below.

  • Pin Bending Rig for DIP Package Chips

    David Levi04/15/2017 at 19:21 0 comments

    I noticed a problem while testing out my first few kits. DIP package chips, like I'm using in these kits, have pins that are bent out a bit too far for breadboards. The pins are about 0.35" apart, but the breadboard works in increments of 0.1". The pins need to be bent down to 0.3". I assume these pins spread to lock in place when pushed into a printed circuit board.

    But on a breadboard, this causes problems. A few of my testers didn't know how to rock the part into place, and didn't want to force the part in. That's understandable, and I remember having the same issue when I was just getting started in electronics.

    So, I built a rig that makes it easy for me to bend dozens of chips at the same time:

    I made this rig from three parts: A woodworking clamp with a wide jaw, a 0.25" wood strip, and a 9/32" (~.28") key stock.

    As you can see, the whole idea is to carefully squish the pins against the hardened steel of the key stock. The key is a bit smaller than 0.3", but when you add in the thickness of the chip pins, it all fits.

    I attached a strip of wood to one side of the clamp. Since the wood is only 0.25" thick, it won't interfere with the clamping. But it will hold the key stock and the chip in place. It only takes a half rotation of the clamp to press the pins into place.

    The key stock is conductive, so I'm not too worried about ESD buildup when using this rig. I might ground the key stock though, just in case.

    I'll be able to to press about 15 microprocessors at a time. I've tested a few parts, and they all fit right into breadboards beautifully. No more pushing and rocking by hand just to get parts in. I hope you enjoyed reading about this simple little solution to an unusual engineering problem.

  • Designing for the Beginning Engineer

    David Levi04/15/2017 at 16:17 0 comments

    I've explained how the microprocessor and timer work together to create a theremin. Now, I wanted to explain some of the decisions I made to make sure that anyone would be able to complete the kit.

    The single most important design choice: breaking up circuit construction into stage. Instead of expecting the circuit to be built all at once, the instructions break down the circuit into three stages: powering up the chip on its own, adding the pitch antenna, and adding the volume antenna. By breaking things up into three stages, the builder has a change to check their work. If something goes wrong, they will only have a few parts to check over, instead of an entire circuit.

    When I first learned to code, I would compile and test what I was building about once every four lines. That rapid feedback let me learn what each part of the code did, and correct my mistakes quickly. But when I was first learning hardware, things were different. I had to solder together an entire kit over a few hours, and just hope it would work when I powered it up. Now, with this kit, I'm bringing immediate feedback to hardware. The builder has "checkpoints" to encourage them to complete their kit. And the kit reinforces the healthy engineering habit of troubleshooting and checking your work as you go.

    The microprocessor has a bit of code on it, that lets it decide what stage of completion it is in. If it receives no signal from either the pitch or volume antenna, it just plays a fixed note. This shows that it is powered and connected to the speaker. With no volume signal, it plays pitch but keeps volume at max. And with the signal from both, I processes both pitch and volume in an infinite loop. "freq_delta" and "vol_delta" are variables from the counter block, proportional to input oscillator frequency. If the numbers are too low, that shows there is no input signal.

    	/*If no signal on freq input, play fixed note and volume*/
    	/*If no signal on vol input, process freq and fix volume*/
    	/*Otherwise, process freq and vol*/
    	if (freq_delta<100){
    		PWM16_1_WritePeriod(C3);
    		PWM16_1_WritePulseWidth(((C3)>>1));
    		DAC6_1_WriteBlind(0);
    		while (1){
    		}
    	} else if( vol_delta<100){
    		DAC6_1_WriteBlind(0);		
    		while (1){
    			Freq_Process();
    		}	
    	}else {	
    		while(1){	
    			Freq_Process();	
    			Vol_Process();
    		}	
    	}

    The layout of the actual circuit is designed to reduce the chance of mistakes. First, most the wires that connect to the side power rails are the shorter, orange variety. With these shorter wires, it's almost impossible to, say, connect a ground pin to 5V power. When I first designed this circuit, most parts connected to power using longer wires. But by flipping the breadboard around and moving around parts, I prevented many short circuits.

    Something else you've noticed by now: the chips have eyes. Partially, I added these stickers because, well, anthropomorphized electrical parts are cute. But there's an important reason they're there. These eyes show the builder what direction to put in the chips. It takes trained eyes to see the tiny direction indent on a chip. These stickers make things friendly and accessible.

    Up next I'll probably start posting about preparing for and building the first big batch of 100 kits. I've already posted images of my microprocessor programming and test fixture. More photos will be on the way soon!

  • Programming and Test Fixture

    David Levi04/15/2017 at 05:49 0 comments

    I just put together a board that I can use to easily program and test the microprocessor I use in this kit. Check it out:

    Top View

    Bottom View

    The board is pretty simple. On the right, I recreated the 555 timer circuit, to create the frequency signals that the microprocessor takes in. I also added the speaker for output. It's all the same as the kit, but soldered in place. On the left, a PSoC MiniProg programmer connects to a row of header pins. This part provides power to the circuit and programs the blank chips.

    The actual microprocessor fits into a Zero Insertion Force (ZIF) holder. A ZIF uses a lever to grab onto the legs of the chip, making it really easy connect and disconnect the target chip. Underneath the ZIF, wires connect it all together.

    There's no space for antennas on the board, so for now I move my finger around the 555 timer to make sure the whole part is working. At some point I should program a separate processor to create the test signals, but this will work well for now. All I have to do is mount this board onto a sturdy piece of wood, and this little rig will last the first few hundred kits I put together.

  • Signal to Sound: What the Microprocessor Does

    David Levi04/11/2017 at 05:13 1 comment

    Last time, I explained how a dual 555 timer created frequency signals that changed with capacitance. Now, I'll explain what happens to these signals inside the microprocessor.

    The choice of Microprocessor was very limited, because I needed something in a DIP package that could be placed onto a breadboard. In the end, I decided on a PSoC 1. This is an old generation of chip and the development software required me to manually specify how blocks connected, but in the end I learned more about how System on Chips worked.

    The images in this post are from the digital and analog wiring diagrams from the PSoC Designer software package.

    The first step is to read in the frequency signal. I use one 8 bit counter each for volume and pitch. The counter increments every time the input completes a cycle. Every so often, an interrupt reads the counter value and compares it with the previous count. In this way, the processor knows how many times the input has cycled in a given time. By making multiple readings, a 12 bit value proportional to input frequency is generated.

    The next step is to calibrate this signal against a baseline, and to filter out any ripples. Also, math is done to correct for the non linear nature of the sensor: sensitivity near the antenna is reduced, and sensitivity away from the antenna is boosted.

    How all this happens is the "Secret Sauce" of the project, the one part I wish to keep proprietary. However, if you've read this far, I'm sure you could make similar software if you try. All it takes is a graphing calculator, a basic understanding of feedback and control loops, and a few months of trial and error.

    Creating an output from such a small chip was very tricky. I did not have the memory or speed needed to store or use a lookup table with output a predefined waveform. Instead, I broke the output into three stages: Frequency, Volume, and Filtering.

    The frequency generating block is shown above. A 16 bit PWM block creates the desired output musical pitch, from C3 to C6 and everything in between. And I do mean everything: the module can create more than 53000 discrete frequencies between the low and high limit (the rest of the 16 bit range is lost on each end).

    The output of the PWM module is routed to one of the I/O buses.

    Instead of going to an output pin, the signal from the PWM module heads towards the analog blocks. With this line of code:

    	/*Turn On Analog Modulator and set to Global_Out_Even_0 bus*/
    	AMD_CR0 = 0x02;
    The output of the I/O line modulates the ASC10 analog module. Now, the output of the analog module will change flip between positive and negative at the same frequency as the PWM module. Note that the reference of the analog modules is 1/2 VDD, or 2.5V. The signal will be flipped across the reference voltage: 0V to 5V, or 1.5V to 3.5V, or 2.5V to itself.

    I created a DAC at this analog block. When this 8 bit DAC has a value of 31, the signal will be at exactly the reference voltage. Flipping the signal just returns the same reference voltage. Thus, at a value of 31, the amplitude of the signal is zero. As the value of the DAC goes lower and lower, the amplitude of the modulated signal increases. A value of 0 creates max volume.

    So, the PWM creates a frequency that modulates a DAC. And changing this DAC changes the amplitude of the signal. But the creates a harsh square wave with plenty of harmonics. To create something pleasing to the ear, an analog filter is created inside the PSoC.

    Thanks to the magic of Switched Capacitor circuits, I create a low pass Buttersworth filter using the analog blocks ASD20 and ASC21. After filtering, the tone is softer, closer to a sawtooth.

    The output signal is sent out to an IO pin and connects to one side of a magnetic speaker. The PSoC can sink twice as much current as it can source, so the other side of the speaker connects to VDD.

    So, that's how the microprocessor (and assorted digital and analog blocks) turn a ~800 kHz and ~500 kHz signal into pitch and volume. But there's more going...

    Read more »

  • Turning Capacitance into a Signal

    David Levi04/11/2017 at 03:43 1 comment

    How does a theremin convert a wave of the hand into music? The first step is to convert capacitance into a usable frequency signal.

    Capacitance is how easy it is to store energy between objects in an electric field. By moving things (like your hands) closer to the theremin, capacitance increases. A hand far away from an antenna will only have a few electric fields. A hand that is closer will have more electric fields and thus more capacitance.

    This capacitance connects to a dual timer. In the schematic below, each side is a complete 555 timer. The antennas act at the capacitor. Only one resistor is needed, because these 555 timers are configured in 50% mode.

    To simplify part count, Control Voltage (Pins 3 and 11) are left floating. For more precise measurements, these pins should be bypassed to ground with their own capacitors, but in this application they made no noticeable difference.

    Typically, in this configuration, the output of this circuit would be taken off Dischage (Pins 1 and 13). I had no issue taking the output of the, well, Output (Pins 5 and 9). This decision removed the need for pull-up resistors.m

    The output frequency of the oscillator depends on how long it takes to charge and discharge a capacitor "C" through a resistor "R". A 555 timer in 50% duty cycle configuration has an output frequency "f" of:

    In practice, the pitch antenna oscillates around 800 kHz and the volume antenna oscillates around 500 kHz. This number varies depending on the environment, but the microprocessor will adapt. The chosen values of R keeps oscillation below 1 MHz. The two oscillators must be two dissimilar frequencies to prevent interference. Pitch should be the higher of the two frequencies, since the sensitivity of the pitch antenna is more important than the volume antenna.

    When a hand moves toward an antenna, capacitance increases and frequency decreases. Up next, I'll be explaining some of the things that goes on inside the microprocessor to turn this frequency signal into something audible.

  • The Project So Far

    David Levi04/08/2017 at 19:24 0 comments

    Since high school, I've wanted to design my own theremin. The idea of controlling an electronic circuit just by waving my hands fascinated me. I had tried out different circuit typologies, but creating a professional instrument was daunting.

    Then, late last year, I realized that theremins are not just musical instruments. They are also an amazing and unexpected way to demonstrate electric fields. I could create something for everyone, especially students, instead of focusing on professional theremists.

    I looked back at my old circuit designs, and chose a design that would be simple and reliable: A high frequency 555 timer and a microprocessor. The instructions would explain the build process step-by-step, as well as the theory behind the circuit. Finally, the circuit would have to to withstand the kind of mistakes that first time engineers could make.

    Currently, I have designed the circuit, programmed the microprocessor, and completed the first draft of the instructions and packaging. I've tested the kit on a dozen or so friends and family, and hope to make a batch of 100 kits within the month.

    In this project log, I'll be going back and explaining some of the design decisions I've made. I'll also be sharing my progress as I try to get these kits out into the marketplace and into the hands of students and hobbyists. And I'm sure there will be bugs or feedback to respond to, too.

    I'm excited to be posting on Hackaday.io! What could be more open-source than a hardware kit that anyone can put together?

View all 9 project logs

View all instructions

Enjoy this project?

Share

Discussions

Todd wrote 04/16/2017 at 20:25 point

Great job on the chip rig - I know those "wide" pins are always annoying when dealing with a breadboard, and with expensive chips it always makes a bit nervous. 
The board layout was great, super clear and easy.
Your idea of a programmed chip to help test your design is interesting, along with your incremental approach to building it - as a developer, it reminds me of Test Driven Development.

  Are you sure? yes | no

David Levi wrote 04/13/2017 at 18:37 point

Hello! Gakken theremins are awesome. I gave out a few test theremins to friends and family, but a retail batch is coming soon!

The audio output has a 2.5V DC bias and I think the signal swings more than line level. Once I get the kits out, I want to add a guide on how to connect this to external speakers. It should just take a bypass cap, resistive divider, and a jack. To keep it simple for folks who are just starting out, I included a small speaker. But there's alot of interest in connecting this circuit to an amp or effects.

  Are you sure? yes | no

ChrisRK wrote 04/13/2017 at 15:17 point

I just found this today and its already sold out, how long has it been available? Do you plan on making any more. My daughter and I built a Gakken theremin a few years ago but it was mostly assembling the container and didn't really deal with the electronics. She's just getting into guitar effects pedals and this would be a great addition to her sound arsenal. Please make more. Thanks

It looks like the voltage going into the speaker is low enough that it could be replaced with a jack to allow you to hook it up to an amplifier, right? 

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates