Nissan Leaf Gen3 Drop-in board

Nissan Leaf/e-NV200 drive stack topics
User avatar
johu
Site Admin
Posts: 5786
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1021 times
Contact:

Nissan Leaf Gen3 Drop-in board

Post by johu »

I am now testing the new Gen3 control board that was created by jrbe here: viewtopic.php?t=2324

Findings (I will edit this post as I go)
  • Lower two bolt holes (opposite side of ESP32) are about 2mm too far in (will add photo)
  • Sometimes the STM32 does not start up, probably hangs in boot loader - is down to reset timing of ESP32
  • The two fault signals were always low. Reason: R12 was 4R7 instead of 4k7. Removed it. Voltage on DESAT is then 3V. I don't think R12 is needed at all
  • UDC signal is always low. 5V was missing for the udc sensor circuit
  • HS temp signal is always low. It needs a pull-up. I tried with 4k7 to 3v3 which results in 1.7V at room temperature. 5V was missing for the temp sensor circuit
I have been through all unknown signals and none of them change with bus voltage. Also at least on the top side of the gate driver board I can't find the classic resistor chain for voltage measurement. Has Nissan skipped this and just receive it via CAN?
Attachments
1708540088784.jpg
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
jrbe
Posts: 280
Joined: Mon Jul 03, 2023 3:17 pm
Location: CT, central shoreline, USA
Has thanked: 98 times
Been thanked: 71 times

Re: Nissan Leaf Gen3 Drop-in board

Post by jrbe »

I can help with a new revision in Kicad if you want once the bugs are found.
johu wrote: Mon Feb 05, 2024 5:08 pm Sometimes the STM32 does not start up, probably hangs in boot loader. More investigation needed
Odd. That should run with just +12v and ground, no?
The two fault signals were always low. Reason: R12 was 4R7 instead of 4k7. Removed it.
Definitely my mistake. JLC lists that resistor as a 4.7ohm resistor.
Voltage on DESAT is then 3V. I don't think R12 is needed at all
UDC signal is always low. Tried adding a pull-up to 3v3 which just offsets it to 1.1V (4k7) or 2.5V (470R). Not PWM. Is this the correct pin for udc?
UDC is just a straight shot from J1 / 32 pos. Nissan connector to the mainboard. Kelju seemed to get UDC working, viewtopic.php?p=18630&hilit=udc#p18630
I added small vias next to all the unused terminals just in case some bodge wires are needed and hopefully left the traces long enough to cut if needed.
HS temp signal is always low. It needs a pull-up. I tried with 4k7 to 3v3 which results in 1.7V at room temperature. As temperature goes up, voltage drops. The OI "standard" is pulling up with 1k2 to 5V but anything is fine as it will be standardized on the adapter board
Thats strange, you mentioned swapping Kelju's board to a 3k3 pull down here, viewtopic.php?p=23175&hilit=3k3#p23175

Do you think there is a missing power or ground to the drive section of the inverter? The above could make a lot of sense if there is a section that is not powered up. Might explain the low / missing UDC, the always low fault signals (- my 4.7ohm screwup), and the Temp (HS?) needing a pull up.

Also this is the list in the Wiki that needs to be verified. Adding it here so its all in one place (hopefully..)


-The board address needs to be checked with the brake circuit connected and disconnected (cut SJ4 to disconnect, solder to connect it.) Need to verify this does not skew the address voltage and change the address. There are vias to measure the voltage in the board address block to help.

-Verify different 32 & 40 position connector footprints - make sure the connector options and their footprints match up.

-The second part of the brake circuit looks like it should block 2.5v and below from turning on the brake lights. Above about 2.7v the brake lights should go on. This depends on if the STM32 can push enough power to overcome a few components. Trying to give a wider range of available addresses and still have the brake light output trigger in regen. The high side switch turns on at around 1.2v on the enable line, that's what the zener blocking diode is for.

-R3 and R9 are setup as 0R (jumper) resistors. Nissan has 2 lines for each current sensor signal. These should not be populated for now.

-R2 & R4 are unclear if they should be grounds and are 0R resistor / jumpers. Need to figure out if these are in fact required grounds.

-J1 connector (Nissan 32 pos.) on position 20 if using thru hole board to wire connectors it only has a .3mm trace to ground which likely won't last or work well. If this ground is required there is a large ground via right next to position 20 to solder to for a good ground connection. Will need to correct this in the next version once understood.

-R13 is a pull down resistor for the T_SINK input. This is at 3K3 in V0.0.1 but unsure if this is ideal. There are 2 plated thru holes on each side of R13 to use to make testing the ideal value easier.

-L2 in rev V0.0.2 had an 0805 inductor rated for only 15ma. Changed to a Sunlord 4030 / AKA 4.0mm X 4.0mm inductor that can pass 700ma +. I don't think any V0.0.2 boards were made yet but not sure.

-What connector options to use for the Open Inverter connections to get out of the inverter.

-The capacitors on each contactor mosfet gate should be checked that they do not delay turn on or off too much and that they help eliminate chatter. If they are too large they could run the mosfets in the linear region and could cause damage.

*EDIT* Is it worth pulling the jumper resistors to what were thought to be required grounds? These are R2 & R4. R3 & R9 are the doubled up current sensor signal wires, those could likely be pulled too.
image.png
glink
Posts: 18
Joined: Mon Mar 15, 2021 7:02 pm
Been thanked: 3 times

Re: Nissan Leaf Gen3 Drop-in board

Post by glink »

Measurements Gen3 board
Measurements Gen3 board
This should be accurate measurements taken with digital caliper. Except the dowels are Ø3.0mm...
All measurements are center to center wrt the holes/dowels
User avatar
johu
Site Admin
Posts: 5786
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1021 times
Contact:

Re: Nissan Leaf Gen3 Drop-in board

Post by johu »

Finally got to this again.
jrbe wrote: Tue Feb 06, 2024 12:56 am Kelju seemed to get UDC working
One of the 5V pins had lifted off the pad thus disabling UDC and TMPHS measurement. All works as before now.
jrbe wrote: Tue Feb 06, 2024 12:56 am Do you think there is a missing power or ground to the drive section of the inverter?
Good one :)
jrbe wrote: Tue Feb 06, 2024 12:56 am The board address needs to be checked with the brake circuit connected and disconnected
With the STM32 in reset it sits at 0.544V instead of the calculated 0.4V. So then I cut the brake jumper and now in reset it sits at 0.75V. With the main board removed and 5.3V applied I read 0.45V. Strange.
jrbe wrote: Tue Feb 06, 2024 12:56 am Odd. That should run with just +12v and ground, no?
I looked for differences between the Gen2 board where the STM32 always boots ok and the Gen3. I think it's the boot delay cap C13. I removed it, now the STM boots every time. It seems somehow the ESP32 sends the magic 0xAA when starting and with the boot delay this coincides with the boot loader waiting for 0xAA. So the fact that it works on all other boards is more out of luck...
jrbe wrote: Tue Feb 06, 2024 12:56 am Verify different 32 & 40 position connector footprints - make sure the connector options and their footprints match up.
Positive for the SMT part. Don't have the THT one.
jrbe wrote: Tue Feb 06, 2024 12:56 am Above about 2.7v the brake lights should go on
The brake output doesn't change. When I activate it I get 2.6V on TP_A1 and 0.7V behind the Zener. So I replaced the Zener with a low value resistor, then the brake output works. Without the Zener the brake light will briefly (200ms) turn on above certain variant codes when booting. Don't think that's too much of an issue.
jrbe wrote: Tue Feb 06, 2024 12:56 am R3 and R9 are setup as 0R (jumper) resistors. Nissan has 2 lines for each current sensor signal. These should not be populated for now.
Seems to be some sort of redundancy. Current readings are the same with or without the jumpers.
jrbe wrote: Tue Feb 06, 2024 12:56 am R2 & R4 are unclear if they should be grounds and are 0R resistor / jumpers.
Solid GND, it's the GND of the current sensor
jrbe wrote: Tue Feb 06, 2024 12:56 am R13 is a pull down resistor for the T_SINK input
Right now I get 3V at room temperature. That's a bit close to the end of the dynamic range indeed. Will test other values. Maybe back to standard OI 1k2.
jrbe wrote: Tue Feb 06, 2024 12:56 am The capacitors on each contactor mosfet gate should be checked that they do not delay turn on or off too much
Will check. What chatter are we talking about though?
jrbe wrote: Tue Feb 06, 2024 12:56 am R3 & R9 are the doubled up current sensor signal wires, those could likely be pulled too.
Yeah not quite sure if there's a beneficial use for these. On the Gen2 board I just ignore the duplicates.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
jrbe
Posts: 280
Joined: Mon Jul 03, 2023 3:17 pm
Location: CT, central shoreline, USA
Has thanked: 98 times
Been thanked: 71 times

Re: Nissan Leaf Gen3 Drop-in board

Post by jrbe »

johu wrote: Mon Feb 12, 2024 7:43 pm With the STM32 in reset it sits at 0.544V instead of the calculated 0.4V. So then I cut the brake jumper and now in reset it sits at 0.75V. With the main board removed and 5.3V applied I read 0.45V. Strange.
Thats really strange. Back to the drawing board on merging those 2 on one IO. Sounds like maybe some odd pull up / down things going on too.
johu wrote: Mon Feb 12, 2024 7:43 pm The brake output doesn't change. When I activate it I get 2.6V on TP_A1 and 0.7V behind the Zener. So I replaced the Zener with a low value resistor, then the brake output works. Without the Zener the brake light will briefly (200ms) turn on above certain variant codes when booting. Don't think that's too much of an issue.
Maybe its simpler to add a few diodes in series to block the voltage. A schmitt trigger of the correct voltage would be ideal but I couldn't find one last I looked.
johu wrote: Mon Feb 12, 2024 7:43 pm I looked for differences between the Gen2 board where the STM32 always boots ok and the Gen3. I think it's the boot delay cap C13. I removed it, now the STM boots every time. It seems somehow the ESP32 sends the magic 0xAA when starting and with the boot delay this coincides with the boot loader waiting for 0xAA. So the fact that it works on all other boards is more out of luck...
Hrmm, thats the recommended boot delay circuit to ensure programming the ESP32. We could swap the resistor to extend the boot delay time some more to allow both to work.

*EDIT* I wonder if the direct esp32 io to STM32 io connection is overloading the STM32. Would it make sense to add say a 220 ohm resistor between the communication lines to prevent them from being overloaded during boot?
*Edit 2* or add a 499 ohm resistor in line like esp32 IO1 / USART_RX has.

johu wrote: Mon Feb 12, 2024 7:43 pm Will check. What chatter are we talking about though?
Some people were adding delay circuits on their contactor outputs. I do not think the root cause was ever found of why / resolved.
viewtopic.php?p=41235&hilit=chatter#p41235
jrbe
Posts: 280
Joined: Mon Jul 03, 2023 3:17 pm
Location: CT, central shoreline, USA
Has thanked: 98 times
Been thanked: 71 times

Re: Nissan Leaf Gen3 Drop-in board

Post by jrbe »

For the brake & board ID resistor, I think you went down this path,

R5 is simulating the STM32 GPIO's ability to drive it high or low. I forget the STM32 expected high / low resistance.

Brake on, STM32 driving GPIO high,
High STM32.PNG
Brake off, STM32 Driving GPIO low,
grounded stm32.PNG
STM32 analog input reading board ID,
Read STM32.PNG
We could adjust R3 & R4 more but I'm not sure how much current is required to turn on U3 / TPS22810DBVR / the brake output IC. VM2 (turn on voltage for U3) is showing good voltage swing between different IO states but I have not tested all options (circuit lab asking for $.) This of course adds variability with the multiple resistor tolerancing.

R4 could be 2x 47K resistors in series if its tolerancing is critical.

We could put a small value capacitor in parallel with R4 to delay brake light turn on slightly so it does not light during boot and state transition if its worth it.

Also, johu, when you get a chance, a reminder for the offset mounting hole photo.
User avatar
johu
Site Admin
Posts: 5786
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1021 times
Contact:

Re: Nissan Leaf Gen3 Drop-in board

Post by johu »

So I investigated some more about the variant resistor. The culprit is the SPI pin that is also connected to OUT_BRAKE:
image.png
image.png (9.19 KiB) Viewed 1318 times
It is pulling the voltage up to 0.7V as it looks. Will investigate some more.
EDIT: desoldered RN1 and RN2 and indeed PB4 sits at 3.3V no matter what I do.
EDIT2: data sheet knows all the answers. It is the NJRST pin! JTAG reset. So with JTAG disabled it stop doing this.
EDIT3: D11 starts conducting at 2V, so with R18 removed we only get 2V coded voltage. I have removed it as sending 5.3V into PC5 over a 47k resistor is easily conducted away by the pins ESR diode. And indeed the voltage only rises to 3.33V.
EDIT4: with that resolved the voltage now rises to 2.9V so I could fit that Zener before the high side driver again.

