smooth movement
hi...i'm want to build a mover robot controlled by keypad..from the past experience, when i pressed forward button(or other direction also), the robot will suddenly move with jerk...how can i control the jerky motion so that the robot can start·smoothly·with increasing speed? (assume that i'm using dc motor·)
Comments
·
The answer "ramping" is certainly correct, but the example given will only work with an R/C servo, and you mention that you're just using a DC motor. How are you presently controlling the speed? If you aren't, therein lies the whole problem.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<!--StartFragment -->
So the answer is you presently have NO speed control In that case you may want to look into using an H-Bridge. This will permit FORWARD and BACKWARD movement, along with the ability to control the speed by using PWM output from the Stamp. See the PWM command in the PBASIC Manual, or in the PBASIC Help File to get an idea what that's all about.
H-Bridge chips can be purchased to provide all the necessary circuitry in one IC. Usually, two pins are used to drive it. One pin controls the DIRECTION, and the other controls the SPEED. Here is a typical example of an H-Bridge chip and this one also includes a BRAKE control line:
http://www.national.com/pf/LM/LMD18200.html
If you prefer, you can DIY and build your own H-Bridge with a few MOSFETS, and a handful of other parts:
http://www.armory.com/~rstevew/Public/Motors/H-Bridges/Blanchard/h-bridge.htm
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<!--StartFragment -->
You can probably use continue to use the same control circuit just feed it PWM to get it up to speed.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module" Now available from Parallax for only $28.95
http://www.parallax.com/detail.asp?product_id=30012
"SX-Video OSD module" Now available from Parallax for only·$49.95
http://www.parallax.com/detail.asp?product_id=30015
Product web site: www.sxvm.com
"Ability may get you to the top, but it takes character to keep you there."
·
You asked: "So if i'm using h-bridge, there will be no jerky any more?"
The direct answer to that is, it depends. Please realize the following.
Presently you have only two modes: OFF and ON (full power). To the extent that the mobile platform _will_ JERK when it goes from a DEAD STOP to FULL SPEED, with a PWM powered H-Bridge, you won't have to go from DEAD STOP to FULL POWER. You will be able to bring up the power (and speed) in discrete steps as slowly or quickly as you choose. Not that you would WANT to do it, but you COULD go from DEAD STOP to FULL SPEED just as you did before. What I'm saying here is that nothing is lost in the process.
Here is a short, but probably incomplete routine, to illustrate what I'm saying:
'Untested PWM Ramping Routine to Power an H-Bridge
Direction PIN 1 'Arbitrary Control Pin Assignments
Speed PIN 2' " " " "
FWD CON 0 'Arbitrary values for
REV CON 1 'Forward and Reverse
Duration CON 128 'Adjust as required
RPM VAR BYTE
OUTPUT Direction 'Set control pins
OUTPUT Speed ' to output mode
Speed = 0 'Initially set RPM to zero
Direction = FWD "Initially set direction to forward
'Let's go forward a bit, slowly
FOR RPM = 1 to 127 STEP 2
PWM Speed, RPM, Duration
PAUSE 1 ' Pause may or may not be needed
NEXT
'Let's STOP and reverse direction, travelling VERY slowly
OUTPUT Speed
Speed = 0
Direction = REV
FOR RPM = 1 to 32
PWM Speed, RPM, Duration
PAUSE 1 ' Pause may or may not be needed
NEXT
'Let's STOP again and go ahead quickly
OUTPUT Speed
Speed = 0
Direction = FWD
FOR RPM = 1 to 255
PWM Speed, RPM, Duration
PAUSE 1 ' Pause may or may not be needed
NEXT
'Stop for good
OUTPUT Speed
Speed = 0
END
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<!--StartFragment -->
I'm not sure how you might want to define "simpler", but here is another H-Bridge project which only has 10 different parts, for a total of less than 20 parts. I'm not sure it can get much "simplier" than that:
http://www.bobblick.com/techref/projects/hbridge/hbridge.html
Obviously, the simplest and least expensive way to do it is to find an appropriate H-Bridge chip that meets your needs, and ask the manufacturer for a sample. I find that gets me back to the overall project goal much more quickly than trying to re-invent the wheel
Please be advised that there are H-bridge chips which contain TWO full H-Bridges on ONE chip. Thus, one chip can control two different motors. Just keep the topic of heat dissappation in mind, and be prepared to invest some money in decent heat sinks, regardless of which route you intend to take.
If I were designing a robot to carry or move 15 kg, I'd be much more worried about the torque required to move it, than moving it quickly. Speed and torque are really at two different ends of the spectrum, when speaking about DC PM motors. You can have one, or the other, but usually not both, unless you want to invest some substantial money in both the motors and an appropriate motor controller.
Wheel chair motors with appropriate gearing are often used in competition robots. Here is one source of same, but these are hardly considered "junk" motors:
http://www.npcrobotics.com/products/index.asp
Here is an excellent resource for various motor controllers for wheelchair motors:
http://divelec.tripod.com/html/motor_controllers.html
Here is another resource for high torque DC motors of various sizes, types and voltages:
http://www.herbach.com/Merchant2/merchant.mv?Screen=CTGY&Store_Code=HAR&Category_Code=MTR
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<!--StartFragment -->
It is very easy to interface with a Basic Stamp. You can control the speed and direction.