i3 controller hacking from diyelectriccar.com

User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: i3 controller hacking from diyelectriccar.com

Post by johu »

Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
JamesPL
Posts: 1
Joined: Fri Apr 09, 2021 11:42 am

Re: i3 controller hacking from diyelectriccar.com

Post by JamesPL »

Hi Guys, anyone own an i3? I think with a little info on the wiring I can help out. I am using an i3 motor and controller for a project and need to know the following to understand how to hack the system. I think I have the easiest way to do it, but need to confirm:
1. Which ECU module does the PNDR stalk plug into, or does it plug directly into the controller?
2. Which ECU module does the accelerator cable plug into, or does it plug directly into the controller?
3. If anyone has schematics that would be a great plus.
4. PiD codes also a plus, but hopefully I can do it without changing the programming.
Here's hoping someone out the has got the info! :)
Heikki J.
Posts: 10
Joined: Fri Dec 25, 2020 8:56 am

Re: i3 controller hacking from diyelectriccar.com

Post by Heikki J. »

I have an i3 but I don't think that'll help, I don't want to tear down the car and track where each wire is going to :) I think it's better to try to find the wiring diagram.
User avatar
Hans Gustafsson
Posts: 20
Joined: Tue Feb 09, 2021 9:13 am
Location: Sweden
Been thanked: 1 time

Re: i3 controller hacking from diyelectriccar.com

Post by Hans Gustafsson »

I buy the first working BMW inverter brain card you get available. Am prepared with an iverter and motor in a car. Hope for your card.

The BMW i3 often seems to be scrapped, probably due to the difficult-to-repair carbon fiber body and many engines are available at a good price.

Here is a reverse-engineer seminar on how BMW designed the world's most torque/weight efficient engine.
User avatar
SciroccoEV
Posts: 369
Joined: Thu Oct 10, 2019 1:50 pm
Location: Luton UK
Been thanked: 15 times

Re: i3 controller hacking from diyelectriccar.com

Post by SciroccoEV »

From what I've been able to find out online, the BMW i3 inverter is using 8kHz PWM, whilst the Leaf is using 5kHz. This would potentially explain the why BMW is using a shorter deatime with the same IGBT moule as the (2018 on) Leaf.
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: i3 controller hacking from diyelectriccar.com

Post by johu »

Picked up work on the i3 again after Heikki sent me some brilliant pictures about what does and doesn't fit.
I am also taking care of the 32V boost regulator and the fix is pretty easy: lower switching frequency from 1.2 MHz to 450 kHz and use a larger inductor. That fixed the problem with the weird looking waveform and also the wifi module is no longer disturbed. As an extra challenge the TPS61175 has gone out of stock at JLCPCB....
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: i3 controller hacking from diyelectriccar.com

Post by johu »

Got some boards while I was away, one of them being the i3 adapter. Many improvements but still one issue
  • 32V boost converter now works without overheating
  • USART comms not disturbed when running
  • SPI_CLK and SPI_MOSI now have a nice 5V swing
  • All holes match
  • Hopefully no more collisions with the enclosure
  • I botched the TTL drivers. Pulled !OE high instead of low
  • SPI_CS needs to go via a driver as well, for now I just bridged the 470R output resistor
Another issue is the TPS61175 still being out of stock but I did successfully reflow it in my pizza oven with only minor alignment issues. I might put a small batch up on the shop. I might also swap over to the right angled Erni connector (connection to the gate driver) because that can also be reflowed by hand.
Attachments
IMG_20210601_114118.jpg
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
Hans Gustafsson
Posts: 20
Joined: Tue Feb 09, 2021 9:13 am
Location: Sweden
Been thanked: 1 time

Re: i3 controller hacking from diyelectriccar.com

Post by Hans Gustafsson »

johu wrote: Tue Jun 01, 2021 10:48 am Got some boards while I was away, one of them being the i3 adapter. Many improvements but still one issue
  • 32V boost converter now works without overheating
  • USART comms not disturbed when running
  • SPI_CLK and SPI_MOSI now have a nice 5V swing
  • All holes match
  • Hopefully no more collisions with the enclosure
  • I botched the TTL drivers. Pulled !OE high instead of low
  • SPI_CS needs to go via a driver as well, for now I just bridged the 470R output resistor
Another issue is the TPS61175 still being out of stock but I did successfully reflow it in my pizza oven with only minor alignment issues. I might put a small batch up on the shop. I might also swap over to the right angled Erni connector (connection to the gate driver) because that can also be reflowed by hand.
https://www.ebay.de/itm/292531390387?_t ... %3A2334524
User avatar
Hans Gustafsson
Posts: 20
Joined: Tue Feb 09, 2021 9:13 am
Location: Sweden
Been thanked: 1 time

Re: i3 controller hacking from diyelectriccar.com

Post by Hans Gustafsson »

johu wrote: Tue Jun 01, 2021 10:48 am Got some boards while I was away, one of them being the i3 adapter. Many improvements but still one issue
  • 32V boost converter now works without overheating
  • USART comms not disturbed when running
  • SPI_CLK and SPI_MOSI now have a nice 5V swing
  • All holes match
  • Hopefully no more collisions with the enclosure
  • I botched the TTL drivers. Pulled !OE high instead of low
  • SPI_CS needs to go via a driver as well, for now I just bridged the 470R output resistor
Another issue is the TPS61175 still being out of stock but I did successfully reflow it in my pizza oven with only minor alignment issues. I might put a small batch up on the shop. I might also swap over to the right angled Erni connector (connection to the gate driver) because that can also be reflowed by hand.
https://www.mouser.de/Search/Refine?Keyword=TPS61175
Heikki J.
Posts: 10
Joined: Fri Dec 25, 2020 8:56 am

Re: i3 controller hacking from diyelectriccar.com

Post by Heikki J. »

johu wrote: Tue Jun 01, 2021 10:48 am
  • Hopefully no more collisions with the enclosure
Happy to test fit again if needed...
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: i3 controller hacking from diyelectriccar.com

Post by johu »

Yes will send it over soon.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
MrX
Posts: 20
Joined: Tue Aug 17, 2021 2:19 pm
Location: Down Under 🦘

Re: i3 controller hacking from diyelectriccar.com

Post by MrX »

Hello all, I have been a long time admirer of the openinverter projects, and personally jumped in the deep end with an i3 about 1 year ago. Originally I thought that Damien stopping work the project had left my hopes of "open" control in the hands of an off the shelf inverter, but I discovered progress here a couple of months ago.

To summarise, I have had the i3 motor spinning with an off-the-shelf inverter and done a small amount of characterisation work using Jim Hendershot's reverse engineering (like in the video posted above). The i3 motor's requires quite a high amount of Id current to be able to reach peak power, around 70degrees advance angle is ideal, if Jim's modelling is correct. I know that spinning a motor is a little way off, but I believe sharing all this info I've accumulated may help to get things moving a little quicker once we get to that point. I am very motivated to help progress the i3 controller hacking in any way, so please let me know Johannes if you would be interested in having a V2 board down under (Australia) for testing in parallel.

A summary of the values that I would suggest using to start:
  • Lq = 240uH (1.72 ohm resistance)
  • Ld = 85uH (0.81 ohm ? Not sure, hard to make out in Jim's slides)
  • Peak RPM = 11400 (~500V back EMF at this RPM!)
  • 6 pole *edit* pairs
  • 240Arms peak current (until we starting pushing it, of course...)
Some risks I maybe see however is that Jim makes a point of saying that at maximum RPM, with the 6 poles, the commutation frequency is around 1200Hz, and that the inverter switching frequency should be approaching 20kHz at this point. I would actually tend to agree with him, as the rotor inductance is fairly low and therefore the current ripple could be fairly interesting. I would like to know what everyone's thoughts are on this. Johannes: I think your point regarding this super short deadtime would be that the BMW engineers have optimised the gate driver to achieve maximum on-time at these required high switching frequencies.

Okay, I think that's enough of a brain dump for now for a forum newbie!
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: i3 controller hacking from diyelectriccar.com

Post by johu »

That's some valuable info. I'm currently in the mechanical design process, the volume where the board resides is rather awkward and I needed two revisions so far just to kind fo get that right.

20 kHz sounds pretty high for an 800A IGBT stage, maybe somebody can find out what BMW runs. The inductances are indeed quite low, I think the Prius motor was 4 times that. Uuuh.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
SciroccoEV
Posts: 369
Joined: Thu Oct 10, 2019 1:50 pm
Location: Luton UK
Been thanked: 15 times

Re: i3 controller hacking from diyelectriccar.com

Post by SciroccoEV »

johu wrote: Tue Aug 17, 2021 4:19 pm 20 kHz sounds pretty high for an 800A IGBT stage, maybe somebody can find out what BMW runs. The inductances are indeed quite low, I think the Prius motor was 4 times that. Uuuh.
Johu, scroll up a bit.

I posted
From what I've been able to find out online, the BMW i3 inverter is using 8kHz PWM, whilst the Leaf is using 5kHz. This would potentially explain the why BMW is using a shorter deatime with the same IGBT moule as the (2018 on) Leaf.
Infineon app. note for the HybridPACK2 dev kit.
User avatar
MrX
Posts: 20
Joined: Tue Aug 17, 2021 2:19 pm
Location: Down Under 🦘

Re: i3 controller hacking from diyelectriccar.com

Post by MrX »

SciroccoEV wrote: Tue Aug 17, 2021 6:51 pm
I posted
From what I've been able to find out online, the BMW i3 inverter is using 8kHz PWM, whilst the Leaf is using 5kHz. This would potentially explain the why BMW is using a shorter deatime with the same IGBT moule as the (2018 on) Leaf.
I would be surprised if it would be as low as 8kHz with a 1200Hz commutation frequency. That said, I would happily be wrong, for the sake of the inverter’s bandwidth and switching loss. How fast could we hypothetically run the switching frequency with the openinverter? I think 12-16kHz would be much better than 8kHz, particularly at high RPM. Does it have the ability to dynamically change switching frequency? You’ll have to forgive my ignorance, I still need to get my hands on a PCBA.
User avatar
MrX
Posts: 20
Joined: Tue Aug 17, 2021 2:19 pm
Location: Down Under 🦘

Re: i3 controller hacking from diyelectriccar.com

Post by MrX »

johu wrote: Tue Aug 17, 2021 4:19 pm I'm currently in the mechanical design process, the volume where the board resides is rather awkward and I needed two revisions so far just to kind fo get that right.
Oh, and I forgot to say I can help here maybe. I could maybe 3D model/scan the enclosure and create some CAD files for you if that helps? Or if you have some models of the PCB (.stl files would be fine) I could check fit on my side. Happy to help, as there is a lot of stuff going on inside that enclosure!
User avatar
Hans Gustafsson
Posts: 20
Joined: Tue Feb 09, 2021 9:13 am
Location: Sweden
Been thanked: 1 time

Re: i3 controller hacking from diyelectriccar.com

Post by Hans Gustafsson »

MrX wrote: Tue Aug 17, 2021 3:16 pm Hello all, I have been a long time admirer of the openinverter projects, and personally jumped in the deep end with an i3 about 1 year ago. Originally I thought that Damien stopping work the project had left my hopes of "open" control in the hands of an off the shelf inverter, but I discovered progress here a couple of months ago.

To summarise, I have had the i3 motor spinning with an off-the-shelf inverter and done a small amount of characterisation work using Jim Hendershot's reverse engineering (like in the video posted above). The i3 motor's requires quite a high amount of Id current to be able to reach peak power, around 70degrees advance angle is ideal, if Jim's modelling is correct. I know that spinning a motor is a little way off, but I believe sharing all this info I've accumulated may help to get things moving a little quicker once we get to that point. I am very motivated to help progress the i3 controller hacking in any way, so please let me know Johannes if you would be interested in having a V2 board down under (Australia) for testing in parallel.

A summary of the values that I would suggest using to start:
  • Lq = 240uH (1.72 ohm resistance)
  • Ld = 85uH (0.81 ohm ? Not sure, hard to make out in Jim's slides)
  • Peak RPM = 11400 (~500V back EMF at this RPM!)
  • 6 poles
  • 240Arms peak current (until we starting pushing it, of course...)
Some risks I maybe see however is that Jim makes a point of saying that at maximum RPM, with the 6 poles, the commutation frequency is around 1200Hz, and that the inverter switching frequency should be approaching 20kHz at this point. I would actually tend to agree with him, as the rotor inductance is fairly low and therefore the current ripple could be fairly interesting. I would like to know what everyone's thoughts are on this. Johannes: I think your point regarding this super short deadtime would be that the BMW engineers have optimised the gate driver to achieve maximum on-time at these required high switching frequencies.

Okay, I think that's enough of a brain dump for now for a forum newbie!
In the video a little higher up states (7.00) it is a twelve pole motor and I am pretty sure that encoders use the same pole number. I have used it for my Unitch inverter and it "worked" even if I have not driven the car yet, only spun the engine.
User avatar
SciroccoEV
Posts: 369
Joined: Thu Oct 10, 2019 1:50 pm
Location: Luton UK
Been thanked: 15 times

Re: i3 controller hacking from diyelectriccar.com

Post by SciroccoEV »

At high rpm you'll be runnning 6 step commutation and the PWM frequency will be irrelevant.
User avatar
MrX
Posts: 20
Joined: Tue Aug 17, 2021 2:19 pm
Location: Down Under 🦘

Re: i3 controller hacking from diyelectriccar.com

Post by MrX »

Hans Gustafsson wrote: Fri Aug 27, 2021 7:48 am In the video a little higher up states (7.00) it is a twelve pole motor and I am pretty sure that encoders use the same pole number. I have used it for my Unitch inverter and it "worked" even if I have not driven the car yet, only spun the engine.
Sorry, my mistake I meant 6 pole pairs. I’ve corrected that now. Does the ultra-high frequency when compared with the leaf motor make a bit more sense now?

The resolver is 6 poles total, but to be honest I’m not sure if resolvers have “pole pairs” like motors do because they’re just a sensor.
i3 resolver
i3 resolver
User avatar
Hans Gustafsson
Posts: 20
Joined: Tue Feb 09, 2021 9:13 am
Location: Sweden
Been thanked: 1 time

Re: i3 controller hacking from diyelectriccar.com

Post by Hans Gustafsson »

Some suggestions for inverters pending this project for a BMW i3 engine. Something cheap that makes it roll out of the garage? Max volt around 430v. Hope and believe in this openinverter project, but difficult to know about the time when it will be realized. The TPS61175PWPR is for example "Expected in stock 22/09/2022" on mouser.de. But there are some that have in stock and sell on ebay. (Have now burned my intended Uniteck inverter for the 3rd time and have no desire to repair it again.)
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: i3 controller hacking from diyelectriccar.com

Post by arber333 »

Hans Gustafsson wrote: Fri Sep 10, 2021 12:00 pm Some suggestions for inverters pending this project for a BMW i3 engine. Something cheap that makes it roll out of the garage? Max volt around 430v. Hope and believe in this openinverter project, but difficult to know about the time when it will be realized. The TPS61175PWPR is for example "Expected in stock 22/09/2022" on mouser.de. But there are some that have in stock and sell on ebay. (Have now burned my intended Uniteck inverter for the 3rd time and have no desire to repair it again.)
Then you need Volt inverter with openinverter brain.
Or Lebowski brain but then you need some resolver to UVW converter.
Max voltage 420Vdc and phase current 600A on one side!
If you would use both sides.... i honestly dont know how much power...
m.art.y
Posts: 550
Joined: Sat Jun 06, 2020 6:54 pm
Location: UK
Has thanked: 24 times
Been thanked: 17 times

Re: i3 controller hacking from diyelectriccar.com

Post by m.art.y »

Hans Gustafsson wrote: Fri Sep 10, 2021 12:00 pm Some suggestions for inverters pending this project for a BMW i3 engine. Something cheap that makes it roll out of the garage?
Go for a gen3 prius/auris you will struggle to find something cheaper. It is also very well documented on here will be very easy to get it setup.
golfdubcrazy
Posts: 75
Joined: Thu Jan 28, 2021 6:15 pm
Has thanked: 1 time
Been thanked: 5 times

Re: i3 controller hacking from diyelectriccar.com

Post by golfdubcrazy »

Hi all been a while, how goes the progress on the new control board ?
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: i3 controller hacking from diyelectriccar.com

Post by johu »

I have made most corrections except moving the control board down another 1 mm so it doesn't collide with a screw post.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
Bratitude
Posts: 783
Joined: Thu Jan 02, 2020 7:35 pm
Location: Canada
Has thanked: 57 times
Been thanked: 168 times
Contact:

Re: i3 controller hacking from diyelectriccar.com

Post by Bratitude »

wiki page started here: https://openinverter.org/wiki/I3_inverter please fill with additional info.
thanks folks
https://bratindustries.net/ leaf motor couplers, adapter plates, custom drive train components
Post Reply