Diagram of the LTC protocol, showing the difference between 1 bits and 0 bits - both transmitted using one up and one down pulse, but with '1' bit pulses being half as short.

Animate Arcane Protocols With Interrupt-Backed Bitbanging

We often take our “SoftwareSerial” libraries for granted, and don’t investigate what goes on under the hood — until they fail us, at least. Would you like to learn how to harness the power of interrupt-driven bitbanging? [Jim Mack] teaches us how to make our protocol implementations fly using the LTC protocol as a springboard.

LTC (Linear/[Longitudinal] TimeCode) is a widely-used and beautifully-crafted protocol that tends to fly under our radar, and is one that hackers could learn plenty from. It’s used for synchronization of audio/video devices during media production and playback. LTC’s signal is almost digital but not quite: it doesn’t need a clock, and it has no polarity. Additionally, it mimics an audio signal really well, you can decode it at any playback speed, and many other benefits and quirks that [Jim] outlines. You do need to maintain the timings, though, and [Jim]’s article shows us how to keep them right while not inconveniencing your primary tasks.

Continue reading “Animate Arcane Protocols With Interrupt-Backed Bitbanging”

A graph visualising approximation errors - the specific principle pictured is described well by the linked article

Time And Accuracy In Las ATMegas

Do you ever have to ensure that an exact amount of time passes between two tasks in your microcontroller code? Do you know what’s the difference between precision and accuracy? Today, [Jim Mack] tells us about pushing timers and interrupts to their limits when it comes to managing time, while keeping it applicable to an ever-popular ATMega328P target! Every now and then, someone decides to push the frontiers of what’s possible on a given platform, and today’s rules is coding within constraints of an Arduino environment. However, you should check [Jim]’s post out even if you use Arduino as a swearword – purely for all of the theoretical insights laid out, accompanied by hardware-accurate examples!

This will be useful to any hacker looking to implement, say, motor encoder readings, signal frequency calculations, or build a gadget processing or modifying audio in real time. To give you a sample of this article, [Jim] starts by introducing us to distinctions between precision and accuracy, and then presents us with a seemingly simple task – creating exactly 2400 interrupts a second. As much as it might look straightforward, problems quickly arise when clock crystal frequency doesn’t cleanly divide by the sampling frequency that you have to pick for your application! This is just a taste of all the examples of hidden complexity presented, and they’re accompanied with solutions you can use when you eventually encounter one of these examples in your hacker pursuits. In the end, [Jim] concludes with links to other sources you can study if you ever need to dig deeper into this topic.

Keeping our projects true to the passage of time can be an issue, and we’ve been at it for ages – calibrating your RC oscillator is a rite of passage for any ATTiny project. If you ever decide to have an interrupt peripheral help you with timing issues, we’ve gone in-depth on that topic in the past, with a three-part series describing the benefits, the drawbacks and the edgecases of interrupts. Going for a more modern target? Our piece on using interrupts with STM32 is a great path for trying out tools of the modern age.

Books You Should Read: The Perfectionists

After pulling late hours in my school machine shop for a few years, I couldn’t help but wonder, who measures the measurement tools? How did they come to be? I’d heard anecdotes from other students and engineers while they inspected my freshly machined parts, but these stories were one-offs. What I wanted was a tale of industrial precision from start to finish. Years later, I found it.

The story of precision, as told by Simon Winchester, is captured in The Perfectionists: How Precision Engineers Created the Modern World. Published in 2018, Winchester’s overview stretches as far back to the Antikythera mechanism and brings us to present day silicon wafer manufacturing. Of course, this isn’t a chronology of all-things made precisely. Instead, it’s a romp through engineering highlights that hallmark either a certain level of precision manufacturing or a particular way of thinking with repercussions for the future. Continue reading “Books You Should Read: The Perfectionists”

Klein Hidden Bolt and Tool

Tricky Screw Heads Have Disappearing Slots

Perhaps you’ve seen them, demonstrations of a machined piece of metal that upon further inspection is actually two pieces machined so perfectly that they appear as one. With extremely tight tolerances, it’s not possible to determine where one piece of metal ends and another begins — that is, until the secret is revealed. Inspired by such pieces of art, [Andrew Klein] sought to put this high level of machine work to practical use. And so it was that his as-yet-unnamed Screw With No Slot came to be.

Klein Hidden Bolt depressed by brass rod
A brass rod pushes down to reveal the keyed center section.

The screw’s disc-like appearance looks as if it’s a metal trim piece to cover a bolt hole. But in the video below [Andrew] shows us the trick, pushing a brass rod into the middle of the disc to reveal the hidden three-point slot. The center of the disk is actually a separate bit of finely machined metal that is spring loaded to stay flush. A specially designed wrench keys into the rounded concave triangle shape cut into the face.