I added a picture of the mounting holes in the first post
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
jrbe
Posts: 280
Joined: Mon Jul 03, 2023 3:17 pm
Location: CT, central shoreline, USA
Has thanked: 98 times
Been thanked: 71 times

Re: Nissan Leaf Gen3 Drop-in board

Post by jrbe »

I'm slowly picking away at the updates to the board as issues are found.
glink wrote: Sat Feb 10, 2024 11:03 am 20240210_114510.jpg
This should be accurate measurements taken with digital caliper. Except the dowels are Ø3.0mm...
All measurements are center to center wrt the holes/dowels
glink, when you get some free time can you please double check the 113.5mm dimensions? I drew the board up to 113mm across the top and bottom hole spacing but it looks like it might be 115mm. The .5mm difference won't be enough to fix the upper right hole offset by how far it looks in johu's picture. Please measure say right side hole edge to right side hole edge to make it a bit easier to measure, like this,
Top holes measurement.PNG
no rush at all.

I did move the bottom mounting holes down 3mm, I had them at 87mm. I think this is correct now at 90mm top to bottom hole spacing. Also opened up the mounting hole ID slightly.

I also moved some vias that stitched to large planes away from the 32 and 40 position connectors some to hopefully help with soldering the connectors.
User avatar
johu
Site Admin
Posts: 5786
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1021 times
Contact:

Re: Nissan Leaf Gen3 Drop-in board

Post by johu »

I have implemented the board detection now: https://github.com/jsphuebner/stm32-sin ... 63d1227f0c
It took a little extra code to handle legacy boards that don't have the resistor bridge and also handle the i3 board with has the output of a logic gate connected to brake_out.

I think there is no need to have any anti-brakelight-flickering hardware, especially not this adapter board with its 480 mV coded voltage. If someone really complains about it in the future there is an easy fix: force the output low in the boot loader and only release it for the few µs that the detection takes. This doesn't require changing the boot loader because firmware provides a table with pin commands to the loader.

I also removed the pull-down resistor R1 as it skews the reading and replaced Zener diode D12 with some arbitrary resistor (could as well be bridged). D11 can also be safely removed.

I also think R5, R12, R10 and D9 are not needed as the DESAT pin is pulled up on the mainboard.

Finally I measured the distance between the bolting points: 90mm and 114mm
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
jrbe
Posts: 280
Joined: Mon Jul 03, 2023 3:17 pm
Location: CT, central shoreline, USA
Has thanked: 98 times
Been thanked: 71 times

Re: Nissan Leaf Gen3 Drop-in board

Post by jrbe »

If R1 is removed, the plan is to allow the board address & STM32 to control the brake high switch enable line? I think that makes sense except U3 turns on at 1.23v and above and off below 1.13v. If this is your planned direction I think the code should pull down after reading the board ID as you mentioned unless its serving some other special purpose. That should give some more wiggle room in addressing too.
brake op board address.PNG
R5 & R12 I can remove.

R10 is to protect the STM32 from a direct short. I don't see anything for this on the mini mainboard.
D9 works with R10 to protect the STM32 from overvoltage. I see both R10 and D9 as cheap protection but can pull them if you want.

Thanks for measuring the hole spacing.
glink
Posts: 18
Joined: Mon Mar 15, 2021 7:02 pm
Been thanked: 3 times

Re: Nissan Leaf Gen3 Drop-in board

Post by glink »

jrbe wrote: Thu Feb 22, 2024 6:36 pm I'm slowly picking away at the updates to the board as issues are found.



glink, when you get some free time can you please double check the 113.5mm dimensions? I drew the board up to 113mm across the top and bottom hole spacing but it looks like it might be 115mm. The .5mm difference won't be enough to fix the upper right hole offset by how far it looks in johu's picture. Please measure say right side hole edge to right side hole edge to make it a bit easier to measure, like this,
Top holes measurement.PNG
no rush at all.

I did move the bottom mounting holes down 3mm, I had them at 87mm. I think this is correct now at 90mm top to bottom hole spacing. Also opened up the mounting hole ID slightly.

I also moved some vias that stitched to large planes away from the 32 and 40 position connectors some to hopefully help with soldering the connectors.
Hmmm, digital caliper out, oldschool caliper in. Johannes is right, it is 114mm and 90mm between the holes.
The then missing 0.5mm is between right hole and dowel, so distance there is 15.5mm, not 15.0mm Rest is correct to the best of my abilities :)
image.png
User avatar
johu
Site Admin
Posts: 5786
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1021 times
Contact:

Re: Nissan Leaf Gen3 Drop-in board

Post by johu »

jrbe wrote: Thu Feb 22, 2024 9:08 pm...
Is the board ready for another production run? Will order sometime next week, presumably
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
jrbe
Posts: 280
Joined: Mon Jul 03, 2023 3:17 pm
Location: CT, central shoreline, USA
Has thanked: 98 times
Been thanked: 71 times

Re: Nissan Leaf Gen3 Drop-in board

Post by jrbe »

johu wrote: Tue Mar 26, 2024 6:33 pm Is the board ready for another production run? Will order sometime next week, presumably
Does that mean everything is running properly? I thought you were still working through some bugs.

You mentioned trying the zener back in line between the address and brake output. It's that staying in?

Edit,
There's the temp sensor pull down resistor too, I didn't see what value ended up working well.

There are a bunch of unresolved things scattered throughout these posts. Do you want me to go through it and combine it into 1 list?

Besides the above unknowns I have a bit of time to clean things up to get it ready to order the next batch.
User avatar
johu
Site Admin
Posts: 5786
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1021 times
Contact:

Re: Nissan Leaf Gen3 Drop-in board

Post by johu »

The Zener is not needed as the coded voltage is below 1.23V and brake light flicker can be software-avoided in any case.
Somewhere I concluded 3k3 is a bit high as it sits at 3V at room temp. For the sake of unification it could be lowered to 1k2. What else was there?
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
jrbe
Posts: 280
Joined: Mon Jul 03, 2023 3:17 pm
Location: CT, central shoreline, USA
Has thanked: 98 times
Been thanked: 71 times

Re: Nissan Leaf Gen3 Drop-in board

Post by jrbe »

A list of unresolved items:
  • Sometimes the STM32 does not start up, probably hangs in boot loader - is down to reset timing of ESP32
    - Are we just leaving the boot delay capacitor unpopulated? Might make sense to increase the boot delay time but unsure how long it needs for all use cases.
  • Verify different 32 & 40 position connector footprints - make sure the connector options and their footprints match up.
    - not sure these through hole connectors are available currently. Just something to note that they are not verified with real parts - just the part cad.
  • If R1 is removed, the plan is to allow the board address & STM32 to control the brake high switch enable line? I think that makes sense except U3 turns on at 1.23v and above and off below 1.13v. If this is your planned direction I think the code should pull down after reading the board ID as you mentioned unless its serving some other special purpose. That should give some more wiggle room in addressing too.
    - I'll add an unpopulated pull down handsolder 0805 resistor footprint there just in case.
  • There has been some chatter on the forums about not using the esp32 inside inverters.
    - Leaving it in for now unless I hear otherwise.
    - There is a slot on the top right of the esp32 in this board to zip tie an external antenna as a strain relief if someone wants to try an external antenna. There are plenty of waterproof antenna options fairly cheap but this adds the complexity of adding holes and futzing with the antenna wires when opening / closing the inverter.
    - The 2x05 header is still in this footprint. People could use the plug in modules for testing then unplug it or maybe plug it into the can based wifi when installing. I added a handsolder 0805 capacitor footprint in case this connector is used and its needed. I also added a DNP 10x10.5 aluminum capacitor footprint if there are still some power dips in the esp32.
In between items:
  • R3 & R9 are the doubled up current sensor signal wires, those could likely be pulled too.
    - My plan is to add open solder jumpers in their place in case there is a need later for them or someone wants to use them.
  • C3 & C4 contactor debounce capacitors - Some people were adding delay circuits on their contactor outputs. I do not think the root cause was ever found of why / resolved.
    viewtopic.php?p=41235&hilit=chatter#p41235
    - Planning to leave these unpopulated 0805 hand solder capacitors.
  • The Zener is not needed as the coded voltage is below 1.23V and brake light flicker can be software-avoided in any case.
    - I'll add a shorted solder jumper in parallel with the zener as DNP.
    - - Or do you feel the zener is not needed at all, even with higher voltage board address voltages?
