The Perils Of Return Path Gaps

The radio frequency world is full of mysteries, some of which seem to take a lifetime to master. And even then, it seems like there’s always something more to learn, and some new subtlety that can turn a good design on paper into a nightmare of unwanted interference and unexpected consequences in the real world.

As [Ken Wyatt] aptly demonstrates in the video below, where you put gaps in return paths on a PCB is one way to really screw things up. His demo system is simple: a pair of insulated wires running from the center pins on BNC jacks and running along the surface of a piece of copper-clad board to simulate a PCB trace. The end of each wire is connected to the board’s ground plane through a 50 ohm resistor, with one wire running over a narrow slot cut into the board. A harmonics-rich signal is fed into each trace while an H-field EMC probe connected to a spectrum analyzer is run along the length of the trace.

With the trace running over the solid ground plane, the harmonics are plentiful, as expected, but they fall off very quickly away from the trace. But over on the trace with the gapped return trace it’s a far different story. The harmonics are still there, but they’re about 5 dBmV higher in the vicinity of the gap. [Ken] also uses the probe to show just how far from the signal trace the return path extends to get around the gap. And even worse, the gap makes it so that harmonics are detectable on the unpowered trace. He also uses a current probe to show how common-mode current will radiate from a long conductor attached to the backplane, and that it’s about 20 dB higher with the gapped trace.

Hats off to [Ken] for this simple explanation and vivid reminder to watch return paths on clock traces and other high-frequency signals. Need an EMC probe to check your work? A bit of rigid coax and an SDR are all you needContinue reading “The Perils Of Return Path Gaps”

A Deep Dive Into Quadcopter Controls

In the old days, building a quadcopter or drone required a lot of hacking together of various components from the motors to the batteries and even the control software. Not so much anymore, with quadcopters of all sizes ready to go literally out-of-the-box. While this has resulted in a number of knock-on effects such as FAA regulations for drone pilots, it’s also let us disconnect a little bit from the more interesting control systems these unique aircraft have. A group at Cornell wanted to take a closer look into the control systems for drones and built this one-dimensional quadcopter to experiment with.

The drone is only capable of flying in one dimension to allow the project to more easily fit into the four-week schedule of the class, so it’s restricted to travel along a vertical rod (which also improves the safety of the lab).  The drone knows its current position using an on-board IMU and can be commanded to move to a different position, but it first has to calculate the movements it needs to make as well as making use of a PID control system to make its movements as smooth as possible. The movements are translated into commands to the individual propellers which get their power from a circuit designed from scratch for this build.

All of the components of the project were built specifically for this drone, including the drone platform itself which was 3D printed to hold the microcontroller, motors, and accommodate the rod that allows it to travel up and down. There were some challenges such as having to move the microcontroller off of the platform and boosting the current-handling capacity of the power supply to the motors. Controlling quadcopters, even in just one dimension, is a complex topic when building everything from the ground up, but this guide goes some more of the details of PID controllers and how they help quadcopters maintain their position.

Continue reading “A Deep Dive Into Quadcopter Controls”

A hand holds a LEGO replica of a Polaroid camera. The back of the "camera" has been removed to show the sereies of Technic pieces inside that allow the camera shutter to work.

How A LEGO Set Is Born

LEGOs are the first window into making something in your head become real for many makers. The Verge dug into how a LEGO set itself goes from idea to the shelves.

While most sets come from the minds of LEGO designers, since 2008, fans can submit their own sets to LEGO Ideas for the chance to become a real product. In this case, we follow the journey of [Marc Corfmat]’s Polaroid OneStep Camera from his initial attempts at LEGO stardom with his brother [Nick] to the current set that took off.

While the initial idea and build are the seed for a new set, once the project is in the hands of LEGO, designers meticulously make revision after revision to ensure the set is enjoyable to build and any moving parts continue to function for thousands of cycles. This is all weighed against the total cost of the BOM as well as any licensing required for intellectual property. One particularly interesting part of the article is how designers at LEGO are afforded a certain number of “frames” for custom bricks which leads to some interesting hacks and collaboration as all good constraints do.

For more LEGO hacks, checkout LEGO’s long lost cousin, testing LEGO-compatible axle materials, or these giant LEGO-like pieces.

Degrees Of Freedom, But For Whom?

Opening up this week’s podcast, I told Kristina about my saga repairing our German toilet valve. I’m American, and although I’ve lived here over a decade, it’s still surprising how things can be subtly different from how they worked back home.

But what was amazing about this device was that it had a provision for fine adjustment, and to some extent relied on this adjustment to function. Short version: a lever mechanism provides mechanical advantage to push a stopper against the end of a pipe to block the water flow, and getting the throw of this mechanism properly adjusted so that the floater put maximum pressure against the pipe required fine-tuning with a screw. But it also required understanding the entire mechanism to adjust it.

Which makes me wonder how many plumbers out there actually take the time to get that right. Are there explicit instructions in the manual? Does every German plumber learn this in school? I was entirely happy to have found the adjustment screw after I spent 15 minutes trying to understand the mechanism, because it did just the trick. But is this everyone’s experience?

I often think about this when writing code, or making projects that other people are likely to use. Who is the audience? Is it people who are willing to take the time to understand the system? Then you can offer them a screw to turn, and they’ll appreciate it. But if it’s an audience that just doesn’t want to be bothered, the extra complexity is just as likely to cause confusion and frustration.

USB-C For Hackers: Program Your Own PSU

Last time, I showed off a few ways you can convert an existing PSU to USB-C duty, and zoomed in on a particular way you can use to convert one of the ever-abundant 18 V – 20 V laptop PSUs to USB-C. All we have left is to write software for it, and I’ll explain how it works. There’s also that one cool USB-C secret I’ve found out, but you’ll have to read on to find out more.

From the last article, we have a board that has an RP2040 and FUSB302 combo on it, which takes a 20 V DC PSU input from a laptop brick, and can switch either 5 V, 20 V or 0 V to its USB-C socket using FETs. The USB-C communication firmware is simple enough, but there’s caveats, especially regarding safety. Let’s go through those!

The Code Logic

VBUS has to be non-powered by default – we only supply 5 V when the FUSB302 detects a 5.1 kΩ pulldown on one of the CC lines. After supplying 5 V, we send out PSU capability advertisements, of the kind that we’ve learned to parse in the Replying PD article – and whenever we get a Request, we have to switch to the requested profile, connecting the voltage rail requested to the FET. I opt to not do any current consumption control in this design, assuming a well-behaved device, but you theoretically should do that. It wouldn’t be hard to add a high-side current sensor, say, something from Analog Devices – I just don’t want to do that now, especially given that I’m already using two of the exposed ADC pins to do Lenovo/HP PSU capability detection instead, one is used up for VBUS measurement, and the fourth is used for VIN (20 V rail) measurement – that’s four ADCs, which is as much as the RP2040 has got. However, if I ever need more ADCs, I can add an analog mux like 4051 in the next version! Continue reading “USB-C For Hackers: Program Your Own PSU”

EcoEDA Integrates Your Junk Bin Into Your Designs

If you’re like us, there’s a creeping feeling that comes over you when you’re placing an order for parts for your latest project: Don’t I already have most of this stuff? With the well-stocked junk bins most of us sport and the stacks of defunct electronics that are almost always within arm’s length, chances are pretty good you do. And yet, we always seem to just click the button and place a new order anyway; it’s just easier.

But what if mining the treasure in your junk bin was easier? If you knew right at design time that you had something in your stash you could slot into your build, that would be something, right? That’s the idea behind ecoEDA, a Python-based KiCAD plugin by [Jasmine Lu], [Beza Desta], and [Joyce Passananti]. The tool integrates right into the schematic editor of KiCAD and makes suggestions for substitutions as you work. The substitutions are based on a custom library of components you have on hand, either from salvaged gear or from previous projects. The plug-in can make pin-for-pin substitutions, suggest replacements with similar specs but different pinouts, or even build up the equivalent of an integrated circuit from available discrete components. The video below gives an overview of the tool and how it integrates into the design workflow; there’s also a paper (PDF) with much more detail.

This seems like an absolutely fantastic idea. Granted, developing the library of parts inside all the stuff in a typical junk bin is likely the biggest barrier to entry for something like this, and may be too daunting for some of us. But there’s gold in all that junk, both literally and figuratively, and putting it to use instead of dumping it in a landfill just makes good financial and environmental sense. We’re already awash in e-waste, and anything we can do to make that even just a little bit better is probably worth a little extra effort. Continue reading “EcoEDA Integrates Your Junk Bin Into Your Designs”

USB-C For Hackers: Build Your Own PSU

What if you wanted to build your own USB-C PSU? Good news – it’s easy enough! If you ever wanted to retrofit a decent DC PSU of yours to the USB-C standard, say, you got a Lenovo/HP/Dell 19V-20V charger brick and you’ve ever wished it were USB-C, today is the day when we do exactly that. To be fair, we will cheat a bit – but only a tiny bit, we won’t be deviating too much from the specification! And, to begin with, I’ll show you some exceptionally easy ways that you can turn your DC PSU into a USB-C compatible one, with a simple module or a few.

Turning a 20 V PSU into a USB-C PSU feels natural if you want to charge a laptop – those tend to request 20 V from a USB-C PSU anyway, so what’s the big deal? However, you can’t just put 20 V onto a USB-C connector – you have to add a fair bit of extra logic to make your newly christened USB-C PSU safe to use with 5 V devices, and this logic also requires you go through a few extra steps before 20 V appears on VBUS. Any USB-C PSU has to output 5 V first and foremost whenever a device is connected, up until a higher voltage is negotiated digitally, and the PSU may only switch to a higher voltage output when it’s requested to do so.

Now, for that, a PSU offers a list of profiles, and we looked into those profiles in the Replying PD article – each profile is four bytes that contain information about the profile voltage, maximum current that the device may draw at that voltage, and a few other details. For a PSU to be USB-C compliant, the USB-C specification says that, in addition to 5 V, you may also offer 9 V, 15 V, and 20 V.

Also, the specification says that if a PSU supports certain in-spec voltage like 15 V, it’s also required by the spec to offer all of the spec-defined voltages below the maximum one – for 15 V, that also requires supporting 9 V. Both of these are UX requirements, as opposed to technical requirements – it’s easier for device and PSU manufacturers to work with a small set of pre-defined voltages that majority of the chargers will support, but in reality, you can actually offer any voltage you want in the PSU advertisement; at worst, a device is going to refuse and contend with slowly charging from the 5 V output that you’re required to produce.

I’d like to walk you through how off-the-shelf USB-C PSUs work, all of the options you can use to to create one, and then, let’s build our own USB-C PSU from scratch! Continue reading “USB-C For Hackers: Build Your Own PSU”