EEVblog Electronics Community Forum

Electronics => Power/Renewable Energy/EV's => Topic started by: Pentoad on August 06, 2020, 08:29:05 pm

Title: Looking to reverse engineer BMW I3 REME Inverter
Post by: Pentoad on August 06, 2020, 08:29:05 pm
Hello, I was wondering what equipment I would require in order to reverse engineer or reprogram this inverter so that it can be used in EV projects? The heart of it seems to be an epm570t100a5n CPLD and it uses 2ED020I12FA gate drivers. This inverter is attached to the generator unit in the car and to start the engine, it uses the 3 phase generator as a motor and once the engine is running, it operates in regenerative mode. I reckon this unit could output 30KW into a motor no problem and looks a lot simpler than other inverters such as those from Tesla or the main inverter in the I3.

[attach=1]

[attach=2]

[attach=3]
Title: Re: Looking to reverse engineer BMW I3 REME Inverter
Post by: tom66 on August 06, 2020, 09:16:25 pm
It's a Bosch, so it will have code protection... they are not stupid (unfortunately)
The CPLD is one part of it, there is almost certainly a DSP or MCU on there?

If there's no MCU on there, then it's probably a very basic unit which accepts PWM commands from an external controller (like Mk1 Prius inverter.)  In which case it is a matter of finding +12V and GND, enable signals, PWM signals and other important signals.

You may get lucky and this is documented in a service manual somewhere - it is for the Prius!
Title: Re: Looking to reverse engineer BMW I3 REME Inverter
Post by: NiHaoMike on August 06, 2020, 10:52:28 pm
The generator could be wound such that it generates the right DC voltage once up to operating speed. To start the engine, it likely uses a state machine to apply pulses to get it up to cranking speed - it only operates as a motor for a very short time so it doesn't make sense to optimize efficiency for that operating mode. Then it adjusts the engine speed to adjust the output voltage.

I don't think it will be capable of outputting any real amount of power in inverter mode for an extended time. Keep in mind that unlike MOSFETs, IGBTs have separate reverse diodes and it's the diodes that handle the rated output power.
Title: Re: Looking to reverse engineer BMW I3 REME Inverter
Post by: Pentoad on August 08, 2020, 01:13:34 pm
The ribbon cable you see attaches to the IGBT board and I think it carries power for the gate drivers, the high and low side PWM signals and phase current sense. I think that the only way to do this is either to write new software for the CPLD, replace the main board with a custom one or somehow find the pinout for the black connector on the unit and figure out what signals would be required to wake the thing up and drive a motor with hall sensors. The engine operates at variable speeds so it's unlikely that it's wound like a normal 3 phase generator which is wound for a particular voltage and speed. This unit could even be very similar to that in the Kia Niro which also uses the motor to start the engine or drive the wheels through a dual clutch transmission.

Another issue is figuring out what is positive and negative on the high voltage input as there are no markings at all.
[attach=1]
[attach=2]
Title: Re: Looking to reverse engineer BMW I3 REME Inverter
Post by: filssavi on August 08, 2020, 03:58:00 pm
Depending on the system design it is very possible (even likely I would say) that the entire control is done in the CPLD, as it will be not much than a couple of PID loops and a 16 bit counter (maybe even less than that), you could totally squeeze them in such a CPLD, esp ci ally if they don’t need any fancy communication, (which I guess They don’t as sure ass hell you can’t fit CANbus into it)
Title: Re: Looking to reverse engineer BMW I3 REME Inverter
Post by: tom66 on August 08, 2020, 06:34:26 pm
Positive and negative on the HV will be very easy to determine.

In reverse there will be two back to back diodes through the IGBTs so approx 2V on diode drop.  You could also test with a current limited PSU.

Alternatively hook up a 400V battery the wrong way will certainly indicate the correct polarity for future modules ... !
Title: Re: Looking to reverse engineer BMW I3 REME Inverter
Post by: Pentoad on August 08, 2020, 07:21:31 pm
Managed to find the polarity, just used a 5v current limited source and 1 is positive and 2 is negative on the orange connector. Damn though, there's a SAK-TC1797-512F180E AC 32 bit microcontroller chip on the back side of the main board so it's a lot more complex than I initially thought. Maybe the best way forward is to find a standard motor controller chip, make a PCB up on easyeda and attach it to the ribbon cable going to the IGBT drivers and current sensors. The socket for the ribbon cable is made by ERNI electronics and maybe mouser sells them. Just choosing a suitable chip will be difficult.

 [attachimg=1]
Title: Re: Looking to reverse engineer BMW I3 REME Inverter
Post by: tom66 on August 08, 2020, 07:37:12 pm
I suspected there might be a TriCore on there, it seems to be Bosch speciality. 

There are some exploits that can dump firmware from these devices, but you'd still need to understand quite a bit about the architecture to pull that off.

Alternatively if you could somehow get access to an i3 you might be able to dump the CANbus data that reaches this module to see how it works... not easy though.
Title: Re: Looking to reverse engineer BMW I3 REME Inverter
Post by: Pentoad on August 08, 2020, 09:29:36 pm
I already have the I3 and a lot of technical documentation and wiring diagrams. No pinout for that big black waterproof connector though. The whole car uses canbus and flexray in all of its modules.
Title: Re: Looking to reverse engineer BMW I3 REME Inverter
Post by: tom66 on August 09, 2020, 08:05:20 am
Looking at it, best guess:

- LtBlue = CAN buses (possibly two; one powertrain and one "infotainment"/"accessory")
- Yellow = unknown, maybe current sense?  Low voltage so seems unlikely to be part of HV system
- Red = 12VDC in?
- Black = GND

Also, it strikes me, given the REME needs to be closely synchronised to engine start and operation, it probably has some control over engine operation? So presumably it would have control for injectors, spark, temperature sensors, oil pressure, O2 sensor etc.   Or is that on another module?

Maybe the remaining pins are to drive various actuators although I would have thought even a basic engine would need more control signals than that. So is there another control module?  You may not be able to get this to work unless that other module says "engine is running OK, you can load it".  In my PHEV, when the engine starts, the car doesn't apply any electrical load for a few seconds, until it is happy everything is running OK.  i3 is probably similar.
Title: Re: Looking to reverse engineer BMW I3 REME Inverter
Post by: Netpo on February 08, 2021, 11:46:38 am
Добрый день. Тема интересна. Ищу оригинальный дамп прошивки процессора этого блока. Буду благодарен любой помощи.
Title: Re: Looking to reverse engineer BMW I3 REME Inverter
Post by: pardo-bsso on February 08, 2021, 04:15:12 pm
Добрый день. Тема интересна. Ищу оригинальный дамп прошивки процессора этого блока. Буду благодарен любой помощи.

Text quoted above says:


Good day. The topic is interesting. I am looking for the original firmware dump of the processor of this block. I would be grateful for any help.