element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
PiCasso Design Challenge
  • Challenges & Projects
  • Design Challenges
  • PiCasso Design Challenge
  • More
  • Cancel
PiCasso Design Challenge
Blog PiCassoTizer - Absolute Mouse Position - HID Simulation - Blog 4
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: dougw
  • Date Created: 29 Apr 2019 4:56 AM Date Created
  • Views 2597 views
  • Likes 9 likes
  • Comments 10 comments
  • doug wong
  • hid
  • picassotizer
  • picasso design challenge
Related
Recommended

PiCassoTizer - Absolute Mouse Position - HID Simulation - Blog 4

dougw
dougw
29 Apr 2019

The last PiCassoTizer blog showed how the touch screen was going to work using image processing on Raspberry Pi's to monitor finger position.

This blog shows the other end, where a Raspberry Pi is used to edit screen graphics using external position information to control the process.

This system uses existing Raspberry Pi resources where possible, so the graphics program is any existing graphics program. All of these graphics programs can be manipulated with a mouse, so the external touch screen information can simply be converted to emulate a mouse to provide full functionality.

It sounds simple but there are a number of issues to deal with:

  • The touch digitizer system provides angular data that needs to be translated to Cartesian coordinates
  • The Cartesian coordinates are absolute, where normal mouse data is only relative position data (unfortunately it seems Linux doesn't support absolute mouse positioning)
  • The only Raspberry Pi that can emulate a mouse is a Pi Zero, which isn't part of this challenge

The simplest way I could think of to convert angular position data to USB mouse data was to convert the angular data to analog signals and use an arduino to convert these signals to look like a USB HID mouse. Although the Raspberry Pi's do a lot of heavy lifting - camera dizitization and image processing on one end and graphics editing on the other end, there is still room for a little arduino to complete the system.

I ordered some digital-to-analog converters for the touch digitizers, but they have not arrived, so I am working on the mouse emulation system and just simulating the camera system outputs with potentiometers.

The potentiometer wiring was a confused spaghetti mess, so I designed a frame to hold everything in a more understandable relationship.

Here is a video showing the back end apparatus in operation with a paint program:

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

The positioning system is pretty close to absolute, so it should be useable once the digitized data is available.

This demo used X and Y position data directly, so there is still firmware needed to translate the angular data.

While waiting for the D-to-A modules, I can start designing the camera frame geometry to ensure the whole screen is in the field of view and the angles provide the best accuracy possible.

I can't complete it though, until the cameras arrive and I figure out their field of view.

 

Relevant links:

PiCasso Design Challenge

 

PiCassoTizer - Introduction - blog 1

PiCassoTizer - Electronic Parts - Blog 2

PiCassoTizer - Finger Detection Image Processing - Blog 3

PiCassoTizer - Absolute Mouse Position - HID Simulation - Blog 4

  • Sign in to reply

Top Comments

  • balearicdynamics
    balearicdynamics over 6 years ago +5
    Hello Doug, I think that there is an easier way to manage absolute mouse positions on the screen, without adding the weight of a microcontroller (Arduino, as you mention) and pass from digital to analog…
  • shabaz
    shabaz over 6 years ago +5
    Hi Doug, Great work on the very novel mouse! The graphics drawing reminds me a little of etch-a-sketch : ) Also, if the two linear pots were connected to perpendicular rails with slots, you could insert…
  • balearicdynamics
    balearicdynamics over 6 years ago in reply to dougw +4
    Hi Doug, My approach was just to point you the attention over some points you have mentioned to be solved via hardware. About your last comment: Mouse handlers use acceleration - the size of the relative…
  • dougw
    dougw over 6 years ago in reply to shabaz

    It is exactly like Etch-a-Sketch - except for the button. I originally had rotary pots, but decided the slide pots were more visually representative.

    • Cancel
    • Vote Up +4 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 6 years ago

    Good update Douglas.

     

    DAB

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz over 6 years ago

    Hi Doug,

     

    Great work on the very novel mouse! The graphics drawing reminds me a little of etch-a-sketch : )

    Also, if the two linear pots were connected to perpendicular rails with slots, you could insert an pen in the intersection of the slots, and have a digitizer : )

    • Cancel
    • Vote Up +5 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • balearicdynamics
    balearicdynamics over 6 years ago

    Gene is trough! While trying to suggest you the better and the best I forgot to say that the approach is really nice image

     

    Enrico

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • genebren
    genebren over 6 years ago

    Doug,

     

    Nicely done.  Great demonstration of your HID mouse half of your camera driven mouse.

     

    Great work!

     

    Gene

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube