Author Topic: No ethernet PHY connectivity with ESP-32-WROOM  (Read 16156 times)

0 Members and 1 Guest are viewing this topic.

Offline padagraTopic starter

  • Contributor
  • Posts: 47
  • Country: us
No ethernet PHY connectivity with ESP-32-WROOM
« on: October 03, 2019, 12:32:53 am »
Hello all, so I’m pretty new to this hopefully this kind of post is alright. I’ve been racking my brain trying to figure out what I’m doing wrong, maybe one of you will see something I’m missing.

So I designed a board based off the Olimex ESP-32-POE for easy sensors in home automation. The Olimex board starts to add up cost with a lot of individual units, I found it was cheaper for me to design the version I need stripped down from their design. I’m going to apologize in advance for my schematics, like I said I’m new and still learning please go easy on me. This is the first PCB design I’ve done, it was supposed to be straight forward since I have an open source design I could copy directly from.

Currently I have working:
- POE 5v regulator
- 5v to 3.3v regulator
- Programming Header
- IO Breakout
- Addressable LEDs

The only part that is not working is the ethernet PHY chip. I’m using the same exact code provided from Olimex using the same components. I’m thinking it must have something to do with my PCB design, I can’t see any differences in the schematics.

This last board I received was drawing 1.43amps when I had the ethernet transistor enabled by the Esp-32 microcontroller. Turns out I had a ground via shorting out a trace which was found using a thermal camera. Once I broke the trace on the circuit board, the short went away but I still cannot get ethernet connectivity as expected.

Troubleshooting notes:
- I also have an Olimex board in hand and have been running my code against it as a baseline, everything works fine on the Olimex board.
- I have checked to make sure the select lines through the resistor networks are selecting the appropriate PHY mode on the chip (2.2k ohm resistors)
- I am using a different style of rectifying POE jack than the Olimex design has but I breadboarded an “interface” to remap the pins and tested this jack on the olimex board with success

The pictures in the post show the most recent ordered revision with the grounded trace however it was only one filter? capacitor lost for the power rail on the ethernet PHY chip.

More notes:
- Using low temp lead free solder paste
- Hand placed components
- Reflowed using T962 (modified) oven
- All components reviewed under microscope and any issues repaired using rework station
- I’ve been powering up the board using the programming header so 3.3v only. This shouldn’t be a problem considering the only 5v uses are external devices through the IO port which is not in use at the moment. The POE does work when plugging in an ethernet cable with POE on.

Links:
Olimex Board: https://www.olimex.com/Products/IoT/ESP32/ESP32-POE/open-source-hardware
Olimex Schematics: https://github.com/OLIMEX/ESP32-POE/raw/master/HARDWARE/ESP32-PoE-hardware-revision-C/ESP32-PoE_Rev_C_Color.pdf

My gerber files: https://drive.google.com/open?id=1gMgqzTtAZ7wnyaUZ_DDinuoLpiHPCpMy
My schematics: https://drive.google.com/open?id=1OJd6zbYkBCBy7uq8c__bVKlTIwECfEKW




Thank you in advance for the help, I have a feeling this is going to be a simple issue I am just looking past.

Adam


847106-0
847110-1
847114-2
847118-3
« Last Edit: October 03, 2019, 12:36:05 am by padagra »
 

Offline ttt

  • Regular Contributor
  • *
  • Posts: 87
  • Country: us
Re: No ethernet PHY connectivity with ESP-32-WROOM
« Reply #1 on: October 07, 2019, 08:28:48 pm »
Can you read from the PHY registers or do you have no communication at all with the chip? First thing I would check is the 50Mhz clock on XTAL1/CLKIN. If you don't have that nothing will work.

If you have communication with the chip it's likely an issue with wiring on the magnetics side. Are you sure that TD+/TD-/TCT are on pins 4/5/6 of your RJ45 part? The Olimex schematic shows otherwise.

Also, as a reminder: you don't need all these pull-down resistors, specifically the PYHADDRx pins. The 8710A has weak pull-downs for these internally. I am not sure why Olimex places resistors for these pins. In my case the chip runs fine without them. Check the 8710A datasheet, all the pull-downs are documented.
 
The following users thanked this post: padagra

Offline padagraTopic starter

  • Contributor
  • Posts: 47
  • Country: us
Re: No ethernet PHY connectivity with ESP-32-WROOM
« Reply #2 on: October 08, 2019, 01:52:38 pm »
Thank you for giving me a direction to go!

The schematic symbol is not depictive of the actual internal wiring. I duplicated a different RJ-45 POE jack symbol and remapped the pins to the PCB symbol based off the datasheet. Also tested this remapping on a breadboard on the Olimex board with success - got POE and connection to the network.

When I get home this evening I will check for clock signal first and work from there.


Thank you again
 

Offline GeorgeOfTheJungle

  • Super Contributor
  • ***
  • !
  • Posts: 2699
  • Country: tr
Re: No ethernet PHY connectivity with ESP-32-WROOM
« Reply #3 on: October 08, 2019, 04:07:16 pm »
May be you have to wait to power up the 8710a until *after* the 50MHz oscillator is up and running?

Quote
Changes related to the problems with ethernet PHY:

The following components were added to enable powering on the PHY after the 50MHz oscillator has been started: L5(NA(FB0805/600R/2A)), FET3(WPM2015-3/TR), FET4(BSS138), C29(22uF/6.3V/20%/X5R/C0603), R50(1k/R0603) and R51(10k/R0603).

https://github.com/OLIMEX/ESP32-EVB/tree/master/HARDWARE
The further a society drifts from truth, the more it will hate those who speak it.
 

Offline dmendesf

  • Frequent Contributor
  • **
  • Posts: 320
  • Country: br
Re: No ethernet PHY connectivity with ESP-32-WROOM
« Reply #4 on: October 08, 2019, 05:26:48 pm »
Look for the wESP32. It's an esp32 + PoE that was crowdfunded. The developer had some problems with the PHY but managed to solve them and did a good documentation in the process.
 

Offline padagraTopic starter

  • Contributor
  • Posts: 47
  • Country: us
Re: No ethernet PHY connectivity with ESP-32-WROOM
« Reply #5 on: October 13, 2019, 04:54:05 pm »
Took me a few days to get back on this but here are my findings. I do have a clock signal, I also have a power transistor to control when the 8710A comes on. It appears that despite using the exact code example that successfully works on the Olimex board, I am still getting the the PHY_POWER coming on before the clock is alive.

Olimex ESP32-POE example: https://github.com/OLIMEX/ESP32-POE/tree/master/SOFTWARE/ARDUINO/ESP32_PoE_Ethernet_Arduino

Clock signal is yellow, PHY_POWER is blue on the screen shots.

It appears that what the wESP-32 guy ran into is the same as my problem but I cannot seem to understand why the same code is working on the Olimex board but is not working on mine when this portion of the circuit is identical.

In the meantime, I am going to see if I can modify the ethernet library to delay turning on the PHY_POWER output until the clock is alive.

Clock signal:
854196-0

PHY_Power vs Clock Signal:
854200-1

Measured:
854204-2

 

Offline padagraTopic starter

  • Contributor
  • Posts: 47
  • Country: us
Re: No ethernet PHY connectivity with ESP-32-WROOM
« Reply #6 on: October 13, 2019, 05:39:00 pm »
I'd like to add that I see Patrick (wESP32 Developer) is using a microcontroller to delay the PHY_POWER line, but Olimex is able to do it using transistors which leads me to believe my current design can be made to work.
 

Offline GeorgeOfTheJungle

  • Super Contributor
  • ***
  • !
  • Posts: 2699
  • Country: tr
Re: No ethernet PHY connectivity with ESP-32-WROOM
« Reply #7 on: October 13, 2019, 07:04:47 pm »
I would double check that all the pins are connected, that you're not using any of those pins somewhere else for any other thing, especially gpio0. Have you got a push button "boot" and a pullup? Is it connected to the usb-serial reset/boot circuit contraption too? Do you see a good 50MHz signal at gpio0?

Just in case, these are the #defines of pins I use. BTW I think I've read somewhere that ETH_ADDR has to be 0 or 1 depending on something I don't remember.

You haven't said what are the symptoms exactly... ?

Are you using esp-idf or the arduino IDE?

Code: [Select]

#define ETH_CLOCK_IN_PIN                    0
#define ETH_MDIO_PIN                       18
#define ETH_TXD0_PIN                       19
#define ETH_TXEN_PIN                       21
#define ETH_TXD1_PIN                       22
#define ETH_MDC_PIN                        23
#define ETH_RXD0_PIN                       25
#define ETH_RXD1_PIN                       26
#define ETH_MODE2_PIN                      27
#define ETH_POWER_PIN                      -1
#define ETH_ADDR                            0
#define ETH_TYPE              ETH_PHY_LAN8720
#define ETH_CLK_MODE       ETH_CLOCK_GPIO0_IN

ETH.begin(ETH_ADDR, ETH_POWER_PIN, ETH_MDC_PIN, ETH_MDIO_PIN, ETH_TYPE, ETH_CLK_MODE);

Edit:
Delete my gpio0 comments, I see you're using clock mode ETH_CLOCK_GPIO17_OUT.
« Last Edit: October 13, 2019, 07:28:40 pm by GeorgeOfTheJungle »
The further a society drifts from truth, the more it will hate those who speak it.
 

Offline artag

  • Super Contributor
  • ***
  • Posts: 1064
  • Country: gb
Re: No ethernet PHY connectivity with ESP-32-WROOM
« Reply #8 on: October 13, 2019, 07:14:15 pm »
Can you get a scope trace of the PHY power and clock as sequenced by the Olimex board ?

I'm wondering if you've used a fragment of the Olimex code that controls the power but perhaps not some other fragment that initialises the pin. Maybe it floats up (or has a weak pullup) before the code runs that actively sets it high?

I'd also be quite concerned about the amount of ripple on that power pin, but that's a different problem.

 

Offline padagraTopic starter

  • Contributor
  • Posts: 47
  • Country: us
Re: No ethernet PHY connectivity with ESP-32-WROOM
« Reply #9 on: October 13, 2019, 07:34:10 pm »
Can you get a scope trace of the PHY power and clock as sequenced by the Olimex board ?

I'd also be quite concerned about the amount of ripple on that power pin, but that's a different problem.


The ripple goes away when I remove channel one of my scope from the clock output. Not sure if that is due to cheap Rigol probes but reading the power pin alone on the oscilloscope gives a clean +3.3v reading the VDDIO (pin 12) on the 8710A.

Yes I will capture the Olimex board and post it.


I would double check that all the pins are connected, that you're not using any of those pins somewhere else for any other thing, especially gpio0. Have you got a push button "boot" and a pullup? Is it connected to the usb-serial reset/boot circuit contraption too? Do you see a good 50MHz signal at gpio0?

Just in case, these are the #defines of pins I use. BTW I think I've read somewhere that ETH_ADDR has to be 0 or 1 depending on something I don't remember.

You haven't said what are the symptoms exactly... ?

Are you using esp-idf or the arduino IDE?


EDIT: I missed a couple of your questions. Yes I have a clean 50mhz clock on GPIO17. Yes I am using the Olimex designed USB programming for auto programming mode. I split it in half to save component cost by moving the USB to Serial chip off board, still works fine for programming.

I have confirmed all the pins are connected, one by one with the board off via checking the traces for continuity.

The code example I'm using only requires the clock signal and PHY_POWER pins to be set, if I need to move away from using the Arduino IDE I can - I had it setup already on my Mac, it was easier to use.

I am using the Arduino IDE with the official Expressif boards added. Using the exact programming methods on the Olimex yields the correct results, it (Olimex) can connect to google.com on port 80, outputting a successful connection via serial. This leads me to believe I am still missing something on the hardware side.

