Leave a comment:
Dear Spammers and Trolls: All comments are checked by myself before publishing!
The manual inspection is why it takes some time until your text appears in the comment section (as long as it passes my inspection) - be patient...

I don't answer comments by mail!
Note the rules and my mail address in the column contact!

Norbert

Name:
Comment:
Formular:


----------------------------------------------------

Seite: technics-base-circuits-computer-mouse_ge.htm
Datum: 2022.04.28 11:14:37 (UTC+1)
Name: Johanna

Kommentar:
Hi Norbert,

I tried replicating your optical_mouse project with the Mouse/M-SBF96 from Logitech, which contains the ADNS2610 I believe. For my first attempt, I soldered the Data,clock,Vdd and ground directly onto the cables of the mouse. That didn't really work, because the mouse wasn't even able to initialize. For the second attempt, I soldered the four cables to the appropriate connections on the sensor itself. Now the values change even if the mouse isn't moving.

Me: I only checked that code with an old mechanical PS/2 mouse. Did you use an Arduino UNO? To what pins of what chip did you solder the cables directly? Some photos of your project could be helpful.



----------------------------------------------------

Page: technics-base-circuits-computer-mouse_en.htm
Date: 2021.10.18 19:49:56 (UTC+1)
Name: Franco Dotti

Comment:
Download file: "computer-mouse.zip"
Folder: "optical_mouse"
Routine: "optical_mouse.ino"

Besides, the variables in question in your routine are "x" and "y". ("mx" and "my" are the names I gave to them, so I think you should also need to guess this from the previous comment.) I'm sorry, please don't get mad. Thanks for you time.