Resolved Items:
  • Lower two bolt holes (opposite side of ESP32) are about 2mm too far in (will add photo)
    - 114mm x 90mm - Hole spacing should be good now.
  • HS temp signal is always low. It needs a pull-up. I tried with 4k7 to 3v3 which results in 1.7V at room temperature.
    - 5V was missing for the temp sensor circuit
  • The two fault signals were always low.
    - Reason: R12 was 4R7 instead of 4k7. - Voltage on DESAT is then 3V. I don't think R12 is needed at all
    R5 & R12 I can remove.
  • UDC signal is always low.
    - 5V was missing for the udc sensor circuit
  • R2 & R4 are solid GND,
    - it's the GND of the current sensor
  • The two fault signals were always low.
    - Reason: R12 was 4R7 instead of 4k7. Removed it. - New version has R12 removed.
  • J1 connector (Nissan 32 pos.) on position 20 if using thru hole board to wire connectors it only has a .3mm trace to ground...
    - connected this to a solid ground with a trace on the bottom of the board in case it needs to be cut / fails you can see it with a connector in place.
  • Somewhere I concluded 3k3 is a bit high as it sits at 3V at room temp. For the sake of unification it could be lowered to 1k2.
    - Will change to the 1k2 and leave the plated through holes in just in case.
User avatar
johu
Site Admin
Posts: 5786
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1021 times
Contact:

Re: Nissan Leaf Gen3 Drop-in board

Post by johu »

Great, thanks!
jrbe wrote: Wed Mar 27, 2024 3:06 pm Are we just leaving the boot delay capacitor unpopulated?
Yes or replace with 0.1uF, that's known to work from other boards
jrbe wrote: Wed Mar 27, 2024 3:06 pm Verify different 32 & 40 position connector footprints
SMT is verified, through hole not because part is lacking
jrbe wrote: Wed Mar 27, 2024 3:06 pm If R1 is removed, the plan is to allow the board address & STM32 to control the brake high switch enable line
Yes absolutely. The STM pulls this low anyway once booted (so after about 200ms) with the option to pull it low almost instantly at power up.
On some boards this pin serves as MISO. In that case it can't be used for brake light anyway.
jrbe wrote: Wed Mar 27, 2024 3:06 pm There has been some chatter on the forums about not using the esp32 inside inverters.
On Tesla inverters it's quite impractical, you almost need to place your laptop onto the motor to get a connection. On the Gen2 inverter it works surprisingly well. I can test this on the Gen3 actually.
Anyway, the handle on this is to just not populate the ESP32 and use CAN for configuration instead.
jrbe wrote: Wed Mar 27, 2024 3:06 pm The 2x05 header is still in this footprint.
Good to have the option. Set it to DNP though.
jrbe wrote: Wed Mar 27, 2024 3:06 pm My plan is to add open solder jumpers
Good.
jrbe wrote: Wed Mar 27, 2024 3:06 pm Planning to leave these unpopulated 0805 hand solder capacitors.
Yes
jrbe wrote: Wed Mar 27, 2024 3:06 pm Or do you feel the zener is not needed at all, even with higher voltage board address voltages?
Yes, see 3rd item
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
jrbe
Posts: 280
Joined: Mon Jul 03, 2023 3:17 pm
Location: CT, central shoreline, USA
Has thanked: 98 times
Been thanked: 71 times

Re: Nissan Leaf Gen3 Drop-in board

Post by jrbe »

johu wrote: Wed Mar 27, 2024 8:57 pmGood.
I have the schematic and board updated to V0.0.4. I still have to do the production files. See any issues with the pdf schematic attached?
Gen 3 Leaf Adapter V0.0.4.pdf
(963.5 KiB) Downloaded 22 times
User avatar
johu
Site Admin
Posts: 5786
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1021 times
Contact:

Re: Nissan Leaf Gen3 Drop-in board

Post by johu »

jrbe wrote: Fri Mar 29, 2024 9:26 pm See any issues with the pdf schematic attached?
Looks good to me!
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
jrbe
Posts: 280
Joined: Mon Jul 03, 2023 3:17 pm
Location: CT, central shoreline, USA
Has thanked: 98 times
Been thanked: 71 times

Re: Nissan Leaf Gen3 Drop-in board

Post by jrbe »

