RE: New CDI - opensource project JMJ and Bigboat
You always have to use "old" information, because you have to measurethe speed. The filtering may or may not be needed (I intent to makethis configurable) because of some jitter (variation) in the hallsensor edges.
It would ofcourse be possible to improve the acceleration behaviour (ina future version) by either using a different position sensor, like amissing tooth sprocket, by calculating and correcting for acceleration,or by using extra sensors, like an throttle position or intake manifoldpressure sensor.
I wouldn't know where to get affordable, small and lightweight pressuresensors, but a throttle position sensor should be very difficult. Itwould also be possible to measure the signal to the throttle servo, anduse that for ignition advance.
All this is, ofcourse, for future versions, first we'll have to build a system that works, and works better than the existing software.
@Azalner:Ithink you understand the proposed algorithm perfectly. It would be easy if the sensor can be adjusted to generate an edge at ~30 BDC for starting, and you did understand correctly that the position of the sensor doesn't matter afterwards, as long as the actual position in input correctly in the software. It isn't quite clear to me if this is always possible, or if there are engines where it is very difficult or possible to adjust the sensor or magnet.
Ihave already implemented a FIR(finite impulse respons)filter for the intervals, and therefore for the crankshaft speed. I'm not worried about spurious pulses on the input, if you use a sufficiently low resistance pull-up or pull-down resistor, any noise will be suppressed. A couple of clamping diodes and maybe a small capacitor to either power supply rail would also be a good idea.