Which ESP32 can connect to ethernet without an ethernet port?

laukejas
Posts: 7
Joined: Thu Apr 11, 2019 3:28 pm

Which ESP32 can connect to ethernet without an ethernet port?

Postby laukejas » Wed Aug 02, 2023 8:53 am

Hi, I have a project where electronics have to be extremely compact. I want to use ESP32 and connect it to an ethernet switch module (https://shorturl.at/pzHO4). I know there are ESP32 variants that have a RJ45 Ethernet port, but I would very much like to avoid it because of how compact the electronics have to be, and I also don't want to have to use a patch cable which takes up a lot of space by itself.

My question is, can I connect, say, ESP32 DEVKIT V1 to an ethernet switch using it's GPIOs? Or is there another ESP32 board with Ethernet capability that uses regular pins instead of RJ45 socket? I know I could de-solder the socket and solder wires directly to the board, but maybe there is a cleaner option?

ESP_ondrej
Posts: 210
Joined: Fri May 07, 2021 10:35 am

Re: Which ESP32 can connect to ethernet without an ethernet port?

Postby ESP_ondrej » Thu Aug 03, 2023 5:54 am

You cannot connect Ethernet directly via GPIO. Simply put, the signal on the physical medium (cable) is modulated to be able to be reliably transmitted over longer distances. Therefore transceivers (so called PHY's) at each node need to "understand" themselves. There are multiple standards with multiple connectors used over the time see https://en.wikipedia.org/wiki/Ethernet_ ... cal_layers for example. You can connect PHY's supporting various standards to the ESP32 if the PHY interface is RMII.

Edit: I'm not sure if I fully understood your use case, however, if you wanted to have ESP32 with switch capability, you can consider using KSZ8863, see https://github.com/espressif/esp-eth-dr ... er/ksz8863
https://github.com/espressif/esp-idf/is ... -978943521

laukejas
Posts: 7
Joined: Thu Apr 11, 2019 3:28 pm

Re: Which ESP32 can connect to ethernet without an ethernet port?

Postby laukejas » Thu Aug 03, 2023 10:52 am

ESP_ondrej wrote:
Thu Aug 03, 2023 5:54 am
You cannot connect Ethernet directly via GPIO. Simply put, the signal on the physical medium (cable) is modulated to be able to be reliably transmitted over longer distances. Therefore transceivers (so called PHY's) at each node need to "understand" themselves. There are multiple standards with multiple connectors used over the time see https://en.wikipedia.org/wiki/Ethernet_ ... cal_layers for example. You can connect PHY's supporting various standards to the ESP32 if the PHY interface is RMII.

Edit: I'm not sure if I fully understood your use case, however, if you wanted to have ESP32 with switch capability, you can consider using KSZ8863, see https://github.com/espressif/esp-eth-dr ... er/ksz8863
https://github.com/espressif/esp-idf/is ... -978943521
Appreciate your suggestion. I know of KSZ8863, but that board is huge compared to ESP32 Devboard. I am trying to minimize size here. What about W5500? I see several tutorials about interfacing it with ESP32, like this one - https://mischianti.org/2022/10/18/esp32 ... ssl-https/. It seems promising, and W5500 is cheap enough that I could risk de-soldering the RJ45 connector and replacing it with JST or similar, more compact connector. Do you think that would work?

ESP_ondrej
Posts: 210
Joined: Fri May 07, 2021 10:35 am

Re: Which ESP32 can connect to ethernet without an ethernet port?

Postby ESP_ondrej » Thu Aug 03, 2023 12:47 pm

Our development board (the link I sent) is big because it provides provisions for different configurations, it has big ass FTDI chip and external 10/100Base-T port transformers. You could highly optimize the size if you needed, in my opinion.

Yes, you can use SPI Ethernet. However, de-soldering RJ45 connector from W5500 dev board would not probably work since that connector also contains internal port transformers - at least most of the dev boards I've seen have design like that (https://datasheet.lcsc.com/lcsc/1811141 ... C70302.pdf).

If you want to design a board which ultimate goal is to be connected to 10/100Base-T or compatible network, you need the PHY which meets the standard. Theoretically, if you had that PHY and external transformers and connect them directly to appropriate Ethernet CAT cable via different connector, it could work. You need at least 2 twisted pairs (https://en.wikipedia.org/wiki/Ethernet_ ... isted_pair) so I'm not sure if the final connector would be much smaller.

laukejas
Posts: 7
Joined: Thu Apr 11, 2019 3:28 pm

Re: Which ESP32 can connect to ethernet without an ethernet port?

Postby laukejas » Thu Aug 03, 2023 4:51 pm

ESP_ondrej wrote:
Thu Aug 03, 2023 12:47 pm
Our development board (the link I sent) is big because it provides provisions for different configurations, it has big ass FTDI chip and external 10/100Base-T port transformers. You could highly optimize the size if you needed, in my opinion.

Yes, you can use SPI Ethernet. However, de-soldering RJ45 connector from W5500 dev board would not probably work since that connector also contains internal port transformers - at least most of the dev boards I've seen have design like that (https://datasheet.lcsc.com/lcsc/1811141 ... C70302.pdf).

If you want to design a board which ultimate goal is to be connected to 10/100Base-T or compatible network, you need the PHY which meets the standard. Theoretically, if you had that PHY and external transformers and connect them directly to appropriate Ethernet CAT cable via different connector, it could work. You need at least 2 twisted pairs (https://en.wikipedia.org/wiki/Ethernet_ ... isted_pair) so I'm not sure if the final connector would be much smaller.
Thank you for this additional info. I will look into making a custom board with FTDI chip. But most likely it is not worth the hastle, that W5500 module I found is bare-bones as it is when it comes to size... Maybe I will somehow manage to cramp these RJ45 sockets into my project.

ESP_ondrej
Posts: 210
Joined: Fri May 07, 2021 10:35 am

Re: Which ESP32 can connect to ethernet without an ethernet port?

Postby ESP_ondrej » Fri Aug 04, 2023 11:18 am

FTDI chip is responsible for UART to USB and JTAG interfaces. Here you can find list of supported PHY's https://github.com/espressif/esp-idf/tr ... e-required

Who is online

Users browsing this forum: No registered users and 85 guests