Putting Your Time In

I was absolutely struck by a hack this week — [Adam Bäckström]’s amazing robot arm built with modified hobby servos. Basically, he’s taken apart and re-built some affordable off-the-shelf servo motors, and like the 6-Million-Dollar Man, he’s rebuilt them better, stronger, faster. OK, and smoother. We have the technology.

The results are undeniably fantastic, and enable the experienced hacker to get champagne robot motion control on a grape-juice budget by employing some heavy control theory, and redundant sensors to overcome geartrain backlash, which is the devil of cheap servos. But this didn’t come out of nowhere. In his writeup, [Adam] starts off with “You could say this project started when I ordered six endless servos in middle school, more than 15 years ago.” And it shows.

Go check out this video of his first version of the modified servos, from a six-axis arm he built in 2009(!). He’s built in analog position sensors in the motors, which lets him control the speed and makes it work better than any other hobby servo arm you’ve ever seen, but there’s still visible backlash in the gears. A mere twelve years later, he’s got magnetic encoders on the output and a fast inner loop compensates for the backlash. The result is that the current arm moves faster and smoother, while retaining accuracy.

Twelve years. I assume that [Adam] has had some other projects on his plate as well, but that’s a long term project by any account. I’m stoked to see his work, not the least because it should help a lot of others who are ready to step up their desktop servo-arm projects. But the real take-home lesson here is that if you’ve got a tough problem that you’re hacking on, you don’t have to get it done this weekend. You don’t have to get it done next weekend either. Keep hammering on it as long as you need, but keep on hammering. When you get it done, the results will be all the better for the long, slow, brewing time. What’s the longest project that you’ve ever worked on?

Machinist’s Accuracy Vs. Woodworker’s Precision

There are at least two ways of making parts that fit together exactly. The first way is the Cartesian way, and the machinists way. Imagine that you could specify the size of both the hole and the peg that you’d like to put into it. Just make sure your tolerances are tight enough, and call out a slightly wider hole. Heck, you can look up the type of fit you’d like in a table, and just specify that. The rest is a simple matter of machining the parts accurately to the right tolerances, and you’re done.

The machinist’s approach lives and dies on that last step — making the parts accurately fit the measure. Contrast the traditional woodworker’s method, or at least as it was taught to me, of just making the parts fit each other in the first place. This is the empirical way, the Aristotelian way if you will. You don’t really have to care if the two parts are exactly 30.000 mm wide, as long as they’re precisely the same length. And woodworkers have all sorts of clever tricks to make things the same, or make them fit, without measuring at all. Their methods are heavy on the jigs and the clever set-ups, and extraordinarily light on the calipers. To me, coming from a “measure carefully, and cut everything to measure” background, these ways of working were a revelation.

This ends up expressing perfectly the distinction between accuracy and precision. Sometimes you need to hit the numbers right on, and other times, you just need to get the parts to fit. And it’s useful to know which of these situations you’re actually in.

Of course, none of this is exclusive to metal or wood, and I’m actually mentioning it because I find myself using ideas that I learned in one context and applying them in the other. For instance, if you need sets of holes that match each other perfectly, whether in metal or wood, you get that precision for free by drilling through two sheets at one time, or by making a template — no measuring needed. Instead of measuring an exact distance from a feature, if all you care about is two offsets being the same, you can find a block of scrap with just about the right width, and use that to mark both distances. Is it exactly 1.000″ wide? Nope. But can you use this to mark identical locations? Yup.

You can make surprisingly round objects in wood by starting with a square, and then precisely marking the centers of the straight faces, and then cutting off the corners to get an octagon. Repeat with the centers and cutting until you can’t see the facets any more. Then hit it with sandpaper and you’re set. While this won’t make as controlled a diameter as would come off a metal lathe, you’d be surprised how well this works for making round sheet-aluminum circles when you don’t care so much about the diameter. And the file is really nothing other than the machinist’s sandpaper (or chisel?).

I’m not advocating one way of working over the other, but recognizing that there are two mindsets, and taking advantage of both. There’s a certain freedom that comes from the machinist’s method: if both parts are exactly 25.4 mm long, they’re both an accurate inch, and they’ll match each other. But if all you care about is precise matching, put them in the vise and cut them at the same time. Why do you bother with the calipers at all? Cut out the middle-man!

99% Inspiration, 99% Perspiration, And 99% Collaboration

I was watching an oldish TEDx talk with Rodney Mullen, probably the most innovative street skater ever, but that’s not the point, and it’s not his best talk either. Along the way, he makes a claim that ideas — in particular the idea that a particular skateboard trick is even possible — are the most important thing.

His experience, travelling around the world on skateboard tours, is that there are millions of kids who are talented enough that when they see a video demonstrating that a particular trick idea is possible, they can replicate it in short order. Not because the video showed them how, but because it expanded their mind’s-eye view of what is possible. They were primed, and so what pushed them over the edge was the inspiration.

On the other side of the street, we’ve got Thomas Edison and his “1% inspiration, 99% perspiration” routine. Edison famously tried a bazillion filament recipes before settling on tungsten, and attributes his success to “putting his time in” or “good old-fashioned hard work” or similar. So who’s right?

The inventor of Casper Slide and the phonograph are both right. Rodney is taking it for granted that these kids have put their time in; they are skaters after all, they skate. He doesn’t see the 99% perspiration because it is the natural background, while the inspiration flashes out in Eureka moments.

Similarly, Thomas E. way underestimates inspiration. He’s already fixated on this novel idea to take an arc lamp and contain it in a glass envelope — that’s what he’s spending all of his perspiration on, after all. But without that key inspiration, all he’d be is sweaty.

