Arduino MIDI Controller – early stage

I recently started working on a USB MIDI controller using the Arduino and microcontroller Atmega32.

As we know Arduino provides functions for MIDI protocol.
In fact MIDI protocol is a serial protocol that operates at 31250 bps.
More information about MIDI and Arduino here.

There are many projects having as object MIDI controllers made ​​with Arduino.

Most of them, however, presents some characteristics that I’ve seen as disadvantages for what I intend (USB interface, no specific drivers, … )

  • Involve the use of certain Arduino compatible boards.
  • Suppose changing the firmware/bootloader of Arduino board.
  • Or involves using a USB-MIDI converter.

The main problem that I hit was sending MIDI commands over USB.

I already knew the V-USB which I used in other projects (V-USB = Virtual USB, a software-only implementation of a USB device for AVR microcontrollers).

So to get to the point I decided to develop a module/ brickout which give me the possibility to be properly integrated into the final project.
For the initial phase I used some DYI modules they already had made to other experiments and a develompent board for Atmega32.
This is my initial(experimental) setup:
MidiControllerInitialSetup

  1. Home made USB brickout.
  2. Minimal Atmega8 brickout.
  3. Atmega32 development board (can be replaced with almost any Arduino board).
  4. USBASP programmer.
  5. Temporary installation of 10 potentiometers (10k) on a aluminum chassis.
  6. Temporary cable “hub”.

USB brickout

USBBrickout1USBBrickout1_Sch

ATmega8 module

ATmega8BrickoutATmega8Brickout_Sch

 

ATmega8  has been programmed with a slightly modified version of MOCO/MICO – USB to MIDI Converter.

HEX file can be downloaded and burned in ATmega8 directly without the need to compile the project in AvrStudio4:

The connection between the two modules

USBConnection

  • USB Data-  to PD3
  • USB Data+  to PD2
  • 1.5k pullup resistor R3 to PD4
  • VCC to VCC
  • GND to GND

After I burned the firmware in ATmega8 and made connections, I connected the USB cable to the computer.

Windows immediately detected the device and installed the standard drivers. No other drivers is required (tested on Windows7-64bit and WindowsXP-32bit).

DeviceManagerMIDIShield

Windows Device Manager – Screenshot

FLStudio_MIDIShield

Fl Studio – Screenshot

Tracktor2_MIDIShield

Traktor – Screenshot

 Development board

For this stage of the project I used a commercial development board for Atmega32. I used this and not one of standard Arduino boards because I intend to make a PCB for the project, based on Atmega32 /Atmega64.

For information about how to use the ATmega32 with Arduino IDE  read the previously post about this.

For those who want to use one project with Arduino boards must consider the connections between the Arduino board and ATmega8 module.

In fact it is simple. Just plug the serial ports of the two microcontrollers and GND:

  • RX from Atmega8 to TX of Atmega32 (or TX of Arduino)
  • TX from Atmega8 to RX of Atmega32 (or RX of Arduino)
  • GND from Atmega8 to GND of Atmega32(Arduino)

In this set-up I am not connected  VCC because USB interface is powered by USB port(or HUB) and Atmega32 is powered separately.

Now we can make first test with the Arduino IDE. As you can see it works with the standard example File>>Examples>>Communication>>MIDI.

The Knobs

Even if in the photo are 10 potentiometers, only 8 of them are connected. Each one is connected to each analog input of the microcontroller. This is because we are still in experimentation phase.  We want to clarify how it works these cheap potentiometers. Since I want to use up to 64 or even 128 analog inputs (knobs+faders) price is a factor. And I want to see if it is possible to use them or had to change the direction.

After a few minor tests I have concluded that knobs must be fitted as stable as possible, electrical and mechanical. Otherwise lack of stable connections (and shielding) lead to incorrect results. Although initial tests showed some instability of the analog readings, I finally got a constant reading even without using a threshold. Some potentiometers that seemed unstable initially, have stabilized after a few uses.

This is end of part 1.

Next steps:

  • Unification of the two modules (USB and ATmega8) into one.
  • Creating a module for multiplexing analog inputs, based on the integrated circuit CD4067.  Each module will have 16 analog inputs and will use only one of the 8 analog input of ATmega32 (or Arduino). Resulting maximum of 128 analog inputs for ATmega32 and 96 for Arduino Uno.
  • Adding a 16×2 LCD display into the project (already progressing)
  • Creating a module for multiplexing digital inputs, based on the 74HC165 for buttons and encoders.
  • Creating a module for multiplexing digital outputs, based on the 74HC595 for LED.
  • Putting all together.
  • Finall PCBs.
  • Enclosure.

ArduinoUsbInterface

PDF schematic download here: arduino usb interface

USB_MIDI_Shield

MIDI USB Interface - GEDA Project

MIDI USB Interface – GEDA Project

PCB for USB MIDI Interface – Almost done

Updated: December 2, 2014 — 3:24 pm

6 Comments

Add a Comment
  1. Good afternoon, you do not tell me, in the project midi usb controller with firmware atmega 8 how to set fuses?

    1. Give me a few hours. I’ll read fuse bits directly from working project.

    2. avrdude: safemode: Fuses OK (E:FF, H:D9, L:CE)

  2. Good day, made this device, excellent works. Tell me, could you please send a circuit PCB board layout in the format “lay” to the mail?

    1. I do not know what is the “lay” format. I can send you project in gEDA format, because it was made in gEDA.

      Only it is not finished: there are two tracks that are not routed. It is designed single-side for etching at home… and that two tracks must be routed by jumper wire…and I need to make room for vias…

      Also I need to make all tracks slightly thicker, because it’s easier to etch like this…

Leave a Reply

Your email address will not be published. Required fields are marked *

OpenHardware.Ro © 2017 Frontier Theme