Having tested out the Bluetooth auto start for a little while through regular use, I came to an interesting conundrum. What should the auto start do if the voltage is too low? I “hemmed and hawed” about this for a while and here are my thoughts:
- If the vehicle is already running, should we shut it off when the voltage gets to low? No, because turning it off will not help the driver in any way (except to alert them to an issue) but they may want it to stay on.
- If the vehicle has not started yet, should it attempt at all? Yes, we should make at least one start attempt, so that the alternator can kick in and charge the battery.
- If the vehicle failed to start, should we try again with a low battery? No, I suppose they should manually start the vehicle to ensure cranking goes properly.
With those three thoughts in mind, here is what I came up with:
if (crankTimer == 0) {
digitalWrite(15, LOW);
digitalWrite(11, HIGH);
if (runBool) {

crankTimer = -1;

startTimer = -1;

startAttempts = -1;

runTimer = 600; // 600 seconds = 10 minutes of run time before shutdown.

Serial.println (” crankTimer OFF, runTimer started. “);

} else {

crankTimer = -1;

startTimer = 5; // To start process again.

runTimer = -1;

startAttempts = startAttempts -1;

if (voltVoltage <= 0.5) {

// Voltage is too low to try again!

startTimer = -1;

Serial.println (” Voltage LOW! “);

} else {

startTimer = 5; // To start process again.

}

runTimer = 600; // 600 seconds = 10 minutes of run time before shutdown.

Serial.println (” Not running, try again… “); Serial.println(startAttempts);

}
So it will attempt one start, but not multiple starts. What do you think? Is that reasonable?
Linux – keep it simple.