And they’re also both wrong! They’re both missing a third ingredient: collaboration. Certainly Mullen, who spent his life hanging out with other skaters, teaching them what he knows, and learning from them in turn, wouldn’t say the community of skaters didn’t shape him. Even in the loner’s sport of skating, nobody is alone. And Edison? His company profited greatly from broader advances in science, and the scientific literature. Menlo Park existed to take bright, well-trained minds and put them all in one place, sharing, teaching, and working together. It embodied the idea of collaborative innovation, and that’s where some of his best work was done.

So I’m with Isaac Newton, “standing on the shoulders of giants“. Success is 99% collaboration. This leaves us with one problem: the percentages don’t add up. But that’s alright by me.

Printing Yoda Heads: Re-Makers Riffing!

We had a comment recently from a nasty little troll (gasp! on the Internet!). The claim was that most makers are really just “copiers” because they’re not doing original work, whatever that would mean, but instead just re-making projects that other people have already done. People who print other peoples’ 3D models, or use other peoples’ hardware or software modules are necessarily not being creative. Debunking a cheap troll isn’t enough because, on deeper reflection, I’m guilty of the same generic sentiment; that feeling that copying other people’s work isn’t as worthy as making your own. And I think that’s wrong!

In the 3D printing world in particular, I’m guilty of dismissively classifying projects as “Yoda Heads”. About ten years ago, [chylld] uploaded a clean, high-res model of Yoda to Thingiverse, and everyone printed it out. Heck, my wife still has hers on her desk; and alone this is proof that straight-up copying has worth, because it made a sweet little gift. After a while, Yoda gave way to Baby Groots, and strangely enough we’re back to Yoda again, but it’s Baby Yoda now. Continue reading “Printing Yoda Heads: Re-Makers Riffing!”

It Ain’t Broke, But Should I Fix It?

Five years ago, I wrote a series on getting started with your own MQTT-based home information/automation network. Five years is a long while in Hackaday time. Back then, the ESP8266 was a lot newer, and the 8266 Arduino port wasn’t fully in shape yet, and the easiest software framework to get MQTT up and running was NodeMCU; so that’s what I used for the article series, and as a consequence a handful of devices around my house run minor modifications of that basic “hello world”, but doing useful stuff.

Since then, NodeMCU has changed a bunch of its libraries and the ESP32 has replaced the ESP8266 in my parts drawer. If you tried to run my code, you’d find that it won’t run on an ESP8266 without porting or compiling an old version of NodeMCU for yourself anyway, and it won’t run on an ESP32 at all. When [Chris Lott] tried to follow my guide, he discovered that Micropython is probably a better language choice in 2021. To minimize lines of code, I’d agree, although the Arduino and Espressif’s own native IDF have grown into the job just about as well. In short, anything but NodeMCU.

Built in an hour, survived for five years.

But my home automation system doesn’t care. Those little guys are running 24/7, flipping bits like it was still 2016. Thermometers, light sensors, and power meters haven’t changed much in five years, and although I’ve revamped the databasing, display, and user control a number of times since then, using a fixed communication transport protocol means that they’re still talking the same language. Indeed, even if NodeMCU is dead to me, the MQTT content of my original series is all still valid, and installing a broker on a Raspberry Pi has only become easier in the intervening five years.

So I’ve got a bunch of legacy code running within the walls of my own home, and it makes me nervous. If the devices fail, or maybe when they eventually fail, it’s not going to be “just flash another ESP8266 and replace it”, because even though I have some ancient NodeMCU binaries sitting around, I know when to throw in the towel. But there’s no good reason to pull them down and start reflashing either. Except that it makes me a little bit itchy, just knowing that there’s orphaned, dead-end code running all around me. Surrounding me. Staring deep into my hacker’s heart.

I know better than to tear down a running system, even though I could do it one device at a time, and each module would surely be a simple, independent fix; even though I’d love the excuse to play around with Micropython and its MQTT implementation on the ESP8266, or maybe even swap some of them out for ESP32s; even though these were all temporary quick hacks that have somehow served for five (5!) years. I certainly know better, right? (Right?)

The Right Tools For The Job

We’re knee-deep in new microcontrollers over here, from the new Raspberry Pi Pico to an engineering sample from Espressif that’s right now on our desk. (Spoiler alert, review coming out Monday.) And microcontroller peripherals are a little bit like Pokemon — you’ve just got to catch them all. If a microcontroller doesn’t have 23 UARTS, WiFi, Bluetooth, IR/DA, and a 16-channel 48 MHz ADC, it’s hardly worth considering. More is always better, right?

No, it’s not. Chip design is always a compromise, and who says you’re limited to one microcontroller per project anyway? [Francesco] built a gas-meter reader that reminded to think outside of the single-microcontroller design paradigm. It uses an ATtiny13 for its low power sleep mode, ease of wakeup, and decent ADCs. Pairing this with an ESP8266 that’s turned off except when the ATtiny wants to send data to the network results in a lower power budget than would be achievable with the ESP alone, but still gets his data up into his home-grown cloud.

Of course, there’s more complexity here than a single-micro solution, but the I2C lines between the two chips actually form a natural division of work — each unit can be tested separately. And it’s using each chip for what it’s best at: simple, low-power tasks for the Tiny and wrangling WiFi on the ESP.

Once you’ve moved past the “more is better” mindset, you’ll start to make a mental map of which chips are best for what. The obvious next step is combination designs like this one.

Run The Math, Or Try It Out?

I was reading Sonya Vasquez’s marvelous piece on the capstan equation this week. It’s a short, practical introduction to a single equation that, unless you’re doing something very strange, covers everything you need to know about friction when designing something with a rope or a cable that has to turn a corner or navigate a wiggle. Think of a bike cable or, in Sonya’s case, a moveable dragon-head Chomper. Turns out, there’s math for that! Continue reading “Run The Math, Or Try It Out?”