Leaf Gen 1 Inverter Board

Nissan Leaf/e-NV200 drive stack topics
damian.lo
Posts: 123
Joined: Sat Dec 22, 2018 12:46 pm
Location: Poland

Re: Leaf Gen 1 Inverter Board

Post by damian.lo »

Hello,

Here below is my trial with TQFP64 + Johannes v3 board. According to some videos, like:
"www.youtube.com/watch?v=K5NXu20749U"
I used flux (and should be more even I first expected), then maybe better will be to use flat iron, but I don't have this so I used normal sharp iron end.
Important: aligninig is very important like Johannes said - with good position it's really easier. Like is visible - mine is not perfect :)
So, next will be board from Damien (thx Damien - PCB arrived in good condition) with TQFP100, hmm we will see...
Attachments
Soldering_prv.jpg
User avatar
Cookie6000
Posts: 246
Joined: Wed May 08, 2019 9:27 am
Location: Wicklow, IRL
Has thanked: 12 times
Been thanked: 32 times
Contact:

Re: Leaf Gen 1 Inverter Board

Post by Cookie6000 »

OK, so spent the last two nights piecing Damiens VCU board together and have a couple of questions. You can see right away I have not attempted the chip yet. Waiting on a couple of suitable solder tips before I attempt this. Not the tidiest but waiting to do a bit more before cleaning the board down.

Has anyone worked on this and noticed that on the board that C17, 27, 28, 29, 36, 37 (all circled in red) are missing from the BOM? Also, in the BOM, C38 and C35 are nowhere on the board. Can you shed some light Damien if you are reading this?

The others (circled in green) are just component orientation questions. Do I have S1 the right way with the small gap/arrow pointing to the dot on the board? The other is Y1 crystal. There are 3 square pads, and one with a notch taken out of it. Does the 'notch' align with the 'N' on the board?
20191124_095944.jpg
Thanks all!
Home of the #Audi8e - https://twitter.com/FiachraCooke
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 Gen 1 Inverter Board

Post by Jack Bauer »

Cookie6000 wrote: Sun Nov 24, 2019 10:16 am OK, so spent the last two nights piecing Damiens VCU board together and have a couple of questions. You can see right away I have not attempted the chip yet. Waiting on a couple of suitable solder tips before I attempt this. Not the tidiest but waiting to do a bit more before cleaning the board down.

Has anyone worked on this and noticed that on the board that C17, 27, 28, 29, 36, 37 (all circled in red) are missing from the BOM? Also, in the BOM, C38 and C35 are nowhere on the board. Can you shed some light Damien if you are reading this?


The others (circled in green) are just component orientation questions. Do I have S1 the right way with the small gap/arrow pointing to the dot on the board? The other is Y1 crystal. There are 3 square pads, and one with a notch taken out of it. Does the 'notch' align with the 'N' on the board?



Thanks all!
I have updated the BOM to reflect the missing parts. C38 and C35 are most certainly on the board. Look closer:)

The switches are not polarity dependent. Y1 is. Now this is the fun part: some versions of Y1 have the notch in the wrong place so if it doenst talk over usb this is my first port of call. Just flip it 180 degrees. Don't ask me how I know this.
I'm going to need a hacksaw
User avatar
Cookie6000
Posts: 246
Joined: Wed May 08, 2019 9:27 am
Location: Wicklow, IRL
Has thanked: 12 times
Been thanked: 32 times
Contact:

Re: Leaf Gen 1 Inverter Board

Post by Cookie6000 »

Ah!! Of course... I was leaving C38/35 till later. Brain fart sorry.
Thanks for filling in the blanks on the updated BOM and Y1. I have one or two components that were ordered but cannot find so, small order to be made. Thanks. Hope to have it completed during the week.
Home of the #Audi8e - https://twitter.com/FiachraCooke
damian.lo
Posts: 123
Joined: Sat Dec 22, 2018 12:46 pm
Location: Poland

Re: Leaf Gen 1 Inverter Board

Post by damian.lo »

Hello,

Ok, day by day I'm making some progress with soldering this board also but I have also some questions about software, because it's not so clear for me. Damien - You wrote somewhere on 1 or second page that is possible to drive forward and reverse. In my really poor knowledge :) of Arduino programming I doesn't found this section in program. It's somewhere or it was only trial? Also precharge should be controlled by external box, I'm right?
It will be also good if in section for usage BMW speedo/RPM and etc. will be possible to read throttle pedal via CAN like is in my BMW 116, but it's only my small dream :)
Damien - thanks for Your big job for Us.
doobedoobedo
Posts: 260
Joined: Sat Jan 12, 2019 12:39 am
Location: UK

Re: Leaf Gen 1 Inverter Board

Post by doobedoobedo »

If you're looking for CAN bus codes try googling "<whichever car> can bus reverse engineering" quite a few can be found that way as some people are curious for various reasons. The Sim racing crowd are particularly helpful if they like a particular instrument cluster.
damian.lo
Posts: 123
Joined: Sat Dec 22, 2018 12:46 pm
Location: Poland

Re: Leaf Gen 1 Inverter Board

Post by damian.lo »

CAN adresses is no problem, steering of them also is possible to me since I have instrument cluster on bench and I'm able to move the needels. Implementation this into code from Damien (receive BMW throttle value and translation this to Leaf inverter) looks for me now like sci-fi and I'm thinking if Damien maybe already tried something like this. Even some example will be enough to make rest of them.
damian.lo
Posts: 123
Joined: Sat Dec 22, 2018 12:46 pm
Location: Poland

Re: Leaf Gen 1 Inverter Board

Post by damian.lo »

Ho, ho, ho :)

Ok, my board is almost done because of my fault I've missed 3 parts. In BOM are (in red) by 1 pcs, but on pcb are 2. I was looking in quantity column into BOM and now I have to wait until christmas will end :(
Another thing - R6 and R8 (in green), like Cookie6000 wrote are missed in action - will wait, until I will have new glasses.
Below is my board - I hope it will work.

Next days I will start new topic in Projects, where I will start show my progress with BMW E87 with Leaf motor/inverter. I hope it will help other users to go on.
Regards.
d.lo
Attachments
IMG_2272_m_bom.jpg
IMG_2272_m.jpg
damian.lo
Posts: 123
Joined: Sat Dec 22, 2018 12:46 pm
Location: Poland

Re: Leaf Gen 1 Inverter Board

Post by damian.lo »

Today my board is soldered and finished end even LED2 is working, so 3V3 is on board. I want to program this to make some trials, but I haven't present some external libraries.
Previously I want to ask all of You where I can found missed libraries but in meantime I found them, so here are links. Maybe someone will need them also
- due_wire.h (now i found this at https://github.com/collin80/due_wire/bl ... due_wire.h
but then I need to find twi.h which I found at https://github.com/esp8266/Arduino/blob ... 8266/twi.h
- Wire_EEPROM.h at https://github.com/collin80/Wire_EEPROM
Of course we need to install arduino due boards and then on my PC was possible to compile sketch.
Then after compile I had error 0x285e0a60 when I tried to write program to ATSAM8E. That means I had to change board from Due-Programming port to Due USB Native Port. Now was possible to write program. Now LED2 shines and LED1 blinks so I think program is working?
On the CAN port interface I hope will be visible some data so later I will connect this to inverter.
User avatar
james@N52E01
Posts: 144
Joined: Wed Sep 18, 2019 7:02 am
Has thanked: 2 times
Been thanked: 3 times

Re: Throtle 5v

Post by james@N52E01 »

Cheers Fiachra, I always thought CAD stood for Crap At Drawing.
Cookie6000 wrote: Tue Jan 28, 2020 11:05 pm @mcgousha, Do you remember where you pulled the 5v from on the Leaf inverter in case Pin26 doesn't work when I test?
Good news on this front at least, just did a quick test and the throttle +ve pin (pin 14 on Damien’s board) is supplying 5v just fine.
1ABD5E8C-2AAA-47A1-B3C9-F5A0604A0F1C.jpeg
User avatar
james@N52E01
Posts: 144
Joined: Wed Sep 18, 2019 7:02 am
Has thanked: 2 times
Been thanked: 3 times

Re: Leaf Gen 1 Inverter Board

Post by james@N52E01 »

damian.lo wrote: Wed Jan 01, 2020 3:16 pm On the CAN port interface I hope will be visible some data so later I will connect this to inverter.
Hi damian.lo, Have you tested CAN messages on the board yet? What program/hardware are you going to use to do this?
damian.lo
Posts: 123
Joined: Sat Dec 22, 2018 12:46 pm
Location: Poland

Re: Leaf Gen 1 Inverter Board

Post by damian.lo »

No, for now no. It's waiting until I will win with v3 board + leaf adapter in my BMW 116. In practise it will be almost the same, because I want to take throttle signal and read by v3 board. I hope I will do this in this week.
For Damien's board I was thinking to use his sketch and modify this to read/write signals from my car. Look at this - at the end of program he wrote instrument cluster steering program. Unfortunately my programming skill is very far from Damien's so it will be longer period :)
If you need other info from me - feel free and ask here.
User avatar
james@N52E01
Posts: 144
Joined: Wed Sep 18, 2019 7:02 am
Has thanked: 2 times
Been thanked: 3 times

Re: Leaf Gen 1 Inverter Board