The symptoms:
- It recognizes that there is an ethernet cable plugged in.
- I can get an "ETH_CONNECTED" status via serial monitor when plugging into my router but it will not connect to google.com or other sites.
- The "Link" and "Act" LEDs stay solid (seen in picture) but the router now recognizes there is a device plugged in. Also forgive the poor board design, I intentionally have the RJ45 port elevated as I missed some dimensions, had to clear the pull up resistors I placed too close to the jack.

854264-0

This is the exact code example I'm using provided by Olimex: https://github.com/OLIMEX/ESP32-POE/blob/master/SOFTWARE/ARDUINO/ESP32_PoE_Ethernet_Arduino/ESP32_PoE_Ethernet_Arduino.ino


I'm going to recheck the magnetics for the RJ45 jack, I've done it once and breadboarded the connections to confirm it works (and did on the Olimex board) but I will check once more. Perhaps I missed a pin when updated the PCB library for the jack.
« Last Edit: October 13, 2019, 07:39:39 pm by padagra »
 

Offline padagraTopic starter

  • Contributor
  • Posts: 47
  • Country: us
Re: No ethernet PHY connectivity with ESP-32-WROOM
« Reply #10 on: October 13, 2019, 08:00:44 pm »
More odd behavior. Plugging the router into my POE injector, POE injector into the board, everything powers up but now the ACT light is flashing, LINK light is off. Router does not recognize anything is plugged into it with this configuration. See video: https://www.dropbox.com/s/1m79cp9bqz4duvt/3rLIZL0ESAqrgLJJIQapLg.MOV?dl=0

« Last Edit: October 13, 2019, 08:02:31 pm by padagra »
 

Offline GeorgeOfTheJungle

  • Super Contributor
  • ***
  • !
  • Posts: 2699
  • Country: tr
Re: No ethernet PHY connectivity with ESP-32-WROOM
« Reply #11 on: October 13, 2019, 08:02:35 pm »
You're not passing the config data to ETH.begin()... !

https://github.com/OLIMEX/ESP32-POE/blob/master/SOFTWARE/ARDUINO/ESP32_PoE_Ethernet_Arduino/ESP32_PoE_Ethernet_Arduino.ino#L74

Try this:

Code: [Select]

 #define ETH_CLOCK_IN_PIN                    0
 #define ETH_MDIO_PIN                       18
 #define ETH_TXD0_PIN                       19
 #define ETH_TXEN_PIN                       21
 #define ETH_TXD1_PIN                       22
 #define ETH_MDC_PIN                        23
 #define ETH_RXD0_PIN                       25
 #define ETH_RXD1_PIN                       26
 #define ETH_MODE2_PIN                      27
 #define ETH_POWER_PIN                      12
 #define ETH_ADDR                            0
 #define ETH_TYPE              ETH_PHY_LAN8720
 #define ETH_CLK_MODE     ETH_CLOCK_GPIO17_OUT

ETH.begin(ETH_ADDR, ETH_POWER_PIN, ETH_MDC_PIN, ETH_MDIO_PIN, ETH_TYPE, ETH_CLK_MODE);
The further a society drifts from truth, the more it will hate those who speak it.
 

Offline GeorgeOfTheJungle

  • Super Contributor
  • ***
  • !
  • Posts: 2699
  • Country: tr
Re: No ethernet PHY connectivity with ESP-32-WROOM
« Reply #12 on: October 13, 2019, 08:04:38 pm »
Can you get a scope trace of the PHY power and clock as sequenced by the Olimex board ?

Should look ~ like this:

« Last Edit: October 13, 2019, 08:08:28 pm by GeorgeOfTheJungle »
The further a society drifts from truth, the more it will hate those who speak it.
 
The following users thanked this post: padagra

Offline padagraTopic starter

  • Contributor
  • Posts: 47
  • Country: us
Re: No ethernet PHY connectivity with ESP-32-WROOM
« Reply #13 on: October 13, 2019, 08:13:18 pm »
You're not passing the config data to ETH.begin()... !

https://github.com/OLIMEX/ESP32-POE/blob/master/SOFTWARE/ARDUINO/ESP32_PoE_Ethernet_Arduino/ESP32_PoE_Ethernet_Arduino.ino#L74

Try this:

Code: [Select]

 #define ETH_CLOCK_IN_PIN                    0
 #define ETH_MDIO_PIN                       18
 #define ETH_TXD0_PIN                       19
 #define ETH_TXEN_PIN                       21
 #define ETH_TXD1_PIN                       22
 #define ETH_MDC_PIN                        23
 #define ETH_RXD0_PIN                       25
 #define ETH_RXD1_PIN                       26
 #define ETH_MODE2_PIN                      27
 #define ETH_POWER_PIN                      12
 #define ETH_ADDR                            0
 #define ETH_TYPE              ETH_PHY_LAN8720
 #define ETH_CLK_MODE     ETH_CLOCK_GPIO17_OUT

ETH.begin(ETH_ADDR, ETH_POWER_PIN, ETH_MDC_PIN, ETH_MDIO_PIN, ETH_TYPE, ETH_CLK_MODE);

No success I also checked the pins against my schematic, all the GPIO pins in your above code match properly. The LINK and ACT lights are still solid.
854300-0
 

Offline GeorgeOfTheJungle

  • Super Contributor
  • ***
  • !
  • Posts: 2699
  • Country: tr
Re: No ethernet PHY connectivity with ESP-32-WROOM
« Reply #14 on: October 13, 2019, 08:28:48 pm »
Have you been messing with the MAC address? What does ETH.macAddress() say? Do you have a way to check if the router is getting a dhcp request from that MAC? Open the terminal in the Mac(intosh!) and type 'arp -a', do you see the esp32 MAC in the list?

854304-0
« Last Edit: October 13, 2019, 08:32:23 pm by GeorgeOfTheJungle »
The further a society drifts from truth, the more it will hate those who speak it.
 

Offline padagraTopic starter

  • Contributor
  • Posts: 47
  • Country: us
Re: No ethernet PHY connectivity with ESP-32-WROOM
« Reply #15 on: October 13, 2019, 08:35:45 pm »
No I have not been messing with the MAC address.

The serial monitor reads: 24:0A:C4:23:FC:27

My router does not show any devices with this MAC address.

EDIT:

'arp -a' command lists MAC addresses but 24:0A:C4:23:FC:27 is not one of them

There appears to be an oddball in the list, all ff:

Code: [Select]
(192.168.1.255) at ff:ff:ff:ff:ff:ff on en0 ifscope [ethernet]
« Last Edit: October 13, 2019, 08:40:51 pm by padagra »
 

Offline GeorgeOfTheJungle

  • Super Contributor
  • ***
  • !
  • Posts: 2699
  • Country: tr
Re: No ethernet PHY connectivity with ESP-32-WROOM
« Reply #16 on: October 13, 2019, 09:21:27 pm »
If it detects link it is receiving ~ ok. You need to check if it's sending anything, so, do you see signals in TXP and TXN? Pins 1 and 2 of the rj45:



Edit:
Pin 3 ought to be a DC halfway of the peaks of those, that is around 3V.

Edit 2:
You should be seeing that as soon as it detects link. When it is sending (or trying to send) you should be seeing positive going pulses of 5µs or more at pin 21 gpio 21 of the esp32.

« Last Edit: October 20, 2019, 08:39:12 pm by GeorgeOfTheJungle »
The further a society drifts from truth, the more it will hate those who speak it.
 

Offline padagraTopic starter

  • Contributor
  • Posts: 47
  • Country: us
Re: No ethernet PHY connectivity with ESP-32-WROOM
« Reply #17 on: October 13, 2019, 09:47:03 pm »
I really appreciate your time helping with this, this has been a cause of frustration for quite some time.

