Power into the motor is approximately power out of the motor (except for losses), so...
1) BatteryCurrent * BatteryVoltage = MotorCurrent * MotorVoltage.
Now,
2) MotorVoltage = BatteryVoltage * PWM_DUTY
Let's substitute 2 into 1:
BatteryCurrent * BatteryVoltage = MotorCurrent * (BatteryVoltage * PWM_DUTY)
Now, cancel BatteryVoltage from both sides of the equation, to get....
BatteryCurrent = MotorCurrent * PWM_DUTY.
Or, said another way,
BatteryCurrent / MotorCurrent = PWM_DUTY
So, if you only know the PWM_DUTY, there are still 2 other variables. You can't know both the battery current and the motor current if you only know the pwm duty.
Hey! It has over 1 million views! I was hoping it would roll over to zero, and there'd be a y2k catastrophe. oh well.
|