i3 controller hacking from diyelectriccar.com

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

Re: i3 controller hacking from diyelectriccar.com

Post by johu »

Hesitant to ask... reversed polarity?
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Scott166
Posts: 106
Joined: Thu Jun 04, 2020 12:23 pm
Location: Dorset, England
Has thanked: 1 time
Been thanked: 1 time

Re: i3 controller hacking from diyelectriccar.com

Post by Scott166 »

Would that cause the symptoms I've got?
I take you mean the HV side?
I might do a little video and see if I can make it private for you guys
Restoring and converting a Classic Mini, I have mad ideas, semi sensible ideas and NO idea if I’ll ever get it done :lol:
Look me up on YouTube https://youtube.com/channel/UCxmP1hLys6Z5tHZpK5mn6eg to see my progress
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

Re: i3 controller hacking from diyelectriccar.com

Post by johu »

Scott166 wrote: Thu Sep 08, 2022 8:32 pm Would that cause the symptoms I've got?
I take you mean the HV side?
I might do a little video and see if I can make it private for you guys
Yes and yes
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Scott166
Posts: 106
Joined: Thu Jun 04, 2020 12:23 pm
Location: Dorset, England
Has thanked: 1 time
Been thanked: 1 time

Re: i3 controller hacking from diyelectriccar.com

Post by Scott166 »

Ok, so there's no markings, I've possibly got confused, can anyone confirm which is positive and which is negative on the capacitor please?
Attachments
IMG_20220909_110043_863.jpg
Restoring and converting a Classic Mini, I have mad ideas, semi sensible ideas and NO idea if I’ll ever get it done :lol:
Look me up on YouTube https://youtube.com/channel/UCxmP1hLys6Z5tHZpK5mn6eg to see my progress
Scott166
Posts: 106
Joined: Thu Jun 04, 2020 12:23 pm
Location: Dorset, England
Has thanked: 1 time
Been thanked: 1 time

Re: i3 controller hacking from diyelectriccar.com

Post by Scott166 »

I've put a small voltage on the capacitor (less than 10v) and it is holding charge and I have checked with the multimeter and get the correct readings for the large upper tab being the positive. Is this what everyone else has?
Restoring and converting a Classic Mini, I have mad ideas, semi sensible ideas and NO idea if I’ll ever get it done :lol:
Look me up on YouTube https://youtube.com/channel/UCxmP1hLys6Z5tHZpK5mn6eg to see my progress
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 »

Don't look at the capcitor, it's a non polarised type.

Look at the IGBT module!
Scott166
Posts: 106
Joined: Thu Jun 04, 2020 12:23 pm
Location: Dorset, England
Has thanked: 1 time
Been thanked: 1 time

Re: i3 controller hacking from diyelectriccar.com

Post by Scott166 »

SciroccoEV wrote: Fri Sep 09, 2022 10:16 am Don't look at the capcitor, it's a non polarised type.

Look at the IGBT module!
Thanks!
How can I tell on the IGBT? Again, no markings at all?
If I do a resistance test between the IGBT and the three phase output which would give a small resistance change? Positive or negative?
Restoring and converting a Classic Mini, I have mad ideas, semi sensible ideas and NO idea if I’ll ever get it done :lol:
Look me up on YouTube https://youtube.com/channel/UCxmP1hLys6Z5tHZpK5mn6eg to see my progress
Scott166
Posts: 106
Joined: Thu Jun 04, 2020 12:23 pm
Location: Dorset, England
Has thanked: 1 time
Been thanked: 1 time

Re: i3 controller hacking from diyelectriccar.com

Post by Scott166 »

I've gone back to Johannes' initial inverter video and it looks like I DID have the pos and neg the wrong way round 😬

Let's hope I haven't damaged anything 🤞
Restoring and converting a Classic Mini, I have mad ideas, semi sensible ideas and NO idea if I’ll ever get it done :lol:
Look me up on YouTube https://youtube.com/channel/UCxmP1hLys6Z5tHZpK5mn6eg to see my progress
Scott166
Posts: 106
Joined: Thu Jun 04, 2020 12:23 pm
Location: Dorset, England
Has thanked: 1 time
Been thanked: 1 time

Re: i3 controller hacking from diyelectriccar.com

Post by Scott166 »

So I have checked the capacitor out of the inverter and it is charging and holding, I have checked the safety bulb circuit, checked the polarity etc.

Now I get no light on the bulb at all, even at 60v.
Restoring and converting a Classic Mini, I have mad ideas, semi sensible ideas and NO idea if I’ll ever get it done :lol:
Look me up on YouTube https://youtube.com/channel/UCxmP1hLys6Z5tHZpK5mn6eg to see my progress
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 »

There will be a part number on the IGBT, which means you can look up a datasheet.
IMG_20220720_213404.jpg
At 60V, the inruch current may be too low and too brief to light the filament.

Measure the DC link voltage.
Scott166
Posts: 106
Joined: Thu Jun 04, 2020 12:23 pm
Location: Dorset, England
Has thanked: 1 time
Been thanked: 1 time

Re: i3 controller hacking from diyelectriccar.com

Post by Scott166 »

Thanks, I'm just really nervous to put more voltage through until I'm certain I'm not going to blow myself up 🤣
Restoring and converting a Classic Mini, I have mad ideas, semi sensible ideas and NO idea if I’ll ever get it done :lol:
Look me up on YouTube https://youtube.com/channel/UCxmP1hLys6Z5tHZpK5mn6eg to see my progress
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

Re: i3 controller hacking from diyelectriccar.com

Post by johu »

Problem solved then :) You didn't do damage, all that happens is current flowing right through the anti-parallel diodes. They are made for that. That is also a way to determine polarity: put multimeter to diode mode and measure into the poles. If you see a stable 0.5-1.4V then polarity is reversed! If you see a climbing voltage and eventually over range, you have charged the cap and polarity is right.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Scott166
Posts: 106
Joined: Thu Jun 04, 2020 12:23 pm
Location: Dorset, England
Has thanked: 1 time
Been thanked: 1 time

Re: i3 controller hacking from diyelectriccar.com

Post by Scott166 »

johu wrote: Fri Sep 09, 2022 2:00 pm Problem solved then :) You didn't do damage, all that happens is current flowing right through the anti-parallel diodes. They are made for that. That is also a way to determine polarity: put multimeter to diode mode and measure into the poles. If you see a stable 0.5-1.4V then polarity is reversed! If you see a climbing voltage and eventually over range, you have charged the cap and polarity is right.
Thanks Johannes
Restoring and converting a Classic Mini, I have mad ideas, semi sensible ideas and NO idea if I’ll ever get it done :lol:
Look me up on YouTube https://youtube.com/channel/UCxmP1hLys6Z5tHZpK5mn6eg to see my progress
Scott166
Posts: 106
Joined: Thu Jun 04, 2020 12:23 pm
Location: Dorset, England
Has thanked: 1 time
Been thanked: 1 time

Re: i3 controller hacking from diyelectriccar.com

Post by Scott166 »

Has anyone made any more progress with this?
I am now stripping all the unnecessary stuff out of the safety box so I can put that in line with the batteries.
I am also uploading another video with the inverter casing work, should be up by the end of the day if anyone is interested.
I have put a plate over the coolant areas with a pipe connecting the two, hopefully it works ok.
Restoring and converting a Classic Mini, I have mad ideas, semi sensible ideas and NO idea if I’ll ever get it done :lol:
Look me up on YouTube https://youtube.com/channel/UCxmP1hLys6Z5tHZpK5mn6eg to see my progress
jon volk
Posts: 572
Joined: Wed Apr 10, 2019 7:47 pm
Location: Connecticut
Been thanked: 2 times

Re: i3 controller hacking from diyelectriccar.com

Post by jon volk »

I didnt happen to see it, but on the 40 pin ribbon connector, are the unpopulated pins in the wiki also unpopulated on the OE board, or are they just unknown/unused for the OI purposes?
Formerly 92 E30 BMW Cabrio with Tesla power
User avatar
CJW
Posts: 9
Joined: Mon Oct 25, 2021 8:56 pm
Has thanked: 9 times
Been thanked: 2 times

Re: i3 controller hacking from diyelectriccar.com

Post by CJW »

I've ordered some PCB pairs to simplify the motor resolver and temperature sensor connections.

One board will sit under the Ampseal connector and allow a PCB header or wires to be connected directly to the pins, the other board will have an ERNI Minibridge connector to mate to the wires coming from the motor (I've been unable to source the ERNI connectors that come pre-mounted to a PCB).

Have ordered some spares in case anyone else needs a set.
image.png
image.png
User avatar
CJW
Posts: 9
Joined: Mon Oct 25, 2021 8:56 pm
Has thanked: 9 times
Been thanked: 2 times

Re: i3 controller hacking from diyelectriccar.com

Post by CJW »

Traced the resolver and motor temp wires at the weekend from the 12 way ERNI connector that connects to the original inverter control board back into the motor housing, sharing some information below in case it's useful.

Have also updated the wiki with suspected pinout for the ERNI connector: https://openinverter.org/wiki/BMW_i3_Inverter

There are two six pin connectors in the motor housing, both appear to be from TE Connectivity. Three pairs of wires from the resolver terminate in one of them, while two pairs of wires from the motor stator temperature sensors terminate in the other:
image.png
Resolver wires are numbered where they enter the connector:
image.png
image.png
As are the temperature sensor wires:
image.png
image.png
The connector pin numbers appear to relate to the numbers on this schematic:
Resolver Circuit Diagram.jpg
Leading to following pinouts:
Resolver connector
1 - Blue - A_SIN_LO
2 - Green - U_POS LO
3 - White - A_COS_LO
4 - Brown - A_SIN_HI
5 - Yellow - U_POS_HI
6 - Red - A_COS_HI

Temperature sensor connector
1 - Blue - A_EM_WK
2 - Grey - M_EM_WK
3 - Red - A_EM_ST
4 - Grey - M_EM_STA
5 - Unused
6 - Unused

Resistance readings suggest these are plausible:
Resolver connector - pins 1 and 4 for A_SIN read 26.5Ω, pins 3 and 6 for A_COS read 26.5Ω, pins 2 and 5 for U_POS read 16.4Ω.
Temperature sensor connector - pins 1 and 2 read 54kΩ as do pins 3 and 4.

Tracing the pins in the two six pin connectors in the motor housing back up to the ERNI minibridge connector for the inverter board with a multimeter, and then checking resistances between the pairs again, results in the following pinout for that connector, where pin 1 is at the end with the two dots:
1 - Brown - A_SIN_HI
2 - Blue - A_SIN_LO
3 - Yellow - U_POS_HI
4 - Green - U_POS LO
5 - Red - A_COS_HI
6 - White - A_COS_LO
7 - Blue - A_EM_WK
8 - Grey - M_EM_WK
9 - Red - A_EM_ST
10 - Grey - M_EM_STA
11 - Unused
12 - Unused
image.png
Thanks to Hans and golfdubcrazy for their earlier information on this.
User avatar
CJW
Posts: 9
Joined: Mon Oct 25, 2021 8:56 pm
Has thanked: 9 times
Been thanked: 2 times

Re: i3 controller hacking from diyelectriccar.com

Post by CJW »

PCBs arrived and fit nicely. Ordered 10 so have spares if anyone needs a pair.

Need to double check the resolver connections on the main Ampseal header as it looked like the Sin Hi and Sin Lo might have been mixed up, based on reviewing the two Wiki pages for the mini mainboard and i3 inverter. Will update once everything checked.
20231120_215137.jpg
20231120_215101.jpg
Scott166
Posts: 106
Joined: Thu Jun 04, 2020 12:23 pm
Location: Dorset, England
Has thanked: 1 time
Been thanked: 1 time

Re: i3 controller hacking from diyelectriccar.com

Post by Scott166 »

Glad to see someone making progress on this, I hope to get back to it March or April time. 🤞🙏👍
Restoring and converting a Classic Mini, I have mad ideas, semi sensible ideas and NO idea if I’ll ever get it done :lol:
Look me up on YouTube https://youtube.com/channel/UCxmP1hLys6Z5tHZpK5mn6eg to see my progress
User avatar
CJW
Posts: 9
Joined: Mon Oct 25, 2021 8:56 pm
Has thanked: 9 times
Been thanked: 2 times

Re: i3 controller hacking from diyelectriccar.com

Post by CJW »

Made some progress testing the encoder using Damien/Johannes' useful FOC tuning guide below.


Rotor angle plot from the interface below, measured using the connections indicated in my previous post and the i3 wiki.
image.png
Have not been able to get the motor spinning yet, seem to experiencing the same issue that Mr X had with the DC bus voltage. Will update once that is solved.
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

Re: i3 controller hacking from diyelectriccar.com

Post by johu »

Got the resolver connector cards from CJW today and set out to mount them to the inverter.

First thing I noticed is that SPI comms doesn't work, as others have noticed.

I finally found the culprits
a) hadn't fully reflowed the solder paste of the Erni connector and had shorts to ground (probably not the culprit for most but worth checking)
b) err_out must be disabled/configured as input because otherwise it either pulls up or down the clock signal

