N54 Solenoid Direct Injectors + Custom ECU Build

ccr0ss

New Member
Feb 21, 2025
9
8
0
Hello,

I have been working for sometime on figuring out how to make N54-powered cars easier to own and maintain. I currently own a 2008 E61 that I got at the end of last year, but this would be my third N54-powered car in the last 13 years. As I'm sure most of you know, some of the most aggravating issues of the N54 are related to the DI system. It seems to be the case that HPFP issues have been sorted by BMW in later revisions of the pump. Our fuel injectors, however, still need considerable attention considering how common it is for them to leak. I know how a $2.5K initial investment for lifetime injectors using one of the two vendors we know of may be reasonable for some, but I am not sold on this path. Which brings me to what I am currently working on right now:

I decided to find a way to run Bosch HDEV 5.2 solenoid direct injectors (the ones on the N55 and newer BMW engines) and this is what I came up with:

1. The injector bore on the N54 is about 1mm smaller at the top than it needs to be to accommodate for the HDEV injectors. The bore would need to be increased to about 21mm at a depth of at least 27mm from the piezo solenoid decoupling element seat. I am actually going for about 33mm depth because I am adding a 5mm 6061 aluminum washer to the bottom of the newly drilled bored so that the HDEV injector decoupling elements can sit properly (the decoupling element on these injectors are smaller than those on the piezo injectors). I took the head to machine shop to have it resurfaced and to increase the bore on the injector holes. I know very little about machining terms, pardon any misuse here.

2. The most difficult part is figuring out how to run the damn thing. I could get a Delta GDI6 and call it a day, but I wanted something that would integrate better with my E61, while also giving me the chance to work on something fun while going to school. So, I decided to design my own ECU and make it opensource. My primary intention was to build an ECU that can run my Frankenstein's N54 while also giving me the ability to avoid some of the BMW idiosyncrasies. So, here's what the prototype ECU is offering at the moment:

6x direct solenoid injectors
6x port injectors
Support for all the engine-critical sensors and actuators found in the N54/N55/S55/B58/S58
Support for 2x EWGs (in case I find an S55 laying around somewhere)
Support for dual HPFPs
Bluetooth and GPS modules
Data logging through USB, limited on-board data logging
2x wideband and 2x narroband sensors
2x LIN/BSD interfaces
2x FDCAN interfaces
Diagnostics for every input/output
No valvetronic support.

My main constraints for the ECU are: 1) the board components need be to as inexpensive as possible ($175-$250 per board without enclosure or header for an order of 5 is the target), 2) the components need to be readily available at LCSC given that I will be using JLCPCB to print the PCB. The ECU is powered by the STM32H743IIT6 MCU, uses the NXP MC33PT2000 from NXP for DI control, and Molex Compactus 186-pin connector. I want to run it barebones eventually, but I think branching out the rusEFI project may be the proper start for the project. It has taken my a while to design the PCB. My first design was based on the Core8 ECU designed by a guy named Ben from the UK/Lithuania. Adding DI, EWGs, BT/GPS, and LIN/BSD has forced me to reinvent the PCB a few times. I should have the PCB files available online in the next month or so.

I will be posting pictures of the work as I move forward with the project. I would appreciate your feedback, specially on the features of the ECU, as this is my first time building something like this.
 
Last edited:

mcprogram

New Member
Apr 3, 2025
2
2
0
I would be in for 1 at your price point and would be happy to design and 3D print enclosures for it when the time comes.

My first recommendation would to be adding ethanol sensor support without a Motiv box. I think the motiv is just a DAC to convert the 5v to a digital signal and giving it to MHD as an extra input, but I could be wrong. I have a second sensor I wouldn't mind sending over if you need one. Second recommendation would be an extra CAN module (or even a ESP32 on a separate 6 pin plug or something) onboard that emulation command sets can be uploaded to directly. A few years ago I saw that someone had bridged the F01 and E92 cruise control modules with a custom emulator to get radar stop/go cruise working on an E90. Saw a different guy make an emulator for the x-drive transfer case with a manual dial to remove CEL's. Having an onboard, writable emulator to get odd features from different cars (or remove incompatibilities) would be a lot easier then making a new little board every single time.

