Warning: Table './lockneyn_dorkbotpdx/cache_page' is marked as crashed and should be repaired query: SELECT data, created, headers, expire FROM cache_page WHERE cid = 'http://dorkbotpdx.org/wiki/midimonster' in /home/lockneyn/public_html/dorkbotpdx/includes/database.mysql.inc on line 172

Warning: Cannot modify header information - headers already sent by (output started at /home/lockneyn/public_html/dorkbotpdx/includes/database.mysql.inc:172) in /home/lockneyn/public_html/dorkbotpdx/includes/bootstrap.inc on line 488

Warning: Cannot modify header information - headers already sent by (output started at /home/lockneyn/public_html/dorkbotpdx/includes/database.mysql.inc:172) in /home/lockneyn/public_html/dorkbotpdx/includes/bootstrap.inc on line 489

Warning: Cannot modify header information - headers already sent by (output started at /home/lockneyn/public_html/dorkbotpdx/includes/database.mysql.inc:172) in /home/lockneyn/public_html/dorkbotpdx/includes/bootstrap.inc on line 490

Warning: Cannot modify header information - headers already sent by (output started at /home/lockneyn/public_html/dorkbotpdx/includes/database.mysql.inc:172) in /home/lockneyn/public_html/dorkbotpdx/includes/bootstrap.inc on line 491
Introducing the Midi Monster. | DorkbotPDX

Introducing the Midi Monster.

About

The Midi Monster is a general purpose USB device that will allow easy interfacing with a variety of real-world sensors. It was developed in support of the the PD workshop.

Source

Preliminary firmware code is hosted at: midi monster git repository

Schematic

schematic topology

Programming

There are two programmable AVR chips on the board. The ATmega32U2 acts as the USB and MIDI master and is programmed with the built-in (factory-default in chip) DFU bootloader.

To activate the DFU bootloader, plug the device into a USB port and execute the following button press sequence:

  1. Press and hold the HWB button
  2. Press and release the RESET button
  3. Release the HWB button

(note: you must use dfu-programmer from svn or patch a release version to program the 32u2)

udev rules

In order to program the chip without using root I had to ad these udev rules:

[to program the mega32u2 with dfu]

SUBSYSTEM=="usb", ACTION=="add", SYSFS{idVendor}=="03eb", SYSFS{idProduct}=="2ff0", MODE="660", GROUP="uucp", SYMLINK+="atmega32u2-%k"
BUS=="usb", ACTION=="add", SYSFS{idVendor}=="03eb", SYSFS{idProduct}=="2ff0", MODE="660", GROUP="uucp"

[to program the tiny48 with the midi monster in avrisp mode]

SUBSYSTEM=="usb", ACTION=="add", SYSFS{idVendor}=="03eb", SYSFS{idProduct}=="2104", MODE="660", GROUP="uucp", SYMLINK+="avrisp-%k"
BUS=="usb", ACTION=="add", SYSFS{idVendor}=="03eb", SYSFS{idProduct}=="2104", MODE="660", GROUP="uucp"

and added myself to the "uucp" group

dfu-programmer

The utility used to send a compiled program to the DFU bootloader is dfu-programmer. As of this writing, however, support for the 32u2 is only available in svn.

To check out the trunk of the svn tree:

svn co https://dfu-programmer.svn.sourceforge.net/svnroot/dfu-programmer/trunk/... dfu-programmer

Then build it:

$ cd dfu-programmer
$ ./bootstrap.sh
$ ./configure
$ make

These are unified diffs that can be applied with the 'patch' program if you are compiling an older released version of dfu-programmer (see attachments at bottom)

Programming the tiny48

The slave device on the board is the tiny48. It can be programmed by programming an ISP (in circuit serial programming) firmware to the atmega32u2 and then using the avrdude utility.

In order to program the tiny48 with avrdude I had to ignore the signature [-F] because my version of avrdude doesn't support the tiny48 either [I just said it was a tiny45 and then ignored the sig]:

avrdude -c avrisp2 -p t45 -P usb -e -U flash:w:../MIDI.hex -F

Using

<TBD>

AttachmentSize
arguments.c.diff_.txt1.01 KB
arguments.h.diff_.txt387 bytes
midi_monster_schematic.jpg253.02 KB
midi_monster_topology.jpg291.57 KB
midi_monster_topology_th.png29.12 KB
midi_monster_schematic_th.png15.59 KB