Could use some help with DC motor control
Heronblade
Posts: 3
My team is considering a class project in which we would use a motor for the sake of automated turret-like rotation. Slow and controllable movement for set periods of time. We would simply use the standard parallax servos we are already familiar with, but they are far too weak for this application. The next step up available to us is a mid size DC motor, this one to be exact, which if anything goes too far the other way in terms of speed and torque. We have stepped it down using gears, and we do have a speed controller on hand. Unfortunately, that is where we are stuck for the moment. We are at present novices at BASIC Stamp programming, and none of us know how to program for a motor like this, the few examples we have found all appear to be set for continuous high speed motion.
Suggestions? examples? resources we've overlooked?
Suggestions? examples? resources we've overlooked?
Comments
In any event, you say that it is controlled just like a servo? Is it the same pulsout 650-850 range?
-pulsout range is 560-960, with 760 as neutral
-Within a few seconds of initial "boot", (ie being connected to the battery), the ESC needs to receive an initialization signal on the channel you intend to use, or it will dead end and require a "reboot" (disconnect power source for 2-3 seconds, reconnect)
-After the initialization signal, the ESC requires at least some kind of input every 500 ms, or it will once again dead end and require a "reboot"
-Accelerating too quickly between pulsout values will, you guessed it, cause it to dead end
As a result, the test program that eventually worked looked like this (result: brief period of inactivity followed by several seconds of steady rotation):
MOTOR CON 12
X VAR Word
FOR X = 1 TO 100 'init signal
PULSOUT MOTOR, 760
PAUSE 20
NEXT
FOR X = 760 TO 800 'accellerate
PULSOUT MOTOR,X
PAUSE 20
NEXT
FOR X = 1 to 250 'rotate at constant V
PULSOUT MOTOR,800
PAUSE 20
NEXT
The HB-25 is much more forgiving than your unit, but that's what you have to work with. Good that you got it working.