Servers by jDrones

Steering brushed motor by Arduino Mini


(Mario Maino) #1

Hello!
I’m testing a rover (tank) with an old APM 2.8 ( Ardurover Firmware v2.51-beta), 2x350W brushed motor, telemetry ecc. and an Arduino mini to bridge PWM signal from APM to brushed motor driver.
Thanks to Arduino I can use either skid steering or normal steering mode (the sketch running on Arduino “mixes” servo steering signal and throttle).
I currently drive the vehicle without RC, with Mission Planner and telemetry.
After arming the rover, I set “Manual mode” and read arduino pins.
Here my problem:
If I set normal steering I have
APM PIN: ARDUINO PIN:
1(throttle) 2
3(steering) 3
In Manual mode:
Arduino pins 2 & 3 are 1500 (neutral position) and from 1150 to 1800 (for throttle, values < 1500 set reverse running)

It’s seem OK but if I set Hold Mode, pin 2 (throttle) is 1500 (OK), while steering value is 1100 (but in Hold Mode steering is in neutral position, 1500).

Now I set Skid Steering:
SKID_STEER_IN is 0 (disabled) -I use the keyboard arrows as joystick
SKID_STEER_OUT is 1 (ENABLED)
APM PIN: ARDUINO PIN:
1(Left Motor) 2
3(Right Motor) 3

in Manual Mode, neutral position, pins values are 1500 (pin2, motor stopped) and 1100 (pin3, so it is fully rev)
if I change speed, pin 2 goes from 1170 to 1800, pin 3 from 1100 to 1700 (quite correct).
Turning: left -> 1300(p2) & 1300 (p3), so pin 2 decreases speed while pin 3 (right) improves: it’s ok but values are foolish!
right-> 1650(p2) & 1100: as prev…

In Hold Mode pins 2&3 are 1100 (fully rev).
“In Hold mode the vehicle should stop and for regular steering-throttle rovers, the wheels will point straight ahead.”

Ok, values need a calibration, but I don’t understand Hold Mode - Manual Mode logic…
Thanks for all!