Shop OBEX P1 Docs P2 Docs Learn Events
Propeller Resets, Drawing too much power? — Parallax Forums

Propeller Resets, Drawing too much power?

DiablodeMorteDiablodeMorte Posts: 238
edited 2008-03-26 20:04 in Propeller 1
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?


            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

  • parts-man73parts-man73 Posts: 830
    edited 2008-03-26 04:36
    Simply, Yes

    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
  • DiablodeMorteDiablodeMorte Posts: 238
    edited 2008-03-26 15:11
    I'm actually connected to the wall, my powersupply must be too weak. Thanks for the confirmation of why it was doing that.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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 BakerPaul Baker Posts: 6,351
    edited 2008-03-26 16:41
    It may be a situation where it's enough to supply the average current, but not the peak current. You need to have around 1/2 Amp spare capacity for every servo you are running, this means your supply should be capable of putting out 1.5A or more.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • DgswanerDgswaner Posts: 795
    edited 2008-03-26 19:45
    I had the same problem, running some servos and sensors from the prop. I didn't trouble shoot it but I figured that it was wire size or battery brown outs, now my Prop runs on it's own battery and I swapper out for bigger main battery connections and all is well in robo land!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "A complex design is the sign of an inferior designer." - Jamie Hyneman, Myth Buster

    DGSwaner
  • jazzedjazzed Posts: 11,803
    edited 2008-03-26 20:04
    Activating N servo's at a time can cause deadly current spikes that can cause reset regardless of how big your power supply.

    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)
Sign In or Register to comment.