82 Maxim DOHC 400 electronics retrofit

SOMETHING AMAZING HAPPENED. I truly cant believe I'm saying this... but we got it to somewhat work!!!! I'll post most details later, but via the Arduino, some VERY simple code (literally digitalRead the sensor, digitalWrite to ignite the spark), and a lot of denial (trial) and error, and we have liftoff!

Now, this was only one cylinder, and the advance was hard set manually to about 7º or 8º BTDC. Ill have to post some pictures and code and wiring diagrams. All will come! But it was responding to throttle input with the starter NOT being engaged. Admittedly, super choppy, on one cylinder, and poorly at best, but it was definitely sparking and completing the 4 cycles for a solid 4-5 seconds. This is super exciting!

Stay tuned!
STILL ON THE MISSION OF GETTING MY XS400 RUNNING! And I made insane progress. I basically got the engine to run! Albeit, super poorly. But it was running under its own power! In the time that I have started this thread, Ive moved twice, given this project away, taken it back, lost hope, and now... gained hope back. Im just stoked it was running under its own power!

Arduino pseudocode:
digitalRead(pickup sensor)
digitalWriteHIGH(spark plug)
digitalWriteLOW(spark plug)

Remember the 4ms is dwell time, to charge the coil. When the pin is set to LOW, the coil is grounded and the field inside the coil collapses, triggering spark. But the code is literally that simple. No advance calculation... YET. When i had it running, it was at full throttle and it was running very poorly. However it hasn't been run in 3 years, there was no airbox, no exhaust, and only one cylinder. So I have confidence that when i start putting it back together, that will help it run. Phase 1 was just a proof on concept to see if I could even run an engine from an arduino!

I'm happy to post code and wiring diagram eventually. But its honestly that simple. I also hooked up the relay to a random momentary contact switch so I could push a button to start it, and have my other hand free to operate throttle and choke.

I haven't been able to find a single guide online that documents a complete, start to finish arduino ignition, ideally with a customizable advance curve. Lots of half-done, half-baked projects, but nothing start-to-finish. I would love to write the whole project up someday!
Last edited: