The sequence is something like this
1. As soon as power is on the mode will be ALTERNATOR_OFF. Normal algorithm will be running.
2. One second over
if(battery voltage > ALTERNATOR_MIN_VOLTAGE && battery voltage < ALTERNATOR_MAX_VOLTAGE)
{
mode = ALTERNATOR_ON;
}
else if(battery current > CRANKING_CURRENT)
{
mode = CRANKING;
stop calculations for one minute till voltage stabilized = TRUE;
}
Please suggest if any mistakes.
You can test battery with a pulse load to detect drop in 1ms of known current or Rload and then store values at various resting voltage to determine battery SoC or aging where both conditions of Low SoC and expired battery from aging give high ESR or large drop with pulsed load. then save parameters for smart analyzer functions.
Thank you for the in depth advise. Actually I have written logic for lead acid battery soc calculations. Can I post the logic? Will you give some advice?
My turn, but I'm having trouble understanding what;s wanted.
The presence of ripple in the electrical system can tell you if the alternator is running. Maybe. The reason why maybe is that the alternator is disabled when starting.
RPM and crank position sensor frequency.
Thank you all for the replies. I have put the current as my test variable, once it crosses certain range i assume cranking starts. yes i can put engine rpm also as variable.