Society of Robots - Robot Forum
Electronics => Electronics => Topic started by: mhosmer on April 28, 2009, 06:51:15 AM
-
Hello,
I'm relatively new to robotics and have undertaken to build my first robot. I'm using the BS2, along with the PMWPAL and a home built h-bridge. I've finally reached the point where I'm experimenting with making my robot move around.
I used 2 identical motors and find that at 100% power both of my motor seem to run about the same speed but at lower speeds one motor will run faster than the other (of course this causes the robot to turn).
Is this normal for two identical motors? (perhaps I just have the motors misaligned)
What's the preferred method of resolving the discrepancy?
A lookup table for predefined speeds?
As it happens, I have motor spindle sensors and counters on the PMWPAL I suppose I could attempt to adjust the faster motor on the fly but if it did not adjust quickly I could imagine a fair amount of oscillation in the track.
Thanks,
Mark
-
Mark,
You've just encountered one of the hardest things in robotics - making a robot go in a straight line at variable speeds !!
Is this normal ... well I think it would be hard to make two motors that are 100% identical throughout their applied voltage. Thats where stepper motors are helpful.
Preferred solution ... you could use the sensors in a feedback loop but this may be complex (sorry - I'm not sure what your coding experience level is) or lookup tables would be easier. NB lookups will only work if the motor response is always repeatable (including when the motor battery is running down). Whereas using the sensor will compensate for how the motor reacts as the voltage drains.
It really depends on 'why' you need it to go in a straight line. Eg if you have sonars etc to navigate around as a free ranging robot then it probably wont matter. But if you need the robot to know where it is in the world based on past wheel rotations (maze solving etc) then it may.
So perhaps you'd like to share what the robot is going to do..
-
Thanks for the reply.
My goal for this robot is to sweep off a cement terrace in my backyard (20’ x 40’). There is a pine tree through the middle of the terrace, pine cones, needles, and small twigs fall on it so I do not intend to collect the debris just push if off the edge. The plan is to only sweep when facing between the directions, North, West, and South (any direction that is not toward the house). I intend to use a perimeter wire to contain it. At least initially it will have a randomized travel pattern but I would prefer if it generally traveled in a more or less straight line. I may eventually add additional logic to minimize non sweeping travel.
I make my living as a software developer so I can handle the code for the feedback loop. By lucky happenstance, the motors I selected have sensors on them and the PWM hardware I'm using has built in counters. I would think I could take a short sample from both motor sensors then slow the faster motor until it generally matches the slower motor. I'll give it a try.
Thanks again,
Mark
-
Sounds like fun.
If you are also using the counters to try to track the direction it is heading in then you may suffer from accumulative errors - and end up with a room full of pine needles. You may want to consider using a compass as well so that you can correct the accumulative errors occasionally.
-
Actually, I'm planning to use a compass as for the heading and not worry about trying to resolve the direction from the counters. I'm a little concerned that the containment wire might cause deviation problems with the compass but I have some time before I get to that issue and it should be easy to test.
-
Hi,
Since you have a predefined area and perimeter, you can make use of several methods to control the travel.
One method is infrared beacons in each corner, read by the vehicle which then triangulate it's position.
A LASER fence which transmit a "too close" warning to the vehicle is another method.
Neither of the above will interfere with a compass sensor (which IMO isn't needed for your app).
To get rid of the debris quickly, you might consider mounting a battery operated leaf blower (or a sucker, to get it removed completely from your property), that way you need less sweeps as well.