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?

Bare-Metal STM32: Please Mind The Interrupt Event

Interruptions aren’t just a staple of our daily lives. They’re also crucial for making computer systems work as well as they do, as they allow for a system to immediately respond to an event. While on desktop computers these interrupts are less prominent than back when we still had to manually set the IRQ for a new piece of hardware using toggle switches on an ISA card, IRQs along with DMA (direct memory access) transfers are still what makes a system appear zippy to a user if used properly.

On microcontroller systems like the STM32, interrupts are even more important, as this is what allows an MCU to respond in hard real-time to an (external) event. Especially in something like an industrial process or in a modern car, there are many events that simply cannot be processed whenever the processor gets around to polling a register. Beyond this, interrupts along with interrupt handlers provide for a convenient way to respond to both external and internal events.

In this article we will take a look at what it takes to set up interrupt handlers on GPIO inputs, using a practical example involving a rotary incremental encoder.

Continue reading “Bare-Metal STM32: Please Mind The Interrupt Event” →

Hackaday Podcast 111: 3D Graphics Are Ultrasonic, Lobotomizing Alexa, 3D-Printing Leaky Rockets, And Gaming The Font System

Hackaday editors Mike Szczys and Elliot Williams curate a week of great hacks. Physical displays created in 3D space are a holy grail, and you can make one with 200 ultrasonic transducers, four FPGAs, and a lot math. Smart speakers have one heck of a microphone array in them, it’s yours for the hacking if you just roll your own firmware. Hobby servos can be awful, but this week we saw they can be made really great by cracking open the DC motor to add a simple DIY position sensor. And lasers are making their way into car headlights; we illuminate the situation in this episode.

Take a look at the links below if you want to follow along, and as always, tell us what you think about this episode in the comments!

Direct download (~60 MB)

Places to follow Hackaday podcasts:

Continue reading “Hackaday Podcast 111: 3D Graphics Are Ultrasonic, Lobotomizing Alexa, 3D-Printing Leaky Rockets, And Gaming The Font System” →

This Week In Security: XcodeSpy, Insecure SMS, And Partial Redactions

There seems to be a new trend in malware, targeting developers and their development and build processes. The appeal is obvious: rather than working to build and market a malicious application, an attacker just needs to infect a development machine. The hapless infected developers can now do the hard work to spread the malicious payload.

The newest example is XcodeSpy, discovered by a researcher who chose to remain anonymous. It works by using the Xcode IDE’s Run Script function to, well, run a script that completely backdoors your computer. The instance was found in a repackaged open source project, TabBarInteraction, but they’re just innocent victims. It was simple enough for someone to insert a script in the build process, and distribute the new, doped package. It’s probably not the only one out there, so watch out for Run Scripts with obfuscated payloads.

Continue reading “This Week In Security: XcodeSpy, Insecure SMS, And Partial Redactions” →

The $50 Ham: WSPR-ing Around The World

Everybody has a bucket list,  things to be accomplished before the day we eventually wake up on the wrong side of the grass. Many bucket-list items are far more aspirational than realistic; very few of us with “A trip to space” on our lists are going to live to see that fulfilled. And even the more realistic goals, like the trip to Antarctica that’s been on my list for ages, become less and less likely as your life circumstances change — my wife hates the cold.

Luckily, instead of going to Antarctica by myself — and really, what fun would that be? — I’ve recently been getting some of the satisfaction of world travel through amateur radio. The last installment of “The $50 Ham” highlighted weak-signal digital modes using WSJT-X; in that article, I mentioned a little about the Weak Signal Propagation Reporter, or WSPR. It’s that mode that let me test what’s possible with very low-power transmissions, and allowed me to virtually visit six continents including Antarctica and Sweden-by-way-of-Alaska.

Continue reading “The $50 Ham: WSPR-ing Around The World” →

How Fast Is The Universe Expanding? The Riddle Of Two Values For The Hubble Constant

In the last decades, our understanding of the Universe has made tremendous progress. Not long ago, “precision astronomy” was thought to be an oxymoron. Nowadays, satellite experiments and powerful telescopes on earth were able to measure the properties of our Universe with astonishing precision. For example, we know the age of the Universe with an uncertainty of merely 0.3%, and even though we still do not know the origin of Dark Matter or Dark Energy we have determined their abundance with a precision of better than 1%.

There is, however, one value that astronomers have difficulty in pinning down: how fast our universe is expanding. Or, more precisely, astronomers have used multiple methods of estimating the Hubble constant, and the different methods are converging quite tightly on two different values! This clearly can’t be true, but nobody has yet figured out how to reconcile the results, and further observations have only improved the precision, deepening the conflict. It’s likely that we’ll need either new astronomy or new physics to solve this puzzle.

The Discovery of the Expanding Universe

In the 1920s Edwin Hubble used the newly built telescope at Mount Wilson Observatory to study fuzzy objects known as nebulae. Back then, astronomers were arguing whether these nebulae are clouds of stars within our Milky Way or if they are whole different galaxies. Hubble discovered stars within these nebulae whose brightness slowly fades in and out. These were known as Cepheids and previously studied by Henrietta Levitt who showed that there was a tight relationship between the star’s intrinsic brightness and the period of its variation. This means Cepheids could be used as so-called standard candles which refers to objects whose absolute brightness is known. Since there is a simple relationship between how the brightness of an object decreases with distance, Hubble was able to calculate the distance of the Cepheids by comparing their apparent and intrinsic brightness. He showed that the Cepheid stars were not located within our galaxy and that nebulae are actually distant galaxies.

Hubble also measured the velocity at which these distant galaxies are moving away from us by observing the redshifts of spectral lines caused by the Doppler effect. He found that the further away the galaxy is located, the faster it is moving away from us described by a simple linear relationship.

\bf v = H_0 d

The parameter H0 is what is known as the Hubble constant. Later the Belgian priest and physicist Georges Lemaître realized that the velocity-distance relationship measured by Hubble was evidence for the expansion of the Universe. Since the expansion of space itself causes other galaxies to move away from us we are not in any privileged location but the same effect would be measured from any other place in the Universe. An effect that is sometimes illustrated by drawing points on a balloon, when it is inflated the points move away from each other at a speed that depends on their distance. It is also better not to think of the cosmological redshift as being caused by a real velocity as the parameter v in the above equation can easily exceed the speed of light. Continue reading “How Fast Is The Universe Expanding? The Riddle Of Two Values For The Hubble Constant” →

Ask Hackaday: How Do You Prepare?

Last month, large parts of the southern United States experienced their coldest temperatures since the 1899 Blizzard. Some of us set new all-time lows, and I was right in the middle of the middle of it here in Southwestern Oklahoma. Since many houses in Texas and Oklahoma are heated with electricity, the power grids struggled to keep up with the demand. Cities in Oklahoma experienced some short-term rolling blackouts and large patches of the Texas grid were without power for several days. No juice, no heat.

In places where the power was out for an extended period of time, the water supply was potentially contaminated, and a boil order was in effect. Of course, this only works when the gas and power are on. In some places, the store shelves were empty, a result of panic buying combined with perishables spoiling without the power to keep them cold. For some, food and drinkable water was temporarily hard to come by.

There have been other problems, too. Houses in the south aren’t built for the extreme cold, and many have experienced frozen pipes, temporarily shutting off their water supply. In some cases, those frozen pipes break open, flooding the house once the water starts flowing again. For instance, here’s an eye-witness account of the carnage from The 8-bit Guy, who lives at ground zero in the DFW area.
Continue reading “Ask Hackaday: How Do You Prepare?” →