genuinequality

Download free music MP3s on genuine quality, the world’s largest online music catalogue, powered by your scrobbles. Free listening, videos, photos, The world’s largest online music catalogue, powered by your scrobbles. Free listening, videos, photos, stats, charts, biographies and concerts. stats, charts, biographies and concerts.

Friday, February 28, 2025

Simple MIDI Touch Button Keyboard

I've grabbed some very cheap TTP223-based touch pad PCBs so this is showing how they can be used as a replacement button in a simple Arduino MIDI controller. Warning! I strongly recommend using old or second hand equipment for your experiments.&n…
Read on blog or Reader
Site logo image Simple DIY Electronic Music Projects Read on blog or Reader

Simple MIDI Touch Button Keyboard

By Kevin on February 28, 2025

I've grabbed some very cheap TTP223-based touch pad PCBs so this is showing how they can be used as a replacement button in a simple Arduino MIDI controller.

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

These are the key Arduino tutorials for the main concepts used in this project:

  • Arduino Button Tutorial
  • Arduino MIDI Library

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

Parts list

  • Arduino Uno or Nano
  • TTP223 "touch button module"
  • MIDI interface
  • Breadboard and jumper wires

The Circuit

The really neat thing about these TTP223 based modules is that although they are touch pads, all the touch "magic" is handled by the onboard device, so when it comes to linking them up to a microcontroller, they can be treated as if they are a simple button, albeit with a VCC and GND connection. In the above I have four connected to D2-D5.

There are some configuration jumpers which can set the configuration:

  • Active HIGH or active LOW (active HIGH is the no-link default)
  • Momentary or toggle (momentary is the no-link default)

Here are some other resources for finding out a bit more about these boards:

  • An Isolated 1 Key Touch Pad Project
  • Interfacing TTP223 Capacitive Touch Sensor With Arduino
  • TTP223 Datasheet

Each of these modules also has the opportunity to adjust the sensitivity. In the datasheet and circuit diagram for the modules, this is labelled Cs and is a capacitor between the value of 0 and 50pF between the input touch pad and GND. Having no capacitor leaves the sensor at its most sensitive.

On these modules this is an unpopulated SMT capacitor pad. In the photo below, the unpopulated pad is top right; and the two solder jumpers are labelled A and B.

Typically for these modules, A is the active HIGH/LOW and B is the momentary/toggle configuration.

I'm connecting TX (D1) up to the output of a Ready-Made MIDI Module.

The Code

The code is essentially code I've used many times before. As already mentioned no special handling is required - they are treated as if they were buttons.

The main code is thus as follows:

loop():
FOREACH button:
If LOW->HIGH detected THEN:
Send corresponding MIDI NoteOn message
IF HIGH->LOW detected THEN:
Send corresponding MIDI NoteOff message

There is a list at the top of the file of button pins and corresponding MIDI notes to be played. The keyboard is fully polyphonic.

There is one downside though. If the button is held for more than around 8 seconds then the board will recalibrate itself causing a retriggering of the note. That just seems to be a built-in limitation of the 6-pin version of the TTP223 device that is used on these cheap modules.

Find it on GitHub here.

Closing Thoughts

These modules are pretty easy to use and very cheap to buy. They typically come on a panel to be broken out and have pins soldered on so its possible to get a couple of octaves worth for really very little!

In one demo I saw online someone had just hooked up the output to an LED (and resistor) highlighting that they function pretty well even with no microcontroller.

It would be interesting to see how they could be matrixed up, but I suspect if getting into large numbers, then using a MPR121 breakout board might still be the better option.

One thing I didn't mention though - they each have a built-in LED, so the underside also lights up when touched. This creates a really interesting effect 🙂

Kevin

Comment
Like
You can also reply to this email to leave a comment.

Simple DIY Electronic Music Projects © 2025.
Manage your email settings or unsubscribe.

WordPress.com and Jetpack Logos

Get the Jetpack app

Subscribe, bookmark, and get real‑time notifications - all from one app!

Download Jetpack on Google Play Download Jetpack from the App Store
WordPress.com Logo and Wordmark title=

Automattic, Inc.
60 29th St. #343, San Francisco, CA 94110

Posted by BigPalaceNews at 10:42 AM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Search This Blog

About Me

BigPalaceNews
View my complete profile

Blog Archive

  • July (30)
  • June (100)
  • May (105)
  • April (95)
  • March (131)
  • February (111)
  • January (104)
  • December (98)
  • November (87)
  • October (126)
  • September (104)
  • August (97)
  • July (112)
  • June (113)
  • May (132)
  • April (162)
  • March (150)
  • February (342)
  • January (232)
  • December (260)
  • November (149)
  • October (179)
  • September (371)
  • August (379)
  • July (360)
  • June (385)
  • May (391)
  • April (395)
  • March (419)
  • February (356)
  • January (437)
  • December (438)
  • November (400)
  • October (472)
  • September (460)
  • August (461)
  • July (469)
  • June (451)
  • May (464)
  • April (506)
  • March (483)
  • February (420)
  • January (258)
  • December (197)
  • November (145)
  • October (117)
  • September (150)
  • August (132)
  • July (133)
  • June (117)
  • May (190)
  • January (48)
Powered by Blogger.