Hot Rodding My 3D Printer

Last night I made a small amount of progress.  I wrote a DTMF encoder in the ChucK programming language, which is located in this Pastebin page for anyone to view:  http://pastebin.com/zVW8g0p9.  The program works using OSC, or Open Sound Control which is a music communications protocol that works over the internet and replaces or was intended to replace MIDI.  It never did that but it did get picked up as an excellent way to send small, rapidly repeating pieces of info across the web.

In this case I have purchased an iPhone program called GyrOSC which sends all of the iPhone’s sensor data (or the subset that you specify) to a remote machine, in this case my local Mac.  GyrOSC also has a button console with buttons 1 thru 9.  Every time i press a button, GyrOSC sends an OSC message to my Mac which routes it to the ChucK program that I wrote.  This program then generates a DTMV signal on the audio system.

I have an audio jack going to a breadboard that is all set up with a chip programmed to decode the DTMF signal and light an LED when the signal for a particular button is recognized.  See the photo nearby to view the hardware.  BreadBoard with DTMF Decoder

And here is a shot of me holding up GyrOSC’s button screen on my iPhone.

GyrOSC
GyrOSC running on my iPhone, a convenient DTMF dialer.

Now as you might expect, writing a DTMF decoder in Arduino language and getting it to work on a chip with no input signal conditioning kind of um um um didn’t work at first, and I got tired and caught some zZzZzZzZz’s before breakfast in the morning.  I did get the bright idea, just before zoning out to sleep, to code up the DTMF decoder in the ChucK programming language (same as the DTMF encoder) because then I can debug the algorithm using print statements and error messages – I don’t have that luxury with the ATtiny85.

Then when the algorithm from Wikipedia is working in ChucK, it will be an easier task to transfer it into the chip.  Also I need to either reduce the volume or do some signal conditioning on the input side because an audio jack carries a 10V peak to peak signal, and the rebiased (hey, at least i rebiased it) signal has an ADC range of only 5V peak to peak.

Well that’s it for now.  I have lunch soon and after that I’ll be doing more work on the project which I will then blog for anyone following this.  I hope you at least find this project entertaining to read and enjoy the photos, videos, and PasteBin code.  I am getting a kick out of writing it, so let’s continue shall we?

Les

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s