Brushed DC-motors ArduSub

Hello everyone,

We want to use brushed DC-motors in combination with a Pixhawk 4 and Raspberry Pi 3B. We installed Blue OS on the Raspberry Pi and ArduSub on to the Pixhawk but we are a bit stuck on how to incorporate the brushed DC-motors with Pixhawk. We saw that you guys are using a Polulu brushed DC-motor for the gripper but haven’t found any brushed motor controller that goes with Pixhawk. Your help would be greatly appreciated!

Hi @MartinFaak -
I think you’re looking for something like this.

Hi @tony-white,

Thanks for the quick response. We are using a PM07 Power Module board in conjunction with the Pixhawk 4. Would the +,- and signal line of the brushed ESC go on the FMU-PWM-OUT (see image below) pins?
Would anything need to be changed in ArduSub itself, like parameters for example?

Hi @MartinFaak -
Apologies, I’m not familiar with that board or the Pixhawk 4. If it can be used with brushless motors, the ESCs I linked would function the same. You should only need the ground and signal line of the ESC connected to the appropriate channel outputs.

Hi @MartinFaak,

Adding some extra context around Tony’s replies:

The motor controller is the important part, not the motor itself. For our gripper we use a custom controller so that it’s possible to send servo-style PWM values and get the desired behaviour out of the gripper motor (which in the case of the gripper is rotate in the specified direction until the input signal returns to neutral, or there’s excess current-draw indicating an end-stop / grip condition).

If you have a DC motor controller that accepts servo-style inputs for bidirectional control (e.g. 1100µs pulses for full reverse, 1500µs pulses for neutral/stopped, 1900µs pulses for full forwards) then it should work fine with your Pixhawk PWM outputs - ArduSub has no idea what kind of motors it’s controlling.

If you’re trying to control a DC motor directly using one of the flight controller’s output pins then that’s ill-advised because

  1. PWM is one-directional, so your motors would only be able to spin one way, and
  2. the PWM frequency is quite low relative to what a DC motor would want for smooth control

You would also need some kind of power amplification circuit since the output signals are very limited in how much current they can provide (and you likely want a higher voltage as well). In that case you would also need to change the output pin and motor control parameters so the minimum and neutral PWM values were set to 0, to avoid the motors spinning when you want it to be stopped.