bit-tech.net

Go Back   bit-tech.net Forums > Modding > Modding

Reply
 
Thread Tools View Mode
Old 1st May 2006, 13:04   #1
agent420
Multimodder
 
agent420's Avatar
 
Join Date: Apr 2006
Location: 3rd stoned from the sun
Posts: 227
agent420 has yet to learn the way of the Dremel
Hacked a Touchpad + VFD with AVR

Got a couple of additions to the junk inventory this weekend, a dead Dell Insprion 1100 and a defunct HP Laserjet 4. The touchpad in the laptop and the VFD board in the printer caught my eye, so I decided to see if I could get them to be friends...



The only chip I'm using on the breadboard is the Atmel AVR microcontroller in the center, the rest of the parts are leftover from testing my stepper driven Etch-A-Sketch project.

Turns out that most Synaptic Touchpads used in laptops communicate via the standard PS2 protocol, using the same wiring scheme as a conventional mouse and keyboard. The pad could probably be wired to a pc and operate as a mouse without any special drivers. But as PS2 is not a common protocol used in microcontroller applications, I had to write my own interface code for the Atmel 8535 AVR I planned on using. Fortunately, the PS2 protocol is not that complex, and references describing it are easily located on the net. Synaptics also has a very good interfacing document available for download that details the electrical interface and the commands used to control the device.

Here's the connections on the back of the touchpad (pins function in pairs)...
Note that other models may have a different pinout (see guide).


The VFD control panel turned out to be a bit more elusive, but after some detective work with a multimeter and the datasheets from the chips on the board I was able to determine how it operates. It's actually a great little board with a nice 16 char VFD, 3 programmable leds and 8 buttons - it makes a great testbed tool and requires only a single +5V supply. The VFD is also a nice change from boring everyday lcd displays (it's the tubes, man ).

Here's the VFD board displaying the coordinates of the touchpad:


While working on this project I wondered if I could get the pad to operate like a qWheel type of device, like used on the iPods. Well,a little bit of geometry math coding later and tada, rotary encoder emulation.

Here's the VFD displaying a bargraph indicating input from circular motion on the pad:


This feature and the ability to devide the pad into multiple zones makes it a great input device for projects. Uses can be fan speed controllers, light dimmers, etc.; the possibilities are endless!

It turns out that the touchpads and this model VFD board are available and inexpensive in the surplus market or eBay, making them great experimenter devices. Unfortunately, neither will natively hook to a pc through parallel or serial interfaces, so a microcontroller has to be used. However, if the interest level in a project using these is there, I might design and offer inexpensive interface boards that would translate the PS2 to RS232 or similar.

Here are some resources I used for this project, as well as the source code I wrote that is well commented and contains additional technical information:

Synaptics Developer Resources - Interfacing Guide available here
Mitsubishi M66004M VFD datasheet (pdf)
PS2 protocol
My source code

edit - updated dead Synaptics link

edit 2 - made Hack-A-Day

Last edited by agent420; 21st Jul 2009 at 11:10.
agent420 is offline   Reply With Quote
Old 1st May 2006, 13:30   #2
bender386
Supermodder
 
bender386's Avatar
 
Join Date: Jan 2006
Location: AUS
Posts: 475
bender386 has yet to learn the way of the Dremel
wow that realy cool.
are you thinking of putting the touch pannel in a computer case. would look real nice.
and i love vacume displays that look so much more "high tech" than lcd's
bender386 is offline   Reply With Quote
Old 1st May 2006, 13:47   #3
BlackScorpion
What's a Dremel?
 
Join Date: Apr 2006
Location: Netherlands
Posts: 10
BlackScorpion has yet to learn the way of the Dremel
sweet job!
BlackScorpion is offline   Reply With Quote
Old 1st May 2006, 13:48   #4
GuardianStorm
Ultramodder
 
GuardianStorm's Avatar
 
Join Date: Apr 2005
Location: Bournemouth
Posts: 1,474
GuardianStorm has yet to learn the way of the Dremel
agreed, nice work
__________________
Sites: My Site :: My blog
Tools: Project Log Previewer
Curent Projects: Dark Vortex
Finished Projects: Yarrrbox :: Laptop Stand :: Bench PSU MK2 :: FS2
Guides: How To Bend Metal
GuardianStorm is offline   Reply With Quote
Old 1st May 2006, 13:55   #5
agent420
Multimodder
 
agent420's Avatar
 
