Brains

BRAINS is the main board of both Hickory and Dickory. But due to its open design concept, it can be used as a multipurpose board to build you own MIDI controller.

So, if you are a DIYer thinking about making cool MIDI devices, Brains can make the task easier. You only need to define how many panel elements, such as LEDs, switches (two or three position) and potentiometers are you going to use, and connect them to the provided pins.

Of course some programming is needed too. But let’s take one thing at a time!

Brains consist of:

  • A Teensy 3.1 core.
  • Two 16 channel multiplexers.
  • Two 6 channel hex inverters.
  • 20 capacitors connected to the 20 Teensy´s analog inputs to stabilize the reading.
  • A filter and a regulator to smooth the power signal from the USB connector.
  • A robust USB type B connector.
  • 4 male 20-pin sockets.

Teensy

We’ve decided to use Teensy microcontroller due to its power, size and price. Among all models available we found that version 3.1 is the most suitable for us.

In fact if you have used an Arduino before, programming a Teensy microcontroller is very straightforward . If not, don’t worry! If you visit the Arduino website you will find a very solid reference with lots of examples.

Tip:

Start installing the Arduino IDE and then Teensyduino, which is some kind of IDE extension for using Teensy. Then click on "Tools" menu, select "Teensy 3.1” in the "Board” submenu and "MIDI" in "USB Type" submenu. And you are ready to go!

Multiplexers

We have used two HEF4067 multiplexers. Each one has 16 channels, multiplying the Teensy's inputs and allowing us to connect all your panel components.

One of the mux outputs is connected to a Teensy analog input, so this is ideal for using with potentiometers, 3 position switches, or anything that needs an analog reading.

The other multiplexer output is connected to a digital input. This can be used with 2 position switches, push buttons, or any component that needs a digital reading.

Hex inverters

In this circuit we use two 74LS04 hex inverters to save outputs. As you can see in the schematic this inverters are used to feed several bi-color LEDs (they are common ground type). The same Teensy output is connected to one of the LED pins and to the inverter input. The inverter output is connectedto the other LED pin (note that both LED pins have an appropiate series resistor). So when a HIGH is output from the Teensy pin, one LED color brights and the other is turned off, all using just one Teensy out. Use them freely if you want to place bicolor LEDs on your panel/box.

Tip:

In any case if you don’t want to use 2 color LED's, you can always skip this two ICs (as it is done on Dickory, for example) and connect your standard LED's directly to the Teensy outputs. Of course, remember to use an appropriate series resistance.

Power filter and capacitors

Potentiometer reading is very sensitive: values keeps jumping on and on due to supply rail ripple and noise on the potentiometer output pin, which in turn has to do with the potentiometer noise figure.

The supply signal from the USB is very noisy, that's why a filter is needed (as recommended in this FTDI application note). To smooth even more the supply signal, a 5v regulator is added to the VCC path.

Regarding the pot outputs and to stabilize readings, each analog input has a capacitor connected in parallel to the ground plane. Also, we use separate GND planes both for analog and digital ground.

Tip:

The ideal scenario involve using low value potentiometers: the lower the value, the lower the noise figure. But also keep in mind that a low resistance value will consume a lot of current, so a compromise has to be reached. For your guidance, 10Kohm works just fine.

Also, depending on the noise floor you find, you may need to filter the signal even more via software. This can be made by several techniques. One of them is using histeresis:  here you can find some examples.

Sockets

Brains has 4 male 20-pin sockets. This makes a total of 80 panel elements (LED’s, switches buttons, potentiometers, sensors…) that can be connected. The easiest way to achieve this is by using a 20-wire flat cable and MOLEX connectors, bur of course you can design your own control board to house all the panel components.

Tip:

To make things easier here you can find a table with the pin assignments. Also, here is Brain’s schematic.