A christmas project to create a TCP/IP Stack on a RP2040 with only a minimal hardware layer
Go to file
2024-12-04 20:51:17 +01:00
docs Initial commit 2024-12-02 22:19:37 +01:00
.gitignore Initial commit 2024-11-24 20:24:12 +01:00
Ethy.kicad_pcb Initial commit 2024-11-27 21:45:43 +01:00
Ethy.kicad_prl Initial commit 2024-11-27 21:45:43 +01:00
Ethy.kicad_pro Initial commit 2024-11-27 21:45:43 +01:00
Ethy.kicad_sch Initial commit 2024-11-27 21:45:43 +01:00
Power.kicad_sch Replace LMR51425 with LMR51406 2024-12-04 20:51:17 +01:00
README.md Add basic comparison between STUSB and TPS 2024-11-25 22:28:40 +01:00

Ethy

A project to learn how ethernet and the TCP/IP Stack works.

Design

Ethy is designed to learn how ethernet and the entire OSI stack functions and how it can be used on low-memory devices.

This project started in November, so the project is made in a christmassy theme by making an LED display driver for a christmas tree over ethernet.

block diagram of Ethy

The block diagram above shows the main components of the system. First of all we have the Ethernet chain, which is just a RJ45 connector together with the magnetics and a chip to convert data from the microcontroller to the differential signals. Another project that attempts something similar uses the W5100 but is still a bit of an overkill for what I want to use. The less of the process the chip automates the better.

The second chain is the USB and power. Although the main way to connect to the device will be via ethernet, I still wanted some other way to talk to it. Given that the RP2040 has an onboard USB PHY, this seemed the easiest way. At the same time the USB PD standard (PD 2.0 and PD 3.0 have a selection of easily attainable chips) allows for 100W of power. How much of that will or can be used is still being figured out, but it makes for an easy way to power multiple LEDS.

Lastly, from the USB PD and the RP2040 together power the LED strips. The device should both support WS2812B and WS2815B LED strips. Since the user may plug in either a WS2812B or WS2815B LED strip, the voltage needed for the should be automatically detected. The easiest way of doing that would be to use a voltage divider in the same way that the base power profile of the PD standard uses it.

USB Power Delivery

Possible PD chips

  • STUSB4500
  • STUSB4500L
  • TPS25730
  • TPS25751

Comparison

All of the PD chips can basically run in auto-run mode--also called dead battey mode. Since Ethy does not have any battery, the PD devices have to be able to auto-configure or atleast allow for the standard 5V output of the USB. The STUSB4500 are specc'ed for USB type-C rev 1.2 (for STUSB4500) and type-c rev 1.4 (for STUSB4500L). Both seem to function with the PD rev 2.0 standard. However, according to the STUSB4500 documentation it is interoperable with USB PD rev 3.0

Both the TPS devices are built for USB PD rev 3.1.

The biggest difference, to me, seems to be the control of an external power path. The STUSB devices can only function with an external power path while the TPS devies also have an internal power path. The biggest difference however, is the type of switch that can be used for each chip.

The STUSB4500 and STUSB4500L have active drain outputs, meaning that the switches should be based on P-channel MOSFETS, as uses in their reference design. The TPS devies have an internal charge pump which means they can use N-channel MOSFETS. N-channel MOSFETS generally have a smaller footprint and smaller R_ds(on) than the P-channel counterparts. This can be seen in the reference designs of PD IC's. The TPS chips use the CSD87501L dual common drain n-channel from Texas Instruments. This dual channel MOSFET has a source-to-source R_ds(on) of 6.6 milliOhm at a Gate Source Voltage of 10 V. For the maximum load of 12V @ 5A, the power loss would be around 165mW.

Comparing to the P-channel MOSFETS in the STUSB chips, the reference design uses the STL6P3LLH6 MOSFET from STM. This MOSFET has a maximum R_ds(on) of around 30milliOhm. at 5A this would result in 0.75 W of loss. Considering that both designs need two MOSFETS, the loss in the MOSFETS for the STUSB chips would be around 1.5W.

This difference in power loss can also be seen in the package size, since the CSD87501L is half the size of a single STL6P3LLH6 MOSFET.

Possible DC/DC chips for controllers

  • TPS56320x (except it only goes to 17V)

Ehternet PHY

LED Strip