Basebot modules

From Rsewiki
Revision as of 10:14, 2 September 2024 by Jca (talk | contribs) (Created page with "Back to Basebot == Module description == === Main code === === Support modules === ==== Motor blocks ==== 400px Motor voltage is translated to a PWM at 65kHz where the average value corresponds to the set motor voltage. Current battery voltage is taken into consideration. PWM = motorVoltage * MAX_PWM/(battery_voltage - voltageLoss) The motor controller has a minimum pulse width. If the motor voltage is not zero, a minimum PWM is...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Back to Basebot

Module description

Main code

Support modules

Motor blocks

Motor voltage is translated to a PWM at 65kHz where the average value corresponds to the set motor voltage. Current battery voltage is taken into consideration.

PWM = motorVoltage * MAX_PWM/(battery_voltage - voltageLoss)

The motor controller has a minimum pulse width. If the motor voltage is not zero, a minimum PWM is added to compensate. The minimum corresponds to 0.4V motor voltage.

(implemented in umotor.cpp in function motorSetAnchorVoltage())