Trigger Wheel VR Sensor ignition timing

I’m building an ignition system to replace the distributor on a classic car. This uses a 36/1 crank trigger wheel with a variable reluctance sensor feeding into a LM1815 IC (obsolete, but still available in thru hole) and a XAIO which is so much faster than the Arduino UNO.

Has anyone done this before and has code they can share? I plan to mimic the distributor RPM advance curve in a lookup table and add vacuum advance as the XIAO analogRead is fast enough. Using the crank rather than the camshaft I’ll be using a wasted spark coil pack. Eventually, I’m hoping to replace the carburettor with a simple injection arrangement which won’t be as sophisticated as a modern ECU but it should be better than the fairly basic Stromberg.

Any thoughts on this would be most welcome! I’d post photos of the project so far if it’s possible on this forum and I knew how?

Hi! Sound an amazed project! But I barely understand a sentence you said! XD
Excuse me the lack of knowledge. I am not sure the XIAO getting started guide can help you here:

Thanks for your response! I did pack a fair amount in my post. To start with, it’s necessary to understand how the distributor works on a four cylinder four stroke petrol car. It is an electromechanical device which, together with the coil, fires the spark plugs in sequence when the relevant piston is close to “top dead centre” (TDC) during the compression stroke. At a low speed on the engine, this happens around 10 degrees before TDC as the fuel/air mixture takes time to burn. As the engine goes faster the “advance” before TDC can be around 35 degrees or more. This is achieved by weights in the distributor which fly outwards with centrifugal force and twist the shaft in the distributor. There is also some “vacuum advance” from the inlet manifold but it’s not essential except for fuel economy at low engine speeds. The way it’s done these days is by using a trigger wheel on the crank pulley - in my case with a tooth every 10 degrees except one of the 36 is missing, which allows the processor to know exactly where the crank is. The reference to “wasted spark” is because I’m using a twin coil pack which fires two cylinder spark plugs at once - a cheaper solution than having a coil for each cylinder. The “wasted spark” fires on one cylinder at the right time and another cylinder which is near the top of its exhaust stroke, which has no effect, i.e. it’s wasted. If you are interested, I recommend you google some of these words to find out more :grinning:

Great! I will try to google some of these professional words and try to understand. XD
Hope the other guys in the forum can help you.