johu wrote: Sat Mar 30, 2024 8:44 amLooks good to me!
One thing I thought of. The throttle inputs I've seen listed as 0-6.6v input. Is that a usable analog input range or just what voltage can be on those inputs without blowing up the STM32?

Basically asking if adding a voltage divider for each throttle would be worth looking at.

We also have 3.3v on the board, we could make that available for throttles if it makes sense.

Edit, thinking of using 3x 4.7k resistors for the dividers.
https://everycircuit.com/circuit/6566780038021120
User avatar
johu
Site Admin
Posts: 5786
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1021 times
Contact:

Re: Nissan Leaf Gen3 Drop-in board

Post by johu »

The divider is already on the mini board
Most pedals run on 5V so wouldn't change that
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
jrbe
Posts: 280
Joined: Mon Jul 03, 2023 3:17 pm
Location: CT, central shoreline, USA
Has thanked: 98 times
Been thanked: 71 times

Re: Nissan Leaf Gen3 Drop-in board

Post by jrbe »

This is mostly done.

Struggling with rotations for JLC, fabrication tool kit, and jlc's site seemingly pulling in old Gerbers, pos, and bom files. I'll keep picking away at it but it will be a bit.
jrbe
Posts: 280
Joined: Mon Jul 03, 2023 3:17 pm
Location: CT, central shoreline, USA
Has thanked: 98 times
Been thanked: 71 times

Re: Nissan Leaf Gen3 Drop-in board

Post by jrbe »

johu wrote: Mon Apr 01, 2024 9:00 am ...
V0.0.4 is done and up on Github (see my signature below.) Should be ready to order. Wiki is updated with V0.0.4 changes as well.
*Edit, this isn't tested yet.*

JLC doesn't have any low tolerance 60 ohm resistors, at least that I could find. Ended up doing 2 parallel 120 ohm resistors for each CAN leg to make the 60 ohm - capacitor to ground - 60 ohm circuit work.
image.png
image.png (78.29 KiB) Viewed 381 times
CAN termination circuit.PNG
Front PCB w- SMD.PNG
PCB back.PNG
Some of the DNP (do not populate) items like the large capacitor are showing in the preview image but are not in the production / gerber files.
User avatar
uhi22
Posts: 597
Joined: Mon Mar 14, 2022 3:20 pm
Location: Ingolstadt/Germany
Has thanked: 90 times
Been thanked: 411 times

Re: Nissan Leaf Gen3 Drop-in board

Post by uhi22 »

High precision CAN termination looks overengineered. The harness will have much more tolerance of the cable impedance, 10% is no problem.
User avatar
johu
Site Admin
Posts: 5786
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1021 times
Contact:

Re: Nissan Leaf Gen3 Drop-in board

Post by johu »

Think so too, but on the other hand 120Ω is a basic resistor and 60Ω isn't :)
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
jrbe
Posts: 280
Joined: Mon Jul 03, 2023 3:17 pm
Location: CT, central shoreline, USA
Has thanked: 98 times
Been thanked: 71 times

Re: Nissan Leaf Gen3 Drop-in board

Post by jrbe »

uhi22 wrote: Thu Apr 04, 2024 10:30 am High precision CAN termination looks overengineered. The harness will have much more tolerance of the cable impedance, 10% is no problem.
Thanks for the feedback Uhi. This is a bit different than a single 10% 120 ohm vs using a single .1% 120 ohm termination resistor, so I'll explain in case it's purpose was missed. If the critique stands that's ok too. Feel free to share what you think I'm missing.

If the resistors / resistor pairs on each side are not closely matched it throws off the effectiveness / ability of the capacitor in the middle to filter out noise. It's the commonly recommended way to terminate can lines in noisy environments.
If you have a noisy test setup you can pull the capacitor in the middle and watch the difference on an oscilloscope. Just probe the middle of the resistors trace and you should be able to see the noise on the scope.
I believe we're talking pennies and about 3cm square of footprint difference here for the extra filtering ability. I think it's worth it.

If JLC starts carrying some 60ish ohm resistors in a close tolerance we can use 2 resistors on each side of the can bus and leave 2 footprints unpopulated.

There are other things that might seem unnecessary but I tried to cover different use cases with cost in mind. The per board cost is pretty low.

Edit, TI can termination reference material, https://www.ti.com/lit/pdf/ssztb40
Post Reply