Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: shlodo on May 08, 2008, 03:33:08 AM

Title: DC Motor Tolerance makes my robot turn slightly! PLEASE HELP!
Post by: shlodo on May 08, 2008, 03:33:08 AM
My robot is turning slightly to the right and I've figured out that it's because the motors have a tolerance (I think).
That is they have an error in the amount of winding in the motor, so one motor might have a few more winding in it and thus it goes slightly faster than the other! This is so annoying! I'm building it for a competition and it has to drive dead straight.
They are both running in parallel off the same power supply (12V) so they are def getting the same power and its not caused by friction.. (all wiring is exactly same length and thickness)


I need help coming up with ways to solve this problem...

I have tried putting a diode in series in the left motor (the faster one) and it slows it down, but too much now... now the right one goes faster. I know that diodes have about a drop of 0.7V so I guess I need something that will drop it by half that (0.3-0.4V). Can I get diodes that will drop 0.3-0.4v??? Are there different types of diodes?

Is there anything else I can use to even out this very slight difference in power getting to the motors. I have also tried putting a 470ohm resistor in series to make it drop but the motor doesn't work then...

I am an amateur at electronics.. Can somebody please come up with a few ideas to solve this problem?

Will resistors work in series if i get the right one? How about using capacitors, can this help me, someone at uni said capacitor in parallel might work, I dunno if he's right tho? Or LEDs somehow, Maybe if i used different colored leds on each motor I could find a drop of 0.3-0.4v? I have tried hooking up a led in series with resistor and it lights but the motor doesn't work. How about if i hooked up a led in parallel, could i get a slight voltage drop??

The motors are como motors rated at 4.5-15V http://www.mfacomodrills.com/motors/380.html


Any help would be much appreciated!
-Shlodo
Title: Re: DC Motor Tolerance makes my robot turn slightly! PLEASE HELP!
Post by: izua on May 08, 2008, 05:33:37 AM
What controls the motors?
Title: Re: DC Motor Tolerance makes my robot turn slightly! PLEASE HELP!
Post by: Kohanbash on May 08, 2008, 06:48:40 AM
Quote
Can I get diodes that will drop 0.3-0.4v??? Are there different types of diodes?
Germanium diodes drop ~0.1v so you can put a few in series.

Have you tried taking the motors off and powering them directly (so not attached to any load)?
Try measuring the voltage across the battery terminals.

In many cases putting a cap between the leads is a good practice since motors produce a lot of noise and you want to prevent that from being fed back into your system.
Title: Re: DC Motor Tolerance makes my robot turn slightly! PLEASE HELP!
Post by: ALZ on May 08, 2008, 01:25:01 PM
Wrap thin wire around a nail to make your own power resistor, it will only take a few ohms to work. What you want to do is start with a long piece of wire and see how it works then  keep cutting off some until you get it to work well. Then just wrap that around the nail so that it can get rid of the heat. R.S. use to sell a pack of rolls of high AWG wire, I don't know if they still do. 
Title: Re: DC Motor Tolerance makes my robot turn slightly! PLEASE HELP!
Post by: ccarlson on May 08, 2008, 01:54:42 PM
A trim pot would do as well, and be more controllable.

Of course, the real answer is to put encoders on the wheels, monitor the rotational speed of each motor while it's going, and dynamically adjust the speed of the motor so they match.
Title: Re: DC Motor Tolerance makes my robot turn slightly! PLEASE HELP!
Post by: AndrewM on May 08, 2008, 02:03:53 PM
Wrap thin wire around a nail to make your own power resistor, it will only take a few ohms to work. What you want to do is start with a long piece of wire and see how it works then  keep cutting off some until you get it to work well. Then just wrap that around the nail so that it can get rid of the heat. R.S. use to sell a pack of rolls of high AWG wire, I don't know if they still do. 

The only problem with this solution is that you just created an inductor, so whatever motor is hooked to the inductor will have current issues, especially if the motors are being powered with a PWM signal.
Title: Re: DC Motor Tolerance makes my robot turn slightly! PLEASE HELP!
Post by: izua on May 08, 2008, 02:18:55 PM
Talking about PWM signals, why don't you make a conversion table speed <-> motor1 PWM, motor2 PWM?
this way, you can ask it for a speed, and you will get what PWM should be applied to each motor. Considering you'll compute it right (read: experiment and see which fits), a lookup table of this type should solve the problem.
Title: Re: DC Motor Tolerance makes my robot turn slightly! PLEASE HELP!
Post by: shlodo on May 08, 2008, 09:08:35 PM

