Leaf powered RX8

Tell us about the project you do with the open inverter
User avatar
celeron55
Posts: 776
Joined: Thu Jul 04, 2019 3:04 pm
Location: Finland
Has thanked: 28 times
Been thanked: 110 times
Contact:

Re: Leaf powered ? (for now)

Post by celeron55 »

The gist of the DC-DC in that is that it lives in one half of the brain board's CN5405, and if you connect that right, you need to command it on via the i2c bus. There's an i2c DAC with 2 outputs on the DC-DC converter, one controls the output voltage and one does something else (not sure what), but sending this makes it tick:

Wire.beginTransmission(0x60);
Wire.write(0x40); // Channel 0
// Value written by original software, no idea what this does
Wire.write(0x08); Wire.write(0x89);
Wire.endTransmission();

Wire.beginTransmission(0x60);
Wire.write(0x42); // Channel 1
uint16_t v = LEAD_ACID_BATTERY_CHARGE_VOLTAGE * 164;
Wire.write(v>>8); Wire.write(v&0xff);
Wire.endTransmission();

As for making it work using the original brain board's CAN interface, this is what I found: https://www.mynissanleaf.com/viewtopic. ... 80#p530880
Basically I found out bit 0x04 in the 0x1f2 frame disables the converter (set low to enable, just spam 0x1f2 00 64 00 a0 00 00 00 00 or so every 10ms). You might also need 50b, 1d4 and maybe 55b (probably not). Anyway, that's worthless without the charging working.
doobedoobedo
Posts: 260
Joined: Sat Jan 12, 2019 12:39 am
Location: UK

Re: Leaf powered ? (for now)

Post by doobedoobedo »

Awesome, thank you. Your notes go through google translate pretty well at first glance. They'll be really useful.

I remembered seeing about CAN switch on, but couldn't remember where, so thanks for that too.
User avatar
celeron55
Posts: 776
Joined: Thu Jul 04, 2019 3:04 pm
Location: Finland
Has thanked: 28 times
Been thanked: 110 times
Contact:

Re: Leaf powered ? (for now)

Post by celeron55 »

To control the charger on the internal i2c bus, there's again just a DAC, again with one weird channel and one useful channel.

Wire.beginTransmission(0x64);
Wire.write(0x42); // Channel 1
// 0xcfd is the value sent by the original software all the time
Wire.write(0x0c); Wire.write(0xfd);
Wire.endTransmission();

uint16_t v = (uint32_t)charge_ma * 215 / 1000;

Wire.beginTransmission(0x64);
Wire.write(0x40); // Channel 0
Wire.write(v>>8);
Wire.write(v&0xff);
Wire.endTransmission();

Reading feedback from the charger is done by reading MCP3021 i2c ADCs at addresses 0x49, 0x4d, 0x4e, 0x4c and 0x4f which measure charger temperature, rectified AC A, rectified AC V, bat V and bat A respectively, with scales: 10k NTC voltage, 60bits/A, 6.78bits/V, 8.122bits/V and 213bits/A.

The 4052 that controls which of two temperature sensors is read by the 0x49 ADC is directly controlled via CN5401.
doobedoobedo
Posts: 260
Joined: Sat Jan 12, 2019 12:39 am
Location: UK

Re: Leaf powered ? (for now)

Post by doobedoobedo »

SMD adapter board with Brain Board
IMG_20190724_175406_9.jpg
Should have it spinning soon
User avatar
johu
Site Admin
Posts: 5791
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1025 times
Contact:

Re: Leaf powered ? (for now)

Post by johu »

celeron55 wrote: Fri Jul 05, 2019 7:23 pm To control the charger on the internal i2c bus, there's again just a DAC, again with one weird channel and one useful channel.
Cool, just saw this. How do you access that I2C bus?
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
doobedoobedo
Posts: 260
Joined: Sat Jan 12, 2019 12:39 am
Location: UK

Re: Leaf powered ? (for now)

Post by doobedoobedo »

I've not had much of a chance to do anything on this, but here's a translation (via google) of celeron55's notes

Code: Select all

Connectors and their signals
-----------------------------

CN100:
- PDM housing connector
- JST-S24B-PADSS-1
- Pinout:
- 1: F / S CHG Relay
- Via fuse (1.5A fast 24V) to CN5405 pin 5
- 2: Quick charger start / stop signal 2
- The charger pulls the ground
- Measurement combined with pin 4
- 3: Quick charger port temperature sensor signal 1
- Probably 10k25C NTC; one end on the pins 16
- 4: Quick charger start / stop signal 1
- The charger raises to 12 volts
- Measurement combined with pin 2:
- -> 750ohm (2x1206) -> PC500 Opton Input -> CN100p2
- In addition to the PC500 opto input, 1kohm
- Measuring the ground:
- -> 750ohm (2x1206) -> PC501 Opton Input -> GND
- In addition to the PC500 opto input, 1kohm
- 5: Quick charger permit signal
- Output from PDM, pulled to ground with 200ohm 1W resistor (2S2P
200ohm 1206)
- 6: Quick charger connection signal
- For PDM up to 12 volts, the charger pulls the ground
- 1000kohm 0.5-1W resistor for P transistor collector, transistor
The emitter current is measured by an opto-isolator PC502 (type M49T) with 12V
the rail connects
- 7: Wrong Name of Datasheet: "Plug in signal"
- Prototype PDM EVSE PWM
- Output from PDM, pulled to ground with 600ohm 0.5W resistor (2P
1200ohm 1206)
- 8: High voltage harness connector detecting circuit signals
- Connected to safety switch stop CN5405p2 (parallel;
- 9: Wrong Name of Datasheet: "EVSE communication (PWM)" [i / o]
- 0ohm with resistance to diode (J1772)
- After the diode signal input
- After the diode 2.74 Ohm to ground (J1772)
- After the diode 1.3k open Collector output (J1773)
- 10: EVSE connection signal [in]
- In Prototype PDM, EVSE connection signal
- 330ohm to 5 volts (J1772)
- 22kohm to the ground and a little cob to the side
- 11: Quick charger communication-H (CAN)
- 12: High voltage harness connector detecting circuit power supply
- Connected to safety switch stop CN5405p1 (parallel;
- 13: Quick charger communication-L (CAN)
- 14: (Not documented) (GND on PCB)
- 15: EV system CAN-H [i / o]
- 16: Quick charger port temperature sensor 2
- Probably 10k25C NTC; one end on the pins 3
- 17: EV system CAN-L [i / o]
- 18: (NC)
- 19: (NC)
- 20: (NC)
- 21: Battery power supply
- 22: (NC)
- 23: Battery power supply
- 24: Power ON power supply

CN5405:
- DC-DC and CHAdeMO auxiliary plate
- JST-S20B-PADSS-1
- Pinout:
CHAdeMO:
- 1: Enclosure Safety Switch End (Direct Switches in Series)
- 2: End of chassis safety switch stop
- 3: F / C 2 gray (contactor right, for common Collector control)
- 4: F / C 1 green (contactor left, for common Collector control)
- 5: F / C 5 red (common fuse for F / C board (1.5A fast)
24V) from CN100 pin1)
- 6: F / C 3 yellow (contactor common)
- According to CHAdeMO spec, should be switched + 12V from charger
- 7: F / C 4 white (Logic power)
- 8: F / C 6 blue (Logic GND)
DC-DC
- 9: GND
- 10: Operating voltage for DC-DC (5V) (Initial 1.0A from R1501 regulator
(entry A1J050))
- 11: GND
- 12: DC-DC pulls the ground if the current limit is exceeded (initial 10k resistor
for pnp transistor base, transistor output for processor)
- 13: NC, the components are missing
- 14: DC-DC pulls the ground in some situation; some kind of voltage limit? (Art. 10k
resistor to pnp transistor base, transistor output
processors as well)
- 15: DC-DC pulls the ground if OK (initial 100ohm low response)
somewhere)
- 16: I2C SCL
- 17: Input for DC-DC: 5V = DC-DC on, 0V = turn on
(Originally 100ohm with a low response to the "E-2" marked five-legged
and port TC7S08F, fed by Renesas and adjacent
"24" marked transistor (npn))
- 18: I2C SDA
- 19: 10k25C NTC under DC-DC converter (on PDM frame) (orig: +)
- 20: 10k25C NTC under DC-DC converter (PDM body) (Origin: GND)

