Page 1 of 2

Put ESP32 on Tesla LDU and SDU board

Posted: Wed Nov 09, 2022 11:14 pm
by johu
I lately did a version of the Nissan Leaf adapter board with the ESP32-WROOM module placed by JLCPCB. This should get rid of the pesky issues that the pluggable ESP8266 module has.

Now I'd like to do the same to he two Tesla boards but I don't have and don't want to learn the PCB design software that they were done in.

If anyone feels like helping out, speak up. I'll link to/attach the needed design files here in the coming days.

https://github.com/jsphuebner/Tesla-Fro ... /master/V7
https://github.com/jsphuebner/Tesla-Dri ... /master/V5

Re: Put ESP32 on Tesla LDU and SDU board

Posted: Thu Nov 10, 2022 6:47 pm
by catphish
Since it's not Kicad I'm afraid I can't be much help, but I'd like to nag instead.

If anyone updates the SDU board, please consider addressing this at the same time! https://github.com/damienmaguire/Tesla- ... t/issues/7

Re: Put ESP32 on Tesla LDU and SDU board

Posted: Thu Nov 10, 2022 8:04 pm
by arber333
johu wrote: Wed Nov 09, 2022 11:14 pm I lately did a version of the Nissan Leaf adapter board with the ESP32-WROOM module placed by JLCPCB. This should get rid of the pesky issues that the pluggable ESP8266 module has.

Now I'd like to do the same to he two Tesla boards but I don't have and don't want to learn the PCB design software that they were done in.

If anyone feels like helping out, speak up. I'll link to/attach the needed design files here in the coming days.

https://github.com/jsphuebner/Tesla-Fro ... /master/V7
https://github.com/jsphuebner/Tesla-Dri ... /master/V5
Hm... i have a design in ESP32 done for my VCU/BMS board. I made it in design spark.
I made design for 38 pin version. Pinout can be found here: https://www.studiopieters.nl/esp32-pinout/
Do you want to change Tesla board or make an interface for ESP32? What kind of interface do you need?
Which pins would you want to use?

Re: Put ESP32 on Tesla LDU and SDU board

Posted: Fri Nov 11, 2022 2:34 am
by royhen99
I am willing to have a go as long as it's only a few hours work. I have not use DesignSpark before but it seems fairly straight forward to use.
I have loaded one of the designs and have the footprint for ESP-WROOM loaded. Picture bellow as proof!
I am a electronics engineer although not working at the moment. I have a lot of schematic experience but most PCB layout was supervising someone else.
I have just completed a simple STM32 board and sent for manufacture so now I have a bit of free time until the boards arrive

Tesla_FDU_V7_2.png
Tesla_FDU_V7_2.png (7.94 KiB) Viewed 10308 times

Re: Put ESP32 on Tesla LDU and SDU board

Posted: Fri Nov 11, 2022 6:00 am
by arber333
There are some limitations in using just bare ESP32 foot. Namely power draw.
See excerpt from design guide:
It should be noted that the sudden increase in current draw, when ESP32 is in transmission mode, may cause a
power rail collapse. Therefore, it is highly recommended to add another 10 µF capacitor to the power trace, which
can work in conjunction with the 0.1 µF capacitor. LC filter circuit needs to be added near VDD3P3 pins so as to
suppress high-frequency harmonics. The inductor’s rated current is preferably 500 mA and above. Refer to Figure
6 and place the appropriate decoupling capacitor near the other analog power pins.
You could try just adding just minimal TTL serial circuit, but from my experience when transmitting the thing can draw quite a bit of power.
image.png
image.png (11.08 KiB) Viewed 10297 times
Full guide can be found here:
https://www.espressif.com/sites/default ... nes_en.pdf

Re: Put ESP32 on Tesla LDU and SDU board

