TrackPoint via Arduino as USB mouse

General Questions, Rumors, Real news & More
Post Reply
Message
Author
feklee
Freshman Member
Posts: 100
Joined: Wed Jun 29, 2005 6:35 am

TrackPoint via Arduino as USB mouse

#1 Post by feklee » Sat Aug 17, 2013 4:28 am

I hooked up a TrackPoint to an Arduino microcontroller and am now able to use it like an external USB mouse.

Features:
  • Adjustable sensitivity with slider.
  • Middle button scrolling.
Details may be found on GitHub.com: https://raw.github.com/feklee/usb-track ... ircuit.jpg (1500x800; 193KB)

Admin edit: Changed large inline image to link. Please keep images <50KB and also post a PIC warning in subject line.

rootScript
Posts: 5
Joined: Fri Apr 18, 2014 9:10 am
Location: London UK

Re: TrackPoint via Arduino as USB mouse

#2 Post by rootScript » Fri Apr 18, 2014 6:15 pm

Hello Felix,

Firstly, thanks for putting your library up on Github, the Trackpoint is a great input device; I had almost lost hope, until I found your post here.

I am trying to connect an IBM Trackpoint to a Teensy 3.1.
As I understand things, I can load your usb-trackpoint code.ino file, and reference the arduino-trackpoint library?

In the code.ino file I can define the Pins for the Teensy, you have:

Code: Select all

Trackpoint trackpoint(3, // CLK
                      9, // DATA
                      12); // RESET
I guess I can connect CLK & DATA to any digital pins on the Teensy; I am not sure which pin to connect the RESET to?

In your Readme for arduino-trackpoint you mention:
This library only supports interfacing with the TrackPoint in remote mode; For a library that supports stream mode, have a look at Cong Nguyen’s arduino-trackpoint-extended.
I don't understand the difference between Stream Mode & Remote Mode; all I want to do is use the Trackpoint as a USB mouse, and maybe as a Up/Down scroller, and Left/Right text cursor control.
Can you suggest which way I should go, please?

Thanks,
:o)
Carlos

feklee
Freshman Member
Posts: 100
Joined: Wed Jun 29, 2005 6:35 am

Re: TrackPoint via Arduino as USB mouse

#3 Post by feklee » Sun Apr 20, 2014 1:27 pm

rootScript wrote:Firstly, thanks for putting your library up on Github, the Trackpoint is a great input device; I had almost lost hope, until I found your post here.
It’s great to hear that the little project is useful to others!
As I understand things, I can load your usb-trackpoint code.ino file, and reference the arduino-trackpoint library?
Absolutely, or you use the new library by Cong (stream mode).
I guess I can connect CLK & DATA to any digital pins on the Teensy; I am not sure which pin to connect the RESET to?
You only need digital pins.
I don't understand the difference between Stream Mode & Remote Mode
In remote mode, the Arduino drives the TrackPoint controller’s CLK pin. In stream mode, the CLK pin is connected to an interrupt pin on the Arduino, and the TrackPoint’s controller initiates communication.

Quote from the TrackPoint System Version 4.0 Engineering Specification: "Stream mode is the TrackPoint controller's normal operating mode."

rootScript
Posts: 5
Joined: Fri Apr 18, 2014 9:10 am
Location: London UK

Re: TrackPoint via Arduino as USB mouse

#4 Post by rootScript » Tue Apr 29, 2014 9:39 am

Hello Felix,

Thank you for the link to the TrackPoint System Specification, it seems that the Trackpoint is 5V
The Teensy 3.1 I am using is 3.3V. After I connect the CLK & DATA pins from the Trackpoint to the Teensy pins 3 & 9, should I power the Trackpoint with a separate 5V or do I need to have a common ground with the Teensy? (I do have some 3.3V/5V logic converters and a 3.3V voltage converter that can up to 5V, if needed)

I managed to to solder a trackpad to some pins, but I think I may have damaged the tracks.
https://plus.google.com/u/0/photos/1007 ... 7197195649

When I pulled away the plastic cable, I ripped a little of the metal track too. How did you manage to remove the orange plastic flat cable from the board?

I was wondering if there was a chemical I could use to melt the flat ribbon cable away in certain places, in order to expose the metal wires inside.
I just got another Trackpoint from an brand new replacement keyboard. Here is a link to the Google+ album:
https://plus.google.com/u/0/photos/1007 ... 8282465889

The IBM Trackpoint board has 127340 RevC printed on it.

rampadc
Posts: 19
Joined: Wed May 08, 2013 8:13 am
Location: Adelaide, Australia

Re: TrackPoint via Arduino as USB mouse

#5 Post by rampadc » Tue Apr 29, 2014 4:16 pm

rootScript wrote: The Teensy 3.1 I am using is 3.3V. After I connect the CLK & DATA pins from the Trackpoint to the Teensy pins 3 & 9, should I power the Trackpoint with a separate 5V or do I need to have a common ground with the Teensy?
According to Teensy 3.1 schematic, 5V from the USB micro connector is connected to a header pin with label VUSB, so you can power the TrackPoint with that. Note the 500mA fuse.

