mTouch capacitive touch sensor boards
The boards and code described below can be downloaded from github.
I built a 16 channel touch sensor board built around the PIC16F727. This enables touch sensors to be easily added to your designs. Each touch sensor channel is brought out to a header pin which can be connected to a conductive pad to add touch sensitivity to a surface. I freely admit that the firmware is a simplified version of Microchip’s example code for their mTouch hardware, which I ported to MikroC Pro. A snap on LED board gives a visual display of the activated channels. This is built around a port expander chip which communicates with the PIC using the I2C bus.
I used this to build up a system to add speech to buttons to help the Visually Impaired navigate an unfamiliar device, such as a radio. Details of this project can be found here.
The board can be powered using one of the expansion headers or from a battery module I made, which clips on to the processor board. The battery module uses a DC-DC converter to boost a single AA or AAA battery to the 3V that all of the devices run off. Touch sensors can be sensitive to ripple noise on the power line, so I over engineered the supply board to compensate for this. I’ll probably change this to running from two battery cells as the DC-DC will be more efficient with the higher input voltage.
The RX-TX lines are bought out to an expansion header. Using a serial to USB converter cable manufactured by FTDI, I can connect the microcontroller directly to a PC for two way communica tions. I lashed up a Java GUI to show which channels are active. The Java GUI displays the capacitive count for each channel - there is a possibility of using this for ‘finger tracking’ as the analog value varies with finger position. The boards can be daisy chained, as shown in the figure to the right - making for a scalable design.
The schematic and layouts for the main processor board and the clip on LED board can be downloaded below. These are in Eagle format. A free version of Eagle can be downloaded here.
The Mikro C Pro code that I use to generate the firmware for the PIC can be found at the bottom of this page as well. You can download a free version of the compiler here. Click on the download button - you don’t need to pay for a licence for a program as small as the one here.
After completing this project, an Arduino shield came out using the same kind of technology as presented in this board. This makes it easier, though much bulkier, to implement touch sensors. I wrote up my experience of implementing this off the shelf system here.