This is an old revision of the document!
+Table of Contents
PS202 - MIDI-Duino
Paper-PCB
Schematic
Parts
- Resistors:
- 3x 220 Ohm
- 3x 2 kOhm
- 1x 1 kOhm
- 1x 3.3 kOhm
- Capacitor:
- 3x keramic Cap 100 nF
- 2x electrolytic capacitor 100 µF
- Semiconductors:
- 1x Arduino Pro Micro
- 1x 7805
- 1x inverter 74 LS 04N
- 1x optokoppler 6N138
- Diodes:
- 3x LED Low Current 2mA
- 1x 1N4148
- 1x 1N4007
- Mechanical:
- 1x 8 pin IC socket
- 1x 14 pin IC socket
- 1x 10 pin socket strip
- 1x 12 pin socket strip
- 1x connector
- 2x MIDI socket 5 pol 180°
- 1x push button
- 1/3 160x100mm 2.54mm raster stripboard
Software
Example Code
Arduino IDE hack
ARCORE USB-Midi hack for the Leonardo. One has to modify the Arduino IDE to run MIDI over USB.
https://github.com/rkistner/arcore
USB-Midi installation manual
Arduino MIDI Library
The Arduino MIDI Library v4.2 for Midi over TX/RX is here:
https://github.com/FortySevenEffects/arduino_midi_library
Knowledge
The Arduino Pro Micro clone
https://www.sparkfun.com/products/12640
Fast PWM
A super tutorial for the fast PWM on Arduino Leonardo:
http://r6500.blogspot.de/2014/12/fast-pwm-on-arduino-leonardo.html.
Due to the fact that the Pro Micro has no pin 11 or 13 I had to activate fast PWM on pin 5. It is the complementary channel A and thats why all values are 255 - value.
And here's the code:
void pwmSet5(int value) { OCR4A = 255 - value; // Set the negativ PWM value DDRC |= 1 << 6; // Set Output Mode C6 TCCR4A = 0x42; // Activate the complementary channel A }
MIDI Library
Here are the links for the MIDI library for MIDI over the serial pins (TX, RX).
MIDI Library 4.2
MIDI Library Callbacks Description