[Solved] Need help with a Synaptics touchpad

Hello, I am having trouble with connecting a touchpad to the arduino.
Even though I have found all the info about it, and followed the schematics I am still scratching my head...

I have purchased 2 units of "IBM T41 touchpad" from ebay.
The board model is : TM42PUF2239
The synaptics chip is : T1004B 0413 FHYCS

Now I have done extensive google searches and found this model's pinout.
Here is how I have wired the PS2 connections :


Here is a link to the thread : Eesti avaandmed
And another link of similiar model synaptics touchpad: Sparktronics: Synaptics T1004 based touchpad to PS2 port

But when I tryed connecting it to the Arduino using the ps2mouse library and example it doesn't work. The sketch stops at the mouseinit() function, right after mouse.write(0xff);

My sketch is :

#include <ps2.h>

/*
 * an arduino sketch to interface with a ps/2 mouse.
 * Also uses serial protocol to talk back to the host
 * and report what it finds.
 */

/*
 * Pin 5 is the mouse data pin, pin 6 is the clock pin
 * Feel free to use whatever pins are convenient.
 */
PS2 mouse(6, 5);

/*
 * initialize the mouse. Reset it, and place it into remote
 * mode, so we can get the encoder data on demand.
 */
void mouse_init()
{
  Serial.print("mouse init\n");
  mouse.write(0xff);  // reset ////////////////////////// HERE IS WHERE IT HALTS. at the start.
   Serial.print("mouse init\n");
  mouse.read();  // ack byte
  mouse.read();  // blank */
  mouse.read();  // blank */
  mouse.write(0xf0);  // remote mode
  mouse.read();  // ack
  delayMicroseconds(100);
  Serial.print("end of mouse init\n");
}

void setup()
{
  Serial.begin(9600);
  Serial.print("init...\n");
  mouse_init();
}

/*
 * get a reading from the mouse and report it back to the
 * host via the serial line.
 */
void loop()
{
   Serial.print("loop start");
  char mstat;
  char mx;
  char my;
  
  Serial.print("loop start");
  /* get a reading from the mouse */
  mouse.write(0xeb);  // give me data!
  mouse.read();      // ignore ack
  mstat = mouse.read();
  mx = mouse.read();
  my = mouse.read();
  
  Serial.print("loop start 2");
  /* send the data back up */
  Serial.print(mstat, BIN);
  Serial.print("\tX=");
  Serial.print(mx, DEC);
  Serial.print("\tY=");
  Serial.print(my, DEC);
  Serial.println();
  delay(20);  /* twiddle */
}

I am not sure what I am doing wrong here... Please help :slight_smile:

I forgot to mention that I have attempted to connect the touchpad to my pc's ps2, and I have used the following schematic for the ps2 port connections : PS2 keyboard and mouse mini-DIN-6 connector pinouts

And the touchpad didn't work there either.

Also my ps2 cable's colors seem a bit strange (at least strange to me).
Orange = +5v
Red = Ground
Yellow = Clock
Black = Data
Maybe that is insignificant and the colors are random...

Update:

After thinking it over, I figured that the pinout must be incorrect...
I know for a fact that the +5v and ground are correct. (By the 470 resistor that I have seen on other models as well).

So here is the pinout for the connector(left to right) to the test points on the board and then to the pins on the chip:
1 -not connected
2 - Ground
3 - T11 -pin2 on chip
4 - T10 -pin3 on chip
5 - T6 -pin7 on chip
6 - +5v -pin44 on chip
7 - Ground
8 - T8 -pin5 on chip
9 - T9 -pin4 on chip
10 - Ground
11 - T5 -pin8 on chip
12 - Ground
13 - not connected.

So, I tried all of the following as combinations for the Data & clock for the ps2 connector:
T5, T6, T8, T9, T10, T11
And all are the same halt at mouse_init function except for T8:
clk data
T8 none all 1's
T8 T5 all 1's
T8 T6 mouse_init halt
T8 T9 all 1s
T8 T10 all 1's
T8 T11 all 1's

the all ones refers to the following output (doesn't change if I try to move my finger on the touchpad) :

setup
inside mouse_init
post reset inside mouse_init
exit mouse_init
mouse_init done
11111111111111111111111111111111	X=-1	Y=-1
11111111111111111111111111111111	X=-1	Y=-1
11111111111111111111111111111111	X=-1	Y=-1
11111111111111111111111111111111	X=-1	Y=-1
11111111111111111111111111111111	X=-1	Y=-1
11111111111111111111111111111111	X=-1	Y=-1
11111111111111111111111111111111	X=-1	Y=-1
11111111111111111111111111111111	X=-1	Y=-1

and continues infinitely....

Unfortunately I am running out of ideas as to what to do...
It seems like I cannot connect this touchpad correctly.

Ok I solved the problem. Here is how:
T8 (pin 8 ) is not the clock. it probably is some button.
After getting the 1111 outputs I thought of enable/disable button. I have seen them on a few touchpads. You click it when you want to disable the touchpad.

So instead of thinking in terms of the Test points T5, T6, T8, T10, T11...etc I had to think in therms of the connector itself.
But first I noticed something strange. T6 (pin 5) goes to the chip, but there is a 104 resistor to ground. 104 is the code for 100k Ohm.

So after making a table of the pins and trying a few combinations the solution is :

1 - not connected
2 - Ground
3 - Data (T11)
4 - Clock (T10)
5 - ! must be +5v (T6)
6 - +5v
7 - Ground
8 - T8 (don't care)
9 - T9 (don't care)
10 -Ground
11 - ! must be T5 Ground
12 - Ground
13 - not connected

In summary pin 5 must be 5v and pin 11 must be Grounded on this model.

Notes for anyone trying to connect a touchpad to ps2 cable :
The test point names seem to be the same.
T10 = clock,
T 11 =data,
T22 = +5 volt (not T20, because it hast to pass trough the 470 resistor),
Ground T28 or the big copper exposed parts.
That should help you get started. Also check if T5 and T6 are connected to the connector, if so T6 should get +5v and T5 should be grounded.

Also insertig the
Serial.println("inside mouse_init"); and Serial.println("exit mouse_init"); helps with debugging. The touchpad gets reset twise on start. I have also noticed that it takes quite a few seconds to start, maybe 10 or so. So be patient if you see it get into mouse_init twise.

Hi,

Old post, but until today is used Synaptics,

Some pinouts can be found here:

Touchpad

Pinout – Touchpad ALPS JCI-S1S (Fujitsu Siemens laptop)
Pinout – Touchpad Synaptics 920-000175-01 RevC
Pinout – Touchpad Synaptics 920-000177-01 RevA
Pinout – Touchpad Synaptics 920-000211-03 RevA
Pinout – Touchpad Synaptics 920-000241-01 RevB
Pinout – Touchpad Synaptics 920-000241-02 RevA
Pinout – Touchpad Synaptics 920-000262-01 RevA
Pinout – Touchpad Synaptics 920-000436-01 RevA
Pinout – Touchpad Synaptics 920-000631-02 RevA
Pinout – Touchpad Synaptics 920-000707-01 RevA
Pinout – Touchpad Synaptics 920-000720-04 RevA (DV9700 laptop)
Pinout – Touchpad Synaptics 920-000764-01 RevA

P.S.: Using an external touchpad can help with Arduino programming at night, it is very bad to use the central touch, and the mouse are very noisy! :wink: