With a gas engine, I energize the fuel pump, wait a few seconds for preessure to stabilize, energize the ignition, read and store the battery voltage and then start a timer and energize the starter. The timer limits how long the starter can be engaged. As soon as the starter is engaged, I start to continuously read the battery voltage. When it rises a half a volt above the stored voltage value the starter is disengaged. I've used this system for years now, in two different vehicles, and it works great. If the timer times out, then the engine didn't start. In this case, I'll try again twice more.Hope this helps,Jerry