go_away

Author Topic: What Wheel Encoders To Buy  (Read 2772 times)

0 Members and 1 Guest are viewing this topic.

Offline jim150454Topic starter

  • Beginner
  • *
  • Posts: 6
  • Helpful? 0
What Wheel Encoders To Buy
« on: August 11, 2015, 05:20:47 PM »
I have recently bought a 2-wheel robot chassis from Amazon (http://www.amazon.co.uk/Motor-Chassis-Classis-Wheels-Battery/dp/B00J0NHWPE/ref=sr_1_4?ie=UTF8&qid=1439334883&sr=8-4&keywords=2wd+robot+chassis), which comes with encoder disks to place on the motors, but no sensors to use with these disks.

I have tried looking around, but all the wheel encoder stuff online seems quite confusing to me. Can someone please give me an idea of what sensors I should be looking at buying in order to calculate my robot's speed. Some links would be appreciated!

Thanks,  :D

Offline cyberjeff

  • Full Member
  • ***
  • Posts: 114
  • Helpful? 7
Re: What Wheel Encoders To Buy
« Reply #1 on: August 12, 2015, 05:44:03 AM »
I don't have any direct experience  with this.

If the encoders have slots, you need a different kind of sensor  then if it is a wheel with light dark/dark segments it is unknown to me which you have.

Take a look at this:

http://ardadv.blogspot.com/2012/03/using-sen0038-wheel-encoders-arduino.html

and then look at this:

https://www.sparkfun.com/products/12617

Either way, you will have to set up an interupt on your MCU as it will otherwise stay in the loop and not know or miss that there was a count change. None of this is trivial.

I'd like to say this about why I reply to questions like this. I am by no means an expert, but I have been around long enough to know when a question is likely to lack getting any replies. So, I'll give something to go on, which I feel is better than nothing.

I'm actively researching robotics at the moment, so I have resources fairly fresh in my mind. I'll be around here for a bit longer, and then I'll be gone as suddenly as I arrived.

Offline ProgressiveAutomations

  • Jr. Member
  • **
  • Posts: 10
  • Helpful? 3
  • Experts in Linear Motion
Re: What Wheel Encoders To Buy
« Reply #2 on: August 13, 2015, 12:40:00 PM »
A wheel encoder is a disk with slots cut in it.  Some more advanced ones have differently cut slots to have more precise control. Here are some levels of complexity: http://www.avrfreaks.net/sites/default/files/SevenWheelsXparent.gif

But they all work on the same principle.  You have layers of slots on the disk, and for each layer you need a light/sensor pair.  In the image above, the first two pictures are 1 layer, the next 2 are 2 layer, and the absolute position ones are 8 layer.

You connect the light to always be on, and connect the sensor to an interrupt pin.  As the wheel spins, the disk spins, and as the slots spin past the light, it causes flashes of light to be detected by the sensor.  By counting these flashes, you can know how far the wheel has moved, to determine position.

By counting the flashes over a certain time interval, you can determine speed.

If you already have an encoder disk, then the only sensors you need are small LEDs, and a small photoresistor.  Put the LED on one side of the disk, and the photoresistor on the other to count the pulses.
Experts in Linear Motion

 


Get Your Ad Here