MegaDrum MIDI Trigger

Documentation and FAQs



I'll add more information here as soon as I get some questions. For now here is some basic stuff.

Content (in no particular order):
1. General
2. MegaDrum drivers installation guide
3. MegaDrum Configuration
4. Construction
5. Firmware

General

MegaDrum is a 'drum pads to MIDI trigger'. It is similar to other DIY drum triggers BUT is more advanced and is cheaper and easier to build at that. Plus you have a wider choice of parts to build it with.
Why is it easier to build you may ask. First of all MegaDrum doesn't use any potentiometers (well, I lie here, it does use one to adjust LCD contrast. It doesn't anymore need a pot for LCD contrast). As a result you'll have to solder ~40-60 less wires. And a lot of wires create a mess (at least it does for me). Why is it cheaper? For the same reason! Potless design alone cuts the cost of parts by £15-£30 and this in a project where the cost of all other parts is around £20-£30.
Does the potless design make MegaDrum worse in comparison? No! On the contrary, MegaDrum is more advanced, more adjustable and has much more features. For now you'll have to take my word for this until MegaDrum is built by someone else besides me.
I guess that is enough for advertising. No, wait a second. Did I mention that MegaDrum is USB powered and so doesn't require a separate power supply? Oh yes, I did, on the Home page so I'll shut up.

MegaDrum USB drivers installation guide


With PIC18F2550 MIDI USB board by Synthex MegaDrum is now fully plug-n-play. Once MegaDrum is connected to a PC it'll be detected automatically and you just need to follow on-screen instructions.
If you built MegaDrum with FT232 or AVR-CDC USB board follow this guide for driver installation.

MegaDrum Configuration

This is a preliminary MegaDrum configuration guide. It's an early version and is far from complete. Click on the image below to download the pdf file.


Construction


First you need to choose what type of a Digital Board  you're going to build. At the moment you can choose either Atmega8 or Atmega32 based boards. At the bottom of this page you'll find parts lists for the both types of the boards and Analogue Board.

MegaDrum32 Digital Board part list.
MegaDrum8 Digital Board part list.
MegaDrum Analogue Board part list.


For these boards I don't find it extremely necessary to design and make a proper PCBs (although you probably have a different opinion).
I build all boards on stripboards, see these pictures:

pic1

pic2

pic3

pic4

As you can see I'm not very professional at soldering.

And here are some pictures of the MegaDrum32 fully assembled. I used one of the cases available from Maplin so it is not the nicest one.


You can see LEDs on this picture so you can guess that I used FT232 USB board. In fact I used one of the FT232 based USB<->Serial cables lieing around instead of building the board myself:)


This is a view from the back. As it is a development example I left an ISP socket and an LCD contrast potentiometer hanging from the back. 


I accidentely made a crack while making a hole for MIDI DIN5 sockets. See it
above the left socket?:)



Firmware


The great thing about Atmega chips is that you don't need a programmer to write firmware into it. Well, almost . You still need  some way of connecting your PC to a board. I've made a LPT-ISP cable  using info found on this page:
http://www.scienceprog.com/simplest-128-atmega-programmer/
I've just modified, accidentally, wiring for MegaDrum boards. The schematics for this cable can be seen here. Once you've built the Digital Board use this cable to connect it to your PC. To write firmware I used an excellent free program called PonyProg. And this is a PonyProg configuration you should use with this cable (Setup->Interface Setup):

ISP Setup

As you probably know you need to program Fuse bits to configure Atmega for proper operation. You can access Fuse programming in PonyProg via
Command->Security and Configuration bits.
And this is the configuration you must use when programming Fuses on Atmega32 (with Atmega324P PonyProg will fail to work, read below how to program it using avrdude ):

fuse32

and Atmega8:

fuse8


Now, you need to write a proper firmware, various types of which are available from the download page. For both the MegaDrum32 and the MegaDrum8 Digital Boards  you have an option of 12MHz and 16MHz versions of firmware. The reason behind this is that when I started this project I accidentally (I do a lot of things by accident) ordered 8MHz version of Atmega8. Eventually it turned out that all 3 Atmega8-8PU chips I got worked happily at 12MHz. Your mileage may vary.

