Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
114 lines (79 sloc) 7.47 KB

Prototyping Circuitry

video-demo

This tutorial describes how to build a DIY controller for the Voice Reaping Machine. As this controller is intended to replicate the controls of the Boss RC-1, it supports four types of events:

  • Simple Press button;
  • Press button twice (in less than a second);
  • Press & Hold (during 2 seconds);
  • Knobs events (both 'persistence' and 'phasing').

Materials & Steps

The circuit is looks like the following:

wiring

As materials, we are going to need:

That said, these are the steps to get the 'pedal' working:

  • Get started on Arduino;
  • Bluetooth BLE board (Bluefruit & Arduino);
  • MIDI on Arduino;
  • MIDI BLE from Arduino to a Mobile;
  • Connect the button;
  • Connect the two potentiometers;
  • Connect battery and rocker switch;
  • Writing the Arduino code;
  • Test the circuit with the VRM app;
  • Record a video of the prototype;

Each step is detailed in the following subsections.

Get started on Arduino!

Because there was no cable (get it ASAP!), decided to use my old Arduino Uno (still working!) instead of the brand new Arduino Micro. I also updated Arduino's IDE software.

Bluetooth BLE board

First, I soldered the connectors into the board. Then, I tested to see if the module was working all right by following the tutorial here.

In short, you'll need:

Wiring

Just like in this image: wiring

Setting Adafruit's BLE on Arduino

For this I used this tutorial.

The tutorial is effective, covering things such as configuring the board; sketch examples (e.g. using AT commands from your computer to the board). By the end, you'll hopefully get your arduino, your BLE board, and you computer via serial port!

PS: Detailed documentation of AT commands can be found here.

Testing the BLE with a tablet/smartphone

You can test communication with your Android/iOs doing as demonstrate in this video.

Midi on Arduino

Arduino has a MIDI library. By following this tutorial here, I was able to send continuous MIDI messages (rate: 1 per second) to my computer via serial. The code is available here.

Sidenote: If I was to synthesize these notes on the computer, we would need someone like the Hairless MIDI to route messages from serial to your MIDI synth. For my purposes, won't bother doing that.

MIDI BLE from Arduino to a Mobile

Afterwards, my goal moved towards replicating the same 'MIDI on Arduino' example now over BLE to a mobile device, which will synthesize the notes.

It wasn't hard. The default MIDI example available on the Adafruits'BLE library seemed to have worked (almost) out-of-the-box:

  • Inside the code, I needed to adjust the configurations to use Software Serial (I have an Arduino Uno);
  • Also needed to use Adafruit's BLE connect app to connect to the board;
  • To route the MIDI to GarageBand, I used the MidiMttr app.

I think that was all. The sketch used is available here.

Sidenote 1: Very often, I get errors when uploading the sketches to the board. These errors differ: Sometimes I get "Couldn't factory reset"; Sometimes, I get "Could not enable MIDI". Sometimes, fortunately, it works fine (i.e. "waiting for a connection"). Need to study why that happens.

Sidenote 2: Need to study how to make the BLE connection more reliable & straightforward (e.g. no need of external Adafruit's or MidiMttr app).

Connecting the button

Regarding Arcade buttons I use, there are two pairs of connectors: one pair for controlling the LEDs, another for using the button itself. For the LED connectors, specification says there is no need to use resistors so that it is possible to connect the button directly to the 5v and GND (these have built-in 1k resistors). For the button, you can follow this basic tutorial in order to read the button inside Arduino. Here, I used a 10k resistor.

I've modified this demo to work with the LEDs: if the button is pressed, the LED will light up. The code is here.

Connect the potentiometers

Also very simple step. Just follow this example here. The code example is available here.

Connect battery and rocker switch

Simple as this!

Writing the Arduino code

Once done with the hardware part, it's time to code a Arduino Sketch that will combine all previous points MIDI BLE, the button, and the potentiometers.

The resulting Arduino Sketch is available here.

Test the circuit with the VRM app

After some updates in the source code, and some fine tuning so that the visuals could match the physical controls, I was able to test this circuit with the VRM app! ;)

The final result can be watched in this video. Have fun! ;)

Update: Port to USB

In order to remove intermediary software (Adafruit's BLE connect app) and simplify power supply, I've decided to replace the BLE module by standard USB connection.

After looking for recent references, I've found this one here that seems to work. If you need further info, this link covers different approaches to MIDI-over-USB in Arduino.

My case, in short:

  1. Get an MIDI-over-USB compatible Arduino (in my case, the Arduino Micro);
  2. Test the device with the 'Blink' example;
  3. Install the MIDIUSB library, available in Arduino IDE library manager;
  4. Use this sketch here as a test.

And we are ready to go! ;)

You can’t perform that action at this time.