Posted: Fri Nov 11, 2022 7:43 am
by johu
royhen99 wrote: Fri Nov 11, 2022 2:34 am I am willing to have a go as long as it's only a few hours work. I have not use DesignSpark before but it seems fairly straight forward to use.
I have loaded one of the designs and have the footprint for ESP-WROOM loaded. Picture bellow as proof!
I am a electronics engineer although not working at the moment. I have a lot of schematic experience but most PCB layout was supervising someone else.
I have just completed a simple STM32 board and sent for manufacture so now I have a bit of free time until the boards arrive
Great, thanks for speaking up. It took me about an hour to do it with FreePcb:
grafik.png
grafik.png (7.29 KiB) Viewed 10289 times
I omitted the extra filtering as it has a dedicated LDO but on the Tesla board I'd prefer the same like on V3 mainboard: https://github.com/jsphuebner/inverter- ... rdv3.4.pdf (10 uH, 500mA inductor plus 10uF cap).
I have routed GPIO0 to a pin header next to a GND pin, so for programming I just put a jumper on there and a serial cable with 5V output. So it's GPIO0, GND, GND, 5V, RX, TX . RX/TX as seen from the STM32 processor!
arber333 wrote: Fri Nov 11, 2022 6:00 am There are some limitations in using just bare ESP32 foot. Namely power draw.
Yes, even the ESP8266 has that issue.
catphish wrote: Thu Nov 10, 2022 6:47 pm Since it's not Kicad I'm afraid I can't be much help, but I'd like to nag instead.

If anyone updates the SDU board, please consider addressing this at the same time! https://github.com/damienmaguire/Tesla- ... t/issues/7
Ah yes good shout. royhen, could you?

Please pick any item from the shop for some compensation. Instead I can also send you the modified boards once manufactured.

Re: Put ESP32 on Tesla LDU and SDU board

Posted: Fri Nov 11, 2022 9:59 pm
by royhen99
Both are done. The LDU was a bit tight but I managed to squeeze it in. Not sure how well these work mounted like this, but I cleared the planes under the antenna which should help. Also added 10k resistor arrays on PWM and clock output driver. Not sure if they are needed on the clk. What file name/version should I used for the update files? I can produce gerber and other output files, and pdf/png for schematic and layout if needed for checking. DesignSpark is fairly horrible so you made a good decision not to use it.

Re: Put ESP32 on Tesla LDU and SDU board

Posted: Sat Nov 12, 2022 9:21 am
by johu
Wow, are you serious :) that was quick!
Just name them V6 and V8, respectively.
No pull down needed on the clock line. Just attach the files (design, gerber, pdf) here if that's fine for you.

Re: Put ESP32 on Tesla LDU and SDU board

Posted: Sat Nov 12, 2022 6:08 pm
by royhen99
Ok, i'll fix the clock lines. The other thing I was not sure about was the enable pin on the esp32. I think you have just connected it to 3.3V on your deisgn but have read it should have a c-r so that it is enabled after the power supply has stabilised.

Re: Put ESP32 on Tesla LDU and SDU board

Posted: Sat Nov 12, 2022 7:10 pm
by johu
So far it works well with enable tied to 3v3. In doubt follow the appnote though

Re: Put ESP32 on Tesla LDU and SDU board

Posted: Sat Nov 12, 2022 10:41 pm
by royhen99
Johannes can you confirm the part number for ESP module ( ESP32-WROOM-32E-N4, C701341 has the highest stock level ). I am updating the BOMs, which is a manual process, and while checking the data sheet for the ESP32 I noticed that the footprint I am using is not quite correct.

Re: Put ESP32 on Tesla LDU and SDU board

Posted: Sun Nov 13, 2022 9:27 am
by johu
I use this one: C82899. Only two requirements were PCB antenna and solderable in economy process (not standard process)

Re: Put ESP32 on Tesla LDU and SDU board

Posted: Sun Nov 13, 2022 12:32 pm
by royhen99
Ok I will put that in the BOM but as it is not recommended for new designs they may run out of stock.

Re: Put ESP32 on Tesla LDU and SDU board

