mini encoder for robot ?

Go To Last Post
46 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi guys.
I'm gonna build a mini robot (L60xW30xH30 mm)
But I need a way to see how long the robot's wheels have gone...
The robot will have a sort of caterpillar-track on each side (small rubber-band)..

So no space for a encoder wheel (opto-coupler i think ?)
But Can i maybe use a small potentiometer ? then using ADC to get direction and speed ?

Or what options can you guys think off here ?

(the image is just from google, but shows my concept)

uC's: Atmega16, 32, 64, 128 and Attiny13
Lang.: C
Interests: Small scale robots AND sensor monitoring system

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, if it has a caterpillar track, then you ought to be able to use wheel revolutions since the slip on the surface should be very low (except turning). How about painting sectors on the inside of a wheel and use reflective sensors in pattern quadrature to detect motion?

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hmm maybe the paint trick could work.. and then use mini sensors ?
Just had an idea, of maybe using the encoder as the rod for one of the wheels :P
But I don't know if its even possible on a small scale robot as this one

uC's: Atmega16, 32, 64, 128 and Attiny13
Lang.: C
Interests: Small scale robots AND sensor monitoring system

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What kind of motor are you using?
Normaly you can sense changes in current for each "state" of a DC motor.

Jens

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

some cheap pager motors from ebay
8mm in dia. :)

uC's: Atmega16, 32, 64, 128 and Attiny13
Lang.: C
Interests: Small scale robots AND sensor monitoring system

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

For that size you can use a step motor from a 3.5" diskdrive (the one that move the head). And then just count the pulses you give it;)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

what about an encoder from the scroll whell on these mini pc mouses ?
Which voltage do they need ? 5V as the USB ?

uC's: Atmega16, 32, 64, 128 and Attiny13
Lang.: C
Interests: Small scale robots AND sensor monitoring system

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Or punch a series of holes in the centerline of the tread and use an optical sensor.

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DocJC wrote:
Or punch a series of holes in the centerline of the tread and use an optical sensor.

JC


On such a small robot, holes are not. really an option :(

uC's: Atmega16, 32, 64, 128 and Attiny13
Lang.: C
Interests: Small scale robots AND sensor monitoring system

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Can you just characterize speeds (or changes in distance) to different PWM rates (or number of pulses) to the motors?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Make a small hole in one of the wheels or the motor axel and use a led and a photodiode, you can use reflection since there is no room for amount on both sides!
Where in DK do you live I have a lot of old parts?
I still think you should look at how the current look like when the motor is running.(if it has brushes there will be a big spike for each state), a cap and some resistors to a ADC should be all you need (a set for each motor that be).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

sparrow2 wrote:
Make a small hole in one of the wheels or the motor axel and use a led and a photodiode, you can use reflection since there is no room for amount on both sides!
Where in DK do you live I have a lot of old parts?
I still think you should look at how the current look like when the motor is running.(if it has brushes there will be a big spike for each state), a cap and some resistors to a ADC should be all you need (a set for each motor that be).

I think ill try to look on this spike thing :)
The motor is a small vibrator / pager motor.. could you maybe link to a circuit showing what you meant ?
I live i Sønderborg on Als

uC's: Atmega16, 32, 64, 128 and Attiny13
Lang.: C
Interests: Small scale robots AND sensor monitoring system

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

To turn the motor you will need to send a signal (PWM, whatever) to it, using the microcontroller. You can't use the ADC at the same time to look for this spike, but you can 'save' the spike by letting it pass through an RC circuit with a relatively long (long enough to get value from ADC) time constant (large R, not too large C, or the 'spike' will be absorbed).

I said you can't use the ADC at the same time, but perhaps you can... There's an analog comparator that triggers an interrupt. I haven't looked into it, but perhaps you should. ;)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

something like this circuit ? (i know its not using PWM..)
http://www.sxlist.com/techref/au...

But aren't I just counting all my PWM spikes instead of the revolutions ?

uC's: Atmega16, 32, 64, 128 and Attiny13
Lang.: C
Interests: Small scale robots AND sensor monitoring system

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That is a single transistor amplifier. C1 gets rid of the motor signal's DC bias, only letting changes in voltage pass through, and C2 acts as a low-pass filter (also 'saves' the spike), getting rid of noise. (If you use a BJT like in this example, put another small, ~25ohm, resistor between the emitter and ground.) These circuits can be pretty finicky. The 'smooth +12V' will be PWM, which will pass through the amp, too... I'm not exactly sure how to differentiate between the PWM pulses and the motor spike. I could spit out a theory, but I bet you want something that actually works, so I'll let someone with more experience advise. ;)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What if I sense the dynamo effect over the motor like every 1/10th second ?
Could I then see the spike ?

I just need a way to see how long each side is traveling (sort of excactly)

uC's: Atmega16, 32, 64, 128 and Attiny13
Lang.: C
Interests: Small scale robots AND sensor monitoring system

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sensing dynamo effect gives you the speed and unpredictable cumulative errors if you integrate it to get distance.
I would use a wheel shaft as optical or electric contact encoder.
For the optical way i would use a drop of black paint on shaft and an encoder like this:
http://usdigital.com/products/encoders/incremental/modules/hedr/
I noticed somewhere even smaller ones.

For the poor man way, i would attach two spring contacts to the metallic shaft, both permanently in mechanical contact with the shaft but with the electrical contact interrupted by a piece of insulator at each rotation.

Another approach would be to use a small magnet (made even by you at what dimensions you want) on shaft or on wheel and a Hall sensor in a small SOT23 package.

Dor

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you LP your PWM signal (or even use the PWM voltages to regulate a voltages regulator), I would expect that just a cap to the adc will do, place it at the hot side of the motor(size ? 10-100nF), (keep the adc pin at a AVG of Vcc 1/2 with 2 100Kohm resistors).

If that don't work try to make the PWM in software so you can start the ADC at the same "place" at the PWM signal every time.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Probably would not work on something quite this minuscule, but how small and integrated are the sensors for optical mice these days?

You could put one on the bottom, and get pretty high position resolution.

-carl

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

sparrow2 wrote:
If you LP your PWM signal (or even use the PWM voltages to regulate a voltages regulator), I would expect that just a cap to the adc will do, place it at the hot side of the motor(size ? 10-100nF), (keep the adc pin at a AVG of Vcc 1/2 with 2 100Kohm resistors).

If that don't work try to make the PWM in software so you can start the ADC at the same "place" at the PWM signal every time.

What if its in a dual H bridge setup ? .. I could have 4 caps then ? And control when each side is hot

The idea with optical mouse could be extremely fun to make :)
But doesn't that require some signal processing ? Or can it delivery x and y increments?

uC's: Atmega16, 32, 64, 128 and Attiny13
Lang.: C
Interests: Small scale robots AND sensor monitoring system

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,
Check out the various magnetic encoders here there is a video on the link that explains the concept. The magnets are 6mm x 2.5mm circular and the chip has to be mounted facing the magnet. They also have some off-axis solutions but the magnetic ring for these would be 32mm diameter for this type of solution. They appear to offer samples but I have not had any samples or used any of their devices.

http://www.austriamicrosystems.c...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

now when we talk about magnets then you could place a magnet on/in one of the weels and have a hall element or pickup on a fixed part of the "car".

edit:
add: or reed switch

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

B4Me wrote:
The idea with optical mouse could be extremely fun to make :)
But doesn't that require some signal processing ? Or can it delivery x and y increments?
(All?) Optical mouse sensors can deliver a lot of info, but typically includes changes in distance (delta x, y) and whether or not there is motion.

Look at the sensor this guy is using:
https://www.avrfreaks.net/index.p...
It's pretty high-end (65"/s), but gives you an idea of what to look for...

You could also make your own with an array of diodes and photodetectors, which would certainly require some fancy DSP.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Last Edited: Sun. Apr 25, 2010 - 03:58 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Re: optical sensors, ST has some single chip solutions that look pretty easy to use and can interface via I2C.

http://www.st.com/stonline/produ... (overview of products) Power supply and optics would add some complexity.

If I did not need very high resolution, I would probably use magnetic encoders as other have suggested.

One way to do it:

Look at these blackberry trackballs @ sparkfun.
http://www.sparkfun.com/commerce... and http://www.sparkfun.com/commerce... (btw, you can get the same replacement trackballs on ebay cheaper (I did)).

Pull the magnetic cylinders off the trackballs (you'll get four per ball). These magnets are special in that they have six separate magnetic domains laid out like pizza slices. You get twelve fields reversals per rotation. They are also surprisingly powerful.

Use the magnets themselves as hub axles or idler wheels (they are very very small).
Then use these hall effect sensors to pick up rotation.
http://www.semicon.panasonic.co....

Normally you'd use two sensors to determine direction, but since you are driving the motors yourself, you should already know that.

Just one possible technique.

-carl

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Did anyone suggest painting a black stripe on the rubberband and looking for it with a photocell? Those are pretty small.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

bobgardner wrote:
Did anyone suggest painting a black stripe on the rubberband and looking for it with a photocell? Those are pretty small.

I like it, simplest by far. Put the stripes on the inside to minimize 'wear'.

-carl

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Many have talked about photocells here.. and i think it's gonna be on one wheel or on the rubber-band...
I can easily see how the sensor could be mounted close to the band on my imaginary robot idea :)

uC's: Atmega16, 32, 64, 128 and Attiny13
Lang.: C
Interests: Small scale robots AND sensor monitoring system

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

don't take me wrong... the rest of ideas are great to ! :D
The blackberry mod was also nice, good for an easy and dirty job :D

uC's: Atmega16, 32, 64, 128 and Attiny13
Lang.: C
Interests: Small scale robots AND sensor monitoring system

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You could just make a tap on the motor that activate a micro switch , one pulse pr. rotation should be ok or do you need to know the direction?
Personaly would I use step motors then you don't need anything else.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The pager motors are half the diameter of the Fraunhofer MicroMo steppers. Those DO have quad encoders on the motor and gearheads with different ratios. But they are $150 each.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

bobgardner wrote:
The pager motors are half the diameter of the Fraunhofer MicroMo steppers. Those DO have quad encoders on the motor and gearheads with different ratios. But they are $150 each.

these are only 15USD for 10 pcs.

uC's: Atmega16, 32, 64, 128 and Attiny13
Lang.: C
Interests: Small scale robots AND sensor monitoring system

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have seen step motors in floppy drevs that are about 10x10x30mm + the shaft is about 10mm long. If that is to big you can use a agel gear (just a spring!). The big benefit is the easy control,and big torque at low speed.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

how is power consumption ?

uC's: Atmega16, 32, 64, 128 and Attiny13
Lang.: C
Interests: Small scale robots AND sensor monitoring system

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A step motor has a good efficiency, but use of big torgue will cost, but with the other motor unless you use a gearbox it will have a problem starting uphill. But when first started a normal motor will be able to run faster.
Is this to run in auto mode or do you plan on a remote?
With a step moter you know precisely how fast the two belts go, so turns will be very controled.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Okay, my "gearbox" will be the ratio between the end wheels and the motors rod, as the rubberband will rud directly on my motors rod.... so maybe like 10:1
It should end up in some small swarm-robots (just 2 to start with..student :P)

 
 /¨¨\¨¨\o/¨¨/¨¨\
|    |     |    |
 \__/_______\__/   

Tried to show the track in ascii :)
Wheel -> motor_rod -> wheel

uC's: Atmega16, 32, 64, 128 and Attiny13
Lang.: C
Interests: Small scale robots AND sensor monitoring system

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

if you rod is very thin then if would be better to place the motor on one of the weels like this

 /¨¨\¨¨¨¨¨¨¨/¨¨\ 
|    |    o|    | 
 \__/_______\__/    

or            o
 /¨¨\¨¨¨¨¨¨¨/¨¨\ 
|    |     |    | 
 \__/_______\__/    

the top is best if the wheels are soft otherwise use the other one.[/code]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I see your point, but if the "wheels" are solid, and the rod is solid (steel), then my or yours second option, is properly the only working ones. as solid vs solid doesn't have much friction :)

uC's: Atmega16, 32, 64, 128 and Attiny13
Lang.: C
Interests: Small scale robots AND sensor monitoring system

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You would be able to put more pressure on the contact, though. 'Suppose you'll have the chance to try many options - let us know what works out! Are you recording your project somewhere? (Blog?)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

tlucas wrote:
You would be able to put more pressure on the contact, though. 'Suppose you'll have the chance to try many options - let us know what works out! Are you recording your project somewhere? (Blog?)

Just to be fair, I got to be honest with you all. This project is a future project, right now I'm making research and buying the basic parts home (motors, batteries, H-bridge mosfets..) so I, when time is right can start building a test platform, and I already there, have all these good ideas and advises you have giving me :)

uC's: Atmega16, 32, 64, 128 and Attiny13
Lang.: C
Interests: Small scale robots AND sensor monitoring system

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

B4ME

If you have the motor shaft driving the rubber band without a pulley (wheel) on the motor shaft then I think you will want a triangular configuration between the motor shaft and the wheels.

You will want the rubber band to be in contact with as much of the circumference of the motor shaft as possible, so it does not slip. You want the rubber band to wrap around the motor shaft as much as possible.

You will notice this triangular configuration is used on (larger) real bulldozers.

(Web Photo of toy model of real Dozer)

JC

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes perfect :)
In my configuration I'm having sort of the inverse...
Instead of a triangle, my motor shaft is lowered beneath the top of the end wheels (so the shaft press down the rubber-band), but its ends up in the same idea, and contact surface area. Maybe I could rap the rupperband around the shaft, if its a not-flat band

uC's: Atmega16, 32, 64, 128 and Attiny13
Lang.: C
Interests: Small scale robots AND sensor monitoring system

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Buy a cheap wheel mouse and open it up. You'll find 2 tiny encoder disks and 2 pairs of IR sensors. You could fit those in somewhere.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

But those are big!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How about a tiny magnet glued on the side of one of the wheels with Super glue & use a Hall effect to look for pole transitions. A small piece of fridge magnet may work.

Charles Darwin, Lord Kelvin & Murphy are always lurking about!
Lee -.-
Riddle me this...How did the serpent move around before the fall?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have made one project using this encoder for robot in my college. It is very effective and reliable. Some functions are really amazing and wonderful. It is really helpful to me.