Me: Now I see what you were talking about (without getting mad). Yes x and y are char and so limited to one byte and so ranging from -127 to 127. That's the definition according to the ps/2 protocol and so can't be changed (because the firmware on your mouse won't recognize that change). Its the movement since the last read happened. The only solution is to read in intervals short enough to prevent an overflow from happening before the next read starts.

----------------------------------------------------

Page: technics-base-circuits-computer-mouse_en.htm
Date: 2021.10.15 19:38:50 (UTC+1)
Name: Franco Dotti

Comment:
Hello Norbert.
Thanks so much for your "computer mouse" routine. It is being very useful to me!
I'm trying to use the ps2 mouse to track the motion an unbalanced wheel (a pendulum wheel).
Everything goes fine unless for one thing: "mx" and "my" are limited between -127 and 127. My question is: could I do something to release such limitation? (I wonder this happens because the char varible type, but I'm not sure how to modify it).
Thank you very much in advance!
Best wishes

Me: People tend to think I could always remember each line of all code examples on my pages. The truth is: I can't.
So please say exactly what download file (and subfolder of the packages) you are talking of.

----------------------------------------------------

Page: technics-base-circuits-computer-mouse_en.htm
Date: 2021.05.04 14:15:44 (UTC+1)
Name: Sohail

Comment:
Thanks for the great article.

There are cheap adapters to convert USB mouse to PS2. They simply connect Data+ and Data- lines of the USB to Clock and Data lines of PS2 connector.

So can we do the same to connect a USB mouse to Arduino by connecting those D+ and D- lines to Arduino pins 5 and 6?

Me: All I can say is: try it out and leave another comment if it works with your mouse model. Most, but not all PS/2 mice work with the Arduino software I am using. The chance is higher, the older or the more simple the mouse model is. The super dooper features mice often have extensions to the protocol that cause trouble and so won't work with the simple implementation on the Arduino.

----------------------------------------------------

Page: technics-base-circuits-computer-mouse_en.htm
Date: 2020.10.18 09:14:57 (UTC+1)
Name: Vahe Arakelyan

Comment:
Greetings, Norbert.
I did a replication of your setup. Got permanent x=0, y=0. Please, advise, what means the stat = 1000 (binary), which is also always the same. I'm trying to capture the pulses train on data analyzer. Please, advise the data configuration, 8N1 or something else. What about MSB (most significant bit) first, or LSB first?

Me: What setup exactly? I have made more than just one. Would also be nice to have pictures of what you have built. My mail address is in the column contact.

----------------------------------------------------

Page: technics-base-circuits-computer-mouse_en.htm
Date: 2020.10.15 21:19:02 (UTC+1)
Name: Vahe Arakelyan

Comment:
Your coding tricks are just amazing. I'd loved those and will use in my further practice.

Me: I am not the inventor of those tricks. Its common coding style for decades.

----------------------------------------------------

Page: technics-base-circuits-computer-mouse_en.htm
Date: 2020.10.15 21:14:24 (UTC+1)
Name: Vahe Arakelyan

Comment:
Wow, your reply goes too quick and that was eye opening for me. Thanks. Will try to replicate on ESP32. Thanks.

Me: You'Re welcome! My computer was up and running while watching Snooker ;-)

----------------------------------------------------

Page: technics-base-circuits-computer-mouse_en.htm
Date: 2020.10.15 21:03:17 (UTC+1)
Name: Vahe Arakelyan

Comment:
In the same sketch I see useless 36 line. Nevertheless of condition being true or false nothing then happens.

Me: That line
while(digitalRead(PS2CLOCK)==HIGH);
means the Arduino waits (does nothing) until the pin PS2CLOCK goes LOW. It is an absolute essential line.

----------------------------------------------------

Page: technics-base-circuits-computer-mouse_en.htm
Date: 2020.10.15 10:42:42 (UTC+1)
Name: Vahe Arakelyan

Comment:
Hello!
In "Optical mouse" sketch review 14-17 lines.  The pin "pin" declared as INPUT, then toggled to HIGH as OUTPUT.

Me: If set to input and then doing a digitalWrite(pin, HIGH) activates the internal pull-up resistor of the Arduino.

----------------------------------------------------

Page: technics-base-circuits-computer-mouse_en.htm
Date: 2020.02.20 09:27:50 (UTC+1)
Name: Erfan

Comment:
hey sir, I wanted to know if you can send me the board pic and the code. I really want this things cause I'm stuck at this moment!
I'd really appreciate it.
King Regards
Erfan

Me: There are download links on the page pointing to what you are looking for. Read it all before posting a comment, next time.

----------------------------------------------------

Page: technics-base-circuits-computer-mouse_en.htm
Date: 2020.02.10 11:09:39 (UTC+1)
Name: Nitin Kumar

Comment:
You may be the next genius of the world. I just wanted to know that "do you know this world is being run by some greatest business minds of all time and we were supposed to consume or use all nature's resources for free?

But they wanted to provide these free resources of nature, may it be water, electricity and even knowledge, at some cost so that they can somehow rule the world.
If I get any, I mean any chance, I would be doing the same thing as you do to make this world a better place.
Thanks

Me: You have all chances to do as I do: Simply share your knowledge for free as well!

----------------------------------------------------

Page: technics-base-circuits-computer-mouse_en.htm
Date: 2020.02.06 16:21:54 (UTC+1)
Name: Sultan

Comment:
Thanks for this beneficial video, may you please help us with the code and wires connections that detect the movement along X and Y axis (figure 6)?

My regards.

Me: Sample codes are part of the Download package.

----------------------------------------------------

Page: technics-base-circuits-computer-mouse_en.htm
Date: 2019.12.05 14:05:10 (UTC+1)
Name: Hello Norbert :)

Comment:
(From your "computer mouse" page) I finished my arduino 4WD car project (with arduino nano), I want to add a spcp168a chip readings, I managed to turn it on with vcc +5 and gnd, but I don't know if the pins are correct, i connected 2 as PD, 3 as SD and 4 as SCLK ... Can you see the datasheet? (Please)
http: //datasheetcafe.databank.netdna-cdn.com/wp-content/uploads/2015/11/SPCP168A.pdf
If they are correct, is the data reading different? how would it be?
Thank you.
Roberto Ortega

Me: There is more than just one mouse project on that page. You must tell me EXACTLY what sample codes you refer to and what reading you want to get. X/Y coordinates or do you want to play with the camera hack of the optical mouse?



----------------------------------------------------

Page: technics-base-circuits-computer-mouse_en.htm
Date: 2019.11.12 21:08:09 (UTC+1)
Name: Mario

Comment:
Hi,
First of all, Thanks for this, it alredy helped me a lot with my school project(ofc im giving you the credits you deserve)!
Now i can get the vector position and so the abs position of the mouse in a 2d coord.

Im trying to 100 understand the code.
Im not really sure how the read/write process happens do it read/write a 8 bit mask?
In the mouseInit, why do you pass 0xFF and 0xF0 to the Write()

I would really appreciate your help, although you alredey helped me a lot!

Vielen DANK!


Me: Since I have written more than just one mouse project it's always a good idea to tell me exactly what file (download package, included folder, code line et cetera) you are talking about.
I guess you are talking about the optical mouse connected to an Arduino (computer-mouse.zip optical_mouse). It is indeed transmitting and receiving 8-bit data and passing special characters is required because of the PS/2 protocol the mouse uses for transmission. Details about that protocol are available at: https://isdaman.com/alsos/hardware/mouse/ps2interface.htm.
Nice to see that I am back in school - somehow ;)
Bitte gerne!