Also you can notice that MegaDrum8 has two more versions of firmware.
The difference between firmware with and without 'nogain' is as follows:

  • the 'nogain' version is for those who choose to use all 4 keys (left, right, up, down) for navigating MegaDrum menu. As a trade off you loose ability to adjust gain for input channels. If your piezo sensors provide high signal (e.g. DIY pads I've made do) you won't need any additional gain and should use this firmware version. Also you should NOT solder in R26 from MegaDrum8 schematics.
  • the version without 'nogain' suffix has 3 levels of gain for every channel but you cannot use key 'left' for menu navigation. Instead you can use Snare hit as 'left' key while in the menu.
All of this is due to pins shortage on Atmega8. On MegaDrum32 there is no such problem so you can use all 4 keys and you will have 9 levels of gain adjustment for every channel.

Once you've chosen the proper firmware you can load it into PonyProg, select a right chip in Device->AVR micro>Atmega8/Atmega32, and write it into your Atmega.

If you used Atmega324P instead of Atmega32 here's the instruction on how to program it using avrdude.
1. First, download and unzip avrdude for windows, thanks for compiling this version goes to Alex, see http://tinkerlog.com/2007/07/15/avrdude-54-for-windows/.
2. Copy a firmware you want to program Atmega324P with into the directory where you unzipped avrdude.
3. From "Start->Run" run cmd.exe
4. On  the command line go to avrdude directory, e.g.:
   "cd C:\arvrdude-5.4-win"
5. From the command line program Atmega324P (all on one line):
   "avrdude.exe -q -u -C avrdude.conf -p m324 -P lpt1 -c stk200 -U efuse:w:0xff:m -U hfuse:w:0x9f:m -U lfuse:w:0xef:m flash:w:megadrum324_20_20071211.hex:i"

where megadrum324_20_20071211.hex is the name of the file with the firmware.
That's it!


More will follow soon.

These tables are for old schematics so references will mismatch with latest schematics. Use it just as a  guidance. See MegaDrum forum for uptodate lists of materials.

MegaDrum Atmega32 based Digital Board


Note: I did not list any type of connectors or buttons here, except USB socket. I guess it's up to you to decide what type of connectors or buttons to use depending on what you can buy or may have.         
          

 Name
 Quantity
 References
 Value
 Notes
 ICs
Atmega32-16PU
or Atmega324P-20PU
1 U1
available from RapidOnline and Farnell in the UK. Atmega32L-8PU may also work for 12MHz firmware
6N138N 1
VO1

RapidOnline , Farnell
Capacitors

2
C1-C2
22pF


4
C3,C4,C6
100nF
 You may want to  put 2-3  of these between ground and Vcc  (not shown on the schematics)

1
 C5
1uF
 Resistors

7
R25,R27-31
220


10
R1-R8 100


4
R21-R24
330


8
R9-R16 6k8


1
R20
6k2


1
R19
10k


2
R17,R18,R26
4k7

 Miscellaneous
Crystal
1
X1
20MHz, 16MHz  or 12 MHz

Inductor
1
L1
1mH

USB Type B Socket
1
USB1

Farnell, Maplin code N95FK
Diodes 1
D1
1N4148
DIL40
1


socket for Atmega32
DIL8
1


socket for 6N138


MegaDrum Atmega8 based Digital Board


The note about connectors and buttons for Atmega32 based board applies here as well.

 Name
 Quantity
 References
 Value
 Notes
 ICs
Atmega8-16PU  1 U1
available from RapidOnline and Farnell in the UK.
Atmega8L-8PU may also work with 12MHz firmware
6N138N 1
VO1

RapidOnline , Farnell
Capacitors

2
C1-C2
22pF


3
C3-C6
100nF
 You will want to  put 2-3  of these between ground and Vcc  (not shown on the schematics)

1
 C5
1uF
 Resistors

7
R20,R22-R26
220


6
R1-R6
100


4
R16-R19
330


6
R7-R12
6k8


1
R15
3k3


2
R13,R14,R21
4k7

 Miscellaneous
Crystal
1
X1
16MHz  or  12MHz

Inductor
1
L1
1mH

USB Type B Socket
1
USB1

Farnell, Maplin code N95FK
Diodes 1
D1
1N4148
DIL28
1


socket for Atmega8
DIL8
1


scoket for 6N138


MegaDrum Analogue Board


Again, the note about connectors for Atmega32 based board applies here.

 Name
 Quantity
 References
 Value
 Notes
 ICs
4051
2
IC1,IC2
RapidOnline, Farnell
Capacitors

1
C1
100nF
 You will want to  put 2-3  of these between ground and Vcc  (not shown on the schematics)

1
C2
1uF
 Resistors

17
R1-R17
100

 Diodes
  44
D1-D44
BAT85
RapidOnline , Farnell
 Miscellaneous
DIL16
2


sockets for 4051

MegaDrum LCD, Keys, MIDI I/O


The note about connectors and buttons for Atmega32 based board applies here as well.

 Name
 Quantity
 References
 Value
 Notes
 Miscellaneous
LCD 16x2
1
LCD1
H44780 compatible
Ebay, RapidOnline, Farnell
Pot
1
VR1
10k

Diodes 2
D1-D2
1N4148




 

L10
Web Stats Reporter 3.15
LevelTen Hit Counter - Free PHP Web Analytics Script
LevelTen dallas web development firm - website design, flash, graphics & marketing