Join Date: Apr 2006
Location: 3rd stoned from the sun
Posts: 227
agent420 has yet to learn the way of the Dremel
Quote:
Originally Posted by bender386
wow that realy cool.
are you thinking of putting the touch pannel in a computer case. would look real nice.
and i love vacume displays that look so much more "high tech" than lcd's
Thanks

Yeah, mounting the pad in a drive bay or similar and using it to control lights and fans is one of the several potential applications I've considered. Pad input would determine multiple channel pwm output from the AVR. In this case, I was thinking of having the four corners of the pad as button type selection zones to choose the device to control, with the center area of the pad emulating a qWheel or qSlide for analog style input.
agent420 is offline   Reply With Quote
Old 1st May 2006, 14:51   #6
ch424
Design Warrior
 
ch424's Avatar
 
Join Date: May 2004
Location: Cambridge, UK
Posts: 3,089
ch424 is the Cheesecake. Relix smiles down upon them.ch424 is the Cheesecake. Relix smiles down upon them.ch424 is the Cheesecake. Relix smiles down upon them.ch424 is the Cheesecake. Relix smiles down upon them.ch424 is the Cheesecake. Relix smiles down upon them.ch424 is the Cheesecake. Relix smiles down upon them.ch424 is the Cheesecake. Relix smiles down upon them.ch424 is the Cheesecake. Relix smiles down upon them.ch424 is the Cheesecake. Relix smiles down upon them.ch424 is the Cheesecake. Relix smiles down upon them.ch424 is the Cheesecake. Relix smiles down upon them.
That's awesome, thanks for documenting it so well! Have you considered using a 20x4 LCD instead, to get more characters?

With that inspiration, I'm going to IT right now to see if they have any "dead" laptops spare...

ch424
ch424 is offline   Reply With Quote
Old 1st May 2006, 15:02   #7
Spoon
What's a Dremel?
 
Join Date: May 2006
Location: London
Posts: 3
Spoon has yet to learn the way of the Dremel
Awesome work, I love microcontrollers.
I was thinking; how about hooking the trackpad to your stepper controlled ecth-a-sketch? Might be cool!
Spoon is offline   Reply With Quote
Old 1st May 2006, 15:09   #8
agent420
Multimodder
 
agent420's Avatar
 
Join Date: Apr 2006
Location: 3rd stoned from the sun
Posts: 227
agent420 has yet to learn the way of the Dremel
Quote:
Originally Posted by ch424
That's awesome, thanks for documenting it so well! Have you considered using a 20x4 LCD instead, to get more characters?

With that inspiration, I'm going to IT right now to see if they have any "dead" laptops spare...

ch424
I typically do use multi-line lcd's in my projects, especially during design and debugging to allow as many variables and pin states as possible (not that I ever make design or code mistakes ) However, I used the VFD board here for the challenge of figuring out how it worked, as well as aesthetic value. Actually, the buttons on the control panel were very helpful; if you look at the code you can see that several buttons select the different information to display, so I could cycle between screens based on what I was testing.

[edit]

btw, I note that there are several of these boards (ans similar ones) on eBay

Last edited by agent420; 1st May 2006 at 15:36.
agent420 is offline   Reply With Quote
Old 1st May 2006, 15:17   #9
agent420
Multimodder
 
agent420's Avatar
 
Join Date: Apr 2006
Location: 3rd stoned from the sun
Posts: 227
agent420 has yet to learn the way of the Dremel
Quote:
Originally Posted by Spoon
Awesome work, I love microcontrollers.
I was thinking; how about hooking the trackpad to your stepper controlled ecth-a-sketch? Might be cool!
Funny you should mention that... The last test of the Etch-A-Sketch used hacked ball mouse to draw. Before I coded the PS2 interface I just hooked into the optical encoders on the mouse board and used that data to move the steppers. Worked very well. Probably better than PS2 because I wasn't limited to the PS2 sample rate and could go as fast as the hardware permitted, also no overhead of command bytes or other header data.

The long term plan is to take a scanned image on pc and replicate it on the Etch-A-Sketch, but I've been slacking recently (too much time jamming with the garage band )

[edit]

btw, the EAS toys they sell today (made in China) really are shoddy compared to the US made ones I remember as a kid... I'll probably have to open it up and redo the string cable inside, it keeps 'twanging' and getting hung up. Every unit I tried in the store was the same way...

Last edited by agent420; 1st May 2006 at 17:34.
agent420 is offline   Reply With Quote
Old 1st May 2006, 15:40   #10
ch424
Design Warrior
 
ch424's Avatar
 
