

Esp12e ethernet
ESP8266 10-Base-T Ethernet Driver
- Size
- 71.8 × 21 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 19
- Nets
- 21
- Pads
- 102
- Tracks, vias
- 193, 0
- Pours
- 1
- Routed
- Yes
- KiCad
- KiCad 3
- Created
- 26 Mar 2016
- Updated
- 23 May 2017
Overview
Esp12e ethernet is an open-source printed circuit board by cnlohr, from the cnlohr/espthernet repository on GitHub. It is a 2-layer board of 71.8 × 21 mm with 19 parts on 21 nets, routed with 193 tracks and 0 vias.
It is built around the AP1117DG. Its parts include 8 capacitors, 4 resistors, 2 ICs and 2 connectors. It belongs with the interfaces and adapters boards and the ESP8266 boards of this library.
Main components
1README
README.mdespthernet
It's pronounced "e-s-peethernet" - a party trick, not a legitimate engineering solution.
ESP8266 + I2S = Software-based 10-Base-T Ethernet Driver
For a detailed overview of how this project works, please see the Hackaday article. For a rough idea of what's going on, checkout the youtube video:
Overall Discussion
This is a relatively unreliable and coincidentally functional ESP8266 Ethernet driver. It only uses two pins on the ESP, the I2S pins, but does provide Ethernet. It does all its own manchester encoding/decoding, framing, FCS, etc. It mimics the ENC424J600 stack found in avrcraft and borrows the IP, ARP, UDP and TCP stacks from that project, too.
This product was created by Charles Lohr, but, will likely fall out of support by original author quickly. Additional contributers would be welcome.
The frontend i2sduplex.c is what takes the bits off wire and calls a callback in an interrupt with raw 32-bit words of what came in from the wire. It also accepts buffers to send raw bits out on the wire.
Though designed for the ESP8266 should be relatively portable, as most of the code is limited to manchestrate.c and related files. Since it is designed to operate at full duplex, it is expecting a 40MHz-in, and 40MHz-out stream. This stream mus be biased toward 0's instead of 1's since at 40MHz-in there are ambiguous bit patterns if you don't bias. This takes on raw on-wire bits and puts out ethernet frames - or accepts frames and outputs raw on-wire bits.
From there, we can check the FCS and process the packets in a consistent way and have a way of interacting with buffers. net_compat.c is what handles all of that. The interface it provides mimics the ENC424J600 and is what is used in avrcraft. The reason I use that interface on so many projects is because the style of memory access and use makes it require less buffers and less copying than stacks like lwip.
For the user layer, this system just borrows everything from avrcraft, including the http server! You will notice that it's a little awkward since it's designed to operate with either the TCP/IP stack from Espressif OR the avrcraft TCP/IP server. It would be really cool if we could figure out some way to have consistent entry.
The Web Interface
There is a web interface that gets put on the ESPs with a "make" step from the "web" directory. It pushes the webpage to the ESP. The webpage does not need to live on the ESP, itself, it can be viewed independent of one, it just only supports the "Load Test Packet" feature in "Last Packet" version on github.io.
The webpage is what is used to look at packets, create the demanchestration table, demanchestrate_table.h and test the table on new data. This was needed considering how complicated the decoding process is. Without testing on data, a lot of data, coming up with a robust algorithm was almost impossible!!! One other feature in the web interface is you can click on the 1's and 0's and turn them on and off to see how the system decodes those packets.
Hardware
Option 1: recommended Use a line driver like the ILS3371 and ethernet magnetics and terminator. This is superior, and likely to work in many situations except with stringent hardware and long cable runs. An example can be found in the esp12e-ethernet.pdf.
Option 2: not recommended Just jam some capacitors and resistors onto the input and hope for the best. This is potentially hazardous and may not work on many devices. Be ready to be disappointed.
Overall, just about any 10 mbit magnetics should do, and line drivers make things a lot better, especially if they have a bandwidth of 20 MHz. Note that you absolutely must bias the incoming signal toward 0, so there will be slightly more 0's on the input stream than 1's.
More to come?
Who knows? Depending on how this is received I may work to improve and document it, but it was a lot of work and after months of this, I'm sick of it.
License
This software is licensed under the 2-clause BSD license. See "LICENSE" for more information
Future Work
- Switch to half-duplex option, or separate streams. By using 20 MHz TX, and 32-36 MHz RX, you can save a lot of time since you'd have to process less data, and remove the requirement for signal bias.
- Add Hook to internal IP stack of whatever is being used.
- Use FLPs instead of NLPs to negotiate for 10BaseT-FD instead of -HD (Stack handles full duplex comms, no reason not to comm at it)
- Use a pseudo-PLL for decoding packets rather than a transition finder. It may be better? Right now we monitor all transitions, instead we could look where we expect a bit transition and see what it does.
Parts
19| Qty | Value | Footprint | References |
|---|---|---|---|
| 4 | NP | SM0805 | C6, C7, C8, C9 |
| 3 | 100 | SM0805 | R1, R2, R3 |
| 2 | 100p | SM0805 | C3, C4 |
| 2 | 10u | SM0805 | C1, C2 |
| 1 | 270 | SM0805 | R4 |
| 1 | AP1117 | SOT223 | U1 |
| 1 | ESP12E | ESP12E | ESP1 |
| 1 | ETHERNET | SMT_ETHERNET | P2 |
| 1 | EXB-A | EXB-A | RN1 |
| 1 | EXTHDR | SIL-8 | P1 |
| 1 | ISL3177 | SO8E | U3 |
| 1 | S553-5999-52 | BELFuse-S553 | T1 |
Similar boards
- 2 layers32 × 24 mm

- 2 layers82.8 × 72.1 mm

Vwcdpic with BT panel
tomaskovacik/vwcdpic
This is my personal fork of k9spud vwcdpic project
280 parts29GPL-2.0 - 2 layers72.5 × 17 mm

Light timer
mulcmu/esphome-usb-grow-lights
Custom PCB and esphome configuration for usb powered grow lights.
41 parts21MIT - 2 layers38.1 × 44.5 mm

- 4 layers100 × 74 mm

Beaglelogic standalone
abhishek-kakkar/beaglelogic-standalone
BeagleLogic implemented as a turnkey and standalone logic analyzer
260 parts15 - 2 layers52.1 × 29.8 mm

Irremote
takigama/HomeAutomationExperiments
Some of my home automation experiments involving arduino, esp, lights and other things
34 parts11 - 2 layers46.5 × 36.6 mm

Partycat
lukecyca/partycat
ESP8266 + WS2812 controller: https://talk.vanhack.ca/t/esp8266-ws2812-partycat-controller/5129
19 parts10 - 2 layers65 × 30 mm

MySensorsPiGw
llegoff/MySensorsPiGw
MySensors RFM69 & NRF24L Gateway for Raspberry Pi (zero & B)
29 parts8
Questions
How big is the Esp12e ethernet PCB?
It measures 71.8 × 21 mm and has 2 copper layers, 1.6 mm thick.
What parts does the Esp12e ethernet use?
19 parts, built around the AP1117DG. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
Where can I download the Esp12e ethernet KiCad files?
From the cnlohr/espthernet repository on GitHub, at the commit this page was made from: the board is hardware/esp12e-ethernet.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.
Can I use the Esp12e ethernet design in my own project?
Its repository states no licence, so its author keeps all rights: ask cnlohr before reusing the design.

