i3 controller hacking from diyelectriccar.com

User avatar
CJW
Posts: 22
Joined: Mon Oct 25, 2021 8:56 pm
Has thanked: 10 times
Been thanked: 8 times

Re: i3 controller hacking from diyelectriccar.com

Post by CJW »

Had a go at tracing pin 35 on the gate driver board and looking up datasheets to get a better idea of what's going on here with a view to hopefully confirming that a 12V supply to this pin is correct. Information below with the caveat that I have a fairly basic understanding of electrical circuits and have best guessed the component identifications.

Having checked every solder pad, pin and via on the underside of the board, aside from a few vias that appear to be for routing purposes pin 35 appears to be connected to a mosfet gate (blue line on image below). Assuming it's a BSS138, the datasheet seems to indicate the gate can accept up to 20V, though presumably there would be little to no ongoing current draw. The source pin of the mostfet seems to be connected to ground:
Gate driver mosfet.jpg
The drain pin of the mosfet is connected to pin number 1 of an International Rectifier 2085S half bridge driver chip on the other side of the board that's linked to a pair of FR024N power mosfets. The datasheet indicates this pin is a current sense input:
P4110422.JPG
Full images of the gate driver board below with component locations:
Gate driver underside.jpg
Gate driver topside.jpg
Damien's original notes, below, also suggest this pin is for enabling the IGBT PSU, however looks more like 5V than 12V to me:
image.png
image.png (115.52 KiB) Viewed 1031 times
User avatar
CJW
Posts: 22
Joined: Mon Oct 25, 2021 8:56 pm
Has thanked: 10 times
Been thanked: 8 times

Re: i3 controller hacking from diyelectriccar.com

Post by CJW »

Parameters used for the successful bench test attached. Notes below:

-firmware version 5.32.R-foc, with Johanne's code mod applied separately to disable err_out pin that was preventing SPI comms
-24V test voltage from a pair of lead acid batteries
-no contactors, so parameters for precharge and contactor control are not set correctly
-tmpmmax is set at 300C to avoid accidental tripping as there is no motor temperature sensor map yet as far as I'm aware
-throttle pot range set up for a smart car throttle
-idc max and min set quite low at +/-20A

Was able to successfully operate in forward and reverse with these settings.
Attachments
20240412 - params.json
(1.62 KiB) Downloaded 5 times
User avatar
MrX
Posts: 21
Joined: Tue Aug 17, 2021 2:19 pm
Location: Down Under 🦘
Has thanked: 3 times

Re: i3 controller hacking from diyelectriccar.com

Post by MrX »

Great work CJW, looks like we've managed to cobble together a working inverter! I feel it would be a good idea to put some kind of gate resistance inline (10R?) but probably not expressly necessary.

Interested with respect to the parameters, I thought that at some stage there was an i3 variant added which mapped the tmphs sense correctly.

Were you also running with the resolver connection? And did you dial that using the typicaly FOC tuning method?
User avatar
johu
Site Admin
Posts: 5797
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 160 times
Been thanked: 1031 times
Contact:

Re: i3 controller hacking from diyelectriccar.com

Post by johu »

MrX wrote: Wed Apr 17, 2024 10:00 am I thought that at some stage there was an i3 variant added which mapped the tmphs sense correctly
When setting snshs=BMWI3 it will switch over to SPI comms for udc also
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
CJW
Posts: 22
Joined: Mon Oct 25, 2021 8:56 pm
Has thanked: 10 times
Been thanked: 8 times

Re: i3 controller hacking from diyelectriccar.com

Post by CJW »

MrX wrote: Wed Apr 17, 2024 10:00 am Great work CJW, looks like we've managed to cobble together a working inverter! I feel it would be a good idea to put some kind of gate resistance inline (10R?) but probably not expressly necessary.

Interested with respect to the parameters, I thought that at some stage there was an i3 variant added which mapped the tmphs sense correctly.

Were you also running with the resolver connection? And did you dial that using the typicaly FOC tuning method?
I'm planning to run some tests on the mosfet gate over the next couple of days, to measure the current draw and try running it off the openinverter's 5v supply (via a 500mA fuse). Will try adding a 10k resistor as well.

So far as I'm aware there's an i3 map option for the snshs from the IGBTs, but not for the motor tmphs. I was planning to make an Arduino datalogger to measure the room temp and motor temperature sensor output over a period of time to work out the resistance/temp curve.

The resolver was hooked up with the connection order based on various notes, multimeter testing, and hand-spinning the motor based on Johanne/Damien's youtube tutorial (posted on page 9 of this thread). The connections are summarised on the i3 Wiki page. If you need one of the drop-in boards I made (pic below) to pick up these connections I can share the design files or order some more and mail one. Note I got the Sin Hi/Sin Lo order wrong on the first batch of these boards, so the blue and brown wires need to cross over between the two PCB's - this has been fixed on the latest design.
20231120_215101.jpg
User avatar
CJW
Posts: 22
Joined: Mon Oct 25, 2021 8:56 pm
Has thanked: 10 times
Been thanked: 8 times

Re: i3 controller hacking from diyelectriccar.com

Post by CJW »

Today I ran the motor again, this time powering pin 35 on the Harwin connector with 5V from the openinverter board via a 10K resistor and registered no current draw on the multimeter.

Will plan to use this setup going forward as seems safer to use the regulated power supply on the openinverter board to power the mosfet gate than the 12V coming in to the drop-in board from elsewhere.

I am pretty sure the mosfet is a BSS138, as the lettering/numbering format matches a datasheet for that device from Diodes Incorporated, see below.
image.png
image.png (3.08 KiB) Viewed 497 times
image.png
image.png (143.19 KiB) Viewed 497 times
User avatar
CJW
Posts: 22
Joined: Mon Oct 25, 2021 8:56 pm
Has thanked: 10 times
Been thanked: 8 times

Re: i3 controller hacking from diyelectriccar.com

Post by CJW »

This is the final fix I've implemented after testing.

Pins 33 and 34 on the Harwin connector are both connected to the 5V 500mA output on the openinverter board. Added a 10K resistor between Pin 34 and 35 to provide power to pin 35 and the mosfet gate on the gate driver board.

Possibly it would be fine to just solder 34 and 35 together, but keeping the resistor in there to be safe on Mr X's advice.
P4270420.JPG
User avatar
CJW
Posts: 22
Joined: Mon Oct 25, 2021 8:56 pm
Has thanked: 10 times
Been thanked: 8 times

Re: i3 controller hacking from diyelectriccar.com

Post by CJW »

Upon reflection, it looks like there is a pull-down resistor on the mosfet gate, so might reduce the gate series resistor to 100R to avoid creating a voltage divider that reduces the gate voltage too much. Will pull the gate driver board out again next weekend and try to measure the pull-down resistor value.
Gate driver mosfet.jpg
image.png
User avatar
johu
Site Admin
Posts: 5797
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 160 times
Been thanked: 1031 times
Contact:

Re: i3 controller hacking from diyelectriccar.com

Post by johu »

I should check my board and find out why it works without the patch. Where on the board is that part of the circuit?
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
CJW
Posts: 22
Joined: Mon Oct 25, 2021 8:56 pm
Has thanked: 10 times
Been thanked: 8 times

Re: i3 controller hacking from diyelectriccar.com

Post by CJW »

johu wrote: Sun Apr 28, 2024 4:20 pm I should check my board and find out why it works without the patch. Where on the board is that part of the circuit?
It is located on the underside of the gate driver board, tip of the blue arrow below:
Gate driver underside.jpg
Post Reply