I decided to build and design a midi controller which is used to send commands to a computer running a DAW(digital audio workstation) to control different parameters within it. The DAW I used is called Ableton Live. There are 16 button pads and 6 potentiometers on the front of the unit. Depending on which DAW is used, you can assign the potentiometers to control parameters like track volume, track reverb, and any other effects applied to a track. There is also a dock on the side which has 10 more analog channels to connect more potentiometers and allow for future expansion of other projects and ideas. The buttons can be used to launch loops, or you can play it just as you would play a regular piano or keyboard. You will be able to change the bank of notes that the buttons send to the computer using bank up and bank down button on the front panel. There is a total of 128 notes (or 128 values) you can play on the buttons and you can bank up 16 notes at a time meaning 8 banks. There are also RGB LEDs’ under the buttons to indicate what bank you are currently on. There is also an LCD display displays what value you are sending to the computer and indicates the bank number.
1.1 Midi Overview
Midi allows you to control virtual instruments within a audio recording program. For example you can assign a piano to a track and control the notes of the virtual piano using a midi controller. A midi command is consists of 3 bytes. The first byte is a status byte. It tells the computer what type of action it will be performing. For example a common status byte would be the decimal value 144 which means note on. This is then followed by two data bytes; the next one being which note to turn on. 0 is the lowest note and 128 is the highest. The last byte would be how loud you want that note to sound. This is called velocity. 0 would be the quietest and 128 would be the loudest. If you want to control things like volume or any other parameters you can send what is called a control change command. This is only two bytes. The first byte would tell the computer which control change you are wanting to control. For example sending the decimal value 16 would be initiated a control change on channel 1. The next byte is the value between 0 and 128 which is sent to the computer. You assign which parameter is controls within the program.
2.0 PCB AND HARDWARE SETUP
There are 3 PCBs’ which I have designed which make the operation of this midi controller possible; the main PCB(Figure 2.0), the RGB driver(Figure 3.0-yellow), and the analog channel expansion port(4.0-yellow). There are 3 units I have used that are bought online; the MIDI to USB converter(Figure 4.0-purple), the LCD screen(Figure 3.0-purple), and the button pad PCB(Figure 3.0-purple).
The main PCB holds the microcontroller I used, and two ADC chips. The microcontroller I used is a PIC18F2550, and the two ADCs’ I used are LTC2309s’. If you refer to figure 2.0, you can see the PIC placed in the center and I have placed the two ADC’s on either end of the PCB. The reason I did this was because of the location I have mounted the PCB within the enclosure. The 6 onboard potentiometers are to the left of the PCB and the ADC extension port is to the right of the main PCB. Since each ADC has 8 channels, I have set it up so IC2 uses 6 of its channels for the onboard potentiometers, and then the extra two ADC channels are added to the ADC extension port.
If you refer to the main PCB schematic in step 5, you will note that I have used two voltage regulators for this design. IC3 is set to regulate the voltage at 5 volts. This voltage is used to power the chips, LCD, and button pad LEDs’. The other voltage regulator, IC5, is an adjustable reference voltage for the potentiometers and ADC channels. This is adjusted using a small surface mount potentiometer located directly beside it. There is also a diode in series at the input of these voltage regulators to keep anything from being damaged if the input voltage was accidently reversed. I made sure the diode was rated high enough to handle the current. Located around the PIC are various connectors used for connecting to the button pad and LEDs’. The function of each pin will be discussed in a later section. To the right of the PIC are the connectors used for connecting to the analog channel expansion port and the programming port. The reason I have the programming port on the same PCB as the ADC extension port is I want to be able to reprogram the PIC without having to remove the lid of the unit. To get access to it, the side panel simply needs to be removed as shown in figure 5.0.
The LED driver PCB I designed is mounted directly beneath the button pad PCB(Figure 3.0). If you refer to the schematic in step 4 this PCB enables me to control all the LEDs at the same time. The connection from this board to the main PCB has 5 pins; VDD, GND, and 3 LED control pins. Each of these control pins is connected directly to the input of the mosfet on the driver board which controls all the LEDs of that color. One mosfet controls all the red LEDs, one for all the green LEDs, and one for all the blue LEDs.