- Thu May 06, 2021 7:18 am
#50100
Long post warning....
OK, so I saw an interesting discussion around timing accuracy as it potentially related to Speeduino and it got me thinking. I'd never sat down and done any end to end timing accuracy testing, that is a crank signal + Speeduino + ignition circuit. The way the scheduler code is written means that the timers are accurate to 4uS, which is a good figure, however all it means is that the start/end of the pulses will be within 4uS of the time that the firmware requests it to be. That doesn't take into account the Speeduinos ability to process the incoming signal and calculate an accurate target angle, nor does it take into account the switching speed of the circuit.
So, I decided to sit down and do some testing. I hooked up a v0.4 board with Ardustim feeding it a 24-1 crank signal with a fixed timing angle that would correspond with a tooth edge based on the trigger angle I set. RPM was turned up to 13,000. On the whole the timing scatter was more than I expected and so is something I will work on, but for all real world requirements for this type of project I think its quite good.
The maximum observed error was around 44uS with the typical error being 12uS. At this speed, that equates to around 3.5 degrees and 1 degree respectively.
At this point I changed the stim over to a 60-2 pattern and ran it back up again, this time to about 13,800 rpm (My rpm pot wasn't particularly accurate, getting the same value was tricky). The maximum observed error was similar (Around 40uS) but it was noticeable that this was occurring less frequently and there were a much greater number of high accuracy results (<=4uS). The images below show some of the results. top line is ignition signal, bottom line is the 60-2 signal (Tooth #1). A perfect result is when the ignition signal is falling when the tooth #1 is rising.
OK, so I saw an interesting discussion around timing accuracy as it potentially related to Speeduino and it got me thinking. I'd never sat down and done any end to end timing accuracy testing, that is a crank signal + Speeduino + ignition circuit. The way the scheduler code is written means that the timers are accurate to 4uS, which is a good figure, however all it means is that the start/end of the pulses will be within 4uS of the time that the firmware requests it to be. That doesn't take into account the Speeduinos ability to process the incoming signal and calculate an accurate target angle, nor does it take into account the switching speed of the circuit.
So, I decided to sit down and do some testing. I hooked up a v0.4 board with Ardustim feeding it a 24-1 crank signal with a fixed timing angle that would correspond with a tooth edge based on the trigger angle I set. RPM was turned up to 13,000. On the whole the timing scatter was more than I expected and so is something I will work on, but for all real world requirements for this type of project I think its quite good.
The maximum observed error was around 44uS with the typical error being 12uS. At this speed, that equates to around 3.5 degrees and 1 degree respectively.
At this point I changed the stim over to a 60-2 pattern and ran it back up again, this time to about 13,800 rpm (My rpm pot wasn't particularly accurate, getting the same value was tricky). The maximum observed error was similar (Around 40uS) but it was noticeable that this was occurring less frequently and there were a much greater number of high accuracy results (<=4uS). The images below show some of the results. top line is ignition signal, bottom line is the 60-2 signal (Tooth #1). A perfect result is when the ignition signal is falling when the tooth #1 is rising.