Post by james@N52E01 »

Thanks damian.lo, good luck with the V3 board and I will send you a message if I get stuck.
User avatar
james@N52E01
Posts: 144
Joined: Wed Sep 18, 2019 7:02 am
Has thanked: 2 times
Been thanked: 3 times

Re: Leaf Gen 1 Inverter Board

Post by james@N52E01 »

Does anyone know the default voltage range for C1 and C2 throttle inputs on this board? I can’t find this information in the arduino code.
User avatar
Thatguyoverthere
Posts: 34
Joined: Fri Jun 28, 2019 5:04 am
Location: California, USA

Re: Leaf Gen 1 Inverter Board

Post by Thatguyoverthere »

On the board, both throttle inputs are halved by a resistor divider, which accounts for the common 0.8V-4.5V output from most hall effect pedals. The ATSAM processor has a max 3.3v input for the Analog input pins (I believe). Note the digital inputs which are 12v in, but get resistor divider'd to approx. 3v. So you'll have to fiddle with the code to calibrate different throttle pedals, but just make sure whatever lands at the pin is under 3.3v.
https://github.com/kaelinwilson
Leaf Motor/Gen1 Camry Inverter
User avatar
Cookie6000
Posts: 246
Joined: Wed May 08, 2019 9:27 am
Location: Wicklow, IRL
Has thanked: 12 times
Been thanked: 32 times
Contact:

Re: Leaf Gen 1 Inverter Board

Post by Cookie6000 »

20200313_220536.jpg
Took a while but, got the board back from resoldering the microcontroller. Nice job too. Today I finished soldering the remaining items including wiring up and labelling the VCU connectors.
20200314_164229.jpg
After that, I proceeded with getting on with the Arduino IDE with the board connected up. When I connect up my FTDI or Arduino Due, no problem. They setup just fine and you can see them. However, when I connect the Leaf VCU, I just get USB connection errors. I try and update drivers with no success. All drivers are up to date.
USB capture.JPG
Damien M did say that there was the odd chance that a crystal could be reversed on the board as their orientation markings changed depending on manufacturer. Does this look like that or is it something more basic I am missing? Tried on two laptops now. Due and FTDI work fine, Leaf VCU not.
Home of the #Audi8e - https://twitter.com/FiachraCooke
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 Gen 1 Inverter Board

Post by Jack Bauer »

The crystal is backwards. That Damien M guy sounds like a moron.
I'm going to need a hacksaw
User avatar
Cookie6000
Posts: 246
Joined: Wed May 08, 2019 9:27 am
Location: Wicklow, IRL
Has thanked: 12 times
Been thanked: 32 times
Contact:

Re: Leaf Gen 1 Inverter Board

Post by Cookie6000 »

Thanks JB. I'll be sure to tell it to his face next time I see him 😉👌
Home of the #Audi8e - https://twitter.com/FiachraCooke
User avatar
Cookie6000
Posts: 246
Joined: Wed May 08, 2019 9:27 am
Location: Wicklow, IRL
Has thanked: 12 times
Been thanked: 32 times
Contact:

Re: Leaf Gen 1 Inverter Board

Post by Cookie6000 »

Crystal flipped. Still nada. R2 and R3 are correct at 39ohm. Dilbert suggested checking as they might have been 3.3ohm.
Next step?

**EDIT - did a bit of a tidy up. small bridge. Can see it now on COM port 8... onto the next stage. As you were...
Home of the #Audi8e - https://twitter.com/FiachraCooke
User avatar
Cookie6000
Posts: 246
Joined: Wed May 08, 2019 9:27 am
Location: Wicklow, IRL
Has thanked: 12 times
Been thanked: 32 times
Contact:

Re: Leaf Gen 1 Inverter Board

Post by Cookie6000 »

Good few nights this week to get where we are now. Followed arbers instructions flashing the ESP8266 via the FTDI board all the way down to the last line - connect your board to Johannes board...
Am I correct in saying that the Johannes web interface will work with the @evbmw Leaf VCU or have I missed a beat? Reason I ask, James (project Fig-leaf) and me have been working together to get to this point and where we see this when we both connect up our inverter and boards. No settings.
JohannesWebInterface.jpg
Should we be doing everything through IDE or should http://192.168.4.1/ be working? All ready to go...
20200318_223235.jpg
Home of the #Audi8e - https://twitter.com/FiachraCooke
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 Gen 1 Inverter Board

Post by Jack Bauer »

So folks where exactly did it say that I had implemented a fully featured interface for this thing using the inverter web front end? I think it's a really cool idea by the way but sadly my attempts to clone myself have been .... well.....messy so far thus I have not done so.

