casainho
10 GW
- Joined
- Feb 14, 2011
- Messages
- 6,058
If you want to try run your motor in 6 steps only, use my latest SVM branch and comment the following code on motor.c, inside the if where ui8_motor_state is set to MOTOR_STATE_RUNNING:casainho said:Maybe your controller don't do sinewave and so don't need automatic angle adjustment?? At least the ones on BMSBattery that don't have the phase current sensor, don't do sinewave and vice-versa. And sinewave/more silent motor is something that sells (Customer Perceived Value) and so can justify the added cost to the dirty cheap controller.
Code:
// update MOTOR_STATE_RUNNING based on motor speed
if ((ui8_motor_state != MOTOR_STATE_STARTUP) &&
(ui16_PWM_cycles_counter_total > SPEED_INVERSE_MOTOR_START_RUN))
{
ui8_motor_state = MOTOR_STATE_STARTUP;
pwm_init_6_steps ();
}
if ((ui8_motor_state != MOTOR_STATE_RUNNING) &&
(ui16_PWM_cycles_counter_total <= SPEED_INVERSE_MOTOR_START_RUN))
{
ui8_motor_state = MOTOR_STATE_RUNNING;
pwm_init_bipolar_4q ();
ui16_PWM_cycles_counter_total = ui16_PWM_cycles_counter_total >> 2;
}