Motor RPM control

Is there a way to control the rotation speed of the two engines of a rover controlled by skid steering?
I would need a graph to correctly complete the servo output calibration and avoid unwanted drift.

I’m not sure if this is what you are asking, but if you set PILOT_STEER_TYPE to 1, then in manual mode, the left stick up and down should control the left wheel speed and the right stick up and down should control the right wheel speed. So, you should be able to independently operate them. I’m not sure about a realtime graph, though. In the dataflash log (after a run), you can see speed from GPS data and servo output under THR.

Ardurover supports quadratur encoders for pixhawk running nuttx not chibios. If you add one to each wheel/motor, you can plot the rpm values on MissionPlanners tuning screen.

1 Like


As @count74 says, we’ve got wheel encoder for control coming in Rover-3.5. It works in NuttX and ChibiOS now (in master) but hasn’t been officially released yet. It is even possible to graph the speed of the wheel on MP (and perhaps other GCSs) using the rpm1 and rpm2 fields (see MP’s status tab on the Flight Data screen). GCS_PID_MASK also gets two new values so you can tune the PID controllers for each wheel.

Randy, I just loaded 3.5-dev chibios to my pixhawk and the encoders no longer work. Is there any special setup required to get them working in 3.5?


The encoders should work although I’ve heard from (I think) Peter Barker that the RSSI_PIN parameter might need to be set to -1 to avoid interference. If you have a dataflash log we can check further…

I just found the thread where he noted the parameters. I changed my parameters to PWM_COUNT 0, leaving the other settings the same as before (I have no RSSI_PIN parameter, because RSSI_TYPE = 0), encoders not working. I changed the physical connections and the WENC_PIN settings to 50/51, 52/53, encoders not working.
Then I uploaded 3.5-dev nuttx and now I get very erratic readings from the encoders without changing anything else.

And now back to 3.4.2 nuttx and the encoders work again.


Ok, if you can upload a log that’d be great…

Hi Randy,

sorry for the long delay. The sd-card in the pixhawk died and I planned on doing the whole test with the different firmwares again, but then I noticed, I had changed the sd-card in the meantime and all logs where still on the previous one. So here they are: