Topic: Filawinder Arduino Reboot solution
Hi,
I understand why my filawinder rebooting at random causing a reset of all calibration...and so stopping working in automode.
i've seen the v10 firmware version with eeprom storage for calibration value but i don't like this reboot that can be very dangerous for arduino board..
so... the problem is in Hardware.. let me explain..
the motor is directly connected at the mosfet.. connected at the power ... when motor is stopped and the PWM raise to a high level "200 or more" in less than 0.5 second , motor drain MORE AMPERE that the alimentator can... and the tension at arduino core goes down , resetting arduino board..
there are 2 possible solution..
1° software solution
void pull_control()
{
qtra.readCalibrated(sensorValues);
unsigned int line_position = qtra.readLine(sensorValues, QTR_EMITTERS_OFF, 1);
Input = line_position; //Get line position from sensors
if (!pullPID.Compute()) return; //Run the PID
int ScaledOutput = (Output * 1.7); //Scale the Output from 0-150 to 0-255)
if (ScaledOutput <= 0) {ScaledOutput = 1;} //Limit the output to the range of 0-255)
if (ScaledOutput >= 255){ScaledOutput = 255;}
puller_speed = ScaledOutput;
if ( (puller_speed - puller_speed_old) > 25) puller_speed = puller_speed_old + 25;
if ( (puller_speed - puller_speed_old) < -25) puller_speed = puller_speed_old - 25;
analogWrite(motor_spoolerPin,puller_speed); //Set the spool speed to the PID result
puller_speed_old = puller_speed;
}
Force PWM to raise only by +-25 every 0.1 second (using the pullPID.Compute 100ms).
2° hardware.. put a capacitor in parallel with the motor that cut some of pwm wave...
with 1° solution in auto mode my filawinder didn't reboot more..