Page 9 of 10

Re: i3 controller hacking from diyelectriccar.com

Posted: Thu Sep 08, 2022 4:06 pm
by johu
Hesitant to ask... reversed polarity?

Re: i3 controller hacking from diyelectriccar.com

Posted: Thu Sep 08, 2022 8:32 pm
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

Re: i3 controller hacking from diyelectriccar.com

Posted: Fri Sep 09, 2022 6:37 am
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

Re: i3 controller hacking from diyelectriccar.com

Posted: Fri Sep 09, 2022 10:03 am
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?

Re: i3 controller hacking from diyelectriccar.com

Posted: Fri Sep 09, 2022 10:13 am
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?

Re: i3 controller hacking from diyelectriccar.com

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

Look at the IGBT module!

Re: i3 controller hacking from diyelectriccar.com

Posted: Fri Sep 09, 2022 10:22 am
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?

Re: i3 controller hacking from diyelectriccar.com

Posted: Fri Sep 09, 2022 10:38 am
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 🤞

Re: i3 controller hacking from diyelectriccar.com

Posted: Fri Sep 09, 2022 10:55 am
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.

Re: i3 controller hacking from diyelectriccar.com

Posted: Fri Sep 09, 2022 12:19 pm
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.

Re: i3 controller hacking from diyelectriccar.com

Posted: Fri Sep 09, 2022 1:25 pm
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 🤣

Re: i3 controller hacking from diyelectriccar.com

Posted: Fri Sep 09, 2022 2:00 pm
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.

Re: i3 controller hacking from diyelectriccar.com

Posted: Fri Sep 09, 2022 4:32 pm
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

Re: i3 controller hacking from diyelectriccar.com

Posted: Mon Nov 07, 2022 10:52 am
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.

Re: i3 controller hacking from diyelectriccar.com

Posted: Sun Feb 05, 2023 5:05 pm
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?

Re: i3 controller hacking from diyelectriccar.com

Posted: Fri Nov 03, 2023 12:23 pm
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

Re: i3 controller hacking from diyelectriccar.com

Posted: Thu Nov 09, 2023 6:48 pm
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.

Re: i3 controller hacking from diyelectriccar.com

Posted: Mon Nov 20, 2023 10:10 pm
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

Re: i3 controller hacking from diyelectriccar.com

Posted: Mon Nov 27, 2023 12:12 pm
by Scott166
Glad to see someone making progress on this, I hope to get back to it March or April time. 🤞🙏👍

Re: i3 controller hacking from diyelectriccar.com

Posted: Sun Dec 03, 2023 11:07 am
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.

Re: i3 controller hacking from diyelectriccar.com

Posted: Tue Dec 05, 2023 12:50 pm
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.

Re: i3 controller hacking from diyelectriccar.com

Posted: Sun Dec 24, 2023 9:50 pm
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 Harwin 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

Re: i3 controller hacking from diyelectriccar.com

Posted: Thu Apr 11, 2024 8:43 am
by CJW
Finally got the motor spinning!!!

Hooked up 12v to pin 35 on the Harwin connector to the gate driver board and the motor sprung to life. It is now working on analogue throttle control in forward and reverse. Will post full set of parameters later and update notes on the Wiki.
IMG-20240410-WA0003.jpeg

Re: i3 controller hacking from diyelectriccar.com

Posted: Thu Apr 11, 2024 9:51 am
by johu
Great to read :)
That's very strange as I'm running the inverter (on a Zoe motor) without the mod. I even faintly remember that the pin drew excessive current when feeding it 12V. Another user reported the mounting holes to be off and they fit my inverter perfectly. I wonder if there's different revisions out there?

Re: i3 controller hacking from diyelectriccar.com

Posted: Thu Apr 11, 2024 10:16 am
by CJW
Yes, I'm a bit concerned about running it indefinitely on 12V as the only basis for that is some old notes from this thread and the wiki. Was planning to trace where that pin goes on the gate driver board to try and get a better understanding.

I have the i3s version, rated at 135kW instead of 125kW, but had assumed the hardware was probably the same between both versions.