Posted: Sun Nov 13, 2022 5:22 pm
by rstevens81
i would make sure that you have a large cap on the 3.3v rail (as well as ones very close to the chip) as the power spike when the wi-fi is enabled, caused me a great del of pain on some of my projects as its caused reboot loops! in had to bodge on some big caps rather than the smd ones.
i typically just go over kill now and put 470uF (through hole or smd) caps on the 12v,5v&3.3v lines, the esp32 dev board reference design is good for inspiration as well. personally i would just put a esp32 dev board footprint on there as you can buy them for sometimes less than you can source the parts for from jlc, also the genuine expressive ones aren't that expensive in the grand scheme4 of things.

for ref my typical psu arrangement i have been using with the esp32 (dev boards)
Image

Re: Put ESP32 on Tesla LDU and SDU board

Posted: Mon Nov 14, 2022 4:18 am
by royhen99
Files attached. I hope they are OK, I can change anything if necessary. The placement and rotation data files are not very good but no worse than the previous versions.

Re: Put ESP32 on Tesla LDU and SDU board

Posted: Mon Nov 14, 2022 8:50 am
by johu
Awesome, thanks, will check it out later.

Re: Put ESP32 on Tesla LDU and SDU board

Posted: Mon Nov 14, 2022 2:23 pm
by royhen99
Here are the PDF files of the schematics. I forgot to add them earlier.

Re: Put ESP32 on Tesla LDU and SDU board

Posted: Wed Nov 16, 2022 9:38 pm
by johu
Just ordered 5 of each kind. Lets see how they come out :)

Thanks very much for your work, will send quick PM also.

Re: Put ESP32 on Tesla LDU and SDU board

Posted: Mon Dec 05, 2022 10:00 pm
by catphish
royhen99 wrote: Mon Nov 14, 2022 2:23 pm Here are the PDF files of the schematics. I forgot to add them earlier.
Thank you for this! The new pulldowns make me very happy!

Re: Put ESP32 on Tesla LDU and SDU board

Posted: Fri Dec 16, 2022 11:30 am
by johu
An enormous truck pulled up here this morning and delivered

Update: programmed fine and works :)

Re: Put ESP32 on Tesla LDU and SDU board

Posted: Fri Dec 16, 2022 5:53 pm
by catphish
This is absolutely beautiful. Thank you mr royhen99!

Bonus points for putting a +5v supply for ESP32 programming with a USB UART cable!

Re: Put ESP32 on Tesla LDU and SDU board

Posted: Sun Jul 23, 2023 12:39 am
by ImportFanatiK
Hi, Newbie here, just purchased a sport LDU and am reading up and planning out how to go from where I am to spinning on the bench with low voltage.
Once I have run through Damien's tests to validate the motor is usable, I am planning to buy the Tesla LDU drop-in logic board (community edition).
But seeing there is an ESP32 version in the works, should I wait until this new ESP32 version is available? Will this be replacing the current board?

Re: Put ESP32 on Tesla LDU and SDU board

Posted: Sun Jul 23, 2023 3:07 pm
by jrbe
ImportFanatiK wrote: Sun Jul 23, 2023 12:39 am ...But seeing there is an ESP32 version in the works, should I wait until this new ESP32 version is available? Will this be replacing the current board?
Do you have a lot of work to do (time) before you need to power up the motor?

The motor cover blocks EMI, It will also likely block some to all wireless signal. Damien was mentioning doing a plastic cover to allow the wireless signals to pass and would also make a board swap easier. Might be worth waiting to see how this plays out if you have the time.

A simple thin metal cover that screws to the motor cover & is sealed with silicone could be made. Add to that an esp32 with a u.fl connector coupled with a waterproof antenna would be nice. Could also do a small, optional antenna cover to make disassembly easier.

If this is something you guys want to do I can draw up the sheet metal cover(s) and share dxf, pdf drawing, and cut template. I'll need some info to draw it up in Solidworks though.

Re: Put ESP32 on Tesla LDU and SDU board

Posted: Sat Jul 29, 2023 10:05 pm
by johu
I have one ESP32 variant for sale, then I need to order new ones.

Re: Put ESP32 on Tesla LDU and SDU board

Posted: Mon Dec 18, 2023 2:24 pm
by jrbe
Did these files ever get updated with the larger inductors for the ESP32?