LLY Ficm

2004LB7

Well-known member
Dec 15, 2010
6,786
2,059
113
Norcal
Ok, What ever happened to cracking the original code?
Vodo 😛

It didn't seem to be located on the chips we were able to look at. The other chips are either proprietary or no data on how to read the code. So we hit a dead end on trying to read and reverse engineer it. Some of the chips on the board have little to no information about them on the Internet so that leads me to believe that Bosch had them specifically made for them or they had the numbers changed for their use. And not knowing which pins to use or what commands to tell it to spit out the code it was not going to happen.

Ken might might know more on the code we did get and what it contained, but it was my understanding it didn't contain anything useful

But we don't necessarily need to use whatever is on the OEM board. The ECMs also read the signals from the sensor. So it's going to have code in it too. So if needed we might be able to steel barrow it from there. But there is already some good example code being used on speeddruino and megasquirt, etc if we have to. Our code will likely be something similar in the end
 

kidturbo

Piston Tester
Jul 21, 2010
2,506
1,325
113
Somewhere On The Ohio
www.marinemods.us
It seems the signal from our ECM isn't perfectly "Clean" as one would expected it.. I haven't got all down and dirty technical on it, but basically dirty is our current issue.

Is it crap on the crank reluctor wheel, actual jitter or the wheel, bad signal from ECU, anyway both of our trucks ECU's are sending some glitches in the replicated crank pulse signal.. Which amazingly, our MPU is reading them correctly as extra teeth, exactly same as my digital oscilloscope does. Screwing with the math, timing, ect.

Give it a clean signal, runs like a charm. So everyone clean those reluctor wheels.... ;)

This whole jittery crank signal thing has haunted me since my earliest Duramax boat days. The LBZ/LMM is no different. Just has some better math to deal with it. But I can still scramble it's brains mechanically and or electricly. Mark as my witness.. LOL

Here is what we are seeing digitally. An extra 0.1us tooth or two tossed in every rotation. So just need to glitch filter those out, and see how it responds. But is easier to capture this OEM, than second guessing our hardware at same time.


Screenshot 2024-08-12 231839.png

Screenshot 2024-08-12 232841.png
 
  • Like
Reactions: RickyDean

kidturbo

Piston Tester
Jul 21, 2010
2,506
1,325
113
Somewhere On The Ohio
www.marinemods.us
One would expect that the ECM would have cleaned that up before sending it back out to the FICM
One would think.. However, I guarantee ya when the Bosch engineers had to rewrite their 60-2 crank code to GM's 60-3, they probably said, "just send us a raw crank signal before you guys mess it up any worse.. " LOL

From what I can tell so far, it's not hardware. IE; reluctor wheel junk related glitches. They don't repeat, or stick to any specific tooth like a chip. So it's garboage...

Would be cool to see if the replication signal matches the crank sensor on these glitches. I'm gong with Yes.. A trick for another day. For our situation, it doesn't matter from who or where they come, only that they go away.. I believe we have it filtered. At least the reading RPM value on the Evaluation board now looks good.

First image, 3 rotations highlighted, and 3 different tooth counts. Remember 57 is what we're starting with.

Screenshot 2024-08-13 072232.png

Next image, just one consecutive falling and rising edge pair contained 4 glitches, jacking our teeth count. And ya wouldn't spot it with naked eye. Yet these pesky computers will see it every time.. So we gotta tell it to ignore the junk signals, yet count all the good teeth, and know exactly where the crank is at in all positions and times. Without A Camshaft Reference. Write that all in an equation using 100 words or less..

Yes I really wish we would have found that little trick in the old FICM code..

Glitch-Captures.jpg
 

DAVe3283

Heavy & Slow
Sep 3, 2009
3,719
284
83
Boise, ID, USA
If I were to speculate, the glitches look like a result of using a threshold on the incoming signal with no hysteresis, so the tiny analog noise on the CKP line cause it to flip back and forth a couple times as the signal transitions. That would imply the ECU is replicating the CKP signal using very basic circuitry, likely to eliminate the time delay that would be required by digital processing or most types of glitch filters.