You will need to use voltage logic level converters for data and clock lines as they are bidirectional. Reset line isn't, and a 'high' on a 3.3V system is high on a 5V one so it can directly connect to any pins on your Teensy.

You can use sand paper to remove the orange plastic insulator.
I need more keyboards to play with :|

rootScript
Posts: 5
Joined: Fri Apr 18, 2014 9:10 am
Location: London UK

Re: TrackPoint via Arduino as USB mouse

#6 Post by rootScript » Tue Apr 29, 2014 5:47 pm

Hello rampadc,
Firstly, thank you for your help, it is very much appreciated !
rampadc wrote:
rootScript wrote: The Teensy 3.1 I am using is 3.3V. After I connect the CLK & DATA pins from the Trackpoint to the Teensy pins 3 & 9, should I power the Trackpoint with a separate 5V or do I need to have a common ground with the Teensy?
According to Teensy 3.1 schematic, 5V from the USB micro connector is connected to a header pin with label VUSB, so you can power the TrackPoint with that. Note the 500mA fuse.
OK so I can power from the VSUB pin, and use any GRD pin on the Teensy 3.1, I don't understand what you mean with the 500mA fuse
rampadc wrote: You will need to use voltage logic level converters for data and clock lines as they are bidirectional. Reset line isn't, and a 'high' on a 3.3V system is high on a 5V one so it can directly connect to any pins on your Teensy.
I have never used an LLC but I do have one that I bought just in case :
https://www.sparkfun.com/products/11978

From what I understand I power it with 5V on the high side & 3.3V on the low side:
Image
Image

If that is not suitable, I also have a dual bi-directional PCA9306 Level Translator, it says it is for I2C & SMBus:
https://www.sparkfun.com/products/retired/10403
Image
Which do you think is suitable?
rampadc wrote: You can use sand paper to remove the orange plastic insulator.
Excellent, I will try some fine wet & dry sandpaper.

rampadc
Posts: 19
Joined: Wed May 08, 2013 8:13 am
Location: Adelaide, Australia

Re: TrackPoint via Arduino as USB mouse

#7 Post by rampadc » Wed Apr 30, 2014 6:37 am

Firstly, it's VUSB and GND. Secondly this is the Teensy's schematic: https://www.pjrc.com/teensy/schematic.html.

Thirdly, use the LLC. I2C and PS/2 are completely different.
I need more keyboards to play with :|

rootScript
Posts: 5
Joined: Fri Apr 18, 2014 9:10 am
Location: London UK

Re: TrackPoint via Arduino as USB mouse

#8 Post by rootScript » Sat May 03, 2014 8:47 pm

Hello Felix (feklee),
The TrackPoint module working fine with your library, I am more than happy - THANK YOU
Can I also ask how you connected up the mouse buttons; I would like to add 3 external buttons to use with the TrackPoint. I am looking for some very light micro switches to use for the mouse buttons, can you recommend any particular part? (I have tried5 of the standard Adafruit/Sparkfun stock, but all of them are a bit stiff).

If I wanted to scroll a page, or move a text cursor left/right with the TrackPoint, is this possible too?

Also Cong (rampadc),
I really appreciate your input - THANK YOU.

Just a small note regarding the Logic Level Converter & the Logic Translator.
The LLC works fine, but I tried the LT too.
Even though the specs say "PCA9306 Level Translator is for I2C & SMBus", it appears to work with the PS/2 signal as well.

The Teensy docs say "All the digital capable pins on Teensy 3.1 are 5 volt tolerant." However when I connect to digital pins without a LLC or LT the TrackPoint does nothing

Just to be complete, I have posted a question regarding Teensy 3.1 digital pin tolerance at this link:
http://forum.pjrc.com/threads/25722-Tee ... -tolerance

:o)
Carlos (rootScript)

rootScript
Posts: 5
Joined: Fri Apr 18, 2014 9:10 am
Location: London UK

Re: TrackPoint via Arduino as USB mouse

#9 Post by rootScript » Mon May 05, 2014 6:40 am

from PaulStoffregen at forum.pjrc.com
The pins with both analog and digital functionality (pins 14 to 23) are 5V tolerant, even when operating as analog inputs.
But anything over the reference voltage, which is 3.3V by default but can be configured for 1.2V, will read as the maximum value (1023 in the default 10 bit mode). Applying 3.4 to 5.0 volts to those pins will not damage the chip, but you can't read the voltage other than knowing it's over 3.3V.
http://forum.pjrc.com/threads/25722-Tee ... #post47139

I have moved over to the pin ranges suggested:

Code: Select all

Trackpoint trackpoint(
17, //TrackPoint DATA
16, //TrackPoint CLK
14); //RESET
But the TrackPoint doesn't respond (without the Logic Level Converter (LLC)).

So I tried removing the LLC from either the DATA or CLOCK, separately.
It seems that the TP_CLK only works through the LLC, to Teensy pin 16.
The TP_DATA is ok to connect straight to the Teensy pin 17.

Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Return to “GENERAL ThinkPad News/Comments & Questions”

Who is online

Users browsing this forum: No registered users and 2 guests