Controlling the Leaf Inverter on its own

My Nissan Leaf Forum

Help Support My Nissan Leaf Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
Great work going on here. Thanks for sharing :D

I've been working with a plug'n'play module from http://www.thunderstruck-ev.com/dilithium-vcu.html. It goes great on a G2 motor inverter but only in reverse on a G1 (I haven't ruled out wiring harness mistakes but I'm 95% sure I've done it right). Do any of you have data from a G1 and G2 inverter to share and compare? I'm interested to see any differences that there might be.

Here's my rig going:
[youtube] http://www.youtube.com/watch?v=8xjG_AcFs70 [/youtube]
 
I've been using my DIY inverter controller now for over 4000km in my project. It works well with full power and torque available.

I've been asked about certain additional details about the inverter protocol (by email, mostly), so I went and added some to here: http://productions.8dromeda.net/c55-leaf-inverter-protocol.html

Here's some snow drifting, because of course:

[youtube]http://www.youtube.com/watch?v=NoQINzi9J1c[/youtube]

EDIT: Here's a gallery of the insides of that thing: http://packages.8dromeda.net/evprevia/gallery/
 
celeron55 said:
I've been using my DIY inverter controller now for over 4000km in my project. It works well with full power and torque available.

I've been asked about certain additional details about the inverter protocol (by email, mostly), so I went and added some to here: http://productions.8dromeda.net/c55-leaf-inverter-protocol.html

Here's some snow drifting, because of course:

[youtube]http://www.youtube.com/watch?v=NoQINzi9J1c[/youtube]

EDIT: Here's a gallery of the insides of that thing: http://packages.8dromeda.net/evprevia/gallery/

Awesomeness! :mrgreen: :D
There's so many of those stinky Estimas stinking up NZ, what a good use of them!
 
Amazing work!

So the Canbus messages the DUE is sending is enough to convince the Leaf controller that the rest of the car is there and working?

I have seen a few videos of people struggling to get the drive running due to not having every ancillary box attached? Or is that only a problem if using the Leaf VCM? The DUE is basically replacing the VCM?
 
Hello,

I have an inverter from the 2018MY LEAF, and I would like to try to install it to my 2013MY. Do you know, if the motor power is preset in the VCM or the inverter? Currently I have the 30kWh VCM, but the question is, if I install the 2018MY inverter, to the 2013MY, will I get 150PS?
 
Kind time!
I want to implement a counter algorithm from 0 to 3. E celeron55 on the page has an algorithm of 0x07 | (counter < < 6), but I cannot implement it. How do I write the code correctly?
 
In the setup section of your code, define an integer counter, eg

int k=3; [This initializes the counter.]

then in your main program you can increment this counter and adjust it such that you can use it's value as the data field in the PID at the byte location.

k++; [This line increments the counter.]
k=k % 4; [This line adjusts the counter to be a value from 0 to 3. (% gives modulus remainder)]

Put your code to write the data field:
PID_number[data_byte_field_number]=k;

e.g. if using PID 0x11A, the counter is in data byte field number 6 or 0x06
so you could fill that byte with a line in the main program such as:
0x11A[6]=k;
Good luck and keep safe,
 
has anyone used the circuit board from " openinverter.org"?
https://openinverter.org/shop/

I have one and now I want to go back and use the oem vcm because I want to use the oem charger.

maybe I am overlooking something .

my project is an electric boat, and I want to delete the park motor. anybody else done that and what are the CAN messages I need to spoof for the absent park motor?
 
Hello, I am part of a student racecar building team called Armature Racing (http://www.armatureracing.com/, and we are using the Nissan Leaf 2012 inverter, motor, and battery in conjunction with Damien Maguire's code (https://github.com/damienmaguire/Nissan-Leaf-Inverter-Controller) for the Arduino Due to control to inverter. Today, we have tested sending torque commands to the motor. The torque commands were successfully sent, but did not spin the motor at all, and a speed of 0 RPM was reported by the CAN messages. Furthermore, a high pitched squealing sound started emitting from the motor, indicating that the motor is stalling. When applying higher speeds, this squealing sound only became louder.

We have the Nissan Leaf gearbox (set 7:1) mounted on the motor, and I believe that the static friction from this gearbox is what is causing the motor to stall. Force is being applied but there is no rotation of the axle to be found. The torques we tested the motor for were between 0 and 400 (on a scale from -2048 to 2048, seeing as the inverter requests a 12 bit torque). At 400, the squealing became loud enough to where we felt concerned and immediately stopped.

Does anybody have any advice or information regarding these issues? It would be much appreciated.
 
Have you checked to make sure the transaxle isn't damaged, and that the parking pawl isn't engaged? I don't think that a working transmission would offer enough resistance to stall that motor.
 
We fixed it. The parking actuator was engaged, so we had to manually disengage it as we are not including the electric parking brake module in the car. Thanks for your help anyways!
 
Looking at your website, I see this:

2.2 seconds to 60 mph
170 mph
100 miles on charge

I see this conceptual mistake in the electric bike forums a lot: you look at the capabilities of a drivetrain with various configurations, and think that they can be combined - added together, if you will. The reality is that when you are looking at high acceleration, high top speed, and high energy efficiency, you can only have ONE of those three things in a given configuration. Sometimes, with a lot of work, you can manage two of them - although only rarely. Here are the reasons:

* High top speeds combined with high acceleration are incompatible with motors like those used in the Leaf, because the low gearing required to get the acceleration boost will also lower the top speed. Over-revving the motor enough to get the lost speed back will likely get you a destroyed motor, so unless you start with a motor capable of both high torque AND ultra-high RPM, you have to choose between great acceleration and a high top speed.

* Both high acceleration and high top speed require enormous amounts of energy, both in discharge amperage and total amount of energy. A Leaf pack definitely won't provide you with either, and even a custom-built pack is going to have to be huge, with a very high C rate*, to provide enough power for both sub 3 second 0-60 and (especially) 170MPH top speed. Realistically, I think that you need a goal of maybe 120-130MPH, and to combine that with the acceleration you desire, you will need a two speed transmission, as Porsche uses in the Taycan. Since it looks like you are going with a small body, that will still require a battery pack with a VERY high energy density, and since packs like that tend to be not extremely safe...

* C rate is the discharge (or charge) rate, expressed as a multiple of the pack's capacity. So a 40kwh pack with a 2C discharge rate can produce 80kw of power...for less than 30 minutes before it's depleted.
 
Speaking about controlling the LEAF inverter, I just got done with that part on my project car, using the Resolve-EV controller. Here are som videos on the current state of the build

https://www.youtube.com/watch?v=2bWuGUKpgUI
https://www.youtube.com/watch?v=EgJlZL-oidY
 
I'm trying to control my leaf inverter on its own with an arduino.
I've read 'celeron55's page on the inverter protocol
http://productions.8dromeda.net/c55-leaf-inverter-protocol.html
I'm not experienced in coding, and can't fathom what number I'm supposed to put in for 1D4, byte 4
the page states '0x07 | (counter << 6) // Counter counts from 0 to 3'
I've no idea what that means. I assume its not as simple as cycling through 0,1,2,3 every 10ms?
Can some one tell me what should be in byte 4 for each of the four count steps please?
(and specify if thats in HEX or dec if there is no letter included to make it obvious!)
 
I’ve been looking at ‘celeron55’s page on inverter protocol
http://productions.8dromeda.net/c55-leaf-inverter-protocol.html
Its very informative, but not being very experienced in coding, I don’t understand the line on 1D4 byte 4:
0x07 | (counter << 6) // Counter counts from 0 to 3
Can someone simply say what the values (in HEX) need to be that are cycled through?
I’m assuming its not as simple as 0x00, 0x01, 0x02, 0x03?
Any help would be much appreciated.
 
It looks like YY is a byte and the 'counter' is shifted left by 6 bits. So the field would increment bits 7 and 6 as a 2 bit counter (0,1,2,3,0,1,....)

In other words, 0x07, 0x47, 0x87, 0xC7, 0x07.....

in binary, the bytes would look like this:

0000.0111
0100.0111
1000.0111
1100.0111

etc.
 
jharr300 said:
Fab, thanks goldbrick.
Got my Leaf motor spinning with an Arduino and that info! :D

Hi Jharr300,

Why did you have to change the code?

what (exactly) did you change it to?

outFrame.data.bytes[4] = 0x07 | (counter_1d4 << 6);
//outFrame.data.bytes[4] = 0x02 | (counter_1d4 << 6);

counter_1d4++;
if(counter_1d4 >= 4)
counter_1d4 = 0;
 
Hello.
I want to make electric mercedes w202 c180 m/t 1999 year.
I want to put nissan leaf gen 1 motor rear with its differential in the place of the mercedes differential. And inverter will be nearly in luggage place with nissan's onboard charger.
Can anybody help me to know how to control nissan's inverter with arduino or some cheap controler board.
 
Back
Top