Log in

View Full Version : Optical encoders and LabView


autox_vette
19-11-2012, 18:12
Our controls team has been experimenting with adding encoders (standard US Digital E4P-250 series) onto the toughboxes on our robot from last year to get more experience with integrating them. We have been having problems with getting accurate readings from them (one side or the other reading as much as 50% more than the other).

We found that the encoder wheesl on all of our encoders (we've tried several) are very "gunked up" (technical term), so we have new ones on order, but as we swap the encoder wheels from side to side, the erroneous readings don't always follow the wheel, I'm wondering if we also have some kind of programming error (I'm relatively new to labView and still trying to figure out all of the interactions) which is adding to our confusion.

We opened the standard encoder example and copied the entire VI to create a second loop so we could read the values on both sides of the robot as we roll it across the room. Sometimes one reads 50% more than the other, sometimes 25%, etc.

Can someone with experience with encoders in labView comment on whether what we did is correct or not.

Thanks,
Kenton

billbo911
19-11-2012, 18:40
Our controls team has been experimenting with adding encoders (standard US Digital E4P-250 series) onto the toughboxes on our robot from last year to get more experience with integrating them. We have been having problems with getting accurate readings from them (one side or the other reading as much as 50% more than the other).

We found that the encoder wheesl on all of our encoders (we've tried several) are very "gunked up" (technical term), so we have new ones on order, but as we swap the encoder wheels from side to side, the erroneous readings don't always follow the wheel, I'm wondering if we also have some kind of programming error (I'm relatively new to labView and still trying to figure out all of the interactions) which is adding to our confusion.

We opened the standard encoder example and copied the entire VI to create a second loop so we could read the values on both sides of the robot as we roll it across the room. Sometimes one reads 50% more than the other, sometimes 25%, etc.

Can someone with experience with encoders in labView comment on whether what we did is correct or not.

Thanks,
Kenton
A lot of things can be coming into play here.
The fact that you are getting readings is a good sign that your electrical connections are good. Although, large variability in your readings may indicate intermittent problems with the electrical as well. For now, let's assume they are good.

Your comment that the encoder wheels are "gunked up" tells a lot. Basically the US digital E4P-250 encoders use two optical sensors and two light sources. The physical distance separating the sensors makes the signals coming from each, 90 deg out of phase with each other. The disk really is nothing more than a mirror, or reflector with 250 or 360 reflective lines on it. If the disk is "gunked up", the signals generated by the circuit in the encoder will be also. The alignment of the disk with respect to the sensors is critical. Make certain you assemble the encoder using the spacing tool. If you don't, you can basically forget about getting a reliable output.

Cleaning the disks is possible, but usually just destroys them. If you choose to try, use a mild soap and water. Use a lint free cloth and dry them gently. You might get lucky.

I also mentioned 250 or 360 counts per revolution. It is easy to get confused between which disk goes with which encoder. Using the 250 disk on a 360 encoder won't work, and vice verse.

The last bit of advice is to make sure the disks are not loose on the shaft. Not only will they not spin properly, but they will wobble and slide in and out. All of these will degrade the signal out of the encoder and give inconsistent results.

To help make sure they are snug, GENTLY use a pair of needle nose to squeeze the long fingers. Don't do the same on the short fingers as this will only cause the long fingers to open up again.

Try these tips and let us know how it turns out.

autox_vette
30-11-2012, 12:27
I also mentioned 250 or 360 counts per revolution. It is easy to get confused between which disk goes with which encoder. Using the 250 disk on a 360 encoder won't work, and vice verse.
.

Thanks for the info. We didn't even realize that we HAD 2 different types of encoders (can't find anything that says 360 on it other than a couple of disks once we get them magnified enough). We found that we had 1 250 and 1 360 disk on (which explains the ~50% higher reading on one side than the other). Seems that a 360 disk will work on some 250 encoders (maybe not reliably or at high speeds).

Replaced the 360 disk with a 250 and everything is working as expected. Now the programming team can work on creative uses for encoder data...

Thanks,
Kenton

billbo911
03-12-2012, 01:18
Thanks for the info. .....
Replaced the 360 disk with a 250 and everything is working as expected. Now the programming team can work on creative uses for encoder data...

Thanks,
Kenton

Kenton,

Glad I could help!
This is one of those times when personal experience has paid off again. :o