Hardware Should Lead Software, Right?

Once upon a time, about twenty years ago, there was a Linux-based router, the Linksys WRT54G. Back then, the number of useful devices running embedded Linux was rather small, and this was a standout. Back then, getting a hacker device that wasn’t a full-fledged computer onto a WiFi network was also fairly difficult. This one, relatively inexpensive WiFi router got you both in one box, so it was no surprise that we saw rovers with WRT54Gs as their brains, among other projects.

Long Live the WRT54G

Of course, some people just wanted a better router, and thus the OpenWRT project was born as a minimal Linux system that let you do fancy stuff with the stock router. Years passed, and OpenWRT was ported to newer routers, and features were added. Software grew, and as far as we know, current versions won’t even run on the minuscule RAM of the original hardware that gave it it’s name.

Enter the ironic proposal that OpenWRT – the free software group that developed their code on a long-gone purple box – is developing their own hardware. Normally, we think of the development flow going the other way, right? But there’s a certain logic here as well. The software stack is now tried-and-true. They’ve got brand recognition, at least within the Hackaday universe. And in comparison, developing some known-good hardware to work with it is relatively easy.

We’re hardware hobbyists, and for us it’s often the case that the software is the hard part. It’s also the part that can make or break the user experience, so getting it right is crucial. On our hacker scale, we often choose a microcontroller to work with a codebase or tools that we want to use, because it’s easier to move some wires around on a PCB than it is to re-jigger a software house of cards. So maybe OpenWRT’s router proposal isn’t backwards after all? How many other examples of hardware designed to fit into existing software ecosystems can you think of?

It’s The Simple Things

I love minimal hacks. Limitations are sometimes the spark for our greatest creativity, and seeing someone do something truly marvelous with the simplest of technological ingredients never fails to put a smile on my face.

This week, it was the super-simple 1D Fireworks project by [Daniel Westhof]. Nothing more than an ESP8266 and a long RGB LED strip went into this effect on the hardware side, and indeed the code isn’t all that tricky either. But what it does is a very nice simulation of the physics that define the movement of a flare rocket and then all of the stars that explode out of it. And that makes it look so good.

Hackaday’s [Kristina Panos] is apparently also a fan of the single dimension, because she picked out some of my personal favorite uses of an LED strip, including Twang, to which we’ll admit we’re addicted, or any of the PONG versions.

But I’ve seen other games, including a button-mashing racer and various roller-coaster simulations. All with the same, essentially, two-part BOM. (OK, if you don’t count the buttons/accelerometer, or power supply.) Or this demo of sorting routines, or the Velocicoaster. And I think there’s more out there.

How much creativity can you pack into an LED strip? This sounds like we need to make a new contest…

New Year’s Resolutions

As we stand here looking at the brand-new year ahead, we find ourselves taking stock, and maybe thinking how we can all be better people in the next year. More exercise, being nicer to your neighbors, consuming more or less of this or that, depending on whether it’s healthy or un. Those are the standard fare. But what’s your hacker new year’s resolution?

Mine, this year, is to branch out into a new microcontroller family, to learn a new toolchain, and maybe to finally dip my toes into Bluetooth Low Energy. Although that last one is admittedly a stretch.

But the former is great resolution material, if you allow me. New programming tooling is always a little unpleasant to set up, but there’s also payoff at the end of the ordeal. It’s a lot like picking up a new exercise – it makes you stronger. Or course, it helps to have an application in mind, the equivalent of that suit you want to be able to fit into at the end of the diet. I’ve got one. I’ve also been out of programming in straight C for a year or so, and I’m faced with a new HAL, so there’s bound to be enough of a challenge to make it worthwhile.

Honestly, I’m looking forward to getting started, but with the usual mix of optimism, over-optimism, and mild dread. It’s the perfect setup for a resolution! What’s yours?

(And yes, the art is from another story, but setting up a good backup regime isn’t a bad resolution either.)

Don’t Give Up

I’m at Chaos Communication Congress this weekend, and it’s like being surrounded by the brightest, most creative, and being honest, nerdiest crowd imaginable. And that’s super invigorating.

