Blowing the lid off the KLR
#1
Thread Starter
Three Wheelin'
Blowing the lid off the KLR
I've spent a lot of time over the last few weeks digging into the 951 KLR - both hardware and software - to get an idea of how it works. I've always been curious about it and there's been an air of mystery around it forever. I ended up getting into it pretty deeply and I have it more or less completely figured out at this point. I'm putting together a simple website to document everything. If you're interested, take a look:
https://jhnbyrn.github.io/951-KLR-PAGES/
There's a lot of stubs there marked as "TBD", but I'm getting there. These are all things that I've untangled from the code and/or circuit board, so it's just a question of getting it all written up.
Most of the pages there get into the assembly code a bit, and it's intended for people who have some understanding of that. But I've tried to provide high-level explanations for things too, for anyone who doesn't want to get too deep into the weeds. I just added some info on the knock sensing circuitry (excuse my sorry excuse for a schematic - I will do a proper one eventually).
Anyway I hope people find it interesting - let me know if you have any questions or comments etc.
https://jhnbyrn.github.io/951-KLR-PAGES/
There's a lot of stubs there marked as "TBD", but I'm getting there. These are all things that I've untangled from the code and/or circuit board, so it's just a question of getting it all written up.
Most of the pages there get into the assembly code a bit, and it's intended for people who have some understanding of that. But I've tried to provide high-level explanations for things too, for anyone who doesn't want to get too deep into the weeds. I just added some info on the knock sensing circuitry (excuse my sorry excuse for a schematic - I will do a proper one eventually).
Anyway I hope people find it interesting - let me know if you have any questions or comments etc.
The following users liked this post:
Dan Martinic (04-23-2020)
#2
Rennlist Member
Awesome work, and thank you so much for making it public. It's hard to move the needle anymore in terms of understanding the 944 Turbo, but this most certainly does. You just earned elevendy-two thousand Rennlist points!
The following users liked this post:
divil (04-23-2020)
#4
Drifting
Hey John.. maybe you can figure out a chip mod to alter the boost with the stock cycling valve... then we'd have an adjustable electronic boost control with stock parts! Perfect for smog and those that would like to keep the "stock" look (something I'm partial to )
#5
Thread Starter
Three Wheelin'
In that case, he replaced the MAP sensor because he wanted to go above 1 bar of boost. If you are happy to stay under that level then you could just modify the target boost map. There's an open loop map to get the cycling valve duty cycle in the right ballpark, but I would bet that you could get away without modifying that. Or you could always do some datalogging after remapping the target boost, and get new open loop values from that (I imagine that's how they got them in the first place). You'd have to be careful about how high you go with the stock sensor though - the stock system allows overboost for short periods, but if you're running it at the ragged edge of what the sensor can read (1 bar above atmospheric pressure) then you have no way of knowing how much you're overboosting. I think replacing the sensor to get some headroom is a safer bet.
Of course no matter what, you'd have to pair any mods like this with a suitable DME chip like Vitesse or similar that will handle the extra airflow correctly.
I might give this a shot at this at some point. My main goal with this was to figure out exactly how it all works, and to explain it. But now that I've done most of the figuring out, and a decent bit of the explaining, I am curious to know how it would turn out if I tinker with the map a little. I hope that isn't the beginning of that legendary "slippery slope" I've heard so much about....
#6
Drifting
That is an interesting thread! Now I am a little confused about something. I have a manual boost control, the A-Tune which uses its MAP sensor, and I have the stock KLR with its own MAP sensor. I set my boost around 15 psi max. Clearly, the KLR reads this as overboost. Does it not react?
What's the point of keeping the line feeding the KLR's MAP sensor?
What's the point of keeping the line feeding the KLR's MAP sensor?
#7
Thread Starter
Three Wheelin'
That is an interesting thread! Now I am a little confused about something. I have a manual boost control, the A-Tune which uses its MAP sensor, and I have the stock KLR with its own MAP sensor. I set my boost around 15 psi max. Clearly, the KLR reads this as overboost. Does it not react?
What's the point of keeping the line feeding the KLR's MAP sensor?
What's the point of keeping the line feeding the KLR's MAP sensor?
That said, we had a long and interesting thread recently where oddjob said that he could never get the KLR to throw overboost codes no matter how much boost he ran. So the final answer has to be: I don't know. Have you ever checked for a blink code? It could take several seconds at full boost to trigger it, because it does have some allowance for temporary overboost. Maybe the reason people don't see the code is that you actually can't stay on full boost for very long on the street, and on the track you have other things on your mind.
The microcontroller code that handles the blink codes is on my list to document on the site. From my initial reading and calculations, the overboost blink code should be triggered if you exceed target boost by 0.25 bar for a few seconds. But it has to be sustained for that time. The time required to trigger it is much lower if the actual boost is 1 bar or more, so if you're at 15psi for several seconds then I'd expect the code to come up. But I might have missed something. The time is counted in engine cycles so it should take longer at lower rpm.
Trending Topics
#8
Drifting
I've never seen a blink code. I made a wire with proper ends to fit the sockets, but all I can do is disable the ICV; I can't get my 12v LED to light up at the same time.
I recall reading that some early chips came with a KLR chip. So yes, there's been work here before. This leads me to understand that previous aftermarket solutions weren't so unsophisticated as we make them out to be: a limit of 14.5 psi isn't exactly slow and frankly, as you say, you can't really hold high boost for long on the street.
The concept of the cycling valve and KLR control seems far more advanced than my current "modern" manual boost control setup (of course, the A-Tune DME chip is more advanced). This was quite the system for the 80s though!
#9
Thread Starter
Three Wheelin'
I've uploaded a pretty big update to the site: https://jhnbyrn.github.io/951-KLR-PA...detection.html. This gets into the routine that handles knock detection and mitigation. This is definitely the single biggest chunk of code and it took the longest by far to document. There's still a few little things to be done to clean it up, but it's mostly there. I've also added a section on the exponential smoothing function that's used all over the place in the KLR code.
In other news, I've done some experiments to see what it really takes to trigger the high/low boost blink codes, since there's been a lot of discussion about those, and I've failed miserably so far. First I disconnected the boost signal from the KLR, and left the MAP sensor floating. This means that the KLR always sees atmospheric pressure, and thinks that no boost is building, even though the car was boosting just fine. On the scope I could clearly see the cycling valve duty cycle working like crazy to try to build boost, but I could not get the low boost blink code to trigger.
Next I attached a Mityvac to the MAP sensor and pumped it up to 15psi. Again, I could see the results in scope trace of the CV signal when boosting - it was pulling the duty cycle back to try to pull boost. But it would not trigger the high boost code for me! So I'm a bit surprised, but not totally defeated yet. I will try a really long pull in 3rd or 4th gear. My best guess at this point is that I just haven't sustained the condition for long enough. But I've definitely exceeded 4 seconds and I thought that would be enough. The trouble is you can't stay on the boost forever...
In other news, I've done some experiments to see what it really takes to trigger the high/low boost blink codes, since there's been a lot of discussion about those, and I've failed miserably so far. First I disconnected the boost signal from the KLR, and left the MAP sensor floating. This means that the KLR always sees atmospheric pressure, and thinks that no boost is building, even though the car was boosting just fine. On the scope I could clearly see the cycling valve duty cycle working like crazy to try to build boost, but I could not get the low boost blink code to trigger.
Next I attached a Mityvac to the MAP sensor and pumped it up to 15psi. Again, I could see the results in scope trace of the CV signal when boosting - it was pulling the duty cycle back to try to pull boost. But it would not trigger the high boost code for me! So I'm a bit surprised, but not totally defeated yet. I will try a really long pull in 3rd or 4th gear. My best guess at this point is that I just haven't sustained the condition for long enough. But I've definitely exceeded 4 seconds and I thought that would be enough. The trouble is you can't stay on the boost forever...
#10
I wonder if there is a way to intercept the signal coming out of the map sensor, and alter it, lowering the value slightly
#11
Rennlist Member
The KLR wouldn't know how far the boost is above the sensor's range though. Now if you were to replace the sensor with one having a higher range (up to 3 bar absolute for example) and set the target in the code where you'd like it...
#12
Thread Starter
Three Wheelin'
That said, I agree that changing the target maps is the way to go if you want to make changes (and the sensor if necessary). There are absolute values that you'd be changing if you mess with the signal, such as the amount of boost pulled when knocking, and various thresholds for PID control and overboost errors. But perhaps more importantly, I'm not sure how much of a change you can make by just interfering with the feedback signal anyway. I've done plenty to artificially change the signal (as described in my previous post) and honestly I didn't feel as big a seat-of-the-pants change as you might expect. This suggests that the closed loop algorithm is only capable of relatively small adjustments, and you really need to change the base open loop map to get big changes. That makes sense anyway: it's why they go to the trouble of adding open loop maps.
I have a few 2732A eproms on the way from eBay (the type used in the KLR) so I might do some experimentation at some point.
#14
Thread Starter
Three Wheelin'