Leaf Gen1 Charger Upgrade

Nissan Leaf/e-NV200 drive stack topics
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: Leaf Gen1 Charger Upgrade

Post by Jack Bauer »

Got the boards from JLC. Communicating fine with stlink so just waiting on firmware which should be available next week.
Attachments
2020-03-13 12.17.30.jpg
2020-03-13 12.16.40.jpg
I'm going to need a hacksaw
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: Leaf Gen1 Charger Upgrade

Post by Jack Bauer »

Sooo, looking at my old leaf logs :https://github.com/damienmaguire/LeafLogs
with the dbc from Dala : https://github.com/dalathegreat/leaf_can_bus_messages

it would seem that the leaf charger only puts out one message 0x380 and listenes to the lbc for charge limts. Of course it probably has to get a wake up signal from the vcu. Once I get the canbridge up and running in the car we can find out for sure.
I'm going to need a hacksaw
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: Leaf Gen1 Charger Upgrade

Post by Jack Bauer »

Software now available and in beta stage for the man in the middle. I have updated the webshop and github.

https://www.evbmw.com/index.php/evbmw-w ... the-middle

https://github.com/damienmaguire/CAN-BU ... The-Middle

Basic user manual :

https://github.com/damienmaguire/CAN-BU ... manual.pdf
Attachments
2020-03-21 16.17.32.jpg
I'm going to need a hacksaw
damian.lo
Posts: 123
Joined: Sat Dec 22, 2018 12:46 pm
Location: Poland

Re: Leaf Gen1 Charger Upgrade

Post by damian.lo »

Hi,

I have another question according to this charger. Is it possible to use this standalone in my car conversion or we need original Leaf harness + signals from Leaf VCU translated by man-in-the-middle board?
I have possibility to buy this charger and I'm wondering if will be not bad to use this like a second bigger charger to Leaf 80s pack. Is it possible to control voltage + current for this charger via CAN?
User avatar
Bigpie
Posts: 1586
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 74 times
Been thanked: 299 times

Re: Leaf Gen1 Charger Upgrade

Post by Bigpie »

Not with the intention of ruining your retirement to somewhere warm.and sunny, but I've become aware of some little boards that intercepts odometer messages and manipulates.

https://dangerouspayload.com/2020/03/10 ... er-device/

Basically looks to be the same microprocessor STM32F105 on a small board with SWD/boot0 & RXTX exposed so could be repurposed for other can bus MITM tasks. They appear to be <€20. I've not got hold of one to play with yet.
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
User avatar
celeron55
Posts: 774
Joined: Thu Jul 04, 2019 3:04 pm
Location: Finland
Has thanked: 27 times
Been thanked: 110 times
Contact:

Re: Leaf Gen1 Charger Upgrade

Post by celeron55 »

Bigpie wrote: Thu Dec 03, 2020 10:55 pm Not with the intention of ruining your retirement to somewhere warm.and sunny, but I've become aware of some little boards that intercepts odometer messages and manipulates.

https://dangerouspayload.com/2020/03/10 ... er-device/

Basically looks to be the same microprocessor STM32F105 on a small board with SWD/boot0 & RXTX exposed so could be repurposed for other can bus MITM tasks. They appear to be <€20. I've not got hold of one to play with yet.
I think those use an NXP MCU, not STM32.
User avatar
Bigpie
Posts: 1586
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 74 times
Been thanked: 299 times

Re: Leaf Gen1 Charger Upgrade

Post by Bigpie »

Maybe some do, the article says its a STM32F105RBT6 but im no expert, could be repurposed.
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
e^2
Posts: 8
Joined: Wed Jul 10, 2019 3:36 pm
Location: Seattle Wa
Contact:

Re: Leaf Gen1 Charger Upgrade

Post by e^2 »

How does one go about learning how to control CAN items? I'd love to learn how to control my Gen1 or Gen1 leaf chargers for an upcoming upgrade.
collin80
Posts: 110
Joined: Sun Aug 30, 2020 3:28 pm
Location: United States, Michigan
Been thanked: 4 times
Contact:

Re: Leaf Gen1 Charger Upgrade

Post by collin80 »

e^2 wrote: Sun Dec 27, 2020 5:30 pm How does one go about learning how to control CAN items? I'd love to learn how to control my Gen1 or Gen1 leaf chargers for an upcoming upgrade.
Well, the answer for a lot of us was "trying to do it and failing a lot." But, naturally it's nice to skip as much of that as possible. Here's a general outline of what you'd probably do to start an attempt at controlling something new:

1. Take a capture from a working system. If you're trying to control a charger then you'd be capturing the CAN traffic on all CAN buses connected to the charger. This generally requires that you get a schematic of the car so you know which buses are connected and where you might be able to get to them at On the Leaf this is a well trod path and lots of people have taken all sorts of captures. As such, for the Leaf you can probably get away with just using other people's captures but for something less covered you might have to do the capture yourself.