Join Date: May 2004
Location: Cambridge, UK
Posts: 3,089
ch424 is the Cheesecake. Relix smiles down upon them.ch424 is the Cheesecake. Relix smiles down upon them.ch424 is the Cheesecake. Relix smiles down upon them.ch424 is the Cheesecake. Relix smiles down upon them.ch424 is the Cheesecake. Relix smiles down upon them.ch424 is the Cheesecake. Relix smiles down upon them.ch424 is the Cheesecake. Relix smiles down upon them.ch424 is the Cheesecake. Relix smiles down upon them.ch424 is the Cheesecake. Relix smiles down upon them.ch424 is the Cheesecake. Relix smiles down upon them.ch424 is the Cheesecake. Relix smiles down upon them.
Ah, I see.

IT didn't have any laptops Well, they had two iBooks, but the touchpad's weren't PS/2.

ch424
ch424 is offline   Reply With Quote
Old 1st May 2006, 15:54   #11
agent420
Multimodder
 
agent420's Avatar
 
Join Date: Apr 2006
Location: 3rd stoned from the sun
Posts: 227
agent420 has yet to learn the way of the Dremel
Quote:
Originally Posted by ch424
IT didn't have any laptops Well, they had two iBooks, but the touchpad's weren't PS/2.
You could probably use any of the protocols, but might need to write your own interface code. RS232 or TTL would be even easier that what I have done here, but I'm guessing that the ones you have access to are Apple ADB, of which I have absoluetly no experience with.

' The 5th character in the model number indicates the interface used.
' P=PS2, S=RS232, B=PS2+RS232, T=TTL and A=Apple ADB.

Worst case scenario is to get one from a surplus shop or eBay. They're pretty cheap (well, most of them).
agent420 is offline   Reply With Quote
Old 2nd May 2006, 00:14   #12
jpaturzo
What's a Dremel?
 
Join Date: Mar 2005
Location: CT, USA
Posts: 18
jpaturzo has yet to learn the way of the Dremel
that was truly excellent, thank you. You've got some synapses firing in my head, the touch pad to microcontroller bit is going to be quite useful.
__________________
Main Rig, Born on 12/23/2003
AMD 2600 OC'ed to 2243 mhz | 1 gig pc2700 | 1 80 gig WD | 1 160 gig Maxtor | 4x DVD Burner | e-VGA 6800 unlocked to GT softmodded to Quadro FX4000

Juke Box PC, Still in progress
AMD Duron 1400 | 1 gig pc133 | 60 gig Maxtor | Chrome Knob | 4x20 LCD

jpaturzo is offline   Reply With Quote
Old 16th May 2012, 03:30   #13
squallrar
What's a Dremel?
 
Join Date: May 2012
Posts: 1
squallrar has yet to learn the way of the Dremel
hello there, can u upload the picture once again? i want to know how you connected the touchpad to uc for my final project, thx before
squallrar is offline   Reply With Quote
Old 17th May 2012, 11:37   #14
GeorgeK
Bit-Tech Keyboard Overlord
Moderator
 
GeorgeK's Avatar
 
Join Date: Sep 2010
Location: Ashford, Kent
Posts: 5,154
GeorgeK is definitely a rep cheat.GeorgeK is definitely a rep cheat.GeorgeK is definitely a rep cheat.GeorgeK is definitely a rep cheat.GeorgeK is definitely a rep cheat.GeorgeK is definitely a rep cheat.GeorgeK is definitely a rep cheat.GeorgeK is definitely a rep cheat.GeorgeK is definitely a rep cheat.GeorgeK is definitely a rep cheat.GeorgeK is definitely a rep cheat.
You may struggle as this thread is over 6 years old and the OP was last online in July 2009...
__________________
Main Rig: i7-4770K | Z87 Sabertooth | H100i | EVGA GTX780 SC SLI | 16GB HyperX Beast 2400 | 256GB 840 Pro | 480GB Seagate 600 SSD | 2TB SSHD | X-1050 | Air 540 | U2713HM | Xonar STX | SP2500s
Keyboards: Black Filco TKL - Stickered, Lubed Reds | White Filco TKL - Browns | Filco MiniLA - Browns | Poker w/Plate, Alu Case - Stickered, Lubed 65g Ergo-Clears | Cherry G80-3000 - Browns | Cherry G80-3700 w/Plate - Lubed 65g Ergo-Clears | IBM Model M SSK - Bolt & Floss Modded | HHKB Pro 2 Type-S
GeorgeK is offline   Reply With Quote
Reply

Thread Tools
View Mode

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:55.
Powered by: vBulletin Version 3
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.