Arduino Touch Music – Revisited

This is a short demonstration of different ways to use my Touch Keyboard PCB, revisiting the following previous projects:

Warning! I strongly recommend using old or second hand equipment for your experiments.  I am not responsible for any damage to expensive instruments!

This builds on the tutorials listed in the previous projects above.

If you are new to Arduino, see the Getting Started pages.

Parts list

  • Arduino Uno
  • Optional: DIY “touch” shield from Arduino Touch Piano – Part 2.
  • OR: MPR121 board or shield.
  • 8 ohm speaker or old headphone speaker
  • 1x 220Ω resistor
  • Breadboard and jumper wires

Arduino Touch Keyboard Revisited

ArduinoTouchPianoShield-TouchPCB_bb

The above diagram shows how to connect the “green” touch keyboard to my DIY touch shield from Arduino Touch Piano – Part 2.  If you are building on solderless breadboard following any of the capacitive touch tutorials online, then you just need to know that the pins are in the following order (from left to right above):

  • GND – C – C# – D – D# – E – F – F# – G – G# – A – A# – B – C

In the sketch from my previous projects, these are connected to the Arduino pins in the following order: D3 through to D11, then A0 to A3.  D2 is the “common” pin for the touch circuit.

You can find the code for this one on GitHub here.

IMG_6524

Arduino 12-note Keyboard Revisited

ArduinoTouchPianoShield-TouchPCB2_bb

The above diagram shows how to connect the “silver” pcb in “stylus” mode.  Each pad is connected to an INPUT_PULLUP pin and the stylus is connected to GND.  Every time the stylus touches a pad it is the same as a button being pressed and pulling the pin LOW.

In this example this will trigger the playing of an Arduino tone() through a speaker connected via a 220Ω resistor to D12.

You can find the code for this one on GitHub here.

IMG_6525

Alternative Configurations

Some other possible configurations and uses might include:

Trying these out is left as an exercise for the reader!

Closing Thoughts

This shows a few ways in which the Touch Keyboard PCB might be used.  The two described in full can be seen in action in the video. I’ve not tried the others, but I see no reason why they won’t work too.

Do let me know in the comments if you have other ideas.

Kevin

Leave a comment