Arduino + Laptop Touchpad using arduino
Yes, this is more or less your average touchpad that one can find from inside a laptop. This model, like majority of touchpads out there operates with PS/2 standard. This means that it can be directly plugged in to a PS/2 connector and with proper drivers, function as a mouse.
As it happens the PS/2 communication is not that difficult to achieve with an Arduino board. Kristopher has written an Arduino/Wiring library that offers all the functionality that we need at this point.
I will be using the MAX7219 Led Controller too and for this one can use LedControl library , written by Eberhard Fahle.
Step 1: Putting the touchpad together
I happened to find this TouchPad from inside a dead Fujitsu Siemens laptop. Model number for the pad is ALPS JCI-S1S. These kind of modules are easy to source also from ebay etc.
Ground and supply voltage pins are usually easy to guess just by looking at the circuit board but the data and clock pins were found by just pure trial and error method.
As the flexible cable is not the best suited for use with Arduino, I soldered better wires for the pins. Hot glue was used to make the connection more secure.
Step 2: Coding – Part I
Here are both the TouchPad and the 8×8 Ledmatrix hooked up to Arduino. Touchpad uses the 5 and 6 pins on Arduino and the MAX7219 utilizes the pins 10, 11 and 12. What goes were can be easy seen inside the code.
TouchPad reports the movement of the finger. One gets a pair of coordinates that indicated the amount of movement and the direction from the last position. For example -12, 2 would mean a swipe towards 10 o’clock and the X-axis movement being faster.
// Arduino + Laptop TouchPad. Basic functionality
// Jani Pönkkö
#define MDATA 5 // touchpad ps/2 data pin
#define MCLK 6 // touchpad ps/2 clock pin
#define SENSITIVITY 5 // amount of movement needed to get a reaction
For more detail: Arduino + Laptop Touchpad
This Post / Project can also be found using search terms:
- a laptop touchpad transducer
- laptop touchpad
- touchpad en arduino
- touchpad sensor arduino code