Propeller Resets, Drawing too much power?
DiablodeMorte
Posts: 238
Hello all,
I'm using a propeller(obviously) and trying to get it to control two servos(continious servos on the BoeBot). The servo commands are fairly simple(All forward, all backward, and all stop) but when I send them, every so often, the propeller resets right when I send a command. Is the transition from all forward to all stop or all backward simply too much for the little thing? I thought the Servo32v3 was supposed to protect against such a situation. Suggestions?
Full Code Attached
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Current Projects:
Robot Control Via Skype API - Dev Stage(50% Complete) - Total(25%)
Robot Localization Via Xbee's - Research Stage
IR Tracking with Propeller - Research Stage
I'm using a propeller(obviously) and trying to get it to control two servos(continious servos on the BoeBot). The servo commands are fairly simple(All forward, all backward, and all stop) but when I send them, every so often, the propeller resets right when I send a command. Is the transition from all forward to all stop or all backward simply too much for the little thing? I thought the Servo32v3 was supposed to protect against such a situation. Suggestions?
if serialPacket == $31 'A 1, ie, forward 'Forward waitcnt (cnt+125_000) 'outa[noparse][[/noparse]18..23]~ 'outa[noparse][[/noparse]16..17]~~ SERVO.Set(srvRight,1000) SERVO.Set(srvLeft,2000) elseif serialPacket == $32 'A 2, ie, stop 'Stop waitcnt (cnt+125_000) 'outa[noparse][[/noparse]16..18]~ 'outa[noparse][[/noparse]19..20]~~ 'outa[noparse][[/noparse]21..23]~ SERVO.Set(srvRight,1500) SERVO.Set(srvLeft,1500) elseif serialPacket == $33 'A 3, ie, backward 'Backward waitcnt (cnt+125_000) 'outa[noparse][[/noparse]16..21]~ 'outa[noparse][[/noparse]22..23]~~ SERVO.Set(srvRight,2000) SERVO.Set(srvLeft,1000) else 'Stop waitcnt (cnt+125_000) 'outa[noparse][[/noparse]16..18]~ 'outa[noparse][[/noparse]19..20]~~ 'outa[noparse][[/noparse]21..23]~ SERVO.Set(srvRight,1500) SERVO.Set(srvLeft,1500)
Full Code Attached
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Current Projects:
Robot Control Via Skype API - Dev Stage(50% Complete) - Total(25%)
Robot Localization Via Xbee's - Research Stage
IR Tracking with Propeller - Research Stage
Comments
You are drawing too much power and the Propeller is resetting itself due to Brown-out.
I had that same power when running off AA batteries, especially Dollar Store AA batteries. I mostly ran my Propeller powered Boe Bot while plugged into a Wall Wart power supply, but that limited it's range to within 6 feet of the wall outlet.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Brian
uController.com - home of SpinStudio - the modular Development system for the Propeller
PropNIC - Add ethernet ability to your Propeller! PropJoy - Plug in a joystick and play some games!
SD card Adapter - mass storage for the masses Audio/Video adapter add composite video and sound to your Proto Board
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Current Projects:
Robot Control Via Skype API - Dev Stage(50% Complete) - Total(25%)
Robot Localization Via Xbee's - Research Stage
IR Tracking with Propeller - Research Stage
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"A complex design is the sign of an inferior designer." - Jamie Hyneman, Myth Buster
DGSwaner
Two servo's should not suck too much current, but just in case as a general rule, you should provide some delay between servo settings to avoid current spikes associated with multiple servo movement. Another approach is "easing into" the desired value.
I tried servo32 as well, but still faced the spike issue with more than a few servos; I would enjoy seeing a working example of this with many servos. An alternative is Servo4.spin in the object exchange. I'm using it successfully with 4 servos (2 servos per cog) for a platform stabalization application. I Haven't tried a Prop BoeBot yet -- maybe later.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
jazzed·... about·living in·http://en.wikipedia.org/wiki/Silicon_Valley
Traffic is slow at times, but Parallax orders·always get here fast 8)