Multiplexing touchRead with 74HC4067

Status
Not open for further replies.

jasonl

New member
Hi,

Thanks to Paul for making the Teensy 3 available. I am just starting a project with it. The final aim is to make an analogue synthesiser controller/sequencer based on (and expanding) the functions of the 1970s EMS AKS keyboard. http://en.wikipedia.org/wiki/EMS_Synthi_AKS This used a single sided PCB as a capacitive keyboard sensor, with some clever discrete logic and shift registers to make a basic 256 step sequencer.

I've started by experimenting with multiplexing a touchRead pin on the Teensy.

The full keyboard will have 30 key sensors and a number of control touch 'buttons', so I'm planning on using 3 74HC4067 chips to give me a maximum of 48 touch inputs. Control voltage output will probably be handled by a MCP4822 DAC. My plan is to have a separate keyboard PCB, and a smaller control board with the Teensy and other chips on it. The two would be connected using PCB headers.

My test for the keyboard uses a 74HC4057 on a breakout board, breadboarded to the teensy and a home etched touch panel with 8 'keys' on it. Some clear sticky tape covers the touch surface. For this test I only have 8 inputs of the 16 connected.
mux4067-proto.jpg

I'm finding using the multiplexer readings from the touchRead pin seem to have a very high base level (around 3000 with a fair amount of jitter), compared with connecting the touchpads directly to teensy pins. Is this to be expected? My test code is working - and displays numbers representing keypresses from the touchplate. Just that the numbers seem very high.

It's possible to get around it by using an array of 'base' readings to calibrate the panel/mux (in setup), and subtract these from the actual readings. I also found it necessary to use a threshold value to detect when a key is touched. I'm just wondering if this is the correct approach or if there's something I'm missing.
 
This reasonable approach but there are techniques to optimize the layout to control the capacitance.You will probably find the whole thing more stable if you run a grounded
plate under the whole keyboard or interpenetrate the keys with grounded fingers. I used an alternative which was to ground all the keys not currently being sensed in this project: http://cnmat.berkeley.edu/system/files/attachments/+Nime2012FingerPhone.CR_.pdf My project uses conductive paper which is faster to prototype with
than etching.

I would abandon the breadboard asap as it is too hard to control capacitance.
 
The breadboard was just proof of concept to see if capacitative sensing was possible through a multiplexer. It seems that it does at the expense of adding some capacitance to the readings. I've subsequently read through the Freescale application note on touch sensor design. http://www.freescale.com/files/sensors/doc/app_note/AN3863.pdf

I've just designed a control board to hold the Teensy and muliplexer chips plus some additional circuitry to interface with the synthesiser, and connectors for a touch panel. It's taking into account some of the layout considerations in the application note - using surface mount for the 74HC4067 chips - it'll be easy to try different approaches for the touch sensors. Just waiting on the parts. I expect I should get better results than with the breadboard!

I tried rigging a grounded metal plate under my test sensor board and this seemed to make things worse. The Freescale document suggests using a X-hatched under the sensor pads which gives some shielding, but doesn't affect the capacitative sensing so much. Need to do more experiments...

Thanks for the link to your project. I expect by using a multiplexer it's impossible to ground the keys not being sensed. How did you do this in your project? In code on the microcontroller?

Using paper touch sensors sounds a good idea. I'll probably prototype a touch sensor panel using card and some aluminium adhesive tape.

The fun will come in writing the software to interpret the capacitative sensor information to get something that's consistent and responsive.
 
Yes, the Arduino does everything in my fingerphone: the key scanning, synthesis and direct class D differential drive of the speaker.
If the grounding really is important of adjacent keys (and this depends on other aspects of your layout) you could achieve it by adding a chip just for that
purpose or an array of mosfets.
Yes, the software is fun. You should probably do what the Apple touch chip does: running calibration for the baseline capacitance. This is necessary because
people's relationship to the e-field changes and the ambient coupling of charge changes with humidity and temperature. Please let me know as your instrument
reaches completion and you have pictures to share. I am writing a history of electrical charge based musical instruments (it goes back to the 18th century) and it would be nice to include some recent ones.
 
Status
Not open for further replies.
Back
Top