|
Collateral Damage posted:The code itself looks OK. If you find that it can't keep up because digitalWrite takes too much time, you can try one of the high performance IO libraries for Arduino, or just do low-level calls on your own. There's actually a DIY ECU thread. I'm using an arduino nano on my bike now -- same processor as the Uno; ATMEGA328. I think the nano has enough power to run a 2-stroke 2-cylinder up to 14k rpm. A complete crank cycle takes 4.28ms at that RPM, so all your math has to be done in less time than that. The clock is 16MHz, and the arduino IDE is pretty well optomized to generate code. Be intelligent with your function calls, and you'll have plenty of headroom on your timing; maybe not so much headroom on your memory space, though. The thread has good info about what transistors to use to fire your coil, too.
|
# ¿ Jan 18, 2016 03:24 |
|
|
# ¿ May 15, 2024 00:39 |