Page 1 of 2
Leaf Gen1 Charger Upgrade
Posted: Fri Feb 14, 2020 5:09 pm
by Jack Bauer
New project : (Can someone please update the Damien's task list thread) Replace the busted 3.3kw charger in my wife's 2011 Leaf with a 10kw Tesla Gen2. It is valentine's day after all and I could probably buy 2 or 3 Tesla charger for the price of a silly 3.3kw leaf version. This enterprise will hinge around CAN messages. Updates as they happen:)
Re: Leaf Gen1 Charger Upgrade
Posted: Fri Feb 14, 2020 6:16 pm
by JaniK
Do you think a 6,6kw Leaf charger would be accepted by the Leaf without modification? Just asking because it has many times been on my mind for my daily driver.
Re: Leaf Gen1 Charger Upgrade
Posted: Fri Feb 14, 2020 7:54 pm
by MattsAwesomeStuff
Jack Bauer wrote: ↑Fri Feb 14, 2020 5:09 pmIt is valentine's day after all
She only married you like, a year ago. She knew exactly what she was in for.

Re: Leaf Gen1 Charger Upgrade
Posted: Sat Feb 15, 2020 10:56 am
by Jack Bauer
I have no idea if the 6.6kw would be a fit. Probably not in the Gen1 I would guess.
So first up I found a source of some CAN dbc files for the Leaf :
https://github.com/damienmaguire/leaf_can_bus_messages
Probably pointless asking but does anyone know the messages specific to the charger?
Re: Leaf Gen1 Charger Upgrade
Posted: Sat Feb 15, 2020 11:31 am
by Jack Bauer
The main problem is the car is in limp mode (limited to 30mph) with the dtc as in the picture. My mains need now is to get it out of limp.
Re: Leaf Gen1 Charger Upgrade
Posted: Sun Feb 16, 2020 11:48 am
by Jack Bauer
So turns out a gen 1 leaf charging port is smarter then me. Who knew. Our Nissan friends decided to add a 2k7 resistor between ground and proximity and measure that to ensure someone like me hasnt been messing with the wiring. Oh and of course wrap it in tape to keep the wet in. Oh no! the resistance of the wet has pulled the proximity line out of spec! SHUTDOWN! SHE'S GONNA BLOW!!!
Re: Leaf Gen1 Charger Upgrade
Posted: Sun Feb 16, 2020 3:58 pm
by JaniK
So did you dry it and get it working now?
Thats good to know.. no more pressure washing engine bay...
Re: Leaf Gen1 Charger Upgrade
Posted: Sun Feb 16, 2020 4:25 pm
by Jack Bauer
Yes. Up and running. So in order to work out the messages required to replace the charger I'll need a CAN "man in the middle" board. Looking around the web there seem to be quite a few but of course none actually available for sale and naturally none opensource. Oh well. Guess I'll just give up....
...yeah right! Time to fire up Designspark:)
Re: Leaf Gen1 Charger Upgrade
Posted: Wed Feb 19, 2020 7:36 am
by zippy500
Be good if someone could make a interface board to use the charger standalone, I'm sure there a lot of unused leaf chargers sitting on peoples garage floors
Re: Leaf Gen1 Charger Upgrade
Posted: Wed Feb 19, 2020 8:17 pm
by rgjones
Id like to volunteer to help with FW on a MITM board. Have worked on proprietary version using TI EK123 processor which worked great, but would love to see a small formfactor, low cost opensrc board that runs off 12V automotive.
Re: Leaf Gen1 Charger Upgrade
Posted: Thu Feb 20, 2020 8:16 am
by Jack Bauer
Thanks for that. Plan is to use an STM32F105 as it is dual canbus and plenty fast.
Re: Leaf Gen1 Charger Upgrade
Posted: Sun Feb 23, 2020 4:00 pm
by Jack Bauer
So after a week of unsuccessfully trying to contact several people who claim to sell a can "man in the middle" board, I have thrown together a quick design based on an STM32F105. Uses an Ampseal 8 pin connector. One problem I have is I can't seem to identify the BOOT1 pin on the '105. Any ideas?
https://github.com/damienmaguire/CAN-BU ... The-Middle
Now just need to get some software up and running. This could also be used for Leaf battery swaps:)
Re: Leaf Gen1 Charger Upgrade
Posted: Sun Feb 23, 2020 10:51 pm
by kiwifiat
Jack Bauer wrote: ↑Sun Feb 23, 2020 4:00 pm
One problem I have is I can't seem to identify the BOOT1 pin on the '105. Any ideas?
Maybe section 14.3.2 of AN2606 is your problem:
"14.3.2 Bootloader unavailability on STM32F105xx/STM32F107xx devices
with a date code below 937
Description
The bootloader cannot be used if the USART1_RX (PA10), USART2_RX (PD6, remapped),
CAN2_Rx (PB5, remapped), OTG_FS_DM (PA11), and/or OTG_FS_DP (PA12) pin(s) are
held low or left floating during the bootloader activation phase.
The bootloader cannot be connected through CAN2 (remapped), DFU (OTG FS in Device
mode), USART1 or USART2 (remapped).
On 64-pin packages, the USART2_RX signal remapped PD6 pin is not available and it is
internally grounded. In this case, the bootloader cannot be used at all.
Workaround
For 64-pin packages
None. The bootloader cannot be used. "
It would seem from the datasheet neither 64 or 100 pin variants have boot1.
Re: Leaf Gen1 Charger Upgrade
Posted: Mon Feb 24, 2020 2:11 pm
by Jack Bauer
Great thanks. Wasn't sure if I was missing something.
Re: Leaf Gen1 Charger Upgrade
Posted: Mon Mar 02, 2020 7:49 am
by Jack Bauer
Mitm board based on stm32f105 is in production.
Re: Leaf Gen1 Charger Upgrade
Posted: Mon Mar 02, 2020 8:17 am
by Bigpie
Damn it. This gives me an idea for another project, now I'm thinking my car doesn't have automatic headlights. Are any of the stm32 io pins on the breakout pins?
Re: Leaf Gen1 Charger Upgrade
Posted: Mon Mar 02, 2020 1:53 pm
by Jack Bauer
There are 2 leds and usart one is on a header. Take a look at the schematic on github.
Re: Leaf Gen1 Charger Upgrade
Posted: Mon Mar 02, 2020 2:57 pm
by Bigpie
I'm copying the schematic into Kicad so I can learn a little and try and add some more io pins to the PCB design. I don't have a Windows machine for DesignSpark and Kicad seems to be a well used alternative.
Anyway, it's probably me and not you doing it wrong, but R7 on the schematic and pbc doesn't seem to be connected to Boot 1 pin. I've very little experience with stm32 but I thought to write to it BOOT1 needs to be pulled to gnd and BOOT0 to 3.3v
Re: Leaf Gen1 Charger Upgrade
Posted: Mon Mar 02, 2020 3:08 pm
by Jack Bauer
Yeah I'd love to learn Kicad. Would you mind sharing when done? The STM32F105 doesnt have a boot1 pin hence the non connection. I forgot to delete it!
Re: Leaf Gen1 Charger Upgrade
Posted: Mon Mar 02, 2020 4:01 pm
by Bigpie
Don't mind at all, I was hoping to post it for feedback as the few simple boards I've designed I've used EasyEDA online
I'm miss reading BOOT1 is PB2, will delete.
Would you be able to export PDFs of the other board layers? I want to try and get exactly the same layout to begin with. EDIT NM, opened the gerber files from your repo.
Re: Leaf Gen1 Charger Upgrade
Posted: Tue Mar 03, 2020 12:30 pm
by Bigpie
I've got the schematic into Kicad now, I've not got round to the PCB yet but I've pushed to my repo if it's any use
https://github.com/jamiejones85/CAN-BUS ... The-Middle
Re: Leaf Gen1 Charger Upgrade
Posted: Tue Mar 03, 2020 5:36 pm
by Jack Bauer
Thank you:)
Re: Leaf Gen1 Charger Upgrade
Posted: Thu Mar 05, 2020 10:05 am
by Bigpie
Would anyone mind having a look over my Kicad port of JB's MITM board? Any feedback or improvements would be great. New to this

Re: Leaf Gen1 Charger Upgrade
Posted: Fri Mar 06, 2020 7:08 pm
by Jack Bauer
I would move X1 down closer to the load caps c2 and C3. Also try not to have right angles on tracks. Lovely work:)
Re: Leaf Gen1 Charger Upgrade
Posted: Fri Mar 06, 2020 7:20 pm
by Bigpie
Thanks
I'll make the changes, I might also change the ampseal so I can breakout more of the IO pints.