2. Try to replay that captured traffic to the charger and see if that makes it work. The hope is that it does. For things like chargers there can be external signals that might also be required. So, you might need to make sure that the external signals are also proper. If everything is correct then the thing you're trying to control should work.

3. At this point, the idea is to start to reduce the traffic you're sending by message ID. Each CAN message has an ID and what you want to do is quit sending one ID at a time until the charger refuses to continue working. When that happens you know that the charger needs that message. Start sending it again, skip over that one, and keep removing messages until you finally get to a minimal set of messages which are required for the charger to operate.

4. Now that you have a list of messages you have two choices. If the charger works sufficiently you might decide to just keep looping those messages forever and never understand what they actually do. But, usually it's beneficial to try to figure out what those messages do so that you can better control things. For a charger, this might include things like controlling the maximum charge current. And, you probably want to figure out what the charger reports. It probably reports things like the line voltage, line current, output voltage, output current, charger temperature.

To figure out what the data bytes in a message do the easiest approach is to find someone who has already done it for you. Everyone does this, there's no shame in that. If you can dig up some data that saves you a lot of time and frustration. So, first things first, go try to find data. For the Leaf there's a lot of CAN decoding that other people have done. Start with that. You might want some things that nobody has figured out. For that the easiest approach is to look at captures where you know some of the real world details. For instance, if you started a charger when you know the outside temperature is, say, 20C then you look for data that seems to match some multiple of that value. Maybe the value stored is 200 for 20.0C in tenths of a degree. If you then have a second capture where the outside (and thus likely starting) temperature is 10C then you know to try to find a value that is half what it was in the first log. So, comparison and knowing the ballpark you're looking for is key. There exist tools that allow you to visualize CAN data to also help to find signals. I wrote one, SavvyCAN. It's free, if you like it you can use it for free. If not, you didn't pay anything so you didn't lose anything but time.

That all skipped a lot of details. For one, I'm assuming that you already have CAN capture hardware you can use. And, I'm assuming you know what CAN is and have some idea how messages are sent. If not, we'd have to skip back a bit. But, youtube has a lot of tutorials too. If you're OK with video there's lots of people explaining the basics.
lt1pat
Posts: 1
Joined: Thu Oct 07, 2021 1:53 pm

Re: Leaf Gen1 Charger Upgrade

Post by lt1pat »

I'm looking into devices like this that could take a can signal from an ECU (such as Holley) then convert it to a BMW transmission signal. Doing so would require CAN1 to be 1MB and CAN2 to be 500k, as well convert the frame identifier and data. Would something like this be capable of altering both the identifier and content using simple math?
whereswally606
Posts: 43
Joined: Sun Nov 14, 2021 6:16 pm
Has thanked: 1 time
Been thanked: 2 times

Re: Leaf Gen1 Charger Upgrade

Post by whereswally606 »

Hi Folks, happy to find this thread, sad to read someway through it and realise Damien's wife's leaf charger had sprung back into life lessening the haste to which this might happen. Anyway I thought id say hi and that I have a Muxsan'd gen 1 leaf which I too would like to put 1 if not 2 tesla 10kw/h chargers into it and eventually ccs but will be happy to get anything better than 3.6kw/h and also in hot hot weather my charger is prone to shutting down which I believe is due to age and it being badly located inside the vehicle thus gets rather hot in summer. Any progress report on this would be much appreciated. A pen pal called Mo I have is also in the same boat but I believe is further along and has bought the charger bits for hit gen1 leaf too, he is based in Germany but his car is a UK original version (Japanese built but not an aftermarket import) i.e. just like mine but without the Muxsan extender. We also have a 2014 outlander so reading one of the other thread on here where a chap had put a 30kwh leaf pack into his outlander that gives me some food for thought if we do a 40kwh battery swap on the leaf, the outlander might have its old 24kwh pack.
User avatar
asavage
Posts: 328
Joined: Sat May 14, 2022 10:57 pm
Location: Oak Harbor, Washington, USA
Has thanked: 269 times
Been thanked: 103 times
Contact:

Re: Leaf Gen1 Charger Upgrade

Post by asavage »

Does Damien's MITM board . . . work? That is, does someone have good experiences with it?

I'm in the market for a CAN MITM device. Sure, I can buy a ESP or Teensy and roll my own, but I'm not fluent in the tech anymore and it's time I'd rather spend doing other things. Should a reasonably well put together off-the-shelf unit CAN MITM device, with suitable enclosure and reasonably friendly HMI is available at something less than three times what it should be worth, well then I'd just as soon buy one as build one.
Al Savage
2014 RAV4 EV
NissanDiesel
Post Reply