This design uses an atemga328p to create a two step/anti-lag/launch control system by using one port of the atmega to take the inputs to the coils from the ecm and another port to output signal to the coils. this way each individual cylinder can be controlled. One of the timers measures the time between ignition events from the ECU in order to calculate RPM and compares it with a setting that is configured over wifi. It has the ability to shift the igntion event by 1 cylinder to achieve anti-lag (on 8 cylinder cars this achieves 90 degrees retarded timing).
At the time of this video i had a different plan utilizing an attiny85 which would have resulted in erratic spark behavior which could be bad for the engine.
Have you considered getting RPM data from the OBD2 port? I recently built a small device to get a bunch of ECU stats from the OBD2 port with a standalone atmega328p soldered on protoboard and it's been working great for a few months so far -- and its pretty cheap, only around ~15 bucks in parts. Just get a generic ELM327 OBD2 scanner on amazon that has a UART based bluetooth module inside, desolder the bluetooth and connect tx/rx to the 328p...pretty elegant solution and you don't have to deal with reading ignition events to estimate RPM, which might slow down the loop time especially if you're reading that through interrupts
I have been asked this a few times, It wouldn't be hard to use OBD2 to grab the RPM, but it is fairly easy to count the time between the previous and current ignition event and use that to calculate RPM. In fact i am pretty sure this would be much faster and more accurate than grabbing it from OBD2. The code is dead simple for the atmega328p.
Have you considered getting RPM data from the OBD2 port? I recently built a small device to get a bunch of ECU stats from the OBD2 port with a standalone atmega328p soldered on protoboard and it's been working great for a few months so far -- and its pretty cheap, only around ~15 bucks in parts. Just get a generic ELM327 OBD2 scanner on amazon that has a UART based bluetooth module inside, desolder the bluetooth and connect tx/rx to the 328p...pretty elegant solution and you don't have to deal with reading ignition events to estimate RPM, which might slow down the loop time especially if you're reading that through interrupts