Go Down

Topic: Ways to improve optical mouse sensor tracking (Read 3 times) previous topic - next topic

robtillaart

Where did you connect the paper disk (your freewheel could be a big one), please post a picture
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Jabberwock

No time for a picture now, I'll post it later...

I did just as Magician said - on the internal side of the crankwheel (i.e. on the other side of the wheel with pedals). It could not be the freewheel, because, well, it's a freewheel.

Jabberwock

Got some (not much) time to play around with this again...

Obviously I am not the right person to do that. On the workbench it works fine, but when I get around to implement it, it's problems, problems, problems...

One of them is that lighting is a bit tricky - I have fitted two LEDs to light the area evenly, however, due to restricted space and surrounding (i.e. white glossy paint of the bike frame) it's hard to get good contrast - either two much light is reflected off the paper or it is too dim.

Anyway, I have started a bit too ambitious - I've put the encoding wheel with 24 sections (12 impulses per turn), but there was too much noise to establish the threshold value right. Now I've fitted 8-section wheel - this works well, but then the resolution is the measly 4 impulses per turn... Hall sensors look attractive again, but then I'd need to order the magnets. By the way, anyone has any experience with hall sensors and neodymium magnets? What's the typical distance they detect the field from? I do not want to space them too densely...

MarkT

Upto several cm, depends on the size of the magnets and the amount of hysterysis of the Hall sensors (most Hall sensors output logic level and have slight hysterysis, analog output hall sensors are the exception not the rule).  Magnetic field strength falls off roughly as the cube of distance, note.
[ I won't respond to messages, use the forum please ]

Jabberwock

Thanks for the info! A few cms might be problematic given the diameter, especially if I want to get the phase for the second sensor. I'll check it out when the magnets arrive.

Unfortunately, the optics turned out to be a dead end - it works well while tested (so the setup and the software are OK, I believe), but at the working speed it stops picking up the impulses - the input value kind of flatlines, I guess the sensor is not fast enough so it just gets a grey blur... actually, when I look at it spinning, I get it, too.

Go Up