In the last post I said the MEG’s internal state used to be a locked box, and that once you can reach into it safely the list of what becomes possible gets very long. This is the first thing off that list, and it’s the one I’ve wanted since I started tuning these cars.
Multi-map switching. Three different tunes in the one ECU, selected from the driver’s seat using the gear stick, with the gear display on the dash showing you which map you’re on.
It works. I’ve got it running in the car.
Why bother?
Anyone who’s had a tune done knows the compromise. A map that’s great on a track day isn’t always what you want in traffic, and a map that’s perfect for the daily commute leaves something on the table when you want to have fun. Normally you pick one and live with it, or you pull the ECU and reflash it every time you change your mind.
With multi-map you don’t have to choose. You could have a mild map, the full tune, and a third for whatever suits you, all living in the one ECU and swapped in a few seconds without a laptop in sight.
None of this is new (on other ECUs)
Same as last time, I want to give credit where it’s due. Map switching on Bosch ECUs is well established. People in the diesel world have been doing it on the EDC15 for years, and there are commercial products for the newer Bosch platforms that do it very nicely, saving your chosen map and locking out changes while you’re driving. I looked hard at how they all do it before I wrote a line of my own.
But none of it exists for the MEG1.1. Different chip, different memory layout, different everything. So as usual, the ideas are borrowed and the work is from scratch.
The trick Bosch left behind
Here’s the bit I really like about this one.
Bosch built the MEG1.1 to run more than one car. The same ECU went into the Fortwo and the Roadster in different power outputs, and rather than build a different ECU for each one, Bosch put several complete calibrations into the one FLASH. There are three full calibration blocks in there. When the ECU boots, it looks at the coding in the EEPROM (the same coding I wrote about in the EEPROM post) and picks which block to run for that car. After that, the other two just sit there doing nothing for the life of the car.
So the room for three maps was already there. Bosch built the house with three bedrooms and only ever let you use one. The job was to work out how the ECU picks its block, and then teach it to pick a different one on command, while it’s running.
That turned out to be the hard part.
What it’s like to use
From the driver’s side it’s simple:
- Sitting still, lever in D, hold + for three seconds. The gear display changes from your gear to a number, 1, 2 or 3. That’s the map you’re currently on.
- Tap + or – to step through the maps. Nothing changes yet, you’re just choosing.
- Hold + for three seconds again to confirm. The new map goes live, the number stays up for a moment so you know it took, and the display goes back to showing your gear.
- Walk away mid-selection and after ten seconds it quietly cancels without changing anything.
No switches to fit, no wiring, no extra hardware. It uses the gear stick and dash that are already in the car.
Reading the gear stick
To make that work I had to understand the gear stick at a level the MEG never shows you.
It turns out the lever isn’t a smooth sensor at all. It’s a little bank of switches, and each position (R, N, D, + and -) closes a different pair of them. The MEG reads those switches, cleans them up, and decodes the pattern into what you asked for. Tracing that path through the disassembly told me exactly which pattern means +, which means -, and, just as importantly, which patterns I must never touch. I actually had + and – backwards in my first attempt, and one of my early candidate patterns turned out to be neutral. That’s the sort of mistake you want to make on the bench and not on the road.
The other job was making sure a “hold” and a “tap” can never be confused. Taps are only counted when you let go, and a press held past the threshold isn’t a tap. So the long hold that confirms your map can’t also step you on to the next one.
Talking to the dash
The dash display was a nice surprise. The instrument cluster doesn’t work out what gear you’re in, it just draws whatever character the MEG tells it to over the CAN bus. So a small routine sits in the path of that message and, only while you’re selecting a map, swaps the gear character for a map number. The rest of the time it leaves the factory message completely alone.
That’s the CAN work from the last post paying off again. Once you know which message carries what, and you can write your own code into the path, the dash becomes a display you can use.
The part that took the longest
Getting it to switch at all wasn’t the end of it. The first version looked like it worked. Pick map 2, confirm, and the car was on map 2. Except not all of it was.
The ECU doesn’t run as one program in a loop. It’s lots of separate tasks running at different rates, some every millisecond, some every ten, and one big background loop that ticks away whenever there’s time spare. Most of those tasks look up which calibration block they should be using every time they run, so they followed the switch straight away. The background loop didn’t. It set itself up once at startup and never looked again, so it quietly kept reading from the old map. Hundreds of values, including some that my tunes actually change.
Nothing in the disassembly tells you that. There’s no comment saying “this part never checks again”. I only found it by mapping out every task the ECU runs and following every path the code can take, then asking which parts could still see the old block after a switch. The fix was small once I knew. Finding it was not.
There’s a related catch that no clever code can get around. A small number of values (forty-odd in my files) are only read once, while the ECU is starting up, and then kept. A change to those only takes effect at the next key-on. Commercial map switches on other Bosch ECUs have exactly the same limitation, and my tool now checks for it and warns me if the maps differ in any of those values, so there are no surprises.
Safety first
I’ll say this plainly because it matters. Changing the tune on a running engine is not something to do casually.
- Map changes are only accepted while the car is stationary. Try it while moving and it refuses. That check reads the same speed signal the ECU already uses for its own decisions.
- Every map in the ECU is a complete, validated tune, with its own checksums sorted. There’s no half-finished state it can switch into.
- If the ECU is ever unsure about the stored choice, it falls back to the car’s normal coded map.
- There’s an escape hatch. Hold – while you turn the key on and the car starts on its factory map, whatever was selected before.
And everything has been tested on my own car and on the bench first. I don’t put anything on a customer’s car that hasn’t been through that.
Remembering your choice
The last piece is remembering which map you chose, so it’s still on that map the next time you start the car. The MEG already writes things like clutch and gearbox learning to its EEPROM when you switch off, so the natural place to keep your choice is right alongside them, written during that same shutdown.
Getting that right took a proper deep review of how the ECU starts up and how it looks after its EEPROM, because this is the kind of feature that’s easy to get almost right. That work is done and it’s on the bench now. I’ll confirm it here once it’s proven, not before.
What’s next
I built a tool to go with this, so a map switch can be installed onto a tune cleanly, checked, and removed again if needed, with everything verified before a single byte is written. It already handles both the normal Roadster and Fortwo software and the Brabus software. The Brabus version still needs its turn on the bench before I’ll call it done.
Launch control is still in the “in progress” column. It’s getting closer, and a lot of what I learnt doing this map switch feeds straight into it.
As always
This is bespoke work, and it’s at the frontier of what’s known about this ECU. I’m happy to share what it does and roughly how it works, but the exact how stays between me and the cars I do it on.
If you’d like multi-map on your Smart, whether that’s a mild and a wild map or something more specific to how you use your car, get in touch.
Big thanks as always to Mike Bailey at 223D Developmental and to Andrew at Smart Automotive.
More to follow.
Tom South Australia WhatsApp: +61 401 723 903