Integrated Shaft Encoders

So I have a few questions regarding the integrated shaft encoders. First of all, what are the differences between the IMEs and the Optical Shaft Encoders, other than the fact that the OSEs are just bigger. I’ve been looking into getting those since I do know how much easier they make it to program an autonomous. Secondly, does someone have a sample program just showing how to use them? One of our other teams has the OSEs and has no idea how to use them, so if anyone could help me out that’d be great. And lastly, my robot has a four wheel drive. Do I need encoders on all of the drive motors or just one on the left and one on the right? Thanks all in advance.

There really isn’t any difference between the IME’s and OSE’s as far as I know. Perhaps other people could share further insight on that. Note that the IME’s tick count per revolution changes with the internal gearing.

As for how many you need, if you want to track distance, then you only need a single encoder; for rotation, two should be enough. I can post a flow chart of tracking distance.
Screen Shot 2015-01-13 at 11.33.45 AM.jpg

Ok, so if I am understanding you correctly, if I want my robot to drive forward for 1 rotation and turn left for half a rotation, I would need only 2 IME’s on only two of my drive wheels, not all four? And that flowchart looks a bit blurry. Could you try posting it again so I could take a better look at it? Thanks.

Yes, that would be correct. I will try posting the flow chart again.

Since I seem to be unable to post the picture with a higher definition, I’m just going to link it to a google document.

Thank you very much for your help

Ok so I have the IMEs, and I put them on the back of the robot, but how exactly do they connect to the cortex?I have one for the left drive and one for the right drive, and I know they have to connect to the I2C port on the cortex, but how does that work with two IMEs and only one I2C port?

And if someone could help me out with the programming side of it to, that’d be great. I am using easyc and I’m trying to get a program, to start, that will just drive forward for 2 full rotations. Which function is used and how is it used?

You run one 4-wire cable between the cortex and the 1st IME and a second cable between the 1st and 2nd IMEs as shown in this document.

Ok, so I got them attached, and I’ve tried several sample programs, but everything I try goes into a continuous loop. Also, I read that the light on the IME is supposed to be green, and mine is orange. I checked all connections and I couldn’t find the problem. Can someone provide some insight on the subject?

According to this…

The yellow light means (there is no orange):

   "Yellow (same as Green patterns) - counter overflow"

I don’t know what counter overflow means though. I have had yellow lights before and it has always ended up being something wired incorrectly. The four wire extensions are not very high qualify. We have had it happen several times where it seems like they are pushed in all of the way, but one of the four wires within the connector has come loose. One time a student connected two four wire extensions together, but they were backwards…

Double check all of those things…its very easy to miss.

Ok I have everything else taken care of, so would someone be able to walk me through the programming process? I’ve initialized the two encoders and preset them both to 0, created a while loop, and I’m not sure where to go from there. Does anyone have an easyc program that uses the IMEs that I would be able to look at? I would really appreciate it.