Driving two motor contollers with 3rd directional pins

Hi,

I’m in the prototype build stage of a UGV tank style ag-robot. I’m using a Px4pilot ( Pixhawk Clone) for the controller and want to connect two Cytron md30c 30A motor controllers. rover documentation indicates that PWM signal is pushed through the RC1 & RC3 pins. The md30c has a three pin ( GND, PWM, DIR) setup. Does this correspond to the - + S from the RCOUTPUTS on a flight controller? I’m only familiar with PDBs on a multirotor UAV… not sure the proper wiring.

Cheers,
Russell

Hi Russell,

It’s not well documented but it should be possible to use this type of motor controller. The direction pin should be connected to the Pixhawk’s AUX5 and AUX6 channels (AUX5 for left, AUX6 for right) which are configured by default to be relays (there’s a page on the relay setup in the rover wiki’s optional hardware section).

The motor driver’s PWM input should be connected to the Pixhawks’s MAIN OUT 1 (for left motor) and MAIN OUT 3 (for right motor)'s “S” (aka signal) pins. The motor driver’s “GND” should be connected to one of the Pixhawk’s “-” pins… it doesn’t matter which but normally it makes sense to connect to the “-” pins above the “S” pins being used.

Then the MOT_PWM_TYPE needs to be set to “brushed with relay”.

3 Likes

Thanks! Exactly the information I needed confirmed. Wish us happy rollin’

1 Like

hi Russel im using the same motor driver , can you please kindly share the parameter or guide me in words because im very new to pixhawk controller

I found this thread while trying to solve the same problem. But the solution from rmackay9 did not seem to work (anymore). After a while I found a solution I want to share with others.
The Configuration seems to have changed a little bit (because since Version4.2 the GPIO-Pins are adressed differently (GPIOs — Rover documentation).

So for Version 4.2 or above you have to do the following steps in MissionPlaner:

  1. Go to Setup → Basis Hardware → Servo Output and set:
  • Position 1 to ThrottleLeft
  • Position 3 to ThrottleRight
  • Position 13 to GPIO (AUX5)
  • Position 14 to PGIO (AUX6)
  1. Go to Config → Standard Params → Search for “Relay” and set:
  • set RELAY_PIN: AUXOUT5
  • set RELAY_PIN: AUXOUT6

Wiring as described by rmackay9:

  • wire MAIN1 of the Pixhawk with PWM Left of the motor controller
  • wire MAIN3 of the Pixhawk with PWM Right of the motor controller
  • wire AUX5 of the Pixhawk with DIR Left of the motor controller
  • wire AUX6 of the Pixhawk with DIR Right of the motor controller
  • wire (-) Minus of Pixhawk with (-) Minus of the motor controller

Excellent. Works fine. But is it not possible to connect esc and brushed relay simultaneously ?