Pages

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:

25 comments:

  1. Great!!! Thanks for sharing ;-)

    ReplyDelete
  2. 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

    ReplyDelete
  3. Thanks !!! it cool !!!

    Where you buy this touchpanel ?

    Regards

    ReplyDelete
  4. 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?

    ReplyDelete
  5. 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

    ReplyDelete
  6. 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...

    ReplyDelete
  7. 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

    ReplyDelete
  8. 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

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

    ReplyDelete
  10. how to install script in pc
    and in device

    ReplyDelete
  11. This comment has been removed by the author.

    ReplyDelete
  12. 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

    ReplyDelete
  13. Very cool device, interested in seeing more of it.

    - http://custompcstuff.blogspot.com/

    ReplyDelete
  14. 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

    ReplyDelete
  15. 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!

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

    ReplyDelete
  17. 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

    ReplyDelete
  18. 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?

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

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

    ReplyDelete
  21. 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)

    ReplyDelete
  22. 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 .

    ReplyDelete
  23. 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!!!

    ReplyDelete
  24. 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

    ReplyDelete
  25. 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.

    ReplyDelete