Tune Your Dish Antenna Like A Pro

It’s a problem we all have at one time or another: your five-meter radio astronomy dish gets out of calibration and you don’t have a ridiculously expensive microwave holography rig on hand to diagnose it. OK, maybe this isn’t your problem, but when [Joe Martin]’s parabolic antenna got out of whack, he set out to diagnose and repair it, and then wrote up how he did it. You can download the PDF from his radio astronomy articles collection.

At the heart of the measurement rig is a laser rangefinder connected to a Porcupine Labs interface that passes the data on to a Pi 4. This is placed on the end of a two-degree-of-freedom servo gimbal that scans over the surface of the dish, measuring its shape. After measuring and math, [Joe] found out that it’s a little bit long here and short there, he attached two cables with turnbuckles to the front of the dish and pulled it back into shape — the sort of thing that you should probably only do if you’ve got a measurement rig already set up.

The Fluke rangefinder and Porcupine labs interface combo is pretty sweet, but it comes with a fairly hefty price tag. (Nothing compared to a professional dish measurement rig, we presume.) We’ve seen a few attempt at hacking into el-cheapo laser rangefinders, but other than [iliasam]’s heroic effort where he ended up writing his own firmware, it doesn’t seem like there are any successes. A shame, because applications like [Joe]’s prove that there’s a need for one. Let us know if there’s anything we missed?

Thanks [Ethan] for the tip!

Impedance Mismatch

There are a few classic physics problems that it can really help to have a mental map of. One is, of course, wave propagation. From big-wave surfing, through loudspeaker positioning, to quantum mechanics, having an intuition for the basic dynamics of constructive and destructive interference is key. Total energy of a system, and how it splits and trades between kinetic and potential, is another.

We were talking about using a bike generator to recharge batteries on the Podcast last night, and we stumbled on a classic impedance mismatch situation. A pedaling person can put out 100 W, and a cell phone battery wants around 5 W to charge. You could pedal extremely lightly for nearly three hours, but I’d bet you’d rather hammer the bike for 10 minutes and get on with your life. The phone wants to be charged lightly — it’s high impedance — and you want to put out all your power at once — you’re a low impedance source.

The same phenomenon explains why you have to downshift your internal combustion automobile as you slow down. In high gear, it presents too high an impedance, and the motor can only turn so slowly before stalling. This is also why all vibrating string acoustic instruments have bridges that press down on big flat flexible surfaces, and why horns are horn shaped. Air is easy to vibrate, but to be audible you want to move a lot of it, so you spread out the power. Lifting a heavy rock with human muscle power is another classic impedance mismatch.

If these are fundamentally all the same problem, then they should all have similar solutions. The gear on the bike or the car, the bridge on a cello, the flared horn on the trumpet, and the lever under the boulder all serve to convert a large force over a short distance or time or area into a lower force over more distance, time, or area.

Pop quiz! What are the common impedance converters in the world of volts and amps? The two that come to my mind are the genafsbezre and the obbfg/ohpx pbairegre (rot13!). What am I missing?

Our Favorite Things: Binary Search

You might not think that it would be possible to have a favorite optimization algorithm, but I do. And if you’re well-versed in the mathematical art of hill climbing, you might be surprised that my choice doesn’t even involve taking any derivatives. That’s not to say that I don’t love Newton’s method, because I do, but it’s just not as widely applicable as the good old binary search. And this is definitely a tool you should have in your toolbox, too.

Those of you out there who slept through calculus class probably already have drooping eyelids, so I’ll give you a real-world binary search example. Suppose you’re cropping an image for publication on Hackaday. To find the best width for the particular image, you start off with a crop that’s too thin and one that’s too wide. Start with an initial guess that’s halfway between the edges. If this first guess is too wide, you split the difference again between the current guess and the thinnest width. Updated to this new guess, you split the differences again.

But let’s make this even more concrete: an image that’s 1200 pixels wide. It can’t get wider than 1200 or thinner than 0. So our first guess is 600. That’s too thin, so we guess 900 — halfway between 600 and the upper limit of 1200. That ends up too wide, so we next guess 750, halfway between 600 and 900. A couple more iterations get us to 675, then 638, and then finally 619. In this case, we got down to the pixel level pretty darn fast, and we’re done. In general, you can stop when you’re happy, or have reached any precision goal.

[Ed note: I messed up the math when writing this, which is silly. But also brought out the point that I usually round the 50% mark when doing the math in my head, and as long as you’re close, it’s good enough.]

What’s fantastic about binary search is how little it demands of you. Unlike fancier optimization methods, you don’t need any derivatives. Heck, you don’t even really need to evaluate the function any more precisely than “too little, too much”, and that’s really helpful for the kind of Goldilocks-y photograph cropping example above, but it’s also extremely useful in the digital world as well. Comparators make exactly these kinds of decisions in the analog voltage world, and you’ve probably noticed the word “binary” in binary search. But binary search isn’t just useful inside silicon. Continue reading “Our Favorite Things: Binary Search”

Make It Compatible

I’m probably as guilty as anyone of reinventing the wheel for a subpart of a project. Heck, sometimes I just feel like working on a wheel design. But if that’s the path you choose, you have to think about whether or not it’s important that others can replicate your project. The nice thing about a bog-standard wheel is that everyone has got one.

The case study I have in mind is a wall-plotter project that appeared on Hackaday this week. It’s a really sweet design, and in many ways would be an ideal starter project. I actually need a wall plotter (for reasons) and like a number of the choices made. For instance, having nearly everything, including the lightweight geared steppers on the gondola makes it easy to install and uninstall — you just pin up the timing belt from which it hangs and you’re done. Extra weight on the gondola helps with stability anyway. It’s open source and based on the Arduino libraries, so it should be easy enough to port to whatever microcontroller I have on hand.

But the image-generation toolchain is awkward, involving cutting and pasting into a spreadsheet, which generates a text file in a custom plotting micro-language. Presumably the designer doesn’t know about Gcode, which is essentially the lingua franca of moving machines, or just didn’t feel like implementing it. Where in Gcode, movement commands are like “G1 X100 Y50”, this device expects “draw_line(0,0,100,50)”. They’re essentially equivalent, but incompatible.

I totally understand that the author must have had a good time thinking up the movement commands and writing the spreadsheet that translates SVG files into them. I’ve been there and done that! But if the wall plotter spoke Gcode instead of its own dialect, it would slot instantly into any number of graphics processing workflows, which would make me, the potential user, happier.

When you are looking at reinventing the wheel, think about your audience. If you’re the only person likely to see the project, go ahead and scratch whatever itch you’ve got. You’ll learn more that way. But if you want to share the project with as many people as possible, adhering to the most widely used standards is a good choice for your users, even if it is less fun than dreaming up your own movement language.

Announcing: The 2022 Hackaday.io Sci-Fi Contest

Ladies and Gentlemen, Sentient robots, Travellers from the distant future, or Aliens from the outer rim, it’s time to enter the 2022 Hackaday.io Sci-Fi Contest!

We last ran the Sci-Fi contest in the far, far past — before the Voigt-Kampff machine was detecting replicants on the gritty streets of 2019’s LA. Back then, we had some out-of-this-world entries. It’s time for the sequel.

Thanks to Digi-Key, the contest’s sponsor, your best blaster, your coolest costume, or your most righteous robot could win you one of three $150 shopping sprees in their parts warehouse. Create a Hackaday.io project, enter it in the contest, and you’re set. You might as well do that right now, but the contest closes on April 25th.

Sci-Fi is all about the looks, so if it’s purely decorative, be sure to blind us with science (fiction). If your project actually functions, so much the better! Of course we’d like to know how it works and how you made it, so documentation of the project is the other big scoring category. Whatever it is, it’s got to be sci-fi, and it’s got to have some electronics in it.

If you’re looking for inspiration, you could do a lot worse than to check out [Jerome Kelty]’s Animatronic Stargate Helmet, that not coincidentally took the grand prize last time around. It’s an artistic and engineering masterpiece all rolled into one, and the description of how it’s made is just as extensive. [Jochen Alt]’s “Paul” robot isn’t out of any particular sci-fi franchise that we know, but of rolling on one ball and reciting robot poetry, it absolutely should be.

Honorable Mentions

In addition to the overall prizes, we’ll be recognizing the best projects in the following honorable mention categories:

  • Star Star: Whether you’re “beam me up” or “use the force”, fans of either of the “Star” franchises are eligible for this honorable mention.
  • ExoSuit: This category recognizes sci-fi creations that you can wear. Costumes and armor fit in here.
  • Stolen off the Set: If your blaster looks exactly like Han Solo’s, you’re a winner here.  This is the category for your best prop replica.
  • Living in the Future: If your sci-fi device was purely fantasy when imagined, but now it’s realizable, you’re living in the future. A working tricorder or a functioning robot companion would fit in fine here.
  • The Most Important Device: Has no function, but it certainly looks like it does. Just blinking lights that blink back and forth, yet the government spent millions of dollars on it.

You don’t have to tell us where your project fits in. We’ve got you covered.

Engage!

Get started now by creating a project page on Hackaday.io. In the left sidebar of your project page, use the “Submit Project To” button to enter in the 2022 Sci-Fi Contest.

You have from now until April 25, 2022 to get it finished. Of course, if your time machine actually works, you can finish it whenever. Check out the Hackaday.io contest page for all the fine print.

How Small Is Too Small?

Not a rhetorical question! This week we consider the most micro microcontroller: the HC32L110. It’s the new title holder of the smallest ARM Cortex M0+ part. But could you actually use it?

MCU is the black thing that’s smaller than the capacitor.

I remember way back, when I first learned to solder surface-mount components. It was fiddly at first, but nowadays I don’t use through-hole components unless someone’s twisting my arm. And I still do my soldering myself — down to 0603 really isn’t all that bad with an iron, and below that, there’s always the heat plate. My heat plate has also gotten me through the two times I’ve actually needed to put down a ball-grid-array part. It wasn’t as bad as I had feared, honestly.

So maybe it’s time for me to take the BGA plunge and design a board or two just to get more familiar with the tech. I probably won’t dive straight into the deep end, like the featured chip here with 0.35 mm ball pitch, but rather stick with something that the cheap PCB services can easily handle. My experience tells me that the best way to learn something is just to test it out.

Now, off to go part shopping in the middle of a chip crisis! Wish me luck.

You Break It, We Fix It

Apple’s AirTags have caused a stir, but for all the wrong reasons. First, they turn all iPhones into Bluetooth LE beacon repeaters, without the owner’s permission. The phones listen for the AirTags, encrypt their location, and send the data on to the iCloud, where the tag’s owner can decrypt the location and track it down. Bad people have figured out that this lets them track their targets without their knowledge, turning all iPhone users into potential accomplices to stalkings, or worse.

Naturally, Apple has tried to respond by implementing some privacy-protecting features. But they’re imperfect to the point of being almost useless. For instance, AirTags now beep once they’ve been out of range of their owner’s phone for a while, which would surely alert the target that they’re being tracked, right? Well, unless the evil-doer took the speaker out, or bought one with the speaker already removed — and there’s a surprising market for these online.

If you want to know that you’re being traced, Apple “innovated with the first-ever proactive system to alert you of unwanted tracking”, which almost helped patch up the problem they created, but it only runs on Apple phones. It’s not clear what they meant by “first-ever” because hackers and researchers from the SeeMoo group at the Technical University of Darmstadt beat them to it by at least four months with the open-source AirGuard project that runs on the other 75% of phones out there.

Along the way, the SeeMoo group also reverse engineered the AirTag system, allowing anything that can send BLE beacons to play along. This opened the door for [Fabian Bräunlein]’s ID-hopping “Find You” attack that breaks all of the tracker-detectors by using an ESP32 instead of an AirTag. His basic point is that most of the privacy guarantees that Apple is trying to make on the “Find My” system rely on criminals using unmodified AirTags, and that’s not very likely.

To be fair, Apple can’t win here. They want to build a tracking network where only the good people do the tracking. But the device can’t tell if you’re looking for your misplaced keys or stalking a swimsuit model. It can’t tell if you’re silencing it because you don’t want it beeping around your dog’s neck while you’re away at work, or because you’ve planted it on a luxury car that you’d like to lift when its owners are away. There’s no technological solution for that fundamental problem.

But hackers are patching up the holes they can, and making the other holes visible, so that we can at least have a reasonable discussion about the tech’s tradeoffs. Apple seems content to have naively opened up a Pandora’s box of privacy violation. Somehow it’s up to us to figure out a way to close it.