Cloning Bosch EDC15C6 ecu (CR2.x) with just an arduino and SD card module

JoeHorner

Senior Member
Joined
Aug 21, 2022
Messages
132
Reaction score
165
Your Mercedes
2003 W203 C270CDI Elegance
Thought this might be of use to someone out there.

After a year of not getting round to fully diagnosing it, a couple of weeks ago confirmed that the intermittent "limp" on our W203 C270CDI was being caused by an ECU fault (bad internal barometric pressure sensor). The sensor isn't available as far as I could find so the only solution was to replace the ECU. The obvious options were to buy a renewed ECU and fit using xentry or pay for someone to clone the existing one. Both would have been about £250 - £300 which would have been worth it but I hate paying when I don't need to.

The ECUs are available from a certain auction site from about £30-£40 but, obviously, won't just plug & play thanks to the drive authorisation system. A fair bit of digging around on less reputable forums showed that the relevant data is held in a 5P08 eeprom chip. This is a 1kB serial eeprom which is so old now that most current eeprom readers don't know how to deal with it. But it uses an SPI interface, which is available with the good old Arduino. A few evenings playing with the chip's data sheet and writing some code produced a system which would happily read the contents of the old ECU and then write them to the new one, verifying the write as it goes.

If you had to buy everything new, total cost of building the programmer would be under £25. I had everything lying around so cost was basically nothing!

Here's the ECU (for recognition purposes):

Ecu_front.jpg
ECU_back.jpg

After opening (6x torx screws) the eeprom chip is conveniently visible on the underside of the board:

FullBoard.jpg
Chip_detail.jpg

Having built the programmer using a breadboard (details and Arduino code below), all that was needed was to connect to the chip. You can do that by carefully soldering 6 fly-leads to its pins or using an SOIC8 test clip if you have one handy:

Wired_Up.jpg

And then power up the arduino. You don't need to have it connected to a computer but having the output going to the arduino serial monitor gives useful feedback that everything's working properly. The initial screen once powered up looks like this:

Start_screen.jpg

Pressing the "read" button on the programmer (the LH one in the layout below, connected to Arduino pin 7) will start the read process:


Note that, if the values coming up on the screen are ALL "FF" then it means there's a problem and it's failing to read properly. Check your connections and try again!

Once you're happy with the read, disconnect from the old ECU and connect to the new one. Then press the "Write" button and wait for it to complete. It writes in 4 blocks blocks of 256bytes each, and reads each byte back after writing to verify a successful write. The verification is reported at the end of each block:


Once you're done, disconnect, put the lid back on, fit to your car and you're done. The car simply won't know it's not using the old ECU anymore :)

It's worth noting that it'll likely be quite lumpy for the first minute or two as the "new" ecu gets used to the new engine's needs.

The Arduino circuit is as follows. I had to use a 25LC chip in the layout because I didn't have an icon for a 5P08 but the connections are exactly the same (with the writing the same way up). The SD module connections, from top to bottom, are:

* Gnd
* +5v
* MISO
* MOSI
* SCK
* CS


The arduino code (with far too many comments included) is in the attached file if anybody needs it.

5p08Programmer_bb.jpg
 

Attachments

  • ECU_back.jpg
    ECU_back.jpg
    221.3 KB · Views: 12
  • 5P08_Arduino_annotated.txt
    8.1 KB · Views: 16

zedmeister

Senior Member
Joined
Sep 5, 2005
Messages
331
Reaction score
8
Location
Watford, Herts.
Your Mercedes
CLK C208/2002/3.2, C Class S205/2019/220d, E class cab A124/1996/2.2
Amazing article - should be kept as a reference!
 
OP
J

JoeHorner

Senior Member
Joined
Aug 21, 2022
Messages
132
Reaction score
165
Your Mercedes
2003 W203 C270CDI Elegance
  • Thread Starter
  • Thread starter
  • #3
Amazing article - should be kept as a reference!
Thanks, and hope it helps someone :)

Obviously, a minimal familiarity with Arduino would be useful but hopefully anyone considering playing around with ECUs will find that easy (and interesting) enough to learn if they need to - there's a whole world of tutorials out there for that
 

harrye500

Senior Member
Joined
Feb 21, 2017
Messages
695
Reaction score
626
Location
Cheshire
Your Mercedes
2010 A207 E500 (the Summer Car and Winter Garage Queen)!
Very good, love reading interesting articles like yours plus it saved you a few bob as well! Winner in my book.
 

BillyBoy

Senior Member
Joined
Aug 28, 2003
Messages
1,194
Reaction score
457
Your Mercedes
W213 E400d All Terrain
Very cool, but could you not have just de-soldered the EPROM from your ECU and soldered into the replacement unit?
 
OP
J

JoeHorner

Senior Member
Joined
Aug 21, 2022
Messages
132
Reaction score
165
Your Mercedes
2003 W203 C270CDI Elegance
  • Thread Starter
  • Thread starter
  • #6
Very cool, but could you not have just de-soldered the EPROM from your ECU and soldered into the replacement unit?
Yes, I could have, but I don't do a lot of SMD soldering so it would have carried some risk doing it that way. This way is pretty much risk free.

It also gives the option if, for any reason, your old ECU isn't readable, of reading the "new" one, virginising the file, and pairing it to the car through xentry. But that involves software that I believe is frowned on around here
 

nick0601uk

New Registration
Joined
Oct 15, 2024
Messages
1
Reaction score
0
Your Mercedes
316 cdi 2004 2.7 diesel
Hi there, brilliant article, which I'm hoping I can make some use of.. I have an Mercedes ECU A612 153 47 79 CR 2.36 2.7L. which i need to replace because it has faults, is it possible using your method above to copy the entire software from the old unit to a second hand one please? would i also need to find a way to stop the immobiliser from functioning or would you know if it is possible to also update that file on the new one from the ignition bezel? thanks for any help, I'm just starting out with this, so just getting up to speed
 
OP
J

JoeHorner

Senior Member
Joined
Aug 21, 2022
Messages
132
Reaction score
165
Your Mercedes
2003 W203 C270CDI Elegance
  • Thread Starter
  • Thread starter
  • #8
Hi there, brilliant article, which I'm hoping I can make some use of.. I have an Mercedes ECU A612 153 47 79 CR 2.36 2.7L. which i need to replace because it has faults, is it possible using your method above to copy the entire software from the old unit to a second hand one please? would i also need to find a way to stop the immobiliser from functioning or would you know if it is possible to also update that file on the new one from the ignition bezel? thanks for any help, I'm just starting out with this, so just getting up to speed
I'm not expert enough to know if the slightly different part number and later software revision will make any difference but, if it's the same Bosch ECU as mine, and has that 5P08 eeprom chip, then it should work to transfer the immo data - that was exactly what I built it for for my one.

It doesn't copy the main firmware, just the immobilizer data held in that chip. But, if you have a replacement ECU of the same type and revision, then that's all you need to plug & go with it. Once that chip is copied the rest of the car genuinely won't know that it's not still the old ECU still fitted.
 

jercalvert

Registered
Joined
Oct 11, 2024
Messages
1
Reaction score
0
Your Mercedes
2002 Sprinter
I am trying to duplicate what Joe Horner did and I am having the sd card not "initialize". I thought it was the soI8 adapter not making contact with the 5p08 legs so I trimmed the adapter and used rubber bands to hold them on. But I am still having problems with getting the sd card initialized. If you aren't a programmer then this is a more difficult task that it may first seem. Hardware wise, I think I have everything hooked up right.
 
Top Bottom