Wired Ethernet on ESP32

I’ve used the ESP32 microcontrollers for a number of projects at this point, often using the built-in WiFi radio. However, there are use cases where WiFi may be less than ideal. In my case, I’m interested in the higher reliability a wired connection offers, as well as consistent latency performance.

Fortunately, the ESP32 includes a built-in Ethernet MAC, which is the controller that manages a wired Ethernet connection. If we can pair that with a PHY, which drives the actual electrical signals on the wire, we should be able to get a working connection.

Before getting into a specific project, I wanted to put together a test board to feel out how it would work, and resolve any issues before putting it to real use. Fortunately, there’s a few references around, including a very nice open source design from Olimex that proved to be a useful reference combined with the part datasheets.

I didn’t bother to include Power over Ethernet like their design does, though that is another potential benefit over WiFi, where you can have a single cable provide power and data to a project.

I ended up testing my design by coding up a simple NTP server, and feeding the board from a GPS signal. I started with MicroPython, which is quite handy for putting together an application a lot faster than writing it in C++, but ran into performance issues that negatively impacted the quality of the time responses the board was able to return.

After rewriting in C++, the board returns fairly accurate timing responses, and would be an interesting basis for future work, though isn’t really in a state suitable for publishing currently.

This entry was posted in Electronics, Technology. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *