TouchDuino XL

Here is a modification of the first version of my TouchDuinoX(tended): The TouchDuino XL

You can download the sketch from here. To get it running you have to download and install the Centipede Shield library. You do not need the shield itself necessarily, but it make things easier if you don’t want to wire it up manually with 4xMCP23017.

The sketch does not include the code for the analog multiplexer/demultiplexer shield as it makes things too complicated. This is about touch sensing, so we’ll keep it as simple as possible.

What is that? It is an Arduino UNO connected with 4x 16-bit DIGITAL input/output MCP23017 port expander with interrupt output  (http://www.microchip.com/wwwproducts/Devices.aspx?product=MCP23017) via I2C and 3 x High Speed CMOS 16-channel ANALOG Multiplexer/Demultiplexer CD74hc4067 fom Texas Instruments (http://www.ti.com/product/cd74hc4067)

The 3 x CD74hc4067’s come as an ready to use Arduino Shield produced by mayhewlabs.com (http://mayhewlabs.com/products/arduino-mux-shield). My version is an older version. A newer shield is available which is from 2013.

We used the old version because it was part of my old YAAMIDrum project from 2012. So dust was removed from the shield and reactivated to become a part of the new TouchDuino XL.

The special thing about the digital inputs is the fact that they are used to trigger not only bit values (on/off) but they return values from 0-127 that can be used to do several things. E.g. you can use these values to change the volume of a midi tone. Or you can use it to pitchbend the sound. There are a lot of possibilities.
How is this done? We modificated the arduino sketch that can be found on http://playground.arduino.cc/Code/CapacitiveSensor so that it runs on the MCP23017. Fortunately there is a great library (http://macetech.com/Centipede.zip) available from
http://docs.macetech.com/doku.php/centipede_shield where you can buy a ready to use arduino shield to get hings running very quickly.
For german users there is a worth to read discussion in the arduino forums (http://forum.arduino.cc/index.php?topic=170396.0)

We used this library to avoid writing things twice. You can find example code on their website that shows how to use this excellent lib.

Here is described how  one of the 4  chips is connected on the breadboard

mcp23017AdrPins
mcp23017_arduino

You need to make your fingers wet (with water or best and cheapest with your own saliva). Then put one wire to ground and hold it in one hand. With a wet finger of your other hand touch a paperclip and you can read the measured value from 0-127 on the serial monitor of the Arduino IDE. Set the DEBUG value in the sketch to 1 for debugging and printing these values out to serial line.

Conclusion:

The problem is the internal pullup resistor of the MCP23017. It has 100 kilo ohm, whereas the internall pullup resistors of the arduino are 20 kilo ohm only. So the solution is really simple, but dangerous:

Turn off the internal pullups of the MCP23017, map the values the other way round and you are done. The disadvantage: If you ever connect any active sensor to on of the inputs/paper clips the possibility that you damage the IC or the Arduino is more than high. Be careful.

But now you simply can touch the paper clips to produce midi sounds 🙂

Download the modified version directly from here.

TouchDuinoX(tended)

Today there are really good news to announce:
The TouchDuinoX(tended) is born.

Read the article about the XL version of the TouchDuino . The source code (arduino sketch) is availble from there.

It is now possible to build a 128 touch sensitive keyboard with one Arduino Uno and eight MCP23017s which are really cheap as one of them costs about 1 Euro. So you can built your own touch sensitive musical instruments with up to 128 inputs.

In this video you can see a proof of concept:
Does the TouchSense Arduino library work on a MCP23017 16 bit I/O expander? To give you the quick answer: Yes, it does.
Because the MCP23017 16 bit digital I/O expander runs via I2C and gives you additional 16 GPIO pins you can use max. 128 touch sensitive input pins.
There are three address pins on each of these chips that allow you to add maximal 8 of these devices to the I2C bus. It was not a trivial task to port the TouchSense library from the first project to work togehter with these chips, but today I wrote a basic library with example code for the Arduino that gives you some insight in this process.

Odroid-C1 makes music

Hi,
here you can see and listen to a little example showing the odroid and his excellent software MIDI capabilities.

My playing piano is really a nightmare but it shell demonstrate how fast the ODROID-C1 can be with 3 different MIDI devices connected to it via I2C/WiFi/USB serial connection.

Connections:

ODROID-C1 <-> Arduino UNO with 18 paperclips: USB cable
ODROID-C1 <-> 4 x MPR121 (Touch Sensors): I2C
ODROID-C1 -> USB soundcard (very cheap): plugged into one of the USB ports
ODROID-C1 <-> Android Tablet: WiFi

Software running on the ODROID-C1:

connecting the hardware to the synth
jack
a2jmidi
ttymidi (serial connection to Arduino)
multimidicast ( WiFi connection to Tablet)

Soundgenerator:
zynaddsubfx

Thanks to the creators of:
ODROID-C1
Arduino UNO
Jack & all the jack tools
a2jmidi daemon
Zynaddsubfx
ttymidi
multimidicast
MPR121 (and breakout board)

and the producers of metal paperclips, of course.

TouchDUINO touchless MIDI device

The most simple and cheapest touchless MIDI instrument ever: TouchDUINO

Hi,

today we experiment with touch sensing on Arduino UNO. We want to build a very cost efficient MIDI instrument without mouch effort on wiring complicated things on a breadboard.

You can find a reference to this article on http://libremusicproduction.com/tools/arduino

What you need for this:

– 1 Arduino UNO
– 20 Paperclips (bare metal)
– 1 Arduino Stackable Header Kit – R3 from sparkfun (https://www.sparkfun.com/products/11417)
or as an alternative:
– 1 unit Break Away Headers – Straight from sparkfun (https://www.sparkfun.com/products/116)

If you use the alternative headers you have to solder the paperclips onto the heders which isn’t an easy task for people who just begin with soldering. But that was my solution and, as you can see in the video: It works very good.

How to do it:

Just put the stackable headers into the following pins of the Arduino UNO: 2- 13 digital inputs and A0-A5 analog inputs
Put one paperclip in each pin.

Upload this sketch to the arduino and (magically) …your done! Congrats.

IMPORTANT NOTE!!! Please be sure to have a good connection to the ground. If you touch one of the paperclips and you have a high electrical load in your body it can seriously damage your Arduino. An easy way to do this is to touch a water-tap while doing this.  The safest way is using an Anti Static Wrist Strap ESD Grounding kit . They are cheap (cheaper than a new Arduino.).  Search for it and you’ll find it.

On your computer you have to install a software that is able to read the MIDI commands send by the arduino over serial via your USB cable. It is called ttymidi. Open a shell and start it with
ttymidi -b 115200 -s /dev/ttyACM0 -v
Configure and start qjackctrl. For more details -> https://help.ubuntu.com/community/HowToQjackCtlConnections
Open a second shell and type
a2j -e
Start your preferred MIDI sound generator. In the video I used zynaddsubfx.
In qjackctrl connect ttymidi out to zynaddsubfx midi in. Connect also zynaddsubfx to system out.

Here is a litte demo video (quick and very dirty) showing this device in action together with sooperlooper, hydrogen and zynadsubfx, recorded from ardour 4.1

and here the long version (Making of …)