Coding my own open source 24x ECU [beta available]
-
AngelMarc
- Posts: 612
- Joined: Sat Apr 08, 2023 11:23 am
- cars: A CB450 running to 8,000RPM with a P59.
Re: Coding my own aftermarket ECU [beta available]
You do not have the required permissions to view the files attached to this post.
Don't stress specific units.
-
AngelMarc
- Posts: 612
- Joined: Sat Apr 08, 2023 11:23 am
- cars: A CB450 running to 8,000RPM with a P59.
Re: Coding my own aftermarket 24x ECU [beta available]
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.
Swapped the low and high name and inverted the "if >" result.
Purely a readability change. Explained by comment.
You do not have the required permissions to view the files attached to this post.
Don't stress specific units.
-
AngelMarc
- Posts: 612
- Joined: Sat Apr 08, 2023 11:23 am
- cars: A CB450 running to 8,000RPM with a P59.
Re: Coding my own aftermarket 24x ECU [beta available]
Currently looking to change
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.
EDIT: The "updated pulse handler" addressed this. AI wasn't helpful, had to do it manually. Fuel and spark get 2 functions each, with some extra flags to trigger thing right.
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;
}
}
EDIT: The "updated pulse handler" addressed this. AI wasn't helpful, had to do it manually. Fuel and spark get 2 functions each, with some extra flags to trigger thing right.
Last edited by AngelMarc on Sun Sep 28, 2025 3:41 am, edited 1 time in total.
Don't stress specific units.
-
AngelMarc
- Posts: 612
- Joined: Sat Apr 08, 2023 11:23 am
- cars: A CB450 running to 8,000RPM with a P59.
Re: Coding my own aftermarket 24x ECU [beta available]
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.
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.
You do not have the required permissions to view the files attached to this post.
Don't stress specific units.
-
AngelMarc
- Posts: 612
- Joined: Sat Apr 08, 2023 11:23 am
- cars: A CB450 running to 8,000RPM with a P59.
Re: Coding my own aftermarket 24x ECU [beta available]
MAP sensor is 5 volt. Pi Pico will die from that... Um, good enough.
Turns out I'm out of female headers, but, voltage divider, pull up resistors, and bias resistor in this mess.
Turns out I'm out of female headers, but, voltage divider, pull up resistors, and bias resistor in this mess.
You do not have the required permissions to view the files attached to this post.
Don't stress specific units.
-
MPC001
- Posts: 174
- Joined: Sat May 05, 2018 11:41 am
Re: Coding my own aftermarket 24x ECU [beta available]
Thanks for reminder. I have been using a 5v map sensor supply into the pico. Must fix it before it kills the pin.AngelMarc wrote: Sun Jun 22, 2025 11:42 pm MAP sensor is 5 volt. Pi Pico will die from that... Um, good enough.
-
AngelMarc
- Posts: 612
- Joined: Sat Apr 08, 2023 11:23 am
- cars: A CB450 running to 8,000RPM with a P59.
Re: Coding my own aftermarket 24x ECU [beta available]
How much have you done?
Don't stress specific units.
-
AngelMarc
- Posts: 612
- Joined: Sat Apr 08, 2023 11:23 am
- cars: A CB450 running to 8,000RPM with a P59.
Re: Coding my own aftermarket 24x ECU [beta available]
Unclear on some details.MPC001 wrote: Tue Jun 24, 2025 9:04 amThanks for reminder. I have been using a 5v map sensor supply into the pico. Must fix it before it kills the pin.AngelMarc wrote: Sun Jun 22, 2025 11:42 pm MAP sensor is 5 volt. Pi Pico will die from that... Um, good enough.no smoke yet. Probably as it's mostly at 1-2v.
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.
Don't stress specific units.
-
AngelMarc
- Posts: 612
- Joined: Sat Apr 08, 2023 11:23 am
- cars: A CB450 running to 8,000RPM with a P59.
Re: Coding my own aftermarket 24x ECU [beta available]
"Let's try using TunerStudio as the tuning UI. No live tuning, no flash/burn, just convert the saved file."
... or not
You do not have the required permissions to view the files attached to this post.
Don't stress specific units.
-
AngelMarc
- Posts: 612
- Joined: Sat Apr 08, 2023 11:23 am
- cars: A CB450 running to 8,000RPM with a P59.
Re: Coding my own aftermarket 24x ECU [beta available]
Real tired of this shit.
You do not have the required permissions to view the files attached to this post.
Don't stress specific units.