Page 19 of 22
Re: Coding my own aftermarket ECU [beta available]
Posted: Thu Jun 19, 2025 12:02 am
by AngelMarc
Re: Coding my own aftermarket 24x ECU [beta available]
Posted: Thu Jun 19, 2025 11:25 pm
by AngelMarc
Minor readability change for anybody keeping track.
Swapped the low and high name and inverted the "if >" result.
Purely a readability change. Explained by comment.

- Capture.PNG (17.7 KiB) Viewed 514 times
Re: Coding my own aftermarket 24x ECU [beta available]
Posted: Thu Jun 19, 2025 11:43 pm
by AngelMarc
Currently looking to change
Code: Select all
void handleSparkPulse(uint8_t pin, unsigned long startTime, bool &activeFlag) {
unsigned long now = micros();
unsigned long elapsed = now - startTime;
if (elapsed < currentOnDelaySpark) {
digitalWrite(pin, LOW);
} else if (elapsed < currentOnDelaySpark + currentOffDelaySpark) {
digitalWrite(pin, HIGH);
} else {
digitalWrite(pin, LOW);
activeFlag = false;
}
}
So dwell can't be effected by rapid RPM change. Might be better to just use a higher dwell: figure out what kind of delta can be created by realistic extreme RPM change deltas over 15 degree increments, and increase main dwell value as needed. And then the same addition done to dwell gets subtracted from main spark table to keep the same spark timing.
Re: Coding my own aftermarket 24x ECU [beta available]
Posted: Mon Jun 23, 2025 5:21 am
by AngelMarc
Should do for testing. 2 cylinder output board. Can test on a couple small engines I have. CB450 and 2 stroke snow blower.
Need to make the input board and add a cam sensor to the CB450 for a full sequential test.
I don't own anything V8.
Re: Coding my own aftermarket 24x ECU [beta available]
Posted: Mon Jun 23, 2025 9:42 am
by AngelMarc
MAP sensor is 5 volt. Pi Pico will die from that... Um, good enough.

- OHMs.PNG (40.62 KiB) Viewed 408 times
Turns out I'm out of female headers, but, voltage divider, pull up resistors, and bias resistor in this mess.
Re: Coding my own aftermarket 24x ECU [beta available]
Posted: Tue Jun 24, 2025 7:04 pm
by MPC001
AngelMarc wrote: ↑Mon Jun 23, 2025 9:42 am
MAP sensor is 5 volt. Pi Pico will die from that... Um, good enough.
Thanks for reminder. I have been using a 5v map sensor supply into the pico. Must fix it before it kills the pin.

no smoke yet. Probably as it's mostly at 1-2v.
Re: Coding my own aftermarket 24x ECU [beta available]
Posted: Wed Jun 25, 2025 4:12 am
by AngelMarc
How much have you done?
Re: Coding my own aftermarket 24x ECU [beta available]
Posted: Wed Jun 25, 2025 9:28 am
by AngelMarc
MPC001 wrote: ↑Tue Jun 24, 2025 7:04 pm
AngelMarc wrote: ↑Mon Jun 23, 2025 9:42 am
MAP sensor is 5 volt. Pi Pico will die from that... Um, good enough.
Thanks for reminder. I have been using a 5v map sensor supply into the pico. Must fix it before it kills the pin.

no smoke yet. Probably as it's mostly at 1-2v.
Unclear on some details.
Just to be sure we're on the same page...
The power for the Pico is 5 volt, it has a regulator to drop that to 3.3. VBUS and VSYS if I remember right, are 5 volt input. You can remove a resistor or something to separate USB power I think.
Every other pin is not 5 volt capable.
Re: Coding my own aftermarket 24x ECU [beta available]
Posted: Wed Jun 25, 2025 11:01 am
by AngelMarc
"Let's try using TunerStudio as the tuning UI. No live tuning, no flash/burn, just convert the saved file."

- Capture.PNG (29.74 KiB) Viewed 256 times
... or not
Re: Coding my own aftermarket 24x ECU [beta available]
Posted: Wed Jun 25, 2025 11:32 am
by AngelMarc
Real tired of this shit.

- Capture.PNG (6.53 KiB) Viewed 245 times

- Capture.PNG (46.9 KiB) Viewed 245 times