Lastly, and it would be a long shot, but at least having the expansion capability for 8HP TCU control with a seperate daughter board translator on the transmission, al-a FuelTech would be super interesting. I have CanTCU, and I absolutely love it, but enabling line lock while turning off my transfer case would be a pretty fun party trick.

Defintely here for this and would love to be a part of it, even though I am nowhere near the level of low level computer engineering/ee needed to be of any techincal help. Best!
 

ccr0ss

New Member
Feb 21, 2025
9
8
0
I would be in for 1 at your price point and would be happy to design and 3D print enclosures for it when the time comes.

My first recommendation would to be adding ethanol sensor support without a Motiv box. I think the motiv is just a DAC to convert the 5v to a digital signal and giving it to MHD as an extra input, but I could be wrong. I have a second sensor I wouldn't mind sending over if you need one. Second recommendation would be an extra CAN module (or even a ESP32 on a separate 6 pin plug or something) onboard that emulation command sets can be uploaded to directly. A few years ago I saw that someone had bridged the F01 and E92 cruise control modules with a custom emulator to get radar stop/go cruise working on an E90. Saw a different guy make an emulator for the x-drive transfer case with a manual dial to remove CEL's. Having an onboard, writable emulator to get odd features from different cars (or remove incompatibilities) would be a lot easier then making a new little board every single time.

Lastly, and it would be a long shot, but at least having the expansion capability for 8HP TCU control with a seperate daughter board translator on the transmission, al-a FuelTech would be super interesting. I have CanTCU, and I absolutely love it, but enabling line lock while turning off my transfer case would be a pretty fun party trick.

Defintely here for this and would love to be a part of it, even though I am nowhere near the level of low level computer engineering/ee needed to be of any techincal help. Best!
Thank you for the suggestions, I sincerely appreciate them! Designing the enclosure would be a fantastic contribution, and 3D printing would keep the cost low, which is a plus. We would need to see about the thermal requirements of the PCB once the design is finalized.

I am planning on integrating native flex-fuel support into the design. I don't have a flex-fuel sensor at the moment, but I am basing my design on the Continental sensor's digital (PWM) 5V output. I was planning on getting a sensor for testing soon enough, but if you have one laying around, I'll be happy to play with it and return it when I'm done.

I see your point on adding an extra CAN module. I'll spend some time thinking about how to get this done. The main microcontroller I am using only offers 2x CAN peripherals, and I have already used all the pins on the microcontroller for other stuff. I may be able to free up a pin and do something through SPI, though. I'll keep you posted.

On the 8HP, my intention is to add native support for 6HP/8HP communication. At the moment, I am focusing my efforts on getting the ECU to properly communicate with the 6HP that is currently found on E-chassis cars, but I did get an 8HP transmission last week so I can start tinkering with it. Do you have any data on the difference between the communication protocols used in the 8HPs, as opposed to the 6HPs?

The insights you are already giving will help me make the ECU initial design more useful. And there's still plenty that would need to be done in the areas of testing and data gathering that could be easily done even with a simple multimeter.
 
Last edited:

ShocknAwe

Captain
Jan 24, 2018
1,683
1
869
0
Charleston, SC
Ride
N54/3 1er ///Mutt
One of the highest selling points of the N54 is the piezo injectors...

Take those away and what's special about it? I'm not sold on the idea. I'd probably leave the platform if the fueling didn't work as well. The capabilities of the N54 DI system are really astounding.

I have two sets of piezo injectors. Plan to send them off for cleaning/rebuild periodically and swap back and forth.
 

ccr0ss

New Member
Feb 21, 2025
9
8
0
One of the highest selling points of the N54 is the piezo injectors...

Take those away and what's special about it? I'm not sold on the idea. I'd probably leave the platform if the fueling didn't work as well. The capabilities of the N54 DI system are really astounding.

I have two sets of piezo injectors. Plan to send them off for cleaning/rebuild periodically and swap back and forth.
The way I see it, running S55/S63 injectors would give the N54 about the same practical fueling capabilities as we now have with the piezo injectors, but at a significantly lower entry/maintenance price, increased reliability, and more availability. Technically, piezo injectors are better than solenoid injectors for a few reasons, but none of those reasons are particularly relevant for the discussion based on the way BMW did things.

That being said, I understand where you're coming from. I don't think the work I'm doing would appeal to people that are in a similar position to yours, having multiple injectors in store so that they may be rebuilt. I don't have an extra set of piezo injectors, so going with solenoid DI and standalone is more cost-effective for me. Also, I want to have more control over other functions of the engine and the car, which this standalone would give me.
 
Last edited:

ShocknAwe

Captain
Jan 24, 2018
1,683
1
869
0
Charleston, SC
Ride
N54/3 1er ///Mutt
Makes sense if you're willing to add control modules and standalone ECUs. I'm definitely not. Less is more. May want to talk to MHD and see if there's a way the factory DME can support it.
 

ccr0ss

New Member
Feb 21, 2025
9
8
0
Makes sense if you're willing to add control modules and standalone ECUs. I'm definitely not. Less is more. May want to talk to MHD and see if there's a way the factory DME can support it.
The electrical driving circuitry for the piezo injectors is not compatible with solenoid injectors. Piezo injectors require alternating power between the two pins to open and close the injectors (bipolar, driven-high circuitry vs bipolar driven-high-and-low circuitry for solenoid DI), and they operate at a significantly higher peak voltage than their solenoid counterparts (140-200V vs 65V for solenoid DI).

There's is a way to add solenoid DI with the MSD80/1. One would need to make an intermediary module that would take the driving signals from the MSD80/1, absorb/dissipate the high voltage created by the DME, and use the now lower voltage signals to indicate to a microcontroller when to open and close the solenoid DI while providing the proper voltage conversion for them (65V for peak) and consideration for varying amounts of injections per cycle. Half of what's needed is provided by NXP's MC33PT2000 evaluation board, but this option didn't appeal to me as much as the standalone option. There's more flexibility in the standalone route, and the price for the module wouldn't be that far off from a full-blown standalone to justify the time investment.
 
Last edited:

ccr0ss

New Member
Feb 21, 2025
9
8
0
Here's a list of basic inputs and outputs for you to evaluate and give suggestions on. The positions on the list are arbitrary, and exclude the LIN/BSD inputs (oil quality, temperature, level, alternator/battery, etc.) and outputs (electric water pump on N54/N55 non-PWM), and solenoid direct injectors:

Driven-High Outputs:
  1. Ignition coil 1
  2. Ignition coil 2
  3. Ignition coil 3
  4. Ignition coil 4
  5. Ignition coil 5
  6. Ignition coil 6
Driven-Low Outputs:
  1. VANOS solenoid (IN, PWM?)
  2. VANOS solenoid (EX, PWM?)
  3. Boost solenoid 1 (PWM)*
  4. Boost solenoid 2/diverter valve (PWM)*
  5. MAP thermostat
  6. Crank breather Heater
  7. Exhaust flap
  8. Vent valve solenoid
  9. Leak valve solenoid
  10. EBOX fan*
  11. DME Relay
  12. HPFP flow control valve 1 (PWM)
  13. HPFP flow control valve 2 (for S55 dual pump support, PWM)*
  14. 02 narroband heater 1*
  15. 02 narroband heater 2*
  16. Aux water pump 1 (for N55/B58 support, PWM?)*
  17. Aux water pump 2 (for N55/B58 support, PWM?)*
  18. Aux water pump 3 (for B58 support, PWM?)*
  19. Port injector 1*
  20. Port injector 2*
  21. Port injector 3*
  22. Port injector 4*
  23. Port injector 5*
  24. Port injector 6*
Signal Outputs:
  1. Electric fan (PWM)
  2. Electric water pump* (non-BSD, PWM)
Analog Inputs:
  1. Throttle position 1
  2. Throttle position 2
  3. Throttle pedal position 1
  4. Throttle pedal position 2
  5. Engine coolant temp
  6. Radiator coolant temp*
  7. Oil pressure
  8. TMAP (temp)/MAF*
  9. TMAP (pressure)/MAF*
  10. MAP/MAF*
  11. High-side fuel pressure
  12. Low-side fuel pressure
  13. Ambient temperature
  14. Brake vaccum*
  15. O2 wideband 1
  16. O2 wideband 2
  17. O2 narrowband 1
  18. O2 narrowband 2
  19. EWG 1*
  20. EWG 2*
  21. Knock 1
  22. Knock 2
  23. Spare
Digital inputs:
  1. Crankshaft position
  2. Camshaft position (IN)
  3. Camshaft position (EX)
  4. Camshaft position (HPFP)*
  5. Coolant Level Switch?
  6. Flex-fuel*
  7. Neutral switch
  8. Brake switch
  9. Clutch switch*
  10. Inmobilizer signal
  11. Spare
  12. Spare
*Input/output may be free/spare depending on platform (E9X vs E6X), engine (N54, N55, B58), transmission (manual vs. auto), fuel injection type (dual, DI, PI), and/or wastegate control (PWG vs EWG).
 
Last edited:
  • Like
Reactions: wheela

wheela

Major
Jun 4, 2021
1,548
893
0
Twin Cities, MN
Ride
2015 e84 X1 35i Msport
This is a cool project👍

Would you unclude an output for the diverter valve for n55? I believe it's a pwm output like the boost solenoids, but I don't know if it's a standard 32Hz signal or high frequency like the boost solenoids.
 

wheela

Major
Jun 4, 2021
1,548
893
0
Twin Cities, MN
Ride
2015 e84 X1 35i Msport
Also, would the boost solenoid outputs be switchable from high frequency to low frequency so they can control both vacuum solenoids or mac valves?
 

ccr0ss

New Member
Feb 21, 2025
9
8
0
This is a cool project👍

Would you unclude an output for the diverter valve for n55? I believe it's a pwm output like the boost solenoids, but I don't know if it's a standard 32Hz signal or high frequency like the boost solenoids.
I didn't even think about diverter valves in newer BMW engines! I just assumed everything was pneumatic (facepalm)... I couldn't find a wiring diagram for the diverter valves, but I assume they are driven low (the ECU grounds the solenoid to activate them) like most automotive solenoids. If we can confirm that with a wiring diagram, then we can use any free/spare low output to drive them. If they are driven high (the ECU provides power to the solenoid), then it will get more complicated. Also, I am not sure the diverter valves require PWM control. I think they just require precise knowledge of how long it takes for them to open and close based on specific pressure in the intake track.
 
Last edited:
  • Like
Reactions: wheela

wheela

Major
Jun 4, 2021
1,548
893
0
Twin Cities, MN
Ride
2015 e84 X1 35i Msport
I didn't even think about diverter valves in newer BMW engines! I just assumed everything was pneumatic (facepalm)... I couldn't find a wiring diagram for the diverter valves, but I assume they are driven low (the ECU grounds the solenoid to activate it) like most automotive solenoids. If we can confirm that with a wiring diagram, then we can use any free/spare low output to drive it. If they are driven high (the ECU provides power to the solenoid), then it will get more complicated. Also, I am not sure the diverter valves require PWM control. I think they just require precise knowledge of how long it takes for it to open and close based on specific pressure in the intake track.
Sorry, I don't have any diagrams for the diverter valve, or any tech docs describing it's control scheme😕
 

mcprogram

New Member
Apr 3, 2025
2
2
0
One of the highest selling points of the N54 is the piezo injectors...

Take those away and what's special about it? I'm not sold on the idea. I'd probably leave the platform if the fueling didn't work as well. The capabilities of the N54 DI system are really astounding.

I have two sets of piezo injectors. Plan to send them off for cleaning/rebuild periodically and swap back and forth.
They are also the lowest selling point of the N54, and reliability is largely why they moved away from the technology as a whole in all of their engines. Other M platforms with solenoid injectors have proven to deliver enough juice to hit high 600's, and anything past that can be handled by PI. People are into the N54 for cheap power, not because it's the pinnacle of technology, even though people across these forums still continue to amaze me with the amount of effort put into this platform.

A few other things, unfortunately I do not have any sniffed data on 8HP communications. I bought the CanTCU and threw it in. I do know that coding on the ECU side is incredibly minimal to get it to function. CanTCU says the transmission is in 5th and has an internal counter for every shift request past that is passed to the TCU. I'm sure they are incredibly similar though, I have seen rumblings of a guy who was able to enable it just with a repin of the harness to the new connector and a proprietary flash. Haven't seen any proof of it actually working though.

I have a personal project I'm in the midst of developing (or saving $ to develop), that would be a low driven output. Is the firmware going to be modular enough that I could swap the crank breather heater out for this (as it would make the crank breather heater redundant)?

If you are going to buy a sensor to actually run on your E60 defintely go ahead (The AC Delco one is still conti produced but usually 20% cheaper), but if it's just to test definitely let me send you one. Shoot me a PM when you want it.
 
  • Like
Reactions: wheela and ccr0ss

ccr0ss

New Member
Feb 21, 2025
9
8
0
They are also the lowest selling point of the N54, and reliability is largely why they moved away from the technology as a whole in all of their engines. Other M platforms with solenoid injectors have proven to deliver enough juice to hit high 600's, and anything past that can be handled by PI. People are into the N54 for cheap power, not because it's the pinnacle of technology, even though people across these forums still continue to amaze me with the amount of effort put into this platform.

A few other things, unfortunately I do not have any sniffed data on 8HP communications. I bought the CanTCU and threw it in. I do know that coding on the ECU side is incredibly minimal to get it to function. CanTCU says the transmission is in 5th and has an internal counter for every shift request past that is passed to the TCU. I'm sure they are incredibly similar though, I have seen rumblings of a guy who was able to enable it just with a repin of the harness to the new connector and a proprietary flash. Haven't seen any proof of it actually working though.

I have a personal project I'm in the midst of developing (or saving $ to develop), that would be a low driven output. Is the firmware going to be modular enough that I could swap the crank breather heater out for this (as it would make the crank breather heater redundant)?

If you are going to buy a sensor to actually run on your E60 defintely go ahead (The AC Delco one is still conti produced but usually 20% cheaper), but if it's just to test definitely let me send you one. Shoot me a PM when you want it.
Your observations about DI and the current value of the N54 are on point. It is precisely because how cheap and abundant these engines are that I decided to involve myself in this project. Of course, I do have an N54 powered vehicle, which kind of helps. One could buy a used engine, rebuild it, upgrade the important parts to push 500-600hp, modify the head to accommodate for solenoid injectors, and print the new ECU PCB for less money than it would take to get a used S55, wich would be an unknown quantity unless one opens it up, and makes sure everything is alright. And if you're going through the trouble of tearing a 6k+ engine up, why not dump 2k-5k rebuilding it while in there. With so much potential value on the N54, why not put some work into it, especially if it is all for good fun?

On the 8HP, I found a link that led me to a discord channel with incredibly useful information on the 8HP retrofit. Some E-chassis owners have accomplished the swap by using E84 valve bodies, a new connector, and some coding/programming, which is the route I am going for now. It may take some time and money, given that I don't have a set of F-chassis modules to figure it out yet, but I'm committed to figuring out full 8HP integration eventually. Here's the link for the thread: https://www.e90post.com/forums/showthread.php?t=2188085. The link to the discord is there, too.

On the crank breather heater, the answer is yes. Almost all inputs and outputs are going to be independent, which means you would be able to connect whatever you want to them as long as you respect their electrical characteristics. Firmware will also be as modular as we can make it.

I'll send you a PM for the sensor
 
Last edited:
  • Like
Reactions: wheela