----------------------------------------------------

Page: technics-base-circuits-computer-mouse_en.htm
Date: 2019.09.01 23:52:04 (UTC+1)
Name: M.Deren

Comment:
Hi
I'm looking for a device can 3d printing and PCB milling It should cheap. Can you suggest me one. Or do you sell your devices?
thanks.

Me: 3D printers don't have to fight sideloads (except inertia), the print head and mechanics must be lightweight. Milling machines must fight sideloads and so need a stiff, heavy mechanics. that's why you'll never find a cheap machine that can do both. I'd suggest buying a 3D printer like one of the Zonestar series and modify it to a milling machine afterwards if you don't expect too much of it (and that's what you never can from what ever cheap machine you buy).

----------------------------------------------------

Page: technics-base-circuits-computer-mouse_en.htm
Date: 2019.05.22 00:13:01 (UTC+1)
Name: :(

Comment:
Hi, may I know why do my serial monitor doesn't appeared any numbers?
It said after I load the sketch:

"Sketch uses 3222 bytes (9%) of program storage space. Maximum is 32256 bytes.
Global variables use 241 bytes (11%) of dynamic memory, leaving 1807 bytes for local variables. Maximum is 2048 bytes."

I'm using Arduino Uno for the Data Transmission. And my mouse did compatible with the PS/2.

Can you help me?


Me: So compillation of program and upload succeeded. Did you set the correct baud rate in the serial monitor window? If you would have told me exactly what sketch you are talking about (I have written more than yust one) I could tell you what baudrate to set.

----------------------------------------------------

Page: technics-base-circuits-computer-mouse_en.htm
Date: 2019.02.27 23:13:00 (UTC+1)
Name: Kevin

Comment:
which optical mouse did you use at 3:47?
Trying to build a interface using PIC microcontroller via i2c

thx

Me: I think it was my Genuis Xscroll GM-1200014.

----------------------------------------------------

Page: technics-base-circuits-computer-mouse_en.htm
Date: 2019.02.27 12:56:58 (UTC+1)
Name: The Computer is your friend

Comment:
#import "compliments.h"

int main() {
 printf(compliments.GREAT_WORK)
 printf(compliments.VERY_HELPFUL)

 takeoverWorld()
}

Me: return (youre.welcome);

----------------------------------------------------

Page: technics-base-circuits-computer-mouse_en.htm
Date: 2019.02.16 16:54:02 (UTC+1)
Name: Kareem

Comment:
Thanks you sir
Nice one

Me: You're welcome!




----------------------------------------------------

Page: technics-base-circuits-computer-mouse_en.htm
Date: 2019.02.08 22:14:57 (UTC+1)
Name: Aditya

Comment:
I have added the snippet below to:
computer-mouse.zip :: optical_mouse.ino
in the
void PS2MouseInit(void)
routine.
The PS/2 optical mouse is made by Cherry and has a 8-pin sensor.
Thanks again!

Me: The question is if this mouse supports different physical resolutions and if the bytes you send are actually the right ones. Standards are sometimes weirdly implemented, that's also true for PS/2 communication...

----------------------------------------------------

Page: technics-base-circuits-computer-mouse_en.htm
Date: 2019.02.08 17:04:26 (UTC+1)
Name: Aditya

Comment:
Hi Norbert,
I have hoked up a PS2 mouse to an arduino, and the readout works, but I am unable to change the mouse-resolution by adding the following code to setup():

 PS2Write(0xE8)_ //set resolution
 PS2Read()_ //We receive a code 0xFA
 //adding delay $here doesn't help
 PS2Write(0x00)_ //resolution 1 counts per mm is requested
 PS2Read()_ //We receive a code 0xFA
 delayMicroseconds(100)_

Any idea what may be amiss? Did changing the resolution work for you? Thanks!

Me: I did not play with the resolution. Can't give a better answer as long as you don't say exactly what software package you are talking about. I have used more than one example on my pages...
Probably your mouse doesn't support changing resolutions that way.


----------------------------------------------------

Page: technics-base-circuits-computer-mouse_en.htm
Date: 2018.09.11 11:31:48 (UTC+1)
Name: qwerty

Comment:
thanks mate i figure it out already. thank you for codes :)