The wrench is made with brass to avoid marring the precision surface. It uses three magnets to hold tight to the screw’s 410 magnetic stainless steel. [Andrew] didn’t spill the beans on how this was done, but we haven’t seen any process other than electrical discharge machining (EDM) that can achieve this level of mating precision. If that topic is new to you, we recommend checking out [Ben Krasnow’s] lab experiments on the topic.

We can’t help but be taken in by the beauty of the fastener, and it immediately sent our imaginations into a National Treasure induced dream-like state. [Andrew Klein] has yet to name this fastener, and he’s soliciting ideas for names in the video below the break. If you have such an idea, you can comment on his video. He’s also exploring the viability of the as-yet-named fastener as a commercial product for high end furniture builders.

This is not the first time we’ve featured [Andrew Klein]’s work. His previous featured projects include a custom sawblade for perfectly foldable joints and an unveiling of the magnetic magic behind switchable permanent magnets. Be sure to submit the neat hacks, builds, and inspiring projects that you come across to our Tip Line!

Continue reading “Tricky Screw Heads Have Disappearing Slots”

caliper jaw tools

Printable Caliper Jaws Increase Precision, Deflect Derision

If you’ve watched as many machining videos as we have, no doubt you’ve seen someone commit the cardinal sin of metalworking: using caliper jaws to scratch a mark into metal. Even if it’s a cheap Harbor Freight caliper rather than an expensive Starrett or Mitutoyo tool being abused, derision and scorn predictably rain down upon the hapless sinner’s head.

The criticism is not without its merit, of course. Recognizing this, [Nelson Stoldt] came up with these clamp-on nosepieces designed to turn calipers into a better marking tool. Using stock calipers as marking gauges always introduces some error, since the jaws are equal lengths and thus have to be held at a slight angle to the workpiece in order to make a mark. The caliper jaws correct for this admittedly negligible error by extending one jaw, allowing it to ride on a reference face while the other jaw remains perpendicular to the workpiece. As a bonus, the short jaw has a slot to mount a steel marking knife, saving the caliper jaws from damage.

[Nelson] chose to 3D-print his caliper jaws, but they could just as easily be milled from solid stock to make them a little more durable. Then again, you could always 3D-print the calipers in the first place, and integrate these jaws right into them.

Beginning The Machine Shop Journey With A DIY CNC

Building a good quality machine shop may seem to present a chicken-and-egg problem, at least for anyone not willing to mortgage their home for the money needed to buy all of these tools new. Namely, that building good tools often requires good tools. To help solve this problem, [Ryan] designed and built this CNC machine which can be built with nothing other than common tools, hardware store supplies, and some readily available parts from the internet.

Since it’s being built from consumer-grade material, [Ryan] has the design philosophy of “buying precision” which means that most of the parts needed for this build are precise enough for their purpose without needing to be worked in any way before incorporation into the mill. For example, he uses a granite plate because it’s hard, flat, heavy, and sturdy enough at the time of purchase to be placed into the machine right away. Similarly, his linear guides do not need to be modified before being put to work with a high degree of precision and minimal calibration. From there, he applies the KISS principle and uses the simplest parts available. With this design process he is able to “bootstrap” a high quality mill for around $1500 USD without needing any extra tools than the ones you likely already have.

The RIG-CNC as it is known has also been made completely open source which further cements its bootstrapability, and there is a lot more detail on the project page and in the video linked below. This project is unique not simply for the mill build from common parts and tools, but because this design philosophy is so robust. Good design goes a lot farther in our builds than a lot of us might realize, and good design often results in more maintainable, hackable things that work for more uses than the original creators may have even thought about.

Continue reading “Beginning The Machine Shop Journey With A DIY CNC”

The Devil Is In The Details

If you’ve taken a physics class, you’ve doubtless heard tales of mythical beasts like the massless string, the frictionless bearing, and the perfect sphere. And if you’re designing something new, it’s not always wrong to start by thinking in terms of these abstractions, just to get the basic framework laid and a first-order handle on the way things go. But once you start building, you’d better be ready to shed your illusions that a 6 mm peg will fit into a 6 mm hole.

Theory and practice are the same thing, in theory. But as soon as you step into practice, your “weekend build” can easily turn into a 500-hour project, full of hurdles, discoveries, experimentation, and eventual success. I’m not going to rehash [Scott Rumschlag]’s project here — you should really watch his detailed video — but suffice it to say that when building a sub-millimeter precision 3D measuring device, bearings do have friction and string does have non-zero mass, and it all matters.

When you start working on a project that “looked good on paper” or for whatever reason just doesn’t turn out as precisely as you’d wished, you could do worse than to follow [Scott’s] example: start off by quantifying your goals, and then identify where every error along the way accumulates to keep you from reaching them. Doing precise work isn’t easy, but it’s not impossible either if you know where all the errors are coming from. You at least have a chain of improvements that you can consider, and if you’ve set realistic goals, you also know when to stop, which is almost as important.

And if anyone out there has an infinite sheet of perfectly conductive material, I’m in the market.