Servers by jDrones

Pixhawk Cube & Pololu G2 Motor Driver Connection

Hello everybody,

I am trying to connect Pixhawk Cube to the motors, and I am using Pololu G2 (https://www.pololu.com/product/2991 ), which is recommended in Ardupilot’s website ( https://ardupilot.org/rover/docs/common-brushed-motors.html ) - well, at least verified! - . The problem is I couldn’t figure out connections between the Pixhawk & the driver.

Looking at the connections:
abcd

Right Side (4 pins):

GND , VIN --> I connect them to my power supply’s ground and + voltage (around 20V).
OUTB, OUTA --> I connect them to the motor.

Left Side (8 pins - but 4 of them enough for using the motor as I tried with power supply):

GND --> ?
DIR --> ?
PWM --> ?
SLP --> ?

There are 3 outputs (-, +, S) going from the Pixhawk. I tried a power supply first, and by using these 4 pins I was able to make the motor work ( I guess I connected GND to ground, PWM and PLT to 5V output, DIR to either ground or 5V - all from the power supply, second channel). Note that, I was controlling the motor’s speed by changing the battery power (VIN of the left side), there was no PWM control. Now I want to connect Pixhawk to it, but don’t know what connections should be made.

Thanks in advance!

By the way, I’ve seen that (https://ardupilot.org/rover/docs/common-brushed-motors.html )
If using “Brushed With Relay” connect the Relay pin(s) to the motor driver’s direction pin(s). For skid-steering vehicles Relay1 is for the left motor, Relay2 for the right motor

I think the S output of the Pixhawk will be connected to DIR of the driver. Still clueless about + and - though.

I did the connections, here’s what I’ve done:

GND --> Pixhawk Output -
DIR --> Pixhawk Output +
PWM --> Pixhawk Output S
SLP --> +5V from Power Supply ( In the website (https://www.pololu.com/product/2991), it is written that by default the motor driver is in sleep mode, if you give some voltage, I guess, it starts working.)

Servers by jDrones