Kaoss Guitar (Update 1)

For a while, a friend and I have been planning to build a specialized MIDI controller into a guitar to control a Korg Kaoss Pad KP2. The idea came from the guitar used by Matt Bellamy of Muse (check out a video of it).

We ordered the electronics for the guitar from SparkFun Electronics and Digi-Key. When the project is over, I plan to add up the total cost and post a bill of materials. I suspect it will total to around $100.

Today we tested out the 4.3″ touchpad from SparkFun using an Arduino. I have just finished setting up an ATmega328P on a breadboard and got a basic blink program running. The final product will be running on a plain AVR without the Arduino libraries/bootloader.

One problem I ran into using my FTDI programmer was the clock rate. A fresh ATmega328P comes running at 1 MHz, significantly lower than the default 16 MHz on Arduino-prepared ATmegas. As a result, I kept getting errors like this:

david@second:~$ avrdude -c ftdi -p atmega168 -P ft0
avrdude: BitBang OK 
avrdude: pin assign miso 1 sck 3 mosi 0 reset 4
avrdude: drain OK 
 
 ft245r:  bitclk 230400 -> ft baud 115200
avrdude: ft245r_program_enable: failed
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.
 
 
avrdude done.  Thank you.

Eventually I found AVRDUDE’s -B option. It adjusts the clock rate that’s fed into the SCK pin on the AVR. I found that a value of -B 76800 works well, but if you’re running into this problem, I recommend starting with -B 1 and going up until it stops working. To be explicit, this is the command that I found works:

david@second:~$ avrdude -c ftdi -p atmega168 -P ft0 -B 76800
This entry was posted in Electronics, Linux, Programming and tagged . Bookmark the permalink.

2 Responses to Kaoss Guitar (Update 1)

  1. Chris says:

    did you ever finish writing that code? the code that uses a touch pad as a midi input for the kaoss pad?

  2. David says:

    No. I’m working on this project with someone I go to school with who lives pretty far away. We’ll be continuing this project in a couple weeks when school starts again.

    I’ll probably post an update on the project next month.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">