Giter Site home page Giter Site logo

esp32-ethgate's Introduction

ESP32-Ethgate

This is an ESP32 (ESP32-WROOM-32 module) with LAN8720A PHY project intended to be an ESP-NOW to (wired) MQTT gateway.

Photo of working board

It was designed to be produced in my PCB mill. If your PCB mill can handle QFN24 footprints and double-sided PCB's then you might be able to duplicate this. Or you can just order a PCB from pretty much anywhere. I had a few made by Oshpark.

Oshpark After Dark PCB

Design

For simplicity, it uses the GPIO17 PLL clock technique rather than the GPIO0-based crystal, and includes a second 3.3v regulator to control the entire ethernet power rail independently. It needs stable USB power, although at some point I might take a stab at a PoE version.

The CH340C runs off the first regulator along with the ESP32. The HT7233 is rated for 300mA, which is just marginal for an ESP32, but so far I haven't noticed any power issues (power consumption for the whole board averages maybe 250mA). I've thrown in some USB ESD protection, a fuse, and some reverse protection (I know that's not supposed to be a problem with USB... things happen, don't ask). ESD protection for the Ethernet port would be a nice-to-have at some point.

The CH340C supports the usual auto-programming. Note that you'll need to dial back the default upload baud rate.

I've added a small (1.25mm pitch) header with 3V3, GND, and two GPIO's to allow for things like environmental sensors. Note that temperature sensors will need to stay a minimum of 10cm off the board to avoid the heat thrown by this board. I've also broken out the USB interface with a small header because stuff... happened.

BOM

Most of the components are from LCSC. There's an interactive BOM page which should tell you what you need. Passives are 0603 with a few 0805 for the larger capacitors.

Firmware

The Arduino-ESP32 ETH_LAN8720 sketch should work with the following configuration:

#define LED_BUILTIN 2	// or use a NodeMCU-type of board definition
#define ETH_CLK_MODE    ETH_CLOCK_GPIO17_OUT
#define ETH_POWER_PIN   12
#define ETH_TYPE        ETH_PHY_LAN8720
#define ETH_ADDR        1
#define ETH_MDC_PIN     23
#define ETH_MDIO_PIN    18

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

I flash mine with the ESP32 clock set at 80MHz, which seems to be more stable at 100Mbps connection speeds and draws approximately 25% less power.

esp32-ethgate's People

Contributors

c- avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.