4WD Rover Wavshare UGV_02 12Vdc motor controller with encoder (A,B - six wires))

Hi everyone,

I have a CubeBlack Flight Controller and I am planning to control the Waveshare UGV_02 robot with it with a RTK GPS for outdoor open sky missions.

The UGV_02 is a 6 wheels 4WD rover with 4 12Vdc motors that have hall encoders (six wires per motor).
Connection to the Cube should be similar to this as for the encoders output.

I have already read that ArduPilot only supports two such encoders connected to AUX 3,4,5,6 and parameters WENC1x and WENC2x. The 4x4 runs with 2L and 2R diagonal opposed motors, so this is not a big restriction so far. Working with two motors encoders will be OK as a starting point.

The waveshare control board of the UGV_02 accepts UART commands to move the rover.
Left and right wheel speed control - CMD_SPEED_CTRL {“T”:1,“L”:0.5,“R”:0.5}

  • L is the speed of the left wheel,
  • R is the speed of the right wheel,
  • and the speed range is -0.5 ~ +0.5, positive value forward, negative value backward
  • the motors comes with encoders. The speed 0.5 represents 100% PWM of the motor, and 0.25 represents 50% PWM of the motor.

A driver such as the roboclaw would be great, and the commands are straightforward.
Is there any information about how to develop such a driver in pyhton?
This would be the easiest and cheapest solution.

Alternatively, if I do not use the waveshare motor controller, which motor controller is the appropriate one for this design?
Obviously, the motors need to move back and forward.

Thank you in advance!

Hi

I have a waveshare tracked rover . I ordered it with a sabertooth motor controller and added a cubepilot flight controller. The sabertooth is sold as an option and documented by waveshare.

The motor controller is two channel . With one channel driving the two left motors and the other the two right motors.

I think the sabertooth motor controllers are awesome for use with ardupilot. I have a couple driving a home build mower using wheel chair motors.

I don’t use the encoders. The GPS keeps the rover on track

1 Like

Hi Michael,

Thank you for the information.

Please let me know where to find the particular Sabertooth Motor Controller that you are using, and the link to Waveshare document about it.
I guess that two appropriate options for the UGV_Rover are (the 2x32A perhaps a bit powerful):

For me it is important to use the encoders as I do an hybrid use of the rover (indoor and outdoor).
I have seen that there is an option for that:

Are you aware about the option to use Simplified and/or Packetized Serial Mode in Mission Planner?

Thank you!

I’ve been using the 2x12. Sorry can’t help you with the encoder but suggest you search the forum for wheel encoder there are a few posts. If were me, I would try without the encoder and see if its necessary.

The wheel encoders will not likely add any significant value if RTK GPS is in use.

Only when the rover is working indoors, then the GPS will not be accurate.