ESP32 + LAN8720 need help

Hello everyone,
After several attempts and reading the diagrams of the ESP32-POE and Kincony A8 models using this LAN8720 chip I understood that they did not use an external oscillator like on our “waveshare” card. So I tried to modify this edge more simply by removing on resistor 33ohm and mouve an other. It works perfectly with GPIO0 or 17 connected on nINT/REFCLK pin !

ethernet:
  type: LAN8720
  mdc_pin: GPIO23
  mdio_pin: GPIO18
  clk_mode: GPIO17_OUT #or GPIO0_OUT, connected to nINT/REFCLK pin
  phy_addr: 1

Original ESP32-poe schematic :

Original Waveshare schematic :

After modification (disconnect onboard oscillator, use ESP32 GPIO0, 16 or 17 OUT) :

4 Likes

Very nice and documented problem solving, congrats @Alois !

hi thanks for posting such use full information, can u please share your full wiring diagram esp32 to lan8720 it will really help

Thanks alot.
please share your full shematic.

i hv tried this one it works… but it break ping after some time continuously, after every 10-20 pings 1 or 2 ping. how to solve that

@muhammadayub

I had the same problem on my Lolin32 board.

Simply solder the Enable pad of the 50MHz oscillator to the NC Pin or Ground.
Then ground NC pin, this will effectively disable the 50MHz oscillator on the LAN8720 board. Alternatively you could de-solder the oscillator all together.

I then used GPIO17_OUT and no pull up or pull down resisters.

1 Like

i am doing same but i am facing ping break issue

@muhammadayub

What board are you using?

You could also try a different power source, network cable / Switch.

hi i am using this board

@muhammadayub
I meant the microcontroller board.

But I have a different ethernet board to you.

My board is this one.
image

i hv this one tooo, i am trying to use it with di-mini, esp32 mini and esp2-wroom-32 but i dont know everytime i got ping break issue. After 10-20 pings 1 or 2 ping

I used this method and this is working fine and without any packet loss such below:

Check these steps:

1- Change the node’s IP . in dhcp server may occure ip conflict.
2- Did you add the node to Home Assistant through API? (It should connect)
3- Check your wireing and isolate it more as you can.
4- Check the resistor between GPIO17 of ESP and XTAL1/CLKIN of Lan8720, it should be 33ohm.
5- change your network cable with a shorter one.

I have modified one of the no name boards and it is working fine so far. The circuit for the oscillator is the same as in the post by [Alois].


1 Like

Hi all,
I have just order one LAN8720 Ethernet Board and trying to understand how I have to connect it to my Sparkfun ESP32 Thing board.

On the ESP32 I have GPIO12, GPIO27, GPIO26, GPIO4, GPIO17, GPIO16, GPIO05 and GPIO02 free. What I have read I shouldn’t use GPIO05 and GPIO02 on this board because they are strapping pins.

In esphome only 3 pins get defined? where do I define all the other pins? (Tx, Rx…)

Thanks!

BR

Those are the only configurable pins. The rest are required per the espressif docs

1 Like

Thank you for sharing what you did find out. But:
Obviously the modified Waveshare schematic does not match with the modification on the photo: If you remove one 33R resistor and move another one to a different place, only one resistor can be missing in the schematic. But in yours, both R11 and R12 are missing. So, what function has the moved resisitor, and where is his place in the modified schematic?

This is not working for me,

I am using a Cisco switch and do wounder if maybe the auto negotiation could be an issue. I cannot ping the device at all.

this solution like put a 33Ohm resistor between gpio 17 and xtal1/clkin

yes bro these 3 pins are just for configuration esp32 with home assistance esphome
and must connect all pins without NC so the system works well

wiring guide

ESP32 | NC | 22 | 19 | 21 | 26 | 25 | 27 | 17 | 23 | 18 | GND | 3V3

LAN8720 | NC | TX1 | TX0 | TX_EN | RX1 | RX0 | CRS | nINT/REFCLK | MDC | MDIO | GND | VCC

I have the same switch Cisco POE and I hope everything with you is working well
me is working but not professionally. every press for the switch in switches need page alone to refresh the need to press again then run if you have any idea about this issue tell me