Ethernet For Hackers: Transformers, MACs And PHYs

We’ve talked about Ethernet basics, and we’ve talked about equipment you will find with Ethernet. However, that’s obviously not all – you also need to know how to add Ethernet to your board and to your microcontroller. Such low-level details are harder to learn casually than the things we talked about previously, but today, we’re going to pick up the slack.

You might also have some very fair questions. What are the black blocks near Ethernet sockets that you generally will see on boards, and why do they look like nothing else you see on circuit boards ever? Why do some boards, like the Raspberry Pi, lack them altogether? What kind of chip do you need if you want to add Ethernet support to a microcontroller, and what might you need if your microcontroller claims to support Ethernet? Let’s talk.

Transformers Make The Data World Turn

One of the Ethernet’s many features is that it’s resilient, and easy to throw around. It’s also galvanically isolated, which means  you don’t need a ground connection for a link either – not until you want a shield due to imposed interference, at which point, it might be that you’re pulling cable inside industrial machinery. There are a few tricks to Ethernet, and one such fundamental Ethernet trick is transformers, known as “magnetics” in Ethernet context.

Each pair has to be put through a transformer for the Ethernet port to work properly, as a rule. That’s the black epoxy-covered block you will inevitably see near an Ethernet port in your device. There are two places on the board as far as Ethernet goes – before the transformer, and after the transformer, and they’re treated differently. After the transformer, Ethernet is significantly more resilient to things like ground potential differences, which is how you can wire up two random computers with Ethernet and not even think about things like common mode bias or ground loops, things we must account for in audio, or digital interfaces that haven’t yet gone optical somehow.

Continue reading “Ethernet For Hackers: Transformers, MACs And PHYs”

Ethernet For Hackers: Equipment Exploration

Last time, we talked about the surface-level details of Ethernet. They are fundamental to know for Ethernet hacking, but they’re also easy to pick up from bits and pieces online, or just from wiring up a few computers in your home network. Now, there’s also a bunch of equipment and standards that you will want to use with Ethernet – easy to find whether used or new, and typically as easy to work with. Let’s give you a few beacons!

Routers And Switches

Whenever you see a box with a few Ethernet ports, it’s either referred to as a router, or a switch, sometimes people will even use the word “hub”! Fortunately, it’s simpler than it may seem. A router is a smart device, typically with an OS, that ties two or more networks together – routing packers from one network to another, and typically taking care of things like handing out local IP addresses via DHCP. A switch merely helps Ethernet devices exchange packets between each other on the same level – it’s typically nowhere near as smart as a router gets. Oftentimes, a home router will contain a switch inside, so that you can plug in multiple of your home devices at once. That’s the main difference – a switch merely transmits packets between Ethernet-connected devices, while a router is a small computer taking care of packet forwarding between networks and possibly including an Ethernet switch on the side.
Continue reading “Ethernet For Hackers: Equipment Exploration”

Ethernet For Hackers: The Very Basics

Ethernet is ubiquitous, fast, and simple. You only need two diffpairs (four wires) to establish a 100Mbit link, the hardware is everywhere, you can do Ethernet over long distances easily, and tons of the microcontrollers and SoCs support it, too. Overall, it’s a technology you will be glad to know about, and there’s hundreds of scenarios where you could use it.

If you need to establish a high-bandwidth connection between two Linux boards in your project, or maybe a Linux board and a powerful MCU, maybe make a network between microcontrollers, Ethernet’s your friend. It also scales wonderfully – there’s so much tech around Ethernet, that finding cables, connectors or ICs tends to be dead easy. Plus, the world of Ethernet is huge beyond belief. Ethernet as most of us know it is actually just the consumer-facing versions of Ethernet, and there’s a quite a few fascinating industrial and automotive Ethernet standards that flip many of our Ethernet assumptions upside down.

Now, you might be missing out on some benefits of Ethernet, or perhaps misunderstanding how Ethernet works at all. What does it mean when a microcontroller datasheet says “has Ethernet interface”? If you see five pins on an SBC and the manufacturer refers to them as “Ethernet”, what do you even do with them? Why does the Raspberry Pi 4 SoC support Ethernet but still requires an extra chip, and what even is GMII? Continue reading “Ethernet For Hackers: The Very Basics”

FPGA To Ethernet Direct

When [iliasam] needed an Ethernet connection, he decided to see how much of the network interface he could put in the FPGA logic. Turns out that for 10 Base-T, he managed to get quite a bit inside the FPGA. His original post is in Russian, but automatic translation makes a passable attempt at converting to English.

This is a classic trade off all FPGA designers face: how much external logic do you use for a particular design. For example, do you add memory to the PCB, or use FPGA resources as memory? Each has its advantages and disadvantages (that’s why it is a trade off). However, if you are trying to keep things cheap, slashing external circuitry is often the way to go.

Continue reading “FPGA To Ethernet Direct”

Hands-On Othermill Review Grinds Out Sparkling Results

We’ve been on the lookout for alternatives to chemically etching circuit boards for years. The problem has been that we don’t particularly want to devote months of or lives learning how to build precision CNC mills. Off in the distance there may be an answer for that quandary if you don’t mind parting with twenty-two Benjamins. Sure, it’s a heck of a lot more expensive than toner transfer and cupric chloride, but the Othermill can be purchased right now (in your hands a few months later) and after reading this in-depth review we are a bit less hesitant about opening our wallets for it.

othermill-review-thumbIt’s a tome of a review, but that means there’s something for everybody. We especially enjoyed seeing the 10 mil board shown here which took about 1-hour to mill. Considering it has also been through-hole drilled we’d put that on part with the time it takes to etch a board. There are obvious places where the traces are not perfectly smooth (not sure if that’s burring or over-milling) but they are not broken and the board’s ready to be populated.

Alignment is something of an issue, but the Othermill isn’t limited to PCBs so we’d recommend designing and milling your own alignment bracket system as an early project.

Who isn’t envious of custom-builds that can get down to 10-mils, like this beauty from 2013. Our hopes had been sparked when Carbide 3D came onto the scene. We’re still optimistic that they will make a big splash when they start shipping preorders in a few months.

As this review proves, Othermill is already out in the wild with a 6-8 week wait before shipping. We saw it in action milling multiple materials at the Hackaday Omnibus Lauch Party and were duly impressed. Price or waiting-period aside we’re going to hold off until the software options expand beyond Mac-only (UPDATE: Othermill software support for Windows was added in early 2016); either Othermill will add support or someone will come up with a hack to use traditional CNC software. But if you count yourself as a subscriber to the cult of Apple the software, called Otherplan, does get a favorable prognosis along with the hardware.

Already have an Othermill sitting on your bench? Let us know your what you think about it in the comments below.

Bonus content: [Mike Estee], CTO of Othermill just gave a talk last night about how he got into making mills and the challenges of building something with super-high-precision. Sound isn’t good but the talk is solid. Hackaday’s [Joshua Vasquez] also gives a talk on the video about building an SPI core for FPGA. These talks are one of the Hardware Developer’s Didactic Galactic series which you really should check out if you’re ever in the San Francisco area.

Continue reading “Hands-On Othermill Review Grinds Out Sparkling Results”