CN5401:
- Charger control
- JST-S16B-PADSS-1
- Pinout:
- 1: + 15V
- max. 300mA (5A charger output) (voltage without load and
with load 15V)
- 2: GND
- separated level # 1, small with common mode choke + 15V
- 3: + 15V
- connected to pin 1
- 4: GND
- connected to pin 2
- 5: ISO7241C # 2 A
- can bind to the ground; 5V = disable CHECK of the chipper
- 6: AC supply relay
- extension pin 1
- 7: ISO7241C # 2 B
- GND = chipper disable, 5V = chopper running CHECK
- 8: AC supply relay
- extension pin 2
- 9: ISO7241C # 2 C
- can bind to ground, 5V = disable CHECK
- 10: SDA
- 11: ISO7241C # 2 D
- output from charger: GND = chopper running, 5V = no k CHECK
- 12: SCL
- 13: ISO7241C # 1 A: 4052 S1
- Standing in 5V measurements but maybe doing something
- 14: ISO7241C # 1 B: 4052 S2
- to switch between the temperature sensor of the PFC and the charger pads
- 15: ISO7241C # 1 C:
- 5V (?)
- 16:?

CN5102:
- JST-S02B-PASK-2
- Relay charge output from charger
- Relay with 832A-1A-FS 12VDC coil, coil resistance 155ohm, current 77mA
- 1: Relay on AC input, connected to pin 6 of CN5401 (+ 15V active)
- 2: Relay on AC input, connected to pin 8 of CN5401 (+ 5.6V active)

