Rotary encoder with CNY70

Hello,

I'm trying to realize a small 3 wheels rover. To better control the movements I need to misure the distance covered by each wheel. In this way I can correct the trajectory if the robot is not going straight forward and also turn with more precision.
I thought to create a small encoder using the CNY70. I've attached an encoder disc (black/white) to the internal part of the wheel and I made the circuit found at the following link:
Imgur
To test it I've attached the tester on the 47Kohm resistance where the pin 4 should be connected. Without anything in front of the sensor I get about 4v. The problem is that everything I put in front of the sensor causes the voltage to drop to 0v even if it is a black paper. The only thing that seems not to be saw by the sensor is the black rubber of the wheel. In this way the idea of using a black/white disc to catch the rotation doesn't work.
I've also tried cutting away the black parts of the disc but it doesn't work too because the rim of the wheel that is half centimeter behind reflect the infrared ray.
Can anyone give me some suggestions on how to get out from this?
Thanks!
Giorgio

Do some searching for photo sensors. Look at the examples that come with the compiler.

http://www.sparkfun.com/search/results?term=photo+sensor&what=products

There are other sensors that work too. Not just the one you chose -- and they are cheap.

For example this one -- from that list.

Please everyone -- search first -- ask later.

Welcome to the forum.

WillR:
Do some searching for photo sensors. Look at the examples that come with the compiler.

Search Results for photo sensor - SparkFun Electronics

There are other sensors that work too. Not just the one you chose -- and they are cheap.

For example this one -- from that list.
Photo Interrupter - GP1A57HRJ00F - SEN-09299 - SparkFun Electronics

Please everyone -- search first -- ask later.

Welcome to the forum.

I've searched just before starting to try realizing this. Searched on google and found several projects using CNY70 even in line follower robots and also in rotary encoders. That's why I thought the CNY70 was a good sensor for my scope.
Of course as you sure know when you put in practice what you have studied in theory you discover the errors you didn't think before. And when you are not an expert this can easily happen. You try and try and finally ask guidance to who is supposed to be more expert than you. I thought this was the scope of the forum but probably I'm wrong, may be the forum is only for experts.
So thank you to have spent 5 minutes in asnwering me and also sorry to have bothered you and may be other experts in reading this thread.

Just a small suggestion from a beginner: don't always think that everybody ask questions before searching, someone sometimes do search before.

Cheers,
Giorgio

Hi Giorgio,

Did you get any further with the CNY70? I want to use it too with the arduino. I have used in the past with great succes in combination with a one-wire counter. But I´m switching to Arduino, thats why I wanted to know.

Thanks!

Willem.

Hi,

I know this might be late for the OP, but I got a simple rotary encoder based on the CNY70 working fine with my Arduino. I wrote a blog entry that contains instructions and a circuit diagram: