Motor Controller

Forums:

Hello,

I am working in a project. I am interested in Diablo - Dual 55A Motor Controller. I want to control 3 linear actuators and each linear actuator has a permanent magnet DC motor. So I want to use Diablo - Dual 55A Motor Controller to control 3 permanent magnet DC motors with the voltage of 24V DC and a current at maximum load is 14A.

I would like to know if Diablo - Dual 55A Motor Controller is compatible with Raspberry Pi4 2GB to control these 3 DC motors and how many Diablo - Dual 55A Motor Controller I will need? What are other materials to connect between Raspberry Pi4 2GB and Diablo - Dual 55A Motor Controller?

piborg's picture

The Diablo has connections for two DC motors. This means that if you need to independently control all three linear actuators independently you will need at least two Diablo motor controllers.

As long as the stall current is below 55A for the motors then the Diablo will work well with these actuators. Given that the largest current on the graph is 20A this is probably true.

The Diablo does work with the Raspberry Pi 4 2GB, however the on-board 5V output only produces 1.5A. The Pi foundation recommend a 2.5A 5V supply for all Raspberry Pi 4 models, so you may need a separate 5V power source for the Raspberry Pi itself.

The board comes with the cables required to connect it to a Raspberry Pi.

Dear Sir or Madam,
Thank you very much for your reply. I really appreciate it.

Could you tell me if Diablo - Dual 55A motor controller handle the current of 55A at 24VDC

piborg's picture

Yes, the Diablo can handle a maximum current of 55A at 24VDC per motor output.

Dear Sir or Madam,
I would like to know why in the attached picture called "Getting started with Diablo" the role of 2 pins named in blue "Unused". Are they important to connect them to Raspberry Pi and to another Diablo as you can see in two attached pictures "Connection between Diablo and Raspberry Pi" and "Connection between 2 Diablos"?
I want to power my Raspberry Pi using the Official Raspberry Pi power supply and not powering my Raspberry Pi from Diablos.
I look forward to hearing from you.

Best Regards,
Kaoutar

Images: 
piborg's picture

We missed that diagram :( the connections have been changed for Diablo v2!

I have updated the page with the correct connections:

The Diablo only provides power on the 5V pins, they can be left disconnected entirely if you power the Raspberry Pi separately. V-logic is used to power all of the logic chips and should be 3.3V for use with a Raspberry Pi.

In other words the Diablo does not need the 5V pins connected and they do not need to be connected for daisy-chaining boards either :)

Dear Sir or Madam,
Thank you very much for your reply and good support.
I received Diablo - Dual 55A motor controllers. I tested 2 Diablos and they work correctly. However, when I ask motors to go at half speed with PWM, I hear some noises come from the boards. Are these noises normal?
For example, when I enter 100% or 0% of PWM, there are no noises. But when I enter a value between 0% and 100% of PWM, I hear noises.

Best Regards,
Kaoutar

piborg's picture

The Diablo uses ~8 KHz for its PWM signal, which may be audible in the case of some motors.

At 0% or 100% the output is constant (fully off or on), which is why this does not make any sound.

Dear Sir or Madam,
Thank you very much for your support.
There is any way that I can eliminate the Regenerative function of diablo because I am using a power supply and not batteries. My power supply shuts down.

Best Regards,
Kaoutar

piborg's picture

It is not possible to entirely disable the regenerative breaking, but you can bypass it by disabling the motor outputs. This is the equivalent of disconnecting the motors and allowing them to slow down naturally instead of the board stopping the motor.

Here is a short example of how you can do this with a script.

# Import library functions we need
import Diablo
import time

# Setup the Diablo
DIABLO = Diablo.Diablo()
DIABLO.Init()
DIABLO.ResetEpo()

print('Start with the motors off and disconnected')
DIABLO.SetEnabled(False)
DIABLO.SetMotors(0)
time.sleep(2.0)

print('Connect the motors and set motor 1 to 25% power')
DIABLO.SetEnabled(True)
DIABLO.SetMotor1(0.25)
time.sleep(2.0)

print('Disconnect the motors so that they slowly stop')
DIABLO.SetEnabled(False)
DIABLO.SetMotors(0)
time.sleep(2.0)

From our experiments with the Diablo it is unlikely that the regenerative breaking is the cause of your problem. It is more likely that a sharp change in motor output causes a large power spike, which in turn causes the power supply to shut down to protect itself.

In this case it would be better to change the motor output smoothly like this:

# Import library functions we need
import Diablo
import time

# Setup the Diablo
DIABLO = Diablo.Diablo()
DIABLO.Init()
DIABLO.ResetEpo()
DIABLO.SetEnabled(True)

# Function to slowly ramp the power up/down
rampAmount = 0.05
rampDelay = 0.01
def RampMotor1(newPower):
    # Get the current output
    oldPower = DIABLO.GetMotor1()
    if newPower > oldPower:
        # Ramp up
        nextPower = oldPower + rampAmount
        while nextPower < newPower:
            DIABLO.SetMotor1(nextPower)
            time.sleep(rampDelay)
            nextPower += rampAmount
    else:
        # Ramp down
        nextPower = oldPower - rampAmount
        while nextPower > newPower:
            DIABLO.SetMotor1(nextPower)
            time.sleep(rampDelay)
            nextPower -= rampAmount
    # Set the final output to the exact value
    DIABLO.SetMotor1(newPower)

print('Start with the motor off')
RampMotor1(0)
time.sleep(2.0)

print('Ramp motor 1 to 25% power')
RampMotor1(0.25)
time.sleep(2.0)

print('Ramp motor 1 back to stopped')
RampMotor1(0)
time.sleep(2.0)
Subscribe to Comments for &quot;Motor Controller&quot;