CN5403:
- Operating voltage for DC-DC
- JST-S02B-PASK-3
- 1: + 16V (up to 50mA with DC-DC converter up to ~ 1A with 12V charging current)
- 2: NC
- 3: GND (separated # 2, small common mode choke)

CN5404:
- Operating voltage on the output side of the charger
- JST-S02B-PASK-2
- 1: + 16V (max. 30mA (5A charging current)
- 2: GND (separated # 2, big common mode choke over CN4503)


A DC-DC converter
-------------

The disc is controlled by a few detached signals as well as one circuit, IC1514, on I2C
which is MCP4728 at 0x60.

The main rotary controller is UCC2895 controlled by EAP and SS / DISB.
- EAP can pull two different connections to the ground:
- PC1300: Pin 7 active low (output B) of IC1302
- PC1301: pin 1 active low (output A) of IC1302
- One SS / DISB pin can be pulled into the ground:
- Some transistor controlled by PC1500; probably activating PC1500
enabloys the chipper

IC1514: MCP4728 (I2C DAC)
- Output A: Current limit? Combines with resistors to IC1100 pin 3 (1in +)
- Output B: Goes scaled and filtered to the pin of IC1302 5
- Output C: Not connected
- Output D: Not connected

IC1302: NJM2737 (Dual opamp)
- 1: A OUT:
- 2: A IN:
- 3: A IN +:
- 5: B IN +: DAC output B
- 6: B IN-: 100k resistor to pin 7, 10k resistor to IC1100 pin 7
- 7: B OUT: Active low PC1302 (Drives the chip controller to the EAP country)

IC1100: TLE2022 (Precision opamp)
- 1: 1out: H = current below set limit; buffered with transistors CN1501
           the pin 10 so that if the current limit is exceeded, the collector will pull
- 2: 1in: 2out (confirmed current measurement)
- 3: 1in +: Through resistors IC1514 DAC output A (current limit?); 58kohm-> 1out
- 4: GND
- 5: 2in +: IC1504 (MAX4378 current sense amp) output
- 6: 2 -: 3.3k / 1.5k resistance distribution from the outlet to the ground
- 7: 2out: 1-; IC1302 B IN; confirmed current measurement
- 8: Vcc +

IC1102: LMV842 (Dual opamp "K409")
- 1: Aout: Disable PC1500 (active high)
- 2: Ain-: Resistant Clash with 840ohm curl C1116 who can be
           an output voltage measurement filter box or timing beam
- 3: Ain +: Konkka & 560ohm + 3.3k + 68ohm to Ain; 47k with resistance to Aoutti; 47 + 3k
           with resistance to I2C SDA
- 4: V-: GND
- 5: Bin +: C1116
- 6: Bin: 6k to ground, 8.2k to operating voltage, cedar output and ground
- 7: Bout: Active high pulls Q1520 with collector CN1501 down to peg 8
- 8: V +

CN1501:
- Current measurement from the DC-DC output plate
- Control from main charger plate
- Pinout:
- 1: (-> CN5405 19) 10k25C NTC under DC-DC converter (PDM body)
- 2: (-> CN5405 20) 10k25C NTC under DC-DC converter (PDM body)
- 3: (-> CN5405 17) PC1500 control; H = chipper on
- 4: (-> CN5405 18) I2C SDA
- 5: (-> CN5405 15) Output: H = PC1500 disable (Q1521 <- Q1509 <- IC1102)
- 6: (-> CN5405 16) I2C SCL
- 7: (-> CN5405 13) NC, components missing
- 8: (-> CN5405 14) OC output; some kind of voltage limit? (Q1520 <- IC1102 Bout)
- 9: (-> CN5405 11) GND
- 10: (-> CN5405 12) OC Output: Drag if current limit is exceeded (IC1100)
- 11: (-> CN5405 9) GND
- 12: (-> CN5405 10) Operating voltage
- 13: The red-gray pair of red
- 14: The gray of the Punaharma pair
- 15: The gray of the Black Gray couple
- 16: Black in black


Power supply to the original charger processor board
-------------------------------------------------

(names of voltage bars from control_pcb_layered.xcf)

- VCC1: 5V, controlled, produced with IC1501 (R1501 1A LDO)
- CPU Control (# 1, TP219)
- Feeds the DC-DC converter
- VCC2: 5V, always on, produced with IC206 (BD00D0AWHFP 2A LDO)
- Feeds the processor
- Feeds the separator transformer
- VCC3: 12V, always on (possibly via coil and concave)
- VCC4: 5V, transistor-connected VCC2
- CPU Control (# 1, TP219)
- Feed the separator circuits towards the charger and I2C eepromm
- Separator with two separate outputs:
- Output 1: 15V 300mA for charger with common-mode choke PLT10HH9016R0PN (# 1)
- Output 2: 16V, of which:
- 50mA for DC-DC converter (# 2 with its own coaxial choke
PLT10HH9016R0PN)
- 30mA on the output side of the charger (# 2 with its own coaxial choke)
(bit like Kemet SU10VD-20010 but reads R10GE1)
- Control from processor (to RUN pin) (# 1, TP219)
User avatar
celeron55
Posts: 776
Joined: Thu Jul 04, 2019 3:04 pm
Location: Finland
Has thanked: 28 times
Been thanked: 110 times
Contact:

Re: Leaf powered ? (for now)

Post by celeron55 »

johu wrote: Wed Jul 24, 2019 8:50 pm
celeron55 wrote: Fri Jul 05, 2019 7:23 pm To control the charger on the internal i2c bus, there's again just a DAC, again with one weird channel and one useful channel.
Cool, just saw this. How do you access that I2C bus?
You do have to connect the wiring as described in the connector pinouts, or alternatively modify the original board to force the signal levels to the required ones that the board won't make for you by default.

Similarly to the other signals you can cut the i2c off from the Renesas microcontroller and add your own master on the i2c. This is what I did. It was a messy process and I mostly improvised it. I might have photos from some of it.

Of course doing something like this doesn't differ a lot from any other "mod chip" style solution that are used in game consoles and whatnot so it might be worth it to look into the optimal spots for cutting traces and attaching a piggyback controller board.
doobedoobedo
Posts: 260
Joined: Sat Jan 12, 2019 12:39 am
Location: UK

Re: Leaf powered ? (for now)

Post by doobedoobedo »

In order to avoid destroying everything before I've really started I thought I'd best do a pin map of the proprietary leaf connector coming off of the brain board adaptor.

Hope this helps anyone else with one.
IMG_20190727_135841_0.jpg
leaf adapter pin map.png
D@F
Posts: 59
Joined: Mon Dec 24, 2018 1:12 pm
Has thanked: 1 time

Re: Leaf powered ? (for now)

Post by D@F »

nice! someone knows if the original charger could work on a 100s pack ?
doobedoobedo
Posts: 260
Joined: Sat Jan 12, 2019 12:39 am
Location: UK

Re: Leaf powered ? (for now)

Post by doobedoobedo »

I have batteries!

I contacted Ben (in this thread viewtopic.php?f=12&t=193) and he put me on to the guys he got his cells from.

I'm now the proud owner of 500 EIG C20s, they threw in everything I need to make up 10 10S5P packs from them, and a BMS from MG Electronics (and a bunch of other stuff).

This one of their own packs, in the raw
IMG_20190805_110706.jpg
and ready to go in a car
IMG_20190807_110609.jpg
And how I received the cells
IMG_20190807_151340.jpg
IMG_20190807_151353.jpg
IMG_20190807_151419.jpg
IMG_20190807_151925.jpg
doobedoobedo
Posts: 260
Joined: Sat Jan 12, 2019 12:39 am
Location: UK

Re: Leaf powered ? (for now)

Post by doobedoobedo »

Just got the motor spinning with FOC control over CAN. Smooth as silk with 60V supply. Very happy right now.

Going to check syncofs tomorrow.
Igor
Posts: 32
Joined: Wed Jul 17, 2019 5:55 am
Location: Wellington, NZ
Has thanked: 6 times

Re: Leaf powered ? (for now)

Post by Igor »

Nice work. Lots of Leaf motors spinning up lately!
doobedoobedo
Posts: 260
Joined: Sat Jan 12, 2019 12:39 am
Location: UK

Re: Leaf powered ? (for now)

Post by doobedoobedo »

Cheers :).

Yes, it's good to see the motors having a second life, plenty of scrap leafs around too.

Syncofs was 500 - no movement between 0 and 1000, slow movement at 1100.
doobedoobedo
Posts: 260
Joined: Sat Jan 12, 2019 12:39 am
Location: UK

Re: Leaf powered ? (for now)

Post by doobedoobedo »

Been doing some field weakening experiments.

Assuming fweak = rpm/60

The more negative idweak the faster it goes.
doobedoobedo
Posts: 260
Joined: Sat Jan 12, 2019 12:39 am
Location: UK

Re: Leaf powered RX8

Post by doobedoobedo »

Well I think I've got myself an RX8 to bung all this stuff in. Going to finalise it out at the weekend.
User avatar
sfk
Posts: 289
Joined: Mon Jan 14, 2019 8:29 pm
Location: Wellington, NZ
Has thanked: 2 times

Re: Leaf powered RX8

Post by sfk »

I think the RX8 will be an excellent platform for the Nissan Leaf donor gear to go into.
The car itself is very well balanced and only let down by the reliability of the engine.
The Leaf motor is probably pretty similar in size to the rotary so shouldn't upset the balance.
The RX8 was disregarded because it didn't live up to the FD RX7's legacy.
For this reason they are very common and very cheap to get hold of currently.
But only for a while until they become "the last rotary" and start to command classic prices.

I'm considering picking one up with a manual transmission and ruined engine to mess around with.
So I'm interested very much in your progress.
-< Mazda Eunos JC Cosmo rotary -> EV conversion w/ Lexus GS450H gear >-
doobedoobedo
Posts: 260
Joined: Sat Jan 12, 2019 12:39 am
Location: UK

Re: Leaf powered RX8

Post by doobedoobedo »

Yes they are really nice cars, 4 usable seats, great handling. Severely let down by the durability of the engine, hence cheap and pretty readily available. Just need to watch out for rust, the one I've got appears to be solid with no sign of rust where they usually go.
doobedoobedo
Posts: 260
Joined: Sat Jan 12, 2019 12:39 am
Location: UK

Re: Leaf powered RX8

Post by doobedoobedo »

A couple of pics of the car.
IMG_20190915_111754.jpg
IMG_20190915_111724.jpg
doobedoobedo
Posts: 260
Joined: Sat Jan 12, 2019 12:39 am
Location: UK

Re: Leaf powered RX8

Post by doobedoobedo »

Thought I'd just give a quick update.

I've been slowly but surely stripping out all the oily bits, I was hoping it was going to be a bit quicker than this, but whoever worked on various bits of the car before doesn't seem to have believed in torque wrenches and everything appears to have been done up to the 'as tight as humanly possible' setting. I snapped a T-Bar undoing one of the wheel nuts! On the plus side I've only sheared one (small, unimportant) bolt. Engine and box should be finally coming out this weekend :).
User avatar
Tremelune
Posts: 64
Joined: Mon Jun 10, 2019 6:07 pm
Location: Los Angeles
Has thanked: 1 time
Been thanked: 7 times

Re: Leaf powered RX8

Post by Tremelune »

Some of the best money I've ever spent was on an electric impact driver.
doobedoobedo
Posts: 260
Joined: Sat Jan 12, 2019 12:39 am
Location: UK

Re: Leaf powered RX8

Post by doobedoobedo »

That was something I have been considering getting and I think it would have helped with the wheel nuts. I even have a set of impact sockets which I got for their depth, so I've really got no excuse...
User avatar
sfk
Posts: 289
Joined: Mon Jan 14, 2019 8:29 pm
Location: Wellington, NZ
Has thanked: 2 times

Re: Leaf powered RX8

Post by sfk »

Sounds like an impact gun wouldn't even shift those fasteners, if you're struggling and breaking hand tools.

Great thing to have though.
-< Mazda Eunos JC Cosmo rotary -> EV conversion w/ Lexus GS450H gear >-
doobedoobedo
Posts: 260
Joined: Sat Jan 12, 2019 12:39 am
Location: UK

Re: Leaf powered RX8

Post by doobedoobedo »

Well I finally have a big hole to fill. Rotary is seriously heavy for it's size.
IMG_20191116_124221_1920.jpg
Still need to remove the fuel tank and diff, but I can move it into my garage now.
User avatar
jnsaff
Posts: 176
Joined: Fri Oct 18, 2019 7:42 am
Location: Tallinn, Estonia
Has thanked: 2 times
Been thanked: 8 times

Re: Leaf powered RX8

Post by jnsaff »

Have you kept track how much weight you have removed as the oily bits and what’s the general budget for adding EV stuff?
doobedoobedo
Posts: 260
Joined: Sat Jan 12, 2019 12:39 am
Location: UK

Re: Leaf powered RX8

Post by doobedoobedo »

No not fully, I have a rough idea though and I still have all the bits I took off. I joined the owners club, and have a spreadsheet with the weight of every single part on the car (down to individual bolts!) ie. the engine with no accessories is ~132Kg, the gearbox ~45Kg etc.
Post Reply