Ferraganchos & Pinchos

Or how to rip all this stuff out of my head…

Archive for the category “electronics”

OpenPipe Breakout & Arduino Musical Shield

UPDATE (October, 1st 2012)!!! We’ve moved to www.openpipe.cc.

If you want to use OpenPipe Breakout as a MIDI controller you need some sort of synthesizer. You could use generic synths with custom sound samples (GarageBand, Reason) or specific synths like UniversalPiper, but all of them need a PC (or smartphone) to run.

If you want something “portable” you need to use a specific hardware synthesizer. The guys from Sparkfun designed an Arduino Shield based on VLSI VS1053b chip (Music Instrument Shield). This chip is a CODEC with support for several audio formats, and It can also play real-time MIDI. I was wondering how good the sound synth inside this chip is, so I bought one.

Connecting OpenPipe breakout board and Arduino UNO is quite simple:

  • OpenPipe GND: Arduino GND
  • OpenPipe VCC: Arduino 3.3V
  • OpenPipe I2C SDA: Arduino Analog 4
  • OpenPipe I2C SCL: Arduino Analog 5

OpenPipe & Arduino Shield connectios

Then connect a sound amplifier or headphones to the jack audio output.

OpenPipe, Arduino Musical Shield and Headphones

Here is the code I’ve used. It’s basically the same for OpenPipe MIDI, but with some changes in the MIDI command functions, because this shield uses SoftwareSerial library.

I’ve tested several instruments (Bagpipe, Oboe, Church Organ, Clarinet, Trumpet, …) and the sound is good, but It’s not amazing.

You can draw your own conclusions from the video: our lovely geek (me) making noise… again…

Advertisements

CDC Bootloader on (Dealextreme) Teensy

The bootloader provided by Dealextreme in Teensy boards is not compatible with Teensy Loader (At least the boards I have with loader 1.06).
In order to have a better (non-proprietary) bootloader we can choose from three provided by LUFA:
  • CDC Class, AVR109 protocol compatible (AVRDude)
  • DFU Class, Atmel DFU protocol compatible (Atmel FLIPdfu-programmer)
  • HID Class, with an included custom cross-platform loader application (Teensy Loader compatible???)
From an Arduino point of view, CDC is the best choice now, but DFU procedure is similar.
I’ve used an avrdragon with avrdude. Here is the connection between Teensy and avrdragon ISP connector:
And now the software part:
MCU=at90usb162
BOARD= TEENSY
F_CPU = 16000000
FLASH_SIZE_KB = 16
  • make
  • WOW!!! We have BootloaderCDC.hex
  • upload
sudo avrdude -v -pusb162 -cdragon_isp -Pusb -Uflash:w:BootloaderCDC.hex
Using ‘lsusb’ you should see something like:
Bus 003 Device 004: ID 03eb:204a Atmel Corp. LUFA CDC Class Bootloader
Now we can upload code using CDC bootloader:
sudo avrdude -v -pusb162 -cavr109 -P/dev/ttyACM0 -Uflash:w:blink.hex
Due to reset circuit on Teensy 1.0 you must repower the board in order to launch the uploaded app (reset button always enters to bootloader mode).

Post Navigation