Page 1 of 1

Ethernet connection [Raspberry (USB-ETH) -> (ETH-SPI) ESP32] same PCB

Posted: Fri Mar 31, 2023 9:01 am
by Phoedus
Good morning,
I would be designing a device, which has a microprocessor and a microcontroller.
I won't dwell on the reasons that make this configuration necessary, just know that the microprocessor will be a raspberry pi (zero) and the microcontroller an ESP32 WROVER-IE.

Raspberry will be able to connect to the internet via WiFi or ethernet (USB-eth conversion module).
Raspberry will act as a bridge and will share the internet towards esp32, which will be able to receive it through Wiznet: w5500.

I would like to ask for advice on this setup.
I realize that esp32 through w5500 could be directly connected to the network, the problem is that it wouldn't make sense to use two ethernet cables for the same device.
I find this solution cleaner and more efficient.

However, since the two interfaces: raspberry's USB-eth, ESP32's eth-SPI would both be designed a very short distance away, on the same PCB, I wonder if there isn't a better solution.

If you have any ideas you would help me a lot.
Thanks in advance!

Re: Ethernet connection [Raspberry (USB-ETH) -> (ETH-SPI) ESP32] same PCB

Posted: Sat Apr 01, 2023 1:26 am
by ESP_Sprite
You could possibly use a serial IP encapsulation (like SLIP or PPP) over a serial port to send IP packets between the RPi and the ESP. That's not super-trivial to implement, though.

Re: Ethernet connection [Raspberry (USB-ETH) -> (ETH-SPI) ESP32] same PCB

Posted: Wed Apr 05, 2023 3:52 pm
by Phoedus
Thank you very much @ESP_Sprite,
I will try to study your solution for future release, thank you very much.
At the moment I have a very close deadline, and I hope to be able to save firmware development time.

I'm planning the following hardware configuration:
ESP32 connected via SPI to the Wiznet w5500
RaspberryPi connected via usb to Realtek RTL8152B

I've managed to create the schematic of both the two components,
but I'm having some doubts about the ethernet-side connection between the two chips.

The connection must be: "Straight Through" and NOT "Crossover".

About w5500 schematic: ESP32-Ethernet-Kit is an example:
https://dl.espressif.com/dl/schematics/ ... 200528.pdf

About RTL8152B schematic:
https://www.waveshare.com/w/upload/3/37 ... 28B%29.pdf

My questions:
1- Can I avoid using magnetic filters? like:
https://pdf1.alldatasheet.com/datasheet ... A-TLF.html
2- The only poles I should join would be those that would reach pins: 1,2,3,6 of the RJ45 connector?

Help :?:

Thank you so much for your kind help ;)

Re: Ethernet connection [Raspberry (USB-ETH) -> (ETH-SPI) ESP32] same PCB

Posted: Fri Apr 07, 2023 12:59 am
by ESP_Sprite
Phoedus wrote:
Wed Apr 05, 2023 3:52 pm
My questions:
1- Can I avoid using magnetic filters? like:
https://pdf1.alldatasheet.com/datasheet ... A-TLF.html
You can, see e.g. here for more info.
2- The only poles I should join would be those that would reach pins: 1,2,3,6 of the RJ45 connector?
Yes.

Re: Ethernet connection [Raspberry (USB-ETH) -> (ETH-SPI) ESP32] same PCB

Posted: Wed Apr 19, 2023 5:15 pm
by Phoedus
Thank you very much @ESP_Sprite,
the documentation you shared with me was really very helpful!

I made an initial draft: on one hand I am using ETH contacts from BananaPI as in the following file:
https://forum.banana-pi.org/t/bpi-m2-ze ... ernet/4268

On the other hand, as I said, a Wiznet W5500 connected to ESP32 with SPI.

This is the idea:
Image


what do you think? Do you have any advice for me?
Thanks in advance ;)

Re: Ethernet connection [Raspberry (USB-ETH) -> (ETH-SPI) ESP32] same PCB

Posted: Thu Apr 20, 2023 3:12 am
by ESP_Sprite
If you're also running the RTL8152B without magnetics, I think you should replicate R22-R25 on the other side of the 33nF capacitors as well. Worst case, if you're making a PCB for it, add the footprints and you can always add/remove them if needed.

Re: Ethernet connection [Raspberry (USB-ETH) -> (ETH-SPI) ESP32] same PCB

Posted: Thu Apr 20, 2023 9:46 am
by Phoedus
Finally, I will not use the RTL8152B,
I will use Banana-pi ethernet signals directly, as in the link:
https://forum.banana-pi.org/t/bpi-m2-ze ... ernet/4268

New design, according to your suggestions:
https://imgbox.com/GPU0BD4P

Did I get it right? that's enough?
<3
Thank you very much

Re: Ethernet connection [Raspberry (USB-ETH) -> (ETH-SPI) ESP32] same PCB

Posted: Fri Apr 21, 2023 2:12 am
by ESP_Sprite
I think this should be sufficient, indeed.