now its working GREAT :))

Me: The most intensive learning is finding the solution by yourself - well done!




----------------------------------------------------

Page: technics-base-circuits-computer-mouse_en.htm
Date: 2018.09.11 11:14:38 (UTC+1)
Name: qwerty

Comment:
hello again

i did your coordinate project. its working fine. but i dont want to read delta x or delta y. i want to read actual position .for example this is on my comport monitor:
11000 delta X=-1  delta Y=1
11000 delta X=-1  delta Y=0
1000  delta X=0 delta Y=0
1000  delta X=0 delta Y=0
11000 delta X=-1  delta Y=2
11000 delta X=-1  delta Y=0

its getting zero when i stoped to movement. i want to read coordinates like on your optical encoder project. which part of codes should i change ?

Me:



----------------------------------------------------

Page: technics-base-circuits-computer-mouse_en.htm
Date: 2018.09.11 10:27:20 (UTC+1)
Name: qwerty

Comment:
hello Norbert..

i did that project and its working fine. but i want to read coordinates as fast as arduino can and also i dont want to read delta x or delta y , i want to read actual position (for example actual position =recent position + current position ). i checked up your codes but didnt understand anything . can u help me please ??


Me: I am very confident you understood something of the source code - which package exactly are you talking of? (I have written more than one example code). So read it again and ask more specific questions about it - that's the only kind of help I can offer.

----------------------------------------------------

Page: technics-base-circuits-computer-mouse_en.htm
Date: 2018.07.13 17:23:56 (UTC+1)
Name: Marc

Comment:
Please for help,
I will like to build my own mice,and I don't actually know where to start. I just want it to click at a particular frequency,I will look a the others function later.
Thanks.

Me: You can emulate mouse actions with e.g. Arduino hardware:
https://www.arduino.cc/en/Reference.MouseKeyboard


----------------------------------------------------

Page: technics-base-circuits-computer-mouse_en.htm
Date: 2018.04.24 21:53:49 (UTC+1)
Name: Emanuel

Comment:
Hello, I intend to make a program for Arduino using a PS-2 mouse to measure distances.

What is the data format in the PS-2 mouse Data pin?
How does it separate the X and Y information?

Thank you

Me: Have a look at the Arduino sketch I have written for the video to see how it works. It's available as download package

----------------------------------------------------

Page: technics-base-circuits-computer-mouse_en.htm
Date: 2018.02.12 18:45:14 (UTC+1)
Name: Mike

Comment:
Yes ı use to have a cnc lathe and ı was working with that code so how can ı convert mouse motion to g code?

Me: Read the link about Gcode I gave you, learn how it works and do the coding. You can't expect to get all that information in a comment and I am not the man that does your work for free ;-)




----------------------------------------------------

Page: technics-base-circuits-computer-mouse_en.htm
Date: 2018.02.11 19:39:37 (UTC+1)
Name: Mike

Comment:
It can be dxf cad cdr any tape i will be use a cnc router as a cordinates to cut starff:))

Me: But what format does your CNC work with? I would recommend learning how gcode works, because that's what many machines can process. Gcode is a text file, thus you can write your mouse coordinates into a file like:
X100.5 Y50.0
X120.1 Y50.0

----------------------------------------------------

Page: technics-base-circuits-computer-mouse_en.htm
Date: 2018.02.10 20:51:18 (UTC+1)
Name: Mike

Comment:
Thank you for answering everytime and quick respond i do understand how to get cordinates and i do know how i save a sd card but i dont know how i convert can you able to tell me codes or something to convert pls

Me: Convert your mouse data to what format? Kee in mind that I am no mentalist ;-)





----------------------------------------------------

Page: technics-base-circuits-computer-mouse_en.htm
Date: 2018.02.06 11:49:05 (UTC+1)
Name: Mike

Comment:
Thank you for answering kind quick:)) when i was asking get a code screen like a draw line for example you move mouse first left than top after down so i want to as a line on the screen trace line:)) because after get that line i would like to cut that line on a cnc router thank you

Me: If you learned how to read the mouse coordinates, all you have to do it convert and store those readings.

----------------------------------------------------

Page: technics-base-circuits-computer-mouse_en.htm
Date: 2018.02.06 09:39:48 (UTC+1)
Name: Mike

Comment:
Hi myfriends good share...
I need some questins about it.i would like to get a mouse movment under record and when finish movmet what line you make i want to see on screen is it possible?(i am going to use this project as a trace outline of some parts so if i get exactly cordinate from mouse movment and change to cdr file than i can give to cnc router to cut that stuff :)) ) if you can help me i will be very happy but still good share thanks

Me: You can find an instruction on how to read mouse coordinates using Linux:
http://blog.eihis.com/2014/06/26/linux-reading-the-mouse-events-datas/

That's how I did it in my video about Computer mice


----------------------------------------------------

Page: technics-base-circuits-computer-mouse_en.htm
Date: 2018.01.12 10:18:08 (UTC+1)
Name: Alex

Comment:
Hello, i want to help please. Have a nice day.

Me: In what project or way do you want to help me?

----------------------------------------------------

Page: technics-base-circuits-computer-mouse_en.htm
Date: 2016.12.14 17:20:12 (UTC+1)
Name: Prasanth

Comment:
May i know how to connect USB MOUSE with ARDUINO UNO board. And also please explain the mouse IC pin configuration and it's connections with arduino.

Me: Sorry, but the Arduino can't operate as host for a USB mouse. The PS/2 protocol is more simple than USB, thus this is the only way to talk to computer mice.

----------------------------------------------------

Page: technics-base-circuits-computer-mouse_en.htm
Date: 2016.12.10 14:07:37 (UTC+1)
Name: snehal

Comment:
Thank u sir for video.
I have open many mouse but I did not get optical mouse sensor ic whose datasheet is  available.
Sir in which mouse u got the A2052 optical mouse sensor IC?

Me: I used a Logitech Mouseman Dual Optical in my video.

----------------------------------------------------

Page: technics-base-circuits-computer-mouse_en.htm
Date: 2016.07.26 22:48:37 (UTC+1)
Name: TARIQ

Comment:
Hi sir,

I saw a lot of tutorials about these things, but yours is very simple and effective.

For me I want to use the optical mouse to know the position of my Robot, and your tutorial was very helpful.

Thank you

Me: You're welcome!


----------------------------------------------------

Page: technics-base-circuits-computer-mouse_en.htm
Date: 2016.06.27 02:22:07 (UTC+1)
Name: Yaser

Comment:
Hi TEACHER ,
I want to writing in the file(Journal Document) by mouse  with pic c  pleas can help me
thank you for all this videos .  
YASER


Me: At the bottom of this page is a link to the download section of the software.



----------------------------------------------------

Page: technics-base-circuits-computer-mouse_en.htm
Date: 2016.06.20 12:48:08 (UTC+1)
Name: Arseny

Comment:
Hello!
I do things myself and saw a lot of YouTube DIY videos - and I want to say that yours are EXCELLENT in detail, simplicity and images. Thank you GREATLY for all the effort that you, experienced people, have put into making such great visual tutorials for the newcomers!!!

Especially I enjoyed the "Rotary encoder or: How to build a digital servo using an Arduino and photo sensors".

Me: You're wecome!
The Arduino is a great computer and the digital servo shown in this video is a useful tool to move the world. I like it, too.
Share my projects with your friend, maybe they can learn new things, too.

----------------------------------------------------

Page: technics-base-circuits-computer-mouse_en.htm
Date: 2016.06.06 23:07:18 (UTC+1)
Name: Morteza

Comment:
thank you for sharing the software data

Me: You're welcome!