|Touchololu Panel Overlay|
Capacitive sensors are usually made up of conductive pads or plates and it is common to form pads on printed circuit boards attached to the back of a case.
The pads act to detect capacitance changes when a target object, such as a finger, passes in proximity to the pad, as shown in the image below. For reliable detection the pads need to be a minimum size and the supporting panel made of suitable material. The typical recommended size for a pad is approximately 15mm square and the panel material typically used in 3D printers, such as PLA or ABS, is suitable as a supporting panel. My pads are slightly smaller but there is a 'tweak' available to address this. As I don't have conductive filament to hand; to construct the touch pads, I used adhesive backed copper tape (542-5460) on the back of the printed case.
|Capacitive touch system used on Curvy Panelolu|
To connect the pads to the PCB in the implementation, an IDC ribbon cable was used for the harness. I found the harness was best protected from external influences by separating each conductor connecting to a pad, with a ground (or zero volt) conductor. A further two conductors, one on each of the extremities of the IDC cable would provide additional screening. Other cable arrangements will work, the main requirement is to ensure that accidentally coupled capacitance is not affecting the wiring harness i.e. fingers at the side of the box un-intentionally selecting a function. The screening conductors achieve this nicely and fixing the cable in place (initially using tape or blue tack) allowed testing of the harness installation.
|Location of capacitive sensor plates for Touchololu|
Connection are soldered to the pad before fixing the adhesive backed tape to the plastic case. As the heat from your soldering iron is likely to deform the case as a minimum. It's important to avoid placing the connection where the LCD panel will sit as clearances are by design small and solder and wire would get in the way. Kapton tape was placed over the display bezel to ensure the metal bezel does not touch the copper strips.
The neat thing about the mTouch library is that at start up it works out what the starting capacitance is for each of the pads. This means that it will accommodate the wiring harness automatically, adjusting for differences in length or routing. It helps to avoid noise sources and keeping the wiring harness fixed in place ensures that sensing occurs only for the desired items such as fingers. If you leave contamination over the buttons, the code has a 'long term average' feature to allow it to compensate.
|Block diagram of Curvy Panelolu configuration|
One of the advantages of the capacitive touch sensors interface is that a graphic overlay can be used on the front panel of any desired form, the technique is described below. Care needs to be taken not to create too thick an overlay. As the thickness affects sensitivity of the touch system, although it is possible to make some adjustment in software to compensate. The sensitivity is adjusted from the default in the implementation. As the copper strip I have is 10mm wide and square pads would make the box ungainly. I cut three lengths of 35mm for each button. The up down buttons are typically aligned with a finger in the implementation. Whereas the action / select pad is at 90 degrees to a finger. Were the same sensitivity deployed, the action / select button 'feels' unreliable. Tweaking the sensitivity allowed the same 'feel' to be achieved on all pads.
|Curvy Panelolu 2 Capacitive Touch Interface circuit|
As can be seen from the block diagram the default configuration of a typical Panelolu interface was extended using a Microchip micro controller. The 16F1825 device selected was one in my bits box although others will no doubt work just as well.
The implementation required only the microchip IC and 3 resistors together with connections to the copper pads. The diagram looks a little more complex as its has the Panelolu 2 basic connections. Although this implementation does not show the card reader connected, as I don't currently use the card reader.
|Construction of panel overlay|
The panel technique I used is straightforward. First the graphic is printed onto adhesive backed paper. The paper can then be covered with transparent adhesive backed plastic for a wipe clean surface. This material is usually not optically correct, so where some graphic displays are deployed, fringing will be seen . In these cases a window should be cut in the transparent film plastic and optically correct plastic inserted. Alternatives are to print buttons in different colours set into the panel, perhaps being formed from conductive filament.
If you decide to make your own Touchololu panel graphic, the templates are here:
|Template For Panel Graphic|
Link to Touchololu PDF template
Link to Button documentation
Marlin had a few bugs in the non interrupt button implementation that I came across when testing out the interface. So there was some debugging of Marlin as well.
A short video showing a test of the capacitive sensor sensitivity
Another short video showing the built unit working with Marlin. Note that in Marlin, the pulses per change was modified from 5 to 1 pulse and the dead zone from 10 to 2 pulses.
I usually use green LCD displays, this display is a Displaytech 204A series module. In some lighting conditions seems to have less clarity than the green units. Note the 'feature' in Marlin where decreasing the number needs a reverse direction, it's not Touchololu. The drift of my finger is due to the close proximity of the camera and attempting not to block its view of the screen.
There is an update post to follow this...