Capture traces of pin 1 and 2 of the RJ45 which does not look like yours:
854318-0

Nothing in my PCB schematic is hooked up to pin 21 of the ESP32. GPIO 21 shows the following (also does not look like yours):
854322-1
 

Offline GeorgeOfTheJungle

  • Super Contributor
  • ***
  • !
  • Posts: 2699
  • Country: tr
Re: No ethernet PHY connectivity with ESP-32-WROOM
« Reply #18 on: October 13, 2019, 10:06:04 pm »
Yes I meant gpio21 (pin 33) sorry. There's a problem with that signal (TXEN). You should be seeing beautiful positive pulses there every time it wants to send something (other than link). Maybe you've got a short there? Check it at both ends, at the esp32 (pin33) and at the 8710 (pin 21) IIANM :-)
The further a society drifts from truth, the more it will hate those who speak it.
 

Offline padagraTopic starter

  • Contributor
  • Posts: 47
  • Country: us
Re: No ethernet PHY connectivity with ESP-32-WROOM
« Reply #19 on: October 13, 2019, 10:08:05 pm »
So.. |O

I have no clue what I did but suddenly I have connectivity - getting a 301 reply from google.com on port 80. Oddly though the LINK light is not lit up anymore but ACT is (see video on dropbox link below). I'm afraid to power cycle the board because I don't want to lose this state if anyone has recommendations for things to check while it is connected.

Also I can now see the proper MAC address is connected both on my router and in terminal:

854330-0

854334-1

Video of behavior:

https://www.dropbox.com/s/knfvscbpklvv250/EE4kEkC9Sx2VX6FxcyjLQQ.MOV?dl=0



 

Offline GeorgeOfTheJungle

  • Super Contributor
  • ***
  • !
  • Posts: 2699
  • Country: tr
Re: No ethernet PHY connectivity with ESP-32-WROOM
« Reply #20 on: October 13, 2019, 10:13:57 pm »
I bet there's a short in TXEN... look carefully at the scope picture you've sent! Looks very much as if the poor esp32 is trying hard to pull it high. Look at it again but this time put the scope in 5 or 10µs/div.
« Last Edit: October 13, 2019, 10:18:04 pm by GeorgeOfTheJungle »
The further a society drifts from truth, the more it will hate those who speak it.
 
The following users thanked this post: padagra

Offline padagraTopic starter

  • Contributor
  • Posts: 47
  • Country: us
Re: No ethernet PHY connectivity with ESP-32-WROOM
« Reply #21 on: October 13, 2019, 10:19:18 pm »
Not seeing a short on the traces relating to TXEN but the 8710A is getting very hot despite still holding a connection which would indicate a short. I'm drawing 350ma at 3.3v.

My trace path is very direct from the esp32 to pin 21 for TXEN.

I will keep searching for a short.
 

Offline GeorgeOfTheJungle

  • Super Contributor
  • ***
  • !
  • Posts: 2699
  • Country: tr
Re: No ethernet PHY connectivity with ESP-32-WROOM
« Reply #22 on: October 13, 2019, 10:22:27 pm »
I must insist... TXEN has a problem!
The further a society drifts from truth, the more it will hate those who speak it.
 
The following users thanked this post: padagra

Offline padagraTopic starter

  • Contributor
  • Posts: 47
  • Country: us
Re: No ethernet PHY connectivity with ESP-32-WROOM
« Reply #23 on: October 13, 2019, 10:24:22 pm »
I will dive into it immediately!

Update: I power cycled the board, at first no connection Plugging and unplugging the ethernet cable ~5 times gets it to reconnect and receive from google.com drawing the same amount of current heating up the 8710a. I am going to unplug the test setup and get it under the microscope now.
 

Offline GeorgeOfTheJungle

  • Super Contributor
  • ***
  • !
  • Posts: 2699
  • Country: tr
« Last Edit: October 13, 2019, 10:41:20 pm by GeorgeOfTheJungle »
The further a society drifts from truth, the more it will hate those who speak it.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf