Is there any sensor that can track the x-y coordinate?

I am looking for a sensor with the help of which I can track and trace the x-y coordinate of the object I mount the sensor on. My scenario is just like a mouse. A mouse when moved makes the cursor move and I assume there is x-y coordinate tracking going on. Is there any such sensor that I can do a PoC with Arduino UNO board?

A PC mouse uses either an optical movement sensor or encoders (in older models). Both of those basic sensors could be used in your Arduino project.

Example optical sensor hack.

1 Like

Or dismantle an old USB mouse and capture the USB signal produced... i.e. mount you object on a mouse...

A mouse does not track x and y. It measures the distance it travels in x and y direction.
Important difference is that errors will accumulate. So to get reliable xy coordinates you will need regular calibration. For example a calibration each time your object hits some border or crosses some line.
True xy coordinates would need measurement of x and y compared to two fixed points with known x and y.
So it will depend on your needs if mouse like approach can work for you.

Thanks for replying. Essentially i wanted to design a stylus where i can write something on a board and it would be replicated in a whiteboard in laptop. Its very similar to an optical stylus. I may be wrong to consider only optical stylus because I was reading that mPU6050 may also help tracing sketching movement that i need from a stylus

This mPU6050 will measure acceleration. To derive distance, you would need to integrate.
Problem is that you do not know the integration constant (velocity in x and y direction at t=0).
Also you may get an ever increasing error due to integral windup. What happens if you rotate your object?
Clever programming may help to get around these issues. I never tried...
Did you find a library?
Does any stylus work the same way (with an accelerometer)? That would prove that this approach is doable.
I know about stylus things that work with a sensitive pad (where the pad gives x and y when the stylus hits the pad).
Edit: you need to integrate twice..
Acceleration -> velocity->position
Then you have 2 unknown integration constants...

Essentially i wanted to design a stylus where i can write something on a board and it would be replicated in a whiteboard in laptop

Could the "board" be a touch screen which detects the x,y of the stylus or finger? Every phone and tablet has touch screen. If the board is completely passive (for example, a sheet of wood), this problem is much harder.

The board is completely passive, which is why I am thinking of a optical stylus kind of thing

You mean a graphics tablet?
https://www.scorptec.com.au/product/tablets/graphics-tablets?page=1

Tom... :smiley: :+1: :coffee: :australia:

@prc89 hey , did you find some solution . Actually i am also trying to do a similar thing but stucked at this point .

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.