i like the idea of the Germanium diodes that drop 0.1V... Its nice and simple. Its due in 2 weeks so i need a low cost, low tech and simple solution. Also the Potentiometer idea is good too. How do I connect a potentiometer though? There are 2 inputs and one output.. what is the second input?

It is being controlled by a I-Box3.0 microcontroller:
http://inexglobal.com/products.php?type=micro&cat=IBOX&model=iboxintro

And running through a motor driver circuit:
http://inexglobal.com/products.php?type=addon&cat=app_motor&model=zxmotor3a

It does have PWM control but I can only change speed from 1 to 8 so i cant actually manipulate the pulse width as it is a beginner kit. I have tried altering the speed of the left motor but i want to solve the problem mechanically of electronically and not have to mess around with programming to do it.

How about capacitor and resistors? any way of using them?

Cheers
-shlodo
Title: Re: DC Motor Tolerance makes my robot turn slightly! PLEASE HELP!
Post by: izua on May 08, 2008, 10:04:08 PM
Solving a problem electronically or mechanically is a bad step when you can do it in software. At some point, a similar problem will appear again, and will incur more costs. This being said, you have to think that motors are power devices (compared to electronics - like the controller). Adding a resistor will require a high power resistor. Adding a capacitor will require some resonance calculations.
And a pot is pretty much out of the question, since it might not handle the power or locally melt.

You can try using a BJT transistor with a pot in its base, this will alter the current through it, unless it's driven into saturation.
Title: Re: DC Motor Tolerance makes my robot turn slightly! PLEASE HELP!
Post by: ALZ on May 09, 2008, 01:15:12 AM
Not a problem; an inductor would limit the current which is what you are trying to do anyway. Also if you don't wind all the wire in same direction that kills most of the induction.  Germanium diodes drop 0.1v to .3 volts  where if you use wire you can get it to drop any voltage you want. izua is right about not using a pot.


Wrap thin wire around a nail to make your own power resistor, it will only take a few ohms to work. What you want to do is start with a long piece of wire and see how it works then  keep cutting off some until you get it to work well. Then just wrap that around the nail so that it can get rid of the heat. R.S. use to sell a pack of rolls of high AWG wire, I don't know if they still do. 

The only problem with this solution is that you just created an inductor, so whatever motor is hooked to the inductor will have current issues, especially if the motors are being powered with a PWM signal.
Title: Re: DC Motor Tolerance makes my robot turn slightly! PLEASE HELP!
Post by: brijesh on May 09, 2008, 09:25:50 AM
Other things that will cause the robot not to go straight.

1) Mismatched wheel diameters.
2) Improper weight distribution between the wheels.
3) If you are using gears to reduce the speed, friction and power loss in the 2 gears maybe different.
4) etc..etc..

These things cannot be solved by trying to reduce the voltage on one of the motors. It is possible that after lot of trial and error you can get it go straight by playing around with voltage of one of the motors. But the moment you make some changes, ex. add another sensor or move the batteries a little, you will upset the weight balance and it will start to veer off again.

You will need encoders and closed loop control of the motors to make the robot go straight. Even then encoders will accumulate errors and robot will veer off on long runs.

Brijesh

 
Title: Re: DC Motor Tolerance makes my robot turn slightly! PLEASE HELP!
Post by: shlodo on May 10, 2008, 05:57:08 AM
Thanks for your help so far guys...

The problem is purely to do with the motors, its definitely not caused by friction or the wheels diameters being different. The base is built very well and the wheels are mounted directly onto the motors and not running through an external gearbox. The motors are gearheaded (internal gearbox) but I cannot alter these.

Its also weighted perfectly and given that the base is made of aluminum and weights a couple of kilo's, even when you change weight distribution it has no effect because its so heavy. I've done so many things to test this; I've even taken the motors off with wheels mounted and put a mark on the wheel and run them next to each other. You can clearly see that one motor is running slightly faster so I've concluded that it HAS to be a difference in the amount of windings in the motors themselves.

By the way when I say its turning to the right its not that much, very slight, it moves aboutr 30cm right for every 4-5 meters of driving..

Anyway I've tried a few things since the last post and the problem is almost solved....

-I put a standard diode in series of the left motor which dropped 0.7V but it slowed it down too much and now started turning left.

-I tried to use a few Germanium diodes which are supposed to drop 0.1V but the ones at the electronics shop were only rated max current of 100mA which would have fried. I've got a few Amps out of the batteries and the motors draw 1-2A so they weren't suitable.

-Instead I found some higher power diodes that drop 0.3V and I've found these to be almost perfect. It still veers ever so slightly to the right, now only 10cm for every 5 meters. I've been able to even this out by putting left motor at a slightly lower speed (with microcontroller). So far this method seems to work well. I've done lots of testing and its very consistent. I might still look at wrapping wire round a nail to fine tune it.



Title: Re: DC Motor Tolerance makes my robot turn slightly! PLEASE HELP!
Post by: Admin on May 17, 2008, 05:24:36 PM
You need to put a control system on it. Its impossible to go straight without a sensor(s) like an encoder. Actually, even with control feedback, its still impossible to go perfectly straight . . .

Quote
its definitely not caused by friction
Actually, friction is the #1 cause of it not going straight. The ground isn't perfectly flat, the friction in the motors are 100% the same, etc.
Title: Re: DC Motor Tolerance makes my robot turn slightly! PLEASE HELP!
Post by: shlodo on May 27, 2008, 08:48:33 AM
someone mentioned an encoder, is there something i could retrofit to the motors so it will count the number of revolutions? is this an encoder? I know u can get motors with this integrated into motor, but i have already spent $100 plus on my motors.

Will this essentially count revoltions and feed bak into microcontroller?

Its not friction!!! im telling u one motor draws more current than the other, i used a multimeter to verify this with the motors running free
Title: Re: DC Motor Tolerance makes my robot turn slightly! PLEASE HELP!
Post by: bens on May 27, 2008, 01:42:55 PM
Its not friction!!! im telling u one motor draws more current than the other, i used a multimeter to verify this with the motors running free
If the motors had different friction, it would manifest itself as one motor drawing more current than the other.  You have no way of telling what's causing the increased current draw, nor do you know if there are multiple competing effects here.  I would be very surprised if the two motors experienced exactly the same frictional forces.

If you want to drive straight over a variety of different surfaces (carpet, tile, etc), you will want to come up with a system that lets you monitor wheel rotation and control power to the motors in a way that keeps both wheels rotating at the same speed.  This is known as a closed loop.  Right now you are trying to go in a straight line using an open-loop system, but this is not going to be all that effective.

You can probably add encoders to your wheels to close your feedback loop.  It might work for you to do something as simple as paste onto each wheel a disk with alternating radial black and white stripes.  You can then setup a reflectance sensor to generate alternating high and low pulses as the stripes pass by.  If you are always moving forward and are on rather simple (i.e. flat) terrain, you can probably get by without using quadrature, which tells you both speed and direction of rotation.

- Ben
Title: Re: DC Motor Tolerance makes my robot turn slightly! PLEASE HELP!
Post by: SixRingz on June 02, 2008, 06:18:27 PM
My recommendation would be to use Hall effect sensors for measuring the rpm of the motors. These are cheap and easy to use! Then you can control your motors with software just like many others recommended.
Title: Re: DC Motor Tolerance makes my robot turn slightly! PLEASE HELP!
Post by: shlodo on June 03, 2008, 04:47:10 AM
Its not friction!!! im telling u one motor draws more current than the other, i used a multimeter to verify this with the motors running free
If the motors had different friction, it would manifest itself as one motor drawing more current than the other.  You have no way of telling what's causing the increased current draw, nor do you know if there are multiple competing effects here.  I would be very surprised if the two motors experienced exactly the same frictional force

Well whether its friction in the motors or a different number of windings in the coils, the fact is it still draws more current....
I think I actually do have hall effect conductors, might try that

cheers