Encoders for servo mounted wheels

Picture_004.jpg

I have 2 questions,
- First, when using a C-stamp (programmed using MPlab) is it possible to track the movement of a continus rotating servo so that I dont need to add encoders to know how much the wheel has turned?
This is an example of coding that makes 2 servos turn(if it helps):
void goforth(BYTE lp, BYTE rp, WORD t)
{
WORD i;

for(i = 0; i < t; i = i + 1){
PULSOUT(lp, 800, 1, 1);
PULSOUT(rp, 400, 1, 1);
PAUSE(17);
}
}
-Second, if it is either difficult to use the method above are there encoders designed for these wheels(top picture), I am asking because there are evenly spaced alternating grooves on the wheel, so I am guessing it must be for some type of encoder.

I don’t know if those

I don’t know if those grooves are necessarily meant for encoding, unless a very sensitive switch was used to detect bounces as it traveled over them. Going back to your first question, if you don’t vary speed at all you could potentially fake knowing how many degrees each wheel turned by calculating how long you kept rotation on.

Let’s say your wheel turns one revolution per second and it’s 12.5 centimeters in circumference.

START TIMER

TURN WHEEL

STOP WHEEL

STOP TIMER

Distance in centimeters = time in seconds * 12.5

This won’t be very accurate s you’ll get error in calculations which then compounds into horribleness, but it won’t require any hardware. Someone else probably knows about those groove though. Best of luck!

- P

 

thanks, I dont really see

thanks

, I dont really see any other point of having those grooves if it isn’t for encoding, but there is a chance it was just decoration.

I have played around enough with electronics that timing is the last thing you want to rely on! But as I said “last” so if there is no other option timing will have to do.

 

The grooves are for optical encoders
Just paint the high lying parts black with a marker. That is their designed purpose.

I have tried to use these
I have tried to use these wheel encoder for my YAABR project. But with no luck, maybe because I use the blue wheels. The QTR-1A sensor did not give a good signal change, even when I paint the higher parts black. Maybe you get better results with a white wheel and black markers, as rik suggested.

**So, final verdict

paint the**
So, final verdict

paint the high lying parts black and use a QTR-1A reflectance sensor to detect the changes?

This seems like a good solution, it will be a bit time consuming to paint the high bits but well worth it at the the end!

Thank you all for the help!

for WheelWatcher

Yes, the intention is to color in every other stripe for optical encoders. Specifically WheelWatcher, but other sensors will probably work fine.
http://www.solarbotics.com/products/sw/
http://www.nubotics.com/products/ww01/index.html

The manufacturer site

The manufacturer site suggests "Just paint in every other stripe pocket, and you’re ready to go!"

I think that agrees with Rudolph.

Those sensors do seem very
Those sensors do seem very interesting! But at 50$ a pair I am going to have to try the cheaper option first.

So paint the holes black,

So paint the holes black, when you think about it it does make more sens.

What sensor would you recommend to detect the changes ?

You can get a range

You can get a range of custom sensor packages, but if you want something small and simple the QRD1113/QRD1114 IR sensors are popular and cheap. The sensitivity and maximum frequency are both good, and the short range isn’t an issue in this case =)

Here’s an example of the QRD1114 in use.