Now, it is your lucky day as I have just been doing some donuts in the grey goose and have posted a new firmware AND a Wifi display on the github. You will however have to wade through my feeble attempts at C programming to calibrate your throttle etc.
I'm going to need a hacksaw
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 Gen 1 Inverter Board

Post by johu »

Is the VCU already using the STM32? If so I think it wouldn't take me long to port the firmware to "libopeninv" and thus make it fully compatible with the existing web interfaces (mine and Dimas)

EDIT: just checked - SAM3X so no easy porting :(
EDIT2: actually the vital parts are hardware-independent. Make some noise if you want me to tackle it.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
Cookie6000
Posts: 246
Joined: Wed May 08, 2019 9:27 am
Location: Wicklow, IRL
Has thanked: 12 times
Been thanked: 32 times
Contact:

Re: Leaf Gen 1 Inverter Board

Post by Cookie6000 »

Jack Bauer wrote: Fri Mar 27, 2020 6:33 pm So folks where exactly did it say that I had implemented a fully featured interface for this thing using the inverter web front end? I think it's a really cool idea by the way but sadly my attempts to clone myself have been .... well.....messy so far thus I have not done so.

Now, it is your lucky day as I have just been doing some donuts in the grey goose and have posted a new firmware AND a Wifi display on the github. You will however have to wade through my feeble attempts at C programming to calibrate your throttle etc.
Soooo you're saying there's a chance.... :lol: Yes, I may have jumped into the wireless interface side of the control with some blind optimism... so no. no, you never ever ever uttered it. I think I have watched so many hours of VCU centric youtube and so many threads in here, they all melded together to convince me otherwise. Since you have thrown up a new treat though, we are more than willing to jump all over it and give it a blast :D
johu wrote: Fri Mar 27, 2020 7:13 pm EDIT2: actually the vital parts are hardware-independent. Make some noise if you want me to tackle it.
How much noise do I/we have to make? How many evbmw boards are out there do you think at this stage JB? I know of at least 5 or 6 projects in motion or pending including mine that use the evbmw Leaf VCU. Probably more that have not revealed themselves yet. Let me know how I can help if any.
Home of the #Audi8e - https://twitter.com/FiachraCooke
User avatar
james@N52E01
Posts: 144
Joined: Wed Sep 18, 2019 7:02 am
Has thanked: 2 times
Been thanked: 3 times

Re: Leaf Gen 1 Inverter Board

Post by james@N52E01 »

johu wrote: Fri Mar 27, 2020 7:13 pm Is the VCU already using the STM32? If so I think it wouldn't take me long to port the firmware to "libopeninv" and thus make it fully compatible with the existing web interfaces (mine and Dimas)

EDIT: just checked - SAM3X so no easy porting :(
EDIT2: actually the vital parts are hardware-independent. Make some noise if you want me to tackle it.
Noise! Lots of noise! 8-)
User avatar
Cookie6000
Posts: 246
Joined: Wed May 08, 2019 9:27 am
Location: Wicklow, IRL
Has thanked: 12 times
Been thanked: 32 times
Contact:

Re: Leaf Gen 1 Inverter Board

Post by Cookie6000 »

Ploughed ahead and flashed the leaf vcu with the new firmware update as outlined below. Tricky finding the ISA.h libraries but found the zip file here in the end at the end of the page:
http://store.evtv.me/proddetail.php?prod=1kshunt

I found though when compiling, an error appeared referencing ISA2.h library
ISA Shunt.JPG
Opened the .h and .cpp file that were causing the error and removed the '2' in 3 locations in the code and all ran fine then. I am a basic programmer but it made sense to me to do it. Correct me if I made a balls. Now I have a vcu newly flashed with all the updated features added complete with slower flashing led for ref.

After that, via the FTDI board, I flashed the ESP8266 as before -
1. Solder GPIO0 to 0
2. Verify code in Arduino IDE - Set - Erase Flash: "Sketch + WiFi Settings"
3. Flash code onto the ESP8266 - all good, flashing green led
4. Solder GPIO0 to 1 to seal bridge back for operation

All good. Connected the Olimex up to the board and the inverter. Powered up inverter and board. All flashing as it should.
Connect up the laptop to the WiFi module, check.

Question 1 - Not sure what I am looking for yet. Is there a separate IP address connect similar to 192.168.4.1? I don't see any in the code, only the html references here.
evbmw wifi.JPG
Question 2- In the IDE, when I hardwire the VCU and open the Serial Monitor, I get Voltage info fed back on the screen. Should I remain on the Native USB Port or change to Programming port to send torque commands? Sorry for these questions that might seem fundamental. Learning this side of the build as I go. Thanks
Home of the #Audi8e - https://twitter.com/FiachraCooke
Post Reply