Midi to Relay Controller

    This projects was done back in 1993.  It was an interface to control a Glockenspiel that I aquired that used to interface to some electric organ.  I could not find anybody who wanted it, so I decided to convert it to Midi.  This instrument is electro-mechanical.  It consists of metal bars that are struck by hammers in a solenoid.

    So, basically, this board consists a processor and 32 solenoid drivers, a midi port and an rs232 port.  Included in the archive are a PDF copy of the schematic, a PCB layout that was done with protel for windows V2.7, and includes gerber files and drill files, Jedec file for the pal (as well as source code in Tango PLD), and the C source code for the firmware.  Now, I have not done anything with this project for nearly 6 years, so the condition of the firmware is dubious.  But, it is there.  Have fun.

    Schematic (.pdf)
    PCB (.zip)
    Pal (.zip)
    Firmware (.zip)

Midi Glockenspiel

    I recently got back to work on this...I wanted to get the Glockenspiel running, and there were bugs in the original firmware.  Now, I originally just intended to repair the original firmware, but, it would not compile with the latest version of the compiler I have now.  I would have to go in and fix a lot of things that the compiler was complaining about and I said, why bother, I should have some fun.  So, I rewrote the whole thing using a RTOS that I wrote.

    At first, I had some problems with the code.  The idea I had was to have a single task that would control each solanoid that struck the bar on the Glock.  There are 30 of them.  Well, the dang thing was very erratic.  After thinking about it for a while, I realized that the 4096 bytes that I was allocating for the stack in each task, plus all the other memory I was allocating, was much bigger than the 128K of ram that was in the system.  After I figured this out, the work went pretty quick.

    Still, the Midi parser I put into the code (look in main.cpp) is something I threw together real fast.  I don't particuarily like it, so, I will probably change it soon.  But for now, it seems to work.

    The RTOS I used makes the entier code image about 17K.  This is probably kind of large, but, using the RTOS did make it real easy for making the solanoids fire.  You can only apply current to them for a short amount of time.

    Anyway, the code is down below.  You may find it interesting.

     Source for Firmware for RTOS version (.zip)

    Update 1-11-2003

    Now that I have the Glock mechanically working, the next task is to get back to the firmware.  I still have to make the firmware check the hardware switch to determine such things as which midi channel to respond to (right now it responds to any midi channel).

    Also, I would like to put a sequencer in the thing to play back some sort of midi file.  Having it play standard midi files would probably be best, but, I don't have the source code for one.  I do have the source code for a Music Studio player (this is a cheesy program that used to run on the Atari ST), and I have a whole bunch of files...well, stay tuned.