Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Motors (http://www.chiefdelphi.com/forums/forumdisplay.php?f=52)
-   -   How do you sync multiple motors? (http://www.chiefdelphi.com/forums/showthread.php?t=59910)

EricVanWyk 24-12-2007 12:09

Re: How do you sync multiple motors?
 
Quote:

Originally Posted by Richard (Post 663400)

Because the causes of the variation are the same, using current sensors to 'correct' for free speed variation is probably not going to be very effective.

So using a current sensor *uncalibrated* is no better than just using uncalibrated PWM?

Richard Wallace 24-12-2007 12:12

Re: How do you sync multiple motors?
 
Quote:

Originally Posted by EricVanWyk (Post 663405)
So using a current sensor *uncalibrated* is no better than just using uncalibrated PWM?

Yes.

Brandon Holley 25-12-2007 01:30

Re: How do you sync multiple motors?
 
just to reiterate what others have said above me...

if you know the left side wheels are spinning the same speed as the right side wheels, your robot is more than likely going straight

how do you make sure your wheels are spinning at the exact same speed? richard made it clear that its almost guaranteed your motors will not be running at the same speed, so...using an encoder to check the wheels speed would most certainly make sure your robot is going straight.

Daniel_LaFleur 25-12-2007 14:15

Re: How do you sync multiple motors?
 
Quote:

Originally Posted by Brandon Holley (Post 663580)
just to reiterate what others have said above me...

if you know the left side wheels are spinning the same speed as the right side wheels, your robot is more than likely going straight

how do you make sure your wheels are spinning at the exact same speed? richard made it clear that its almost guaranteed your motors will not be running at the same speed, so...using an encoder to check the wheels speed would most certainly make sure your robot is going straight.

Your statement makes a number of assumptions that may or may not be correct.

First assumption is that the floor (plane of travel) is perfectly flat, which will not happen on a carpeted arena surface.

Second assumption is that all wheels on the robot are the exact same size. This also will not be true, as variation in tread, tread attachment, or runner molding will create variances. It gets even worse with pneumatic tires ;)

If you intend on going only a short distance (under 10') then the error encountered by the above will probably not affect your performance, but going further will reduce your accuracy possibly to the point where you will miss your intended target zone. And none of this takes into account field obsticals(sp?), other robots, or wheel slippage.

To ensure you are going in the direction you wish to go in, the best ways (IMHO) are a gyro, a compass, or something like an optical mouse.

Japper 26-12-2007 10:57

Re: How do you sync multiple motors?
 
Quote:

Originally Posted by Leav (Post 663372)
Ok so to recap what people more experienced than me said here:

Regarding syncing two wheels on the same side, you can:
  • sync wheels using tachometer (this is a temporary solution, it will only work for a while and the effectiveness will probably fade)
  • sync wheels using a sensor that measures wheel speed in real time. (choose one wheel to be the reference and have the other change so that it is equal)
  • use a gearbox that accepts two motors and drives two wheels (this is food for future thought)

Regarding syncing the left wheel set to the right wheel set, you can:
  • sync wheels using tachometer (see above)
  • sync wheels using a sensor that measures wheel speed in real time. (integrates with the above option, so 4 sensors and a non-negligible amount of coding solves all your problems)
  • use a gyro (you should be able to use the size of the X value of the joystick as a base to compare gyro readings and adjust accordingly)

Good luck and don't hesitate to ask for clarification about anything or for more help!

-Leav


Thanks for the info...
I have a power induction timing light that I use on timing automobile engines....

How might I connect this to the robot to measure/reference one of the wheels?

Would I connect it to 12v & ground and place the induction pick up coil around the positive motor lead and then draw a line on one of the wheels and the chassis for a reference point?

Please advise- any tips would be greatly appreciated

thank you!

AdamHeard 26-12-2007 12:18

Re: How do you sync multiple motors?
 
Quote:

Originally Posted by Daniel_LaFleur (Post 663655)
Your statement makes a number of assumptions that may or may not be correct.

First assumption is that the floor (plane of travel) is perfectly flat, which will not happen on a carpeted arena surface.

Second assumption is that all wheels on the robot are the exact same size. This also will not be true, as variation in tread, tread attachment, or runner molding will create variances. It gets even worse with pneumatic tires ;)

If you intend on going only a short distance (under 10') then the error encountered by the above will probably not affect your performance, but going further will reduce your accuracy possibly to the point where you will miss your intended target zone. And none of this takes into account field obsticals(sp?), other robots, or wheel slippage.

To ensure you are going in the direction you wish to go in, the best ways (IMHO) are a gyro, a compass, or something like an optical mouse.


294, and many other teams have used encoders to traverse in autonomous rather accurately; A gyro certainly helps, but it can be done without one.

Daniel_LaFleur 26-12-2007 12:29

Re: How do you sync multiple motors?
 
Quote:

Originally Posted by AdamHeard (Post 663812)
294, and many other teams have used encoders to traverse in autonomous rather accurately; A gyro certainly helps, but it can be done without one.

Truthfully, it depends on how far you are going and how accurate you need to be. With encoders alone, the further you travel the wider your target window needs to be.

lukevanoort 26-12-2007 12:50

Re: How do you sync multiple motors?
 
Quote:

Originally Posted by Daniel_LaFleur (Post 663817)
Truthfully, it depends on how far you are going and how accurate you need to be. With encoders alone, the further you travel the wider your target window needs to be.

Isn't that true of all sensors though? Gyros can drift; double integrating accelerometers isn't too accurate, and collision accelerations will probably exceed the number of Gs the device can handle; compasses are affected by EM fields; GPS won't always have a solid connection; optical mouse performance is heavily surface dependent; transmission encoders can be affected by wheelspin, tire variations, backlash, etc; pots have the same problems as encoders, but can also be affected by EM fields. Most of these errors end up being additive over the long run and result in a larger target region for longer distances.

The best way I can think of to eliminate the most potential problems is to run encoders on a non-driven, relatively hard, wheel. Wheelspin is no longer much of an issue, hard tires wear slowly (and if they wear too much, a little math in the code can easily correct for them getting smaller), and backlash can be more easily minimized since you would have far fewer possible sources of it.

Daniel_LaFleur 26-12-2007 13:03

Re: How do you sync multiple motors?
 
Quote:

Originally Posted by lukevanoort (Post 663824)
Isn't that true of all sensors though? Gyros can drift; double integrating accelerometers isn't too accurate, and collision accelerations will probably exceed the number of Gs the device can handle; compasses are affected by EM fields; GPS won't always have a solid connection; optical mouse performance is heavily surface dependent; transmission encoders can be affected by wheelspin, tire variations, backlash, etc; pots have the same problems as encoders, but can also be affected by EM fields. Most of these errors end up being additive over the long run and result in a larger target region for longer distances.

The best way I can think of to eliminate the most potential problems is to run encoders on a non-driven, relatively hard, wheel. Wheelspin is no longer much of an issue, hard tires wear slowly (and if they wear too much, a little math in the code can easily correct for them getting smaller), and backlash can be more easily minimized since you would have far fewer possible sources of it.


Agreed. And as the design engineer you need to decide which (mix?) of sensors will provide the accuracy for the task at hand.

My initial response was aimed at making sure that teams don't just "slap on" a few encoders and assume all will work.

Design in the sensors you need for the task at hand, and understand where your innaccuracies will come from. From there it's just a matter of limiting those inaccuracies and determining if the system you designed is accurate enough for the task at hand.

TubaMorg 26-12-2007 13:23

Re: How do you sync multiple motors?
 
Quote:

Originally Posted by Japper (Post 663796)
Thanks for the info...
I have a power induction timing light that I use on timing automobile engines....

How might I connect this to the robot to measure/reference one of the wheels?

Would I connect it to 12v & ground and place the induction pick up coil around the positive motor lead and then draw a line on one of the wheels and the chassis for a reference point?

Please advise- any tips would be greatly appreciated

thank you!

Disclaimer:
If you choose to use the timing light option, keep in mind that it is the least effective of all the options presented thus far for a variety of reasons (all discussed previously).

I don't think an automotive timing light will work (I could be wrong) because it is typically triggered by the car's ignition system so that you get a flash every time the engine's #1 cylinder receives a spark. You need a strobe that is adjustable such that you can change the speed of the strobe to match the periodicity of the spinning object (the wheel).

Step by step for each wheel; robot on blocks; repeat forward and reverse:

1. Send a PWM value to the motor.
2. Wait for equilibrium.
3. Adjust strobe light until wheel appears to "stop". Be aware of harmonic frequencies: If the wheel is spinning at 100 rpm, the strobe will freeze the scene at a number of other possible frequencies. A single mark on the wheel will help eliminate some of the possibilities.
3. Note the PWM/wheel RPM values on your favorite spread sheet.
4. Increase PWM value (say by 5) and repeat until you maximize/minimize.

Once you have plotted the values for every wheel, you can now estimate how fast each wheel will turn for a given PWM value. In your program, you will take a joystick value to be a desired speed, then figure out what signal each wheel needs to match that speed.

This will work for a little while, but the more you drive your robot, the more changes will occur in the drive train components, which will lead to decline in reliability. Also you can see it is labor intensive to use this method. You really should consider using a GYRO!

Hope this helps.

EricVanWyk 26-12-2007 15:46

Re: How do you sync multiple motors?
 
Quote:

Originally Posted by lukevanoort (Post 663824)
Isn't that true of all sensors though? Gyros can drift; double integrating accelerometers isn't too accurate, and collision accelerations will probably exceed the number of Gs the device can handle; compasses are affected by EM fields; GPS won't always have a solid connection; optical mouse performance is heavily surface dependent; transmission encoders can be affected by wheelspin, tire variations, backlash, etc; pots have the same problems as encoders, but can also be affected by EM fields. Most of these errors end up being additive over the long run and result in a larger target region for longer distances.

The best way I can think of to eliminate the most potential problems is to run encoders on a non-driven, relatively hard, wheel. Wheelspin is no longer much of an issue, hard tires wear slowly (and if they wear too much, a little math in the code can easily correct for them getting smaller), and backlash can be more easily minimized since you would have far fewer possible sources of it.

Before you go this over-the-top, put together an error budget. Do you really need to be accurate to within an angstrom? How about a meter? Figure out just how sloppy you can be, and then start budgeting that sloppiness out.

This will also help you figure out what actually needs to be fixed. List all of your error sources and their contribution. You will end up with something that says "I can afford N% error, and right now I have a maximum of M% error." Then start chipping away at the important ones.

Don't compensate for Jupiter's gravitational pull before you make sure that your motors spin equally well forward and backward.

Pots being affected by EM fields? Probably not a big deal.
Getting hit by another robot? Probably a big deal.

Lastly, always remember that physics is a cruel mistress. She is out to get you. She is a bully. However, you can deal with bullies in two ways: Confront or Ignore. Ignore her minor grievances, save your energy for when she gets really out of hand.

robogeek753 28-12-2007 20:06

Re: How do you sync multiple motors?
 
Our team approaches this problem in a different way, and we have never had a problem with it. It works kind of like this, put two motors on one wheel (use a gearbox) and then use chain or a timing belt to link the two wheels (or, if you are really fancy, tracks!). Do this on both sides and the two motors act like one super powerful motor.

If you've never heard of us, we're the team that can push everyone else (well, almost everyone)

Derek Bessette 28-12-2007 21:17

Re: How do you sync multiple motors?
 
As Pat stated above, when it comes to motors on the same side there is no need to worry. If the gearbox ratio from the motor to the wheel is the same for each wheel then they will end up going the same speed. Any slight differences will not cause any binding.

As for making the robot go straight by balancing the two sides. Our tried and true method is to throw the motors on, setup the joystick trims and let her rip. If the robot goes straight you are done! If it doesn't then you can start using the encoders and gyro that you have designed into your drivebase along with some fancy PID programming to make that robot go straight.

If you don't need the encoders and gyro to make the robot go straight don't fret. Your time is not wasted. They will always come in handy when you start programming autonomous modes.

Good Luck!

Brandon Holley 28-12-2007 21:27

Re: How do you sync multiple motors?
 
Quote:

Originally Posted by Daniel_LaFleur (Post 663655)
Your statement makes a number of assumptions that may or may not be correct.

First assumption is that the floor (plane of travel) is perfectly flat, which will not happen on a carpeted arena surface.

Second assumption is that all wheels on the robot are the exact same size. This also will not be true, as variation in tread, tread attachment, or runner molding will create variances. It gets even worse with pneumatic tires ;)

If you intend on going only a short distance (under 10') then the error encountered by the above will probably not affect your performance, but going further will reduce your accuracy possibly to the point where you will miss your intended target zone. And none of this takes into account field obsticals(sp?), other robots, or wheel slippage.

To ensure you are going in the direction you wish to go in, the best ways (IMHO) are a gyro, a compass, or something like an optical mouse.

if you think i didnt know any of that, then thank you for trying to educate me, however i knew this, and based on the problem stated by the poster, and based on my overview of his/her knowledge i tried to make it as simple as possible.

Al Skierkiewicz 01-01-2008 13:15

Re: How do you sync multiple motors?
 
Japper,
In your original post you asked how to synchronize the motors on one side of the robot. In reality, if both front and back wheels on the same side are driven by similar motors with the same PWM value and both speed controllers are calibrated the same and the tread on similar sized wheels have a reasonable friction to the playing field surface, then the motors will drive the same speed. The only way they could not drive the same speed is for one of the wheels to be slipping.
The next step in complexity would be to use wheel encoders at both wheels with some software loop that allows you to modify the PWM values sent to the respective wheels. If the desire is to run straight and have all four wheels in sync then know that this is a mutually exclusive result. Running straight and in sync rarely occurs. It is more accurate to use a gyro system to run straight. However, the gyro does not give you distance traveled, so some form of wheel rotation sensor is still needed to run straight and to a specified distance.
Current monitoring on individual drive motors will give you no useful information unless you can correlate drive current and loaded speed on a motor by motor basis. The variations in motor construction (magnetic field, internal temperature, winding resistance, brush resistance, etc.) will affect the output loaded and unloaded speed of a motor. However, the transmission ratios will also be a determining factor in the wheel rotational speed.
The inductive timing light is triggered by the high voltage pulse that feeds the sparkplug. The pickup is actually a transformer where the sparkplug wire is a half turn primary winding. Since you have nothing on the robot that is in the 30kV range, there is no way to trigger the timing light.
The Banner sensors shining into a simple interuptor attached to the wheel make an excellent speed sensor. You can make a simple attachement for each wheel using a CAD program to draw a segmented circle with alternating light and dark areas. Divide your wheel into eight segments (four light and four dark) and you can get 16 transistions per rotation using this method. With a six inch wheel, this could give you resolution to a little over an inch of travel. Using two Banner sensors you can actually determine wheel direction as well.


All times are GMT -5. The time now is 22:51.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi