ultraborg to control robotic arm

Forums:

I recently purchased a robotic arm with 6 TowerPro MG996R servos. These motors have a stall current of: 2.5A (6V) and a running current of: 500mA - 900mA (6volts). My questions:

1. would a single ultraborg be capable of supporting 4 of these motors should a worse case loading scenario occur?
2. i realize that 2 ultraborgs would be required for 6 servos so would 2 battery packs (2AAx4) supply sufficient power for the 2 ultraborgs and their respective servos?
3. Would it be possible to control two leds off of one of the output channels such that a led circuit be attached to the ultraborg channel's signal pin and 5V pin? To allow bright/dim for two single leds mounted to arm.
4. Is it possible with the ultraborgs to return the arm (all of its servos) to a predefined position and then cease sending power to the motors. to save on batteries.

piborg's picture

Two UltraBorgs should be fine for driving that robot arm.

In reply to your questions:

  1. A single UltraBorg would be capable of driving four of those servos, most of the current is being drawn directly from the batteries in this case.
  2. Two 4xAA battery packs should be plenty of power for what you require.
    We would recommend putting three servos on each UltraBorg so the batteries are drained at a similar rate.
  3. It is possible to connect a couple of LEDs between the 5V and signal pin of an unused channel.
    See below for more detail.
  4. Unfortunately the UltraBorg cannot disable the 5V pin on the servo outputs.
    What you could do is attach a switch between the 4xAA battery pack and the UltraBorg to disconnect the servo power manually.

Driving LEDs from UltraBorg

Firstly you will probably need a resistor betweent the 5V pin and the LEDs.
You can calculate the value you need using this website: http://ledcalc.com/

In order to drive the LEDs correctly you will need to set the actual power output for the signal, not a servo position.
The code below will allow you to set an LED brightness between 0.0 (off) and 1.0 (fully on) when attached to output #4.
Be very careful with this, if you use the function to drive a servo instead it may damage the servo!

Place this function somewhere towards the top of your script

def SetLedPowerOnServo4(power):
    if power < 0.0:
        power = 0.0
    elif power > 1.0:
        power = 1.0
    setting = int((1.0 - power) * 0xFFFF)
    UB.CalibrateServoPosition4(setting)

Now any LED(s) attached to servo output #4 can be controlled like this:

SetLedPowerOnServo4(0.0)  # LED off
SetLedPowerOnServo4(0.25) # LED 25%
SetLedPowerOnServo4(0.5)  # LED 50%
SetLedPowerOnServo4(1.0)  # LED fully on

Thank you for your quick response. It is my desire for this robotic arm to go mobile and I have some concerns about whether two 6V battery packs would provide sufficient power and runtime. Would it be possible to use a 24V lipo and step the power down to 6V. And would this provide suitable runtime and power? Is so, does PiBorg have a card for stepping down the power or have another suggestion.

TIA

piborg's picture

After a quick look on the internet it looks like those servos will work with a 5V supply:
http://www.servodatabase.com/servo/towerpro/mg996r

What you could do is use a BattBorg to step the 24V lipo down to 5V.
The only problem is that a BattBorg is only capable of a 1.5A draw, so it may not provide enough current for the servos when they are under strain.

Probably a better option would be to use a UBEC with either a 5V or 6V output.
These will step the voltage down like you are after, plus they tend to supply higher currents.
This is the kind of thing you are looking for:
http://www.ebay.co.uk/itm/Hot-High-Quality-Hobbywing-3A-Switch-Mode-UBEC...
They are common in RC cars and planes, so a RC model shop will probably have what you want as well.

Would the 5V DC/DC regulator (seen here:https://www.piborg.org/battborg/parts/5v-dcdc) not accomplish the same thing? Or am I missing something.

piborg's picture

Yes, it will be able to generate the 5V supply from a 24v LiPo.
It is only capable of 1.5A though, so it may not provide enough current for the servos when they are under strain.

Subscribe to Comments for &quot;ultraborg to control robotic arm&quot;