Shop OBEX P1 Docs P2 Docs Learn Events
MSR1 Controller powering multiple servos at the same time. — Parallax Forums

MSR1 Controller powering multiple servos at the same time.

StickySticky Posts: 42
edited 2010-01-28 05:34 in Propeller 1
I'm trying to power up to six servos at the same time off of an MSR1. Whenever I try to power a few I get the low power signal led on the board and the board reboots. I'm trying to port over an application from a BS2 Homework board which ran off of one power supply and worked really well. I tried the same power supply, I tried a 12 volt wall jack but the MSR1 always signals low power and reboots. I tried changing the VIN - 5V jumper to directly move the servos from the power supply and same result. Can someone direct me to how to make this work?

Below is the code (I'm still to o lazy to figure out how to post it although someone has already messaged me to tell me how I apologize for this.)

Init works ok the servo goes to the right positions, but init3 doesn't.

CON
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
tx_pin = 30
rx_pin = 31
s0 = 0
s1 = 1
s2 = 2
s3 = 3
s4 = 4
s5 = 5
s6 = 8
led = 9
ping_pin = 7
mbend = 100
s0_centre = 750
s1_centre = 750
s2_centre = 770
s3_centre = 760
s4_centre = 750
s5_centre = 750
var

byte x
long pos, i, i2, range, cmDistance, inDistance, time, j, k, mramp
obj
bs2 : "bs2_functions_1_3_5"
ping : "ping.spin"
pub main
bs2.start (rx_pin,tx_pin)

init
init3
pub init
bs2.pause(5000)
j := 0
repeat until j == 21
bs2.pulsout(s6,250)
bs2.pause(20)
j++
bs2.pause(1000)
j := 0
repeat until j == 21
bs2.pulsout(s6,1250)
bs2.pause(20)
j++
bs2.pause(1000)
j := 0
repeat until j == 21
bs2.pulsout(s6,750)
bs2.pause(20)
j++

pub init3
i := 0
repeat until i == 10
j := 0
repeat until j == 21
bs2.pulsout(s0,750)
bs2.pulsout(s1,s1_centre)
bs2.pulsout(s4,s4_centre)
bs2.pulsout(s5,s5_centre)
bs2.pause(20)
j++
i ++
1536 x 2048 - 1M
1536 x 2048 - 1M

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-01-15 17:21
    Without the indenting, it's impossible to do much more than guess the structure of your program. You can always use the Attachment Manager by using the "Post Reply" button. That will let you attach your actual source file to the message (like the pictures).

    Servos draw a lot of current when under load, up to 1A each. You're pushing the supply if you try to run more than 2 or 3 servos from the regulated supply. The regulator requires a supply voltage of at least 6V or the "power low" LED will come on. You didn't say what kind of battery pack you're using. You may need a higher voltage battery, something more like a rechargable R/C vehicle battery that puts out 7.2V (with 6 NiMH cells).
  • Roy ElthamRoy Eltham Posts: 3,000
    edited 2010-01-15 17:24
    Instead of doing one pause(20) at the end, do a pause(5) after each pulsout(). This will spread out the power load on the pins over time.

    Also, you might want to move some servos to different pins farther apart, so 2 servoes at pins 0 and 1, 2 servos at pins 8 and 9, and 2 servos at pins 16 and 17. Each of the 8pin groups run off a different translator chip, so it'll spread the power load between them evenly.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Check out the Propeller Wiki·and contribute if you can.
  • StickySticky Posts: 42
    edited 2010-01-15 17:30
    I was using a 7.2 V R/C battery and a 12 V wall jack (not both at the same time), still not enough power. The servos are Hitec HS-645MG, they are pretty high torque.

    CON
        _clkmode = xtal1 + pll16x
        _xinfreq = 5_000_000
        tx_pin = 30
        rx_pin = 31
        s0 = 0
        s1 = 1
        s2 = 2
        s3 = 3
        s4 = 4
        s5 = 5
        s6 = 8
        led = 9
        ping_pin = 7
        mbend = 100
        s0_centre = 750
        s1_centre = 750
        s2_centre = 770
        s3_centre = 760
        s4_centre = 750
        s5_centre = 750
    var
    
    byte x
    long pos, i, i2, range, cmDistance, inDistance, time, j, k, mramp
    obj
    bs2 : "bs2_functions_1_3_5"
    ping : "ping.spin"
    pub main
    bs2.start (rx_pin,tx_pin)
    
    init
    init3
    pub init
    bs2.pause(5000)
    j := 0
    repeat until j == 21
      bs2.pulsout(s6,250)
      bs2.pause(20)
      j++
    bs2.pause(1000)
    j := 0
    repeat until j == 21
      bs2.pulsout(s6,1250)
      bs2.pause(20)
      j++
    bs2.pause(1000)
    j := 0
    repeat until j == 21
      bs2.pulsout(s6,750)
      bs2.pause(20)
      j++
    
    pub init3
    i := 0
    repeat until i == 10
      j := 0
      repeat until j == 21
        bs2.pulsout(s0,750)
        bs2.pulsout(s1,s1_centre)
        bs2.pulsout(s4,s4_centre)
        bs2.pulsout(s5,s5_centre)
        bs2.pause(20)
        j++
      i ++
    
    
  • StickySticky Posts: 42
    edited 2010-01-15 17:36
    Sorry if I seem to be spamming up the works but I just saw Roy's reply after I sent back to Mike. Thanks both of you. Roy I'm going to try out what you said, I only need 6 servos to move the bot, but i wanted to add arms so I may be soaking up more power then. Mike I figured out how to add code to the post at least so you can look at the indents now.

    I just down want to have to use a servo controller board as then I will need two or three power supplies which adds to the bulk and weight. As of now the bot is quite light.
  • Nishi .Nishi . Posts: 23
    edited 2010-01-16 18:18
    I'm working on a BRAT 6 DOF with MR1, ran into similar problems, so far Ive just not had more than 3 running at once for a walking gate and then stop to pan etc. Ill keep you posted and vice verse keep posting, your not spamming [noparse];)[/noparse]
  • StickySticky Posts: 42
    edited 2010-01-16 19:01
    Well Nishi I just gave up, I went back to the old trustworthy SSC32 and a BOE. Aside from the fact the MSR1 is not able to power too many servos, specially for a biped, here is no breadboard so as I would have to add one. I used this space for the BOE. Sadly though now I need 3 power supplies. I guess an MSR1 and a breadboard would have been the best solution. BTW I also ran into the power problem just using a propeller on breadboards, I just thought it was sloppy wiring on my part but now I see it just acted the same way. Bah!
  • Nishi .Nishi . Posts: 23
    edited 2010-01-28 05:34
    I'm on it, Ive posted a thread - having no trouble with power issues.
Sign In or Register to comment.