Are the glitches always sub-microsecond? It looks like a standard debounce or glitch filter setup would take care of that given how quick they are compared to the main tooth pulse duration. But if they become a higher percentage of the true tooth pulse at high RPM that might take more complex logic to clean up.
 
  • Like
Reactions: dndj and RickyDean

2004LB7

Well-known member
Dec 15, 2010
6,786
2,059
113
Norcal
If I were to speculate, the glitches look like a result of using a threshold on the incoming signal with no hysteresis, so the tiny analog noise on the CKP line cause it to flip back and forth a couple times as the signal transitions. That would imply the ECU is replicating the CKP signal using very basic circuitry, likely to eliminate the time delay that would be required by digital processing or most types of glitch filters.

Are the glitches always sub-microsecond? It looks like a standard debounce or glitch filter setup would take care of that given how quick they are compared to the main tooth pulse duration. But if they become a higher percentage of the true tooth pulse at high RPM that might take more complex logic to clean up.
That's kinda our thought too. ECM is just passing through the signal without cleaning it up or filtering it in any way. So we had to build the filters into the programming to ignore pulses less then a specific duration. Seems to have worked. We are getting better RPM measurements and matching the actual closely.

Right now we are concentrating on glitch filtering to make the input to output more reliable. We are having to fine tune it to not filter out legitimate signals but still squash the noise.
 

kidturbo

Piston Tester
Jul 21, 2010
2,506
1,325
113
Somewhere On The Ohio
www.marinemods.us
Last night I set a 5us glitch filter on the laptop scope, and captured a few revs with crank and 3 injector signals to the factory FICM. A 5us filter seems to catch all the errors, so that's doable.

We have been focused on the injector pulse glitches this last round. High and Low time limits on those pulses. Raw code was just pulse in equals pulse out. Knowing we should probably check that ECM signal data for errors, and reject anything over 3500us or less than 100. A simple starter filter logic, so we can adjust those values to reject anything outside of normal pulse parameters. Not looking to limit firing to any specific crank positions. Just a maximum of 3 pulse per revolution for now should cover our replacement needs.

To bench test all this, I had someone modify the original ardu-stim emulator code to output one 60-3 Crank, and eight programble cam signals. Each cam signal contains our pilot and main injection pulse patterns over 720deg of crank rotation. Which makes a nice, clean, and highly programable pattern generator, that ties the injector pulse pattern to an exact crank tooth positon. Works great on bench, emulating a perfect crank and all injetors signals to way past 10k RPM. But it doesn't allow ya to inject errors or change pulse timing on the fly. So for understanding the basic logic flow and testing with evaluation boards that worked fine. But toss in a bunch of live changing varables and some crank signal glitchs, then learn how good the code handles it. Currently the plan just rejects anything out of spec. When in doubt, toss it out.. Better to cut any questionable pulse, than have one glitch a big fuel shot at 50deg BTDC.

So past few days I've been piggybacking our STM Evaluation board off the running ECM / FICM to see how well our code mirrors the OEM hardware. Besides those crank glitchs, looking good. Then we can mock everything up on the bench with high confidence in our data valid specs. Hopefully my un-bricked LLY ECM shows up tomorrow, then I can let it rip and scamble the signals without risking bending a rod..
 
Last edited:

kidturbo

Piston Tester
Jul 21, 2010
2,506
1,325
113
Somewhere On The Ohio
www.marinemods.us
Screenshot 2024-08-16 001312.png

Here is something curious, that don't recall seeing this in my LBZ/MM captures.

For defueling patterns, when you lift on accel, the LLY continues to send a base 250us pilot pulse, but starts cutting the main pulse. Had to look at several logs and count the teeth, but seems they drop the main first, followed by the pilots. In example above, #1 shows a 250us piliot, followed by a 116us main. Then next cylnder logged #7, shosw the 250us pilot in correct position, but no main signal from the ECM. Next rotation, there is no pulses to any cyclnder on the decel.

Found that intersting. And these are some old PPE boat DSP5 tune files being logged for those wondering.. Gonna have to go look at that file now. I know the guy who wrote that tune. He was pretty green in those days.. But hey, this old truck been rockin that same junk for a decade now... lol
 
  • Like
Reactions: RickyDean

2004LB7

Well-known member
Dec 15, 2010
6,786
2,059
113
Norcal
There might be a table in the tune file that has the deacceleration injector cutoff sequence. Similar to the pilot cutoff on high RPM, but not mapped out. Is the pattern repeatable?
 

kidturbo

Piston Tester
Jul 21, 2010
2,506
1,325
113
Somewhere On The Ohio
www.marinemods.us
Making progress.. :)

Was able to get our crank glitch filters sorted a bit better, so decided to try this code on the prototype #2 board Jason sent me to test with. Spare E60 didn't arrive yet, so rather than pull my buddies ECM out of his truck to bench test, figured may as well jump right in and stick the new FUCM board in the truck. Problem solved..

Fired right up, and actually runs fairly decent.

Here is a short video of that cold start.

Source: https://youtube.com/shorts/lPh7MWMVVhc?feature=shared
 

kidturbo

Piston Tester
Jul 21, 2010
2,506
1,325
113
Somewhere On The Ohio
www.marinemods.us
And then I shut it off... :mad:

Seems I forgot about the Bank Disable parts of our hardware being "disabled." And that 10 second PCM power down delay after you turn off the key. A few minutes later I when I tried to start it again to captures some scope data, no fire.. At least in the holes where ya want it..

Screenshot 2024-08-16 235634.png


From inside the cab I spotted the smoke. Followed by the that distinct smell of a burning PCB. Seems when turn the key on, it stuck a mosfet on and quickly burnt a trace for injector #6, along with the injector coil for same. Luckily, I know the truck owner has a few spare sticks laying around. How many spare boards we have, that's another question..

So we are making some serous progress. Only 2 more injectors, and I'll but caught up with Jason... :p
 

kidturbo

Piston Tester
Jul 21, 2010
2,506
1,325
113
Somewhere On The Ohio
www.marinemods.us
We good for a couple more tries now..
589fd81259bf83ea9485324a938368de.jpg


Sent from my SM-S901U using Tapatalk
 

kidturbo

Piston Tester
Jul 21, 2010
2,506
1,325
113
Somewhere On The Ohio
www.marinemods.us
Found that Fuseable Link issue.
Is gonna need a new link I think...

Burnt_Trace.jpg

This being the second weakest point in our injector circuitry. The first being the injector coils themselves. Jason claims those are good for 2 seconds steady on time. Board did 10, and still has copper left to go..

Engineering humor, sorry..:ROFLMAO:

edit: note to self, check load when shorted to ground, and suggest adding fuse.
 
Last edited:

kidturbo

Piston Tester
Jul 21, 2010
2,506
1,325
113
Somewhere On The Ohio
www.marinemods.us
Ask Jason to check something with pilot off to see if it ran any smoother, and he sends me video driving it to the store...

I'm still over here trying to figure out why this #6 cylinder has such a horrible balance rate.. I connected the wires exactly like the book shows.

1724400487719.jpeg
 
  • Like
Reactions: Ron Nielson

kidturbo

Piston Tester
Jul 21, 2010
2,506
1,325
113
Somewhere On The Ohio
www.marinemods.us
Shortly after the first "Official FUCM Powered Test Drive" video, to which much congratulations in order, our coder msg me that he solved the glitch bug randomly killing the second pulses. A simple setting that compares Injector pulse times, had a maxim acceptable value of 3 * previous injector pulse. So normally at idle, pilot and main are well within that pulse length range, but when you punch it, the main pulse jumps in size, while the pilot does not.. Soon as the main pulse exceeded 3x pilot value, the glitch code tossed it out as bad data. Going back to our rule of "when in doubt toss it out" so a shorted ECM signal wire can't stick an injector ON longer than normal pulse. Thus protecting the injectors and board from possible damage, along with related hydro issues or misfire issues.

Here is quick capture of normal pilot and main pulse values, coming off idle with a good WOT input. Main is right at 3 times the pilot, with only around 1300rpm. Very hard to to replicate on the bench feeding the MPU tooth width based set of injector values. So while testing beta code on live engine is risky, sure does make debugging go quicker.

Screenshot 2024-08-23 034531.png