What's new
Honda Trail 125 Forum

Welcome to the Honda Trail 125 Forum! We are an enthusiast forum for the Trail 125, Hunter Cub, CT125 or whatever it's called in your country. Feel free to join up and help us build an information resources for this motorcycle. Register a free account today to become a member. Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

JA55 AI Fuel Tuning

JPMcGraw

Active member
Joined
Apr 13, 2022
Messages
126
Hey everyone! I've been messing with Antigravity and the nerd in me had an idea. Nothing super cool but its fun. This was a kind of spur of the moment thing because i realized i already had all the stuff so i just did it this weekend. Everything isn't fully fleshed out but its at least working and ive been able to tune idle.

The goal is to get an AI agent to log, analyze, and suggest changes to tune my fuel map. This will be a slow process because my garage is over 90* right now so don't expect anything quick. Also don't expect many pictures. Really you should try this on your own so you figure everything out for me.

So far i reinstalled the Takegawa Fi-con fuel controller (it doesn't do spark, just fuel). The AI Agent can't connect to the FI-con since im using linux and there is no native Linux app with terminal commands for the AI Agent to use. So it can't change anything or connect to the FI-con at this time using the agent. Im sure i can use Wine or a virtual machine and just passthrough bluetooth but ill explore that later. If you are running windows you might have better luck.

I have a honda 4 pin diagnostic plug to OBD2 connector and a cheap Panlong Bluetooth OBD2 reader (OBD2 through Bluetooth) - this gives a bunch of PIDs like TPS, temps, rpm
I have a 14point7 Spartan 3 wideband (serial data through USB) - this gives Wideband air fuel reading

The OBD2 connects Bluetooth to my computer, the Spartan 3 sends serial output through USB to my computer. The AI agent connects, logs, syncs, and analyzes the data and suggests what changes i should make. Then i connect to the takegawa software with my phone and manually enter the changes. So far its tuned idle. The takegawa was set to 0 across the map. I rode the CT around my neighborhood (under 25mph) for a good 10min then came home, did some idle logs, and modified the table based on AI suggestions. It went from around 12AFR (i have a 170 injector) and it got it up to 13.7 before i called it quits for the day. This took 3 idle runs and each run was around 30 second idle each time. Also through doing multiple logs and changes it was able to figure out the increments, or how much lambda/afr increase/decrease per fuel table unit (i think its microseconds of injector pulse). since its learning, it should get better and better, and making more accurate changes as it learns the flow of the system. It should also learn how much change is required based on outside temp so i could get a rich cooling summer map and a leaner winter map. I also have a 155 injector so im going to get it to learn that too at some point. i may even throw on the stock injector just to see if it can keep up with my mods. im just excited i have something fun to do that connects 2 of my loves!

Tuning the idle with my laptop is easy because im stationary and i can run a long USB to keep may laptop inside my house out of the garage heat. Riding around on my motorcycle with my laptop in a backpack, in the summer, sounds like a terrible idea. So this weekend Antigravity is going to slop me together an android app that will connect to the OBD2 by bluetooth and spartan 3 by usb. It will maintain that connection and try to reconnect and resume logging if it drops, it will only log raw data, and it will make sure to accurately timestamp everything that way if a connection drops and resumes syncing the data should be easy to sync up. then ill move those logs over to my laptop for post processing (syncing, converting, and analyzing). any post processing will happen on my laptop after the run so my phone hardware overhead is low reducing the chances of something messing up while logging is active.

For now im just putting this out there in case another nerd wants to tinker and figure out another setup. Once i get the app working (hopefully this weekend) ill post again because then i can actually ride around logging and tune the rest of the map. Once my setup is fully tuned ill post my MAP in case someone wants to use it.
 
Last edited:

JPMcGraw

Active member
Joined
Apr 13, 2022
Messages
126
The slop logging app is made and working. Super basic, 0 fancy, just logs, maintains a connection, reconnects, resumes, and timestamps. the fanciest part is the indicator dot that lets me know the devices are connected and data is flowing. Connects to OBD2 by Bluetooth and Spartan3 Wideband by USB, all to my phone in my pocket. If i disconnect the USB or Bluetooth (usb jiggles loose in my pocket then i notice during a run), then i reconnect, the app auto reconnects to the device and auto resumes logging. all logs are sync'd on my laptop post ride. File names have a start date and time and the log files contain elapsed time. i made sure timestamping and syncing was a major focus for that exact scenario.

Here's my current map after probably 6-7 runs and making changes after each run. 0 is unchanged, green is add fuel, red is take away fuel. (143BBK, takegawa n-15? cam, big valve head, full exhaust, NK racing intake pipe, larger stock air filter, stock airbox no snorkel)

1785848699705.png

the 170cc injector is obviously too big,

Still need to work on logic to prevent toggling +1 then -1 every run. A rolling minimum of 3 should fix that (+1 +1 +1 would give me +1 / +2 +2 +4 would give me +2). There are some other tuning concepts that i need to get it to implement to speed up tuning. it also needs to work on smoothing (10%TPS at 5500rpm is a little suspicious but i'm no expert). Im only doing 15min rides with lots of "twist and hold" throttle so it gets a good long reading at a stable TPS%. im also giving it A LOT of 4th gear full throttle pulls so it can get plenty of slow sweep WOT rpm data. the 170cc injector seems to be perfect for WOT in my setup. i have it ignoring all transitional/varying/moving throttle data so only stable TPS gets looked at. For now its working, stable, and the bike is running really nicely so i'm going to say its at v1.0. The FICon also has an accelerator pump feature that im going to eventually mess with but it has a lot of settings so thats for a later date.

Buying a device with autotune already (like the ARacer) is the best idea, but if you already have all the parts like i did and no way to autotune this seems to be working. I'm also learning a lot about tuning concepts so that's been a really big highlight of the whole process.

once i get done with the 170cc injector map ill post it and move over to the 155cc injector, repeat, then the stock injector. ill post everything here. At some point ill get AI to go over everything, describe the app and tuning process in a way that AI would understand and recreate. Then all you will have to do is download an agent, tell it to "read the file and recreate the project", and it will probably get you 75% of the way there. Then you just have to customize everything to your devices and liking.
 

squeaks

Active member
Joined
Jan 5, 2022
Messages
147
Wow. This is very impressive.
I kind of followed the example of Ozark garage for My 143 , but opened up the intake and exhaust, added the big valve head and ported it.
Added a oil cooler also.
I'm getting 12.5 to 13s on the AFRs
The only issue so far is at idle and just off idle...
It's running rich then.
I'm running the 140cc if that helps your research.
I'm also running the efie at 250 mv
I'm going to remove it to see if that helps with the rich idle.
 
Top