DC Motor and L293D / Motors for Rover

Hello everyone,

I’m a new user.
I want to built a rover using two DC motor with a motor driver L293d, because I used it with arduino some times and now I want to try with a Pixhawk and Ardurover.
Can someone help me how to connect and control the motor driver or a DC motor with ArduRover/Pixhawk?

If this configuration is not feasible, can you suggest me a motor dedicated to ArduRover/Pixhawk?

Hi Thomas,

I think it should work although we don’t have it well documented.

I think the motor drivers have two inputs per wheel? One input for speed and the other for direction?

Is this vehicle a skid steering vehicle (i.e. like a tank or R2D2)?

For for the physical connections, you’ll want to connect a total of 4 wires from the back of the flight controller (i.e. Pixhawk):

  • the left wheel’s speed control should be connected to the Pixhawk’s to MAIN OUT1.
  • the left wheel’s direction control should be connected to AUX OUT5
  • the right wheel’s speed should be connected to the Pixhawk’s to MAIN OUT3.
  • the right wheel’s direction control should be connected to AUX OUT6

The MOT_PWM_TYPE parameter will also need to be set to “Brushed With Relay” (see wiki here).

1 Like

Hello rmackay9,
Thank you for the answer.
Finally I found a brushless motor with esc(3ways).
I want to control my rover(Ardurover) with a joystick(without any rc transmitter/receiver) and these motors but I don’t know how to set them.
Thank you

Hi Thomas,

Instructions for using a joystick with Mission Planner are here. It’s really up to the GCS to send RC_OVERRIDE or MANUAL_CONTROL messages to ArduPilot so it’s more of a ground station feature than an ArduPilot feature.

hello

If we use L298n motor controller , which pin is direction control IN1 , IN 2 , IN3 , IN4 ?
For speed control we use ENA and ENB but already there is 2 wires . which ones are the other 2 wires

Is there any improvement? I have same problem.

The module L298n motor controller has two direction control pins for each channel. The IN1 and IN2 pins control the spinning direction of motor A, while IN3 and IN4 control motor B. For further information, you can also visit reliance electric motor.
Thanks.