So in vehiclecontrol.cpp below

Code: Select all

      //Brake pin is used as SPI_MISO
      DigIo::brk_out.Configure(GPIOC, GPIO5, PinMode::INPUT_FLT);
I added

Code: Select all

      //Disable err_out so it doesn't pull the clock signal up or down
      DigIo::err_out.Configure(GPIOC, GPIO10, PinMode::INPUT_FLT);
I suggest checking out safer_can2 branch and adding it to that because I haven't fully tested/understood the speed dependent throttle travel yet

With that sorted there is no longer any need to bridge series resistors.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
CJW
Posts: 9
Joined: Mon Oct 25, 2021 8:56 pm
Has thanked: 9 times
Been thanked: 2 times

Re: i3 controller hacking from diyelectriccar.com

Post by CJW »

MrX wrote: Fri Jun 17, 2022 10:22 am A couple of interesting points on the cable running to the gate drive board:

Pin 35 (IGBT PSU 12V on) is low level 0V
Pin 17 (lower gate driver ready) is low level 0V. Notably, Pin 16 (upper gate driver ready) is 5V

Should pin 35 have 12V on it from the adapter PCBA? Mine does not appear to. Does that come from one of the ampseal inputs?

Edit* did not mention that I am aware of the DCDC off the DC bus caps. That appears to be okay. I see no increase in consumption from the 12V power when in manual run.
Have implemented the code fix provided by Johannes above (thanks for that, and also to Janosch for compiling), now reading bus voltage and heatsink temperature.

Checked the 40 pin Harwin connector and found pins 22, 27 and 29 (all ground connections) were not soldered to the pads, now fixed.

I now seem to have encountered the same issue as MrX, pin 35 on the ERNI connector (IGBT PSU 12V on), isn't reading any voltage even with inverter in run mode and no errors indicated. Does anyone know if this pin is usually powered up as soon as the drop-in board receives power, or if its state is controlled by the STM32? If anyone is able to check it would be appreciated, I'm hesitant to apply power to the pin without confirming. Pin indicated on photo below.
image.png
image.png
Post Reply