ThunderBorg or Diablo

Hi,

I have 2 hopefully very basic questions

firstly, I have acquired 4 geared motors with the following spec

Current (unloaded): 350 mA
Stall torque: 8.8 kg/cm
Motor rpm: 10,000 ± 5%
Voltage: 6 V nominal (7.5 V max.)
Gear ratio: 75:1
Shaft rpm: 133
Stall current: 5.5 A

given the high stall current, will 2 ThunderBorg controllers be suitable or will I need to go with the Diablo controllers

secondly, I have little experience with python, but when it comes to robotics I can manage to control a 'tank' type robot with GPIO, is the code used for these boards simple enough that following the instructions to install is all that is needed or is it a little more complicated?

Thanks

piborg's picture

The motor question is a tricky one, the stall current is right on the limit of what a ThunderBorg will handle.

I would say that two ThunderBorgs would work fine IF:

  • Stalling the motor is not a common occurrence.
    For example it only happens when the robot crashes.
  • You are not trying to rapidly change motor speeds.
    For example jumping from stopped to full power is bad, ramping up from stopped to full power quickly would be fine.
  • Avoid changing between forwards and reverse directly.
    To change direction set the motor power to 0% very briefly and then set the new power level.
  • The actual running current under load is not too high.
    Generally this depends on how heavy the robot is.

If you use a Diablo instead then you can use a single board to control all four motors if you do not need fully independent control. In this case you can connect both of the motors for one side of the robot in parallel to one of the motor outputs on the Diablo.

The software is very simple to use for both boards and actually comes with a tank-steering example for one board using a game controller or joystick if you get stuck :)

For example a minimal script for setting motor speeds on two ThunderBorgs might be:

# Load library functions we want
import time
import ThunderBorg

# Setup ThunderBorg 1
TB1 = ThunderBorg.ThunderBorg()
TB1.i2cAddress = 10
TB1.Init()
TB1.ResetEpo()

# Setup ThunderBorg 2
TB2 = ThunderBorg.ThunderBorg()
TB2.i2cAddress = 11
TB2.Init()
TB2.ResetEpo()

# Work out our maximum power output
voltageIn  = 12.0         # Total battery voltage to the ThunderBorg
voltageOut = 6.0          # Maximum motor voltage
if voltageOut > voltageIn:
    maxPower = 1.0
else:
    maxPower = voltageOut / float(voltageIn)

# Get our speed values here between -1.0 (full reverse) and 1.0 (full forward)
speedLeft  = 0.5          # 50 % forward speed
speedRight = -0.3         # 30 % reverse speed

# Set the power out to the motors
TB1.SetMotor1(driveRight * maxPower)
TB1.SetMotor2(driveLeft * maxPower)
TB2.SetMotor1(driveRight * maxPower)
TB2.SetMotor2(driveLeft * maxPower)

# Wait for a couple of seconds then turn everything off
time.sleep(2.0)
TB1.MotorsOff()
TB2.MotorsOff()

This assumes the right motors are connected to M1 on both boards and the left motors are connected to M2 on both boards. There are instructions on the Getting Started page which explain how to set the I2C addresses for each board.

Diablo is very similar to the example above, but you will only need the one board which makes it even simpler :)

Thanks, thats very helpful.

Subscribe to Comments for "ThunderBorg or Diablo"