banner

Sunday, January 13, 2013

Resistive touch screen based wireless mouse

Hi, after a long time I am updating my blog again. I bought few nokia color LCDs and resistive touchpad last month, all are chinese clones and very cheap. Then I thought of doing some thing with the touchpad at first. My previous blogpost  was a TV remote based computer mouse. So I decided to make a similar stuff using the touchpad and bluetooth...
         I have used a cheap ATtiny13 (8pins) microcontroller which runs at internal 9.6MHz clock. It samples two channel analog voltage from the touchpad. One of the GPIO pin is configured as a software uart TX (bit banging) which will stream the mouse data at a baudrate of 115200 (may need to calibrate by changing OCR0A little bit up or down) to a PC via bluetooth (HC_05 bluetooth module). Apart from the mouse cursor movement, I have implemented left click, right click and wheels on the same touch screen.
       A python script running on the pc will accept the mouse data and it will process the data and apply a smoothing filter to make the cursor movement more efficient. Right now I did the code for linux but will be easily portable by small modification in the python code.
        The only demerit is that we cannot do any multi-touch since it is a resistive touchpad.... Also it is not so easy to use with naked finger, instead a stylus is recommended for smooth operation. But any way in the video demo you can see its working fine with my finger........(I am using my fingernail ;-) ).....
       The bottom left part of the touchpad is configured as left click, bottom right as right click and 1 thickness from the right is for mouse wheel ...





Circuit diagram:
https://github.com/vinodstanur/resistive_touchpad_as_wireless_mouse
Code:
  
Python code for PC:

26 comments:

Casainho said...

Great!!! Thanks for sharing ;-)

Cefn Hoile said...

Hi, there. Thinking of creating a touchscreen project. Which touchscreen did you use, and how did you wire it? (they seem to often have tiny ZIF connectors)

Cefn
http://shrimping.it

turman said...

Thanks !!! it cool !!!

Where you buy this touchpanel ?

Regards

Green Goo said...

It cool!!!!

Look my project

http://www.youtube.com/watch?feature=player_embedded&v=ATRV4r7DLD8

end post:

http://habrahabr.ru/post/136297/

I want to build devices 'Resistive touch' + 'teensy++' as HID USB Keyboard\Mouse, you can help me this project?

cece99 said...

I can't compile the python code under windows , can you give me a compiled version (for windows) or correct the code? The error is on the 27th line.
Regards

Vinod.S said...

nice work @ Green Goo... :-)

@cece99: I think in 27th line there is some TAB problem. Correct it or download the code from my github repo/copy it from the gist embedded above...

Nitrous said...

Can this be easily converted to Wacom RF digitizer modules?
I suspect that a serial output is necessary for this to work. Correct?
Great project.
Thanks
Nitrous

Debraj said...

Hello Vinod,

Great work and more than that is its ingeniousness. I had never thought of using a touch panel to control mouse. I have seen your other projects as well, all of them are unique!! I tried the mouse commands on my computer (using python) and all of them works flawless..

Regards,
Debraj

Josué Dread said...

Wow, thanks for sharing all this information , i wanna try to make this device at this moment, thanks a lot man.

ranjithwap said...

how to install script in pc
and in device

Jijiang Zhao said...
This comment has been removed by the author.
T@her said...

hello Vinod, i am impressed from your work. i am working on a project based on ATmega32 and touch screen. I am facing some problem in interfacing it. would you please help me? here is my thread
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=1056287#1056287

Daniel Tracy said...

Very cool device, interested in seeing more of it.

- http://custompcstuff.blogspot.com/

Dima Lunegov said...

Hello, thanks for your projects. But I newbie in AVR..I can't understand how you compile "C" code..Please answer, what program you compile, and can you send the *hex file to me

jeremyslick said...

Any thoughts on adapting this to work on an Android phone? I have my phone hooked up to my car in-dash tv and it would be nice to overlay the touchscreen on the car TV (currently no touch screen functionality) and then control my phone via the touchscreen/bluetooth!

බුද්ධික said...

Cool project bro :D what is the touchpad (for what phone?) model and price ?

rollandelliott said...

I think if you made an iphone 5 app for this, you could make a lot of $$$. many people want to control their iphone from a large touch screen computer including me. Please email me if you do projects professionally I'd gladly pay for such functionality. service attt rentphotobooths doot coom

jaydeep patel said...

i m not using ATtiny13
insted of that i m using ATmega16
in atmega external crystal is needed....
so can i use 16MHz crystal to run this?

Dilan yasantha said...

this is great, i got syntax error in line 4 of python code , please help me to resole it . thanks

Heather Thomas said...

Would love to feature some of your blogs on my website! The Electronic Connection! Very intuitive and interesting. www.everythingyouneeds.com

NIDHIN said...

Hai vinu,
i am nidhin ,i like this project very much,actually i had this idea before,but difference is i decided to use pic18f4550 for usb connection and rest all the same function like sensing co-ordinates of touch point .
i have a doubt on this project
1 . y we cant implement usb mouse(hid class ) on this project making it wired ??
i am new to python programming ,can u please explain python compiling ,which compiler u used in windows7 environment and how to compile it.

thanks in advance
NIDHINDAS T.S(kerala)

Vinod.S said...

Nidhin: You can implement it as wired usb hid using some controller having usb hardware / software usb stack like Vusb for avr.

Also you can implement it as bluetooth HID .

Beyondallmeadows said...

Hi very interesting work!

Is it possible to make a basic tutorial on how to start these things.
I've got a samsung corby screen, and want to do something alike.
But I don't know where to start!

Any help is appreciated!!!

Liza Jenifer said...

I think any contemplations on adjusting this to deal with an Android telephone? I have my telephone snared to my auto in-dash television and it might be decent to overlay the touchscreen on the auto TV (as of now no touch screen practicality) and afterward control my telephone through the touchscreen/bluetooth!
Best 7 Inch Tablet

tdecurtins said...

Hello I was wondering if you could port this to android at all? I know many other people would really like this also! Thank you.

Arun kumar said...

Very nice technology, your invention very cute and user friendly, where can buy this product in market??

Arun
bizbilla.com

Post a Comment

SHARE IT on FB