Think Create | Deqing Sun

Arduino harp

by on Nov.06, 2011, under My gadgets

Arduino has a built in function “tone()” to play sound. It is simple and efficient, while the only problem is the sound quality. The tone function uses square waves, which have only odd harmonics. This harp uses wavetable synthesizer to generate a 6-channel chord tone. The sound is controlled by the touch harp.

The wavetable synthesizer on AVR was first introduced by elm-chan. I tried to transplant the code to Arduino IDE, but it is too slow. Finally I used C code directly.

I removed the melody reading function and used the touch sensing function instead. The circuit is based on the schematic in “PreSense: Interaction Techniques for Finger Sensing Input Devices”. The human body is equivalent to a capacitor which is greatly larger than the distributed capacitance of the IO port. So the sensing pin needs more time to charge when touched. One problem I noticed is that the high frequency current from the PWM port may affect the sensing of the surrounding pins.

The circuit was drawn by Fritzing (seems quite unprofessional). I used a smaller resistor to shorten the time of sensing.

There is a performance. Please forgive my skill.

arduino_harp_code


2 Comments for this entry

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Blogroll

A few highly recommended websites...