IEEERobotics / bot

Robot code for 2014.
BSD 2-Clause "Simplified" License
18 stars 11 forks source link

Motor cape encoder reader #396

Open SeanKetring opened 9 years ago

SeanKetring commented 9 years ago

Introduction

Some motors come with sensors attached to them that allow them to measure how much they've moved.

Notes

AhmedSamara commented 9 years ago

Issue updated, please view on github for most recent version.

tabarrett commented 9 years ago

Update: I found some resources that might be helpful but I am still trying to figure out the details: http://www.ni.com/tutorial/7109/en/ This is a concise how they work guide with some short examples. Theres an example of people setting up one I found: http://letsmakerobots.com/content/how-use-quadrature-encoder. These might be helpful for people who understand the python code found in dmcc_motor.py

shreyashgotee commented 9 years ago

I'm going to work on this one...

wtshaw commented 9 years ago

I'm going to work on this.

imohame commented 9 years ago

I'm working on this. So let's on Thurs. to discuss it

imohame commented 9 years ago

This is the data sheet for the motors https://www.pololu.com/product/2271

imohame commented 9 years ago

img_1023 Sean helped me figuring out the correct to match the pins of the cape and the micro-controller as shown in the figure. Now the encoders give values for the pos. and the vel. We need to see how to interpret them.

AhmedSamara commented 8 years ago

We have an example of this being used from a few years ago:

https://github.com/IEEERobotics/bot/blob/master/bot/hardware/dmcc_motor.py

So calling the position, velocity, etc, properties is really straightforward.

I added a rapper in omni_driver.py on the omni dev branch.

AhmedSamara commented 8 years ago

@WillDuncan1

AhmedSamara commented 8 years ago

https://github.com/IEEERobotics/DMCC_Library/blob/master/examples/dmcc_motor_test.py

Here's a sample script of them being used