Page 1 of 1
Leaf Current Sensor instead of IVT-S
Posted: Mon Jul 07, 2025 8:06 am
by peakPWR
I was wondering whether we could use the current sensor of a leaf contactor box that is connected to the Leaf BMS?
The leaf inverter can measure the voltage for precharge so an IVT is not strictly necessary anymore.
Current measurement is needed for CCS and general limits but needs to be implemented via external current sensor, why not use the internal one (connected to Leaf BMS or directly to a VCU) or did I miss something?
Re: Leaf Current Sensor instead of IVT-S
Posted: Mon Jul 07, 2025 8:36 am
by tom91
Not possible with the Zombie as it is not coded in.
Do you have specs on what the leaf current sensor is?
If you are talking about CCS I would expect you to have a BMS and the BMS should be measuring the current and reporting it.
Re: Leaf Current Sensor instead of IVT-S
Posted: Mon Jul 07, 2025 8:57 am
by peakPWR
Ok thank you for the quick clarification.
The leaf current sensor is a normal hall sensor but with a small offset (0A => 3.25V, instead of expected 0A => 2.5V with normal 5V logic hall sensors).
So basically an ADC reading would suffice but the value needs to be mapped to CAN. This is option 1: connecting sensor directly to VCU and getting current values for things like CCS, monitoring, etc. from there.
But does the leaf BMS not output the current value via can? Then one could connect the current sensor to BMS as intended and rad the current from the
CAN bus which would lead to option 2: leaf BMS + current sensor replaces shunt.
Just a thought of mine, which came up when I connected a leaf conntactor box and saw the unused current sensor. If one of the options works, then Leaf Stack users could who also use BMS and leaf cells can omit the expensive IVT-S shunt completely.
Re: Leaf Current Sensor instead of IVT-S
Posted: Mon Jul 07, 2025 10:23 am
by tom91
peakPWR wrote: ↑Mon Jul 07, 2025 8:57 am
then Leaf Stack users could who also use BMS and leaf cells can omit the expensive IVT-S shunt completely.
... just like Damien done on his truck with the latest firmware release.
Re: Leaf Current Sensor instead of IVT-S
Posted: Mon Jul 07, 2025 10:33 am
by peakPWR
Right, but as far as I know the last release made use of the voltage value provided by leaf interver.
Is the current value of the junction box also used? I don't think so as it is connected to the BMS and is never mentioned anywhere, so I thought it might be worth talking about it
Re: Leaf Current Sensor instead of IVT-S
Posted: Mon Jul 07, 2025 11:27 am
by tom91
Really?
You watch any of the Damien youtube videos? The Leaf BMS is implemented in the Zombie release 2.20A.
also on the wiki
https://openinverter.org/wiki/ZombieVerter_VCU
Re: Leaf Current Sensor instead of IVT-S
Posted: Mon Jul 07, 2025 11:40 am
by peakPWR
The BMS is i know.
But does it use the current sensor in the junction box? It may or may not I don't know that's why I asked. Sorry maybe I did't find the right words to express what I was trying to say...
The Leaf BMS is included but where is the information about the current sensor?
When reading the code I found that:
Code: Select all
if (Param::GetInt(Param::ShuntType) == 0)//Only populate if no shunt is used
{
float BattCur = cur / 2;
float BattVoltage = udc / 2;
Param::SetFloat(Param::idc, BattCur);
if(BattVoltage < 450)Param::SetFloat(Param::udc2, BattVoltage);
if(BattVoltage > 200)Param::SetFloat(Param::udcsw, BattVoltage - 20); //Set for precharging based on actual voltage
float kw = (BattVoltage*BattCur)/1000;//get power from isa sensor and post to parameter database
Param::SetFloat(Param::power, kw);
}
What made me think was the ShuntType 0 and isa sensor part. As the sensor originally used with the leaf battery is a hall sensor not a shunt ?
From the code I can't see where this hall sensor should be used?
To put it in other words: When using Leaf BMS with Zombieverter do I need to have the leaf junction box and current sensor connected to the BMS?
As I can't find an equivalent part in the source code and you mentioned Zombieverter doesn't use the current hall sensor.
-> wouldn't that be something good to add as it would make other current measurements obsolete just like the last FW made voltage sensing obsolete?
Re: Leaf Current Sensor instead of IVT-S
Posted: Mon Jul 07, 2025 11:44 am
by johu
The LeafBMS has a current sensor connected to it. There is no separate junction box logic.
Re: Leaf Current Sensor instead of IVT-S
Posted: Mon Jul 07, 2025 11:46 am
by peakPWR
johu wrote: ↑Mon Jul 07, 2025 11:44 am
The LeafBMS has a current sensor connected to it. There is no separate junction box logic.
Great. And does the BMS report the current values to the CAN Bus? If so I would like to add this information to Nissan Leaf Wiki pages, as I think that's something to consider.
Re: Leaf Current Sensor instead of IVT-S [SOLVED]
Posted: Mon Jul 07, 2025 11:50 am
by johu
Re: Leaf Current Sensor instead of IVT-S
Posted: Mon Jul 07, 2025 12:04 pm
by peakPWR
Oh I missed that link ...
thanks for pointing me in that direction!
so this current value can be used for things like CCS by mapping the current value to the right message of lets say Foccci.
Thanks everything clear on my side now!
Re: Leaf Current Sensor instead of IVT-S
Posted: Mon Jul 07, 2025 12:21 pm
by tom91
peakPWR wrote: ↑Mon Jul 07, 2025 11:40 am
float BattCur = cur / 2;
Param::SetFloat(Param::idc, BattCur);
This is current reported from the BMS, So the code reads as follows
shuntype = 0 ->No shunt used so use the BMS info
Do not look to deep into names of variables and parameters. You are trying to draw conclusions without understand how the data is moved about. Keep in mind code evolves so naming conventions and reasoning gets lost/changes.
Re: Leaf Current Sensor instead of IVT-S
Posted: Mon Jul 07, 2025 3:40 pm
by zippy500
...so if you are not using a leaf BMS , is the IVT-S is needed ?
Re: Leaf Current Sensor instead of IVT-S
Posted: Mon Jul 07, 2025 5:13 pm
by tom91
zippy500 wrote: ↑Mon Jul 07, 2025 3:40 pm
..so if you are not using a leaf BMS , is the IVT-S is needed ?
To do what. Be specific.
Re: Leaf Current Sensor instead of IVT-S
Posted: Mon Jul 07, 2025 7:00 pm
by zippy500
read the current draw/load ?
Re: Leaf Current Sensor instead of IVT-S
Posted: Mon Jul 07, 2025 7:14 pm
by tom91
Sure a current sensor would that. Usually that is connected to a BMS that then sends that info to the ZombieVerter.
Just reading current is not enough usually.
Also analogue sensors are quite finicky to get the readings correct and repeatable so best to reuse as much OEM hardware en software as possible.