Touch Keyboard PCB

Ever since experimenting with copper tape as a “touch keyboard” I wanted something a little more useful on a pcb.  I always quite liked the design of the stylus keyboard for a Stylophone, so that was my starting point.  I’ve not found anything “off the shelf” that wasn’t part of another build, so I thought I’d have a go myself.

This is the result.

MPR121TouchKeyboard-3d

Update:

Tutorials used in this project:

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

The Circuit

MPR121TouchKeyboard-sch

The circuit itself is literally just a set of header pins with connections to what will become pads on the pcb.

I did consider the idea of allowing the use of a common MPR121 breakout board, but in the end, I opted to keep this to just the keyboard.

I’ve created two “circuits” as I’m planning on having two “keyboards” within the 100x100mm footprint of the pcb.  I couldn’t decide if I wanted a purely “touch” keyboard, or if I wanted to support the use of a stylus.  So, I’ve provided two designs, one of each.

The “touch” keyboard provides a pin header connection for 13 notes and a GND connection, so 14 in all.  The “stylus” keyboard provides a pin header connection for 13 notes, a GND link and a common connection for the stylus, i.e. 15 in all.  It also has a connection point for the stylus in addition to the 15-way header.

PCB Design

MPR121TouchKeyboard-pcb

There are several points to note in the design of this PCB.

  • I want to provide a full octave of contacts but to stay within a 100x100mm pcb size.
  • However, I’d like the option to use several keyboards side by side, so the high “C” pad has a slightly wider gap which hopefully will allow it to be cut off if required.
  • One of the designs supports a capacitive touch interface (top), one the use of a common connection for a stylus (bottom).
  • The capacitive keyboard has a full layer of solder resist over all the pads to provide an insulating layer between the pad and what will be touching it.
  • The stylus keyboard has each pad left uncovered by the masking layer.
  • The pads themselves are custom “pad” footprints in KiCad so tracks can be connected anywhere on the pad.
  • There are covered pad footprints which don’t include a mask layer, but do include a silkscreen edge pattern.
  • And there are “open” pad footprints that include a mask layer to leave the bare copper of the pad exposed (as shown in the lower half of the figure below).
  • The placing of the pads was done via calculation to ensure they all line up and have equal spacing.
  • I’ve opted for GND fill zones on both sides of the board.

MPR121TouchKeyboard-ger

Closing Thoughts

This one will be very experimental as I’m quite out of my depth now in terms of use of ground planes, and large capacitive areas of the board!  But I’ve got to start somewhere.

This is the fourth board being made as part of a round of discount vouchers I’ve had from Seeed Fusion.

Kevin

4 thoughts on “Touch Keyboard PCB

  1. Hi Kevin
    Kevin here!
    I have been pursuing exactly the same objective as you with a lot less knowledge of the subject!
    Weirdly enough, I had decided on something based on the Stylophone keyboard layout – I was looking to transfer it onto copper coated board using toner and ferric chloride and connecting to MPR121’s. I’m having a few problems with the transfer process so far but I’m hopeful!
    I was looking to connect this to a Daisy Seed and using its oscillators, but I’ve been struggling to get it to output.
    I was very pleased to come across your project for the Arduino and got it working for a single MPR121 using tone.
    I’m now looking at trying out your multi-MPR121 setup outputting to MIDI and then feeding that into the Daisy.
    Thanks you so much for your easy to follow walkthroughs.
    If you reach the point where you are ready to share your Gerber files I’d love to have a go with your keyboard design.

    Thanks again
    Kevin (2)

    Like

    1. Once I get the boards back and if they seem ok, I’ll produce a “build guide” and stick them on GitHub. As always, I have 10 on order so if you want to find a way to get in touch privately and are happy to give me an address, then assuming postage isn’t too expensive, I’d be happy to stick a spare one in the post. They’ve been posted, so I’d expect them back in a week or so now. Ditto if you want the files right now to have a try yourself, ping me an email or something 🙂

      Thanks for the comments and nice messages. Glad some of these posts seem to be doing something useful!

      You are certainly braver than I am, setting up a chemical shop at home!

      Kevin

      Like

    2. Hi
      Have been thinking of doing something similar myself, but two octaves. Looked around for blank ‘Stylophone’ PCB’s to buy but they don’t exist 😦

      Are the CAD files available for yours anywhere as I can’t find them?

      Like

      1. Not CAD as such, but Gerbers and schematic and so on are available via GitHub (part 2 has the links). I’ve designed it so that they can be combined in a relatively simple manner.

        Do report back and let me know how you get on if you managed to produce something too 🙂

        Kevin

        Like

Leave a comment