But because of the pandemic, this is the first in-person conference in four years, and it’s been a rather unsettling time in-between. There are tons of unknowns and issues confronting us all, geeks or otherwise, at the moment. I know some people who have fallen prey to this general malaise, and become more or less cynical.

Especially in this context, watching a talk about an absolutely bravado hack, or falling into a conversation that sparks new ideas, can be inspiring in just the right way to pull one out of the slump. Every talk is naturally a success story — of course they are, otherwise they wouldn’t be up there presenting.

But all of the smaller interactions, the hey-why-didn’t-I-think-of-that moments or the people helping each other out with just the right trick, that give me the most hope. That’s because they are all around, and I’m sure that what I’m seeing is just the tip of the iceberg. So stick together, nerds, share your work, and don’t give up!

You Can’t Make What You Can’t Measure

What’s the most-used tool on your bench? For me, it’s probably a multimeter, although that’s maybe a tie with my oscilloscope. Maybe after that, the soldering iron and wire strippers, or my favorite forceps. Calipers must rate in there somewhere too, but maybe a little further down. Still, the top place, and half of my desert-island top-10, go to measuring gear.

That’s because any debugging, investigation, or experimentation always starts with getting some visibility on the problem. And the less visible the physical quantity, the more necessary to tool. For circuits, that means figuring out where all the voltages lie, and you obviously can’t just guess there. A couple months ago, I was doing some epoxy and fiberglass work, and needed to draw a 1/2 atmosphere vacuum. That’s not the kind of quantity you can just eyeball. You need the right measurement tool.

A few weeks ago, I wrote about my disappointment in receiving a fan that wouldn’t push my coffee beans around in the homemade roaster. How could I have avoided this debacle? By figuring out the pressure differential needed and buying a fan that’s appropriately rated. But I lacked pressure and flow meters.

Now that I think about it, I could have scavenged the pressure meter from the fiberglassing rig, and given that a go, but with the cheap cost of sensors and amplifiers, I’ll probably just purpose-build something. I’m still not sure how I’ll measure the flow; maybe I’ll just cheese out and buy a cheap wind-speed meter.

When people think of tools, they mostly think of the “doers”: the wrenches and the hammers of this world. But today, let’s all raise a calibrated 350 ml glass to the “measurers”. Without you, we’d be wandering around in the dark.

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.

The Physics Lesson I Keep Re-Learning

One of the most broadly applicable ideas I’ve ever encountered is the concept of impedance matching. If you’re into radio frequency electronics, you’re probably thinking that I mean getting all your circuit elements working to a common characteristic resistance for maximum power transfer. (If you’re not, you’re probably wondering what that jumble of words even means. Fear not!)

But I mean impedance matching in the larger sense. Think about driving a stick-shift automobile. In low gear, the engine has a lot of torque on the wheels, but it can’t spin them all that fast. In high, the wheels turn fastest, but there’s not enough torque to get you started from a standstill. Sometimes you need more force and less motion, other times more motion and less force. The gearbox lets you match the motor’s power to the resistance – the impedance – it’s trying to overcome.

Or think about a cello. The strings are tight, and vibrate with quite a bit of force, but they don’t move all that much. Air, which is destined to carry the sound to your ear, doesn’t take much force to move, and the cello would play louder if it moved more of it. So the bridge conveys the small, but strong, vibrations of the strings and pushes against the top of the resonant box that makes up the body of the instrument. This in turn pushes a lot of air, but not very hard. This is also why speakers have cones, and also why your ear has that crazy stirrup mechanism. Indeed, counting the number of impedance matches between Yo Yo Ma and your brain, I come up with four or five, including electrical matches in the pre-amp.

I mention this because I recently ran into a mismatch. Fans blow air either hard or in large volume. If you pick a fan that’s designed for volume, and put it in a pressure application, it’s like trying to start driving in fifth gear. It stalled, and almost no air got pushed up through the beans in my new “improved” coffee roaster, meaning I had to rebuild it with the old fan, and quick before the next cup was due.

I ran into this mismatch even though I knew there was a possible impedance issue there. I simply don’t have a good intuitive feel how much pressure I needed to push the beans around – the impedance in question – and I bought the wrong fan. But still, knowing that there is a trade-off is a good start. I hope this helps you avoid walking in my footsteps!