Hackaday Links Column Banner

Hackaday Links: May 15, 2022

It may be blurry and blotchy, but it’s ours. The first images of the supermassive black hole at the center of the Milky Way galaxy were revealed this week, and they caused quite a stir. You may recall the first images of the supermassive black hole at the center of the M87 galaxy from a couple of years ago: spectacular images that captured exactly what all the theories said a black hole should look like, or more precisely, what the accretion disk and event horizon should look like, since black holes themselves aren’t much to look at. That black hole, dubbed M87*, is over 55 million light-years away, but is so huge and so active that it was relatively easy to image. The black hole at the center of our own galaxy, Sagittarius A*, is comparatively tiny — its event horizon would fit inside the orbit of Mercury — a much closer at only 26,000 light-years or so. But, our black hole is much less active and obscured by dust, so imaging it was far more difficult. It’s a stunning technical achievement, and the images are certainly worth checking out.

Another one from the “Why didn’t I think of that?” files — contactless haptic feedback using the mouth is now a thing. This comes from the Future Interfaces Group at Carnegie-Mellon and is intended to provide an alternative to what ends up being about the only practical haptic device for VR and AR applications — vibrations from off-balance motors. Instead, this uses an array of ultrasonic transducers positioned on a VR visor and directed at the user’s mouth. By properly driving the array, pressure waves can be directed at the lips, teeth, and tongue of the wearer, providing feedback for in-world events. The mock game demonstrated in the video below is a little creepy — not sure how many people enjoyed the feeling of cobwebs brushing against the face or the splatter of spider guts in the mouth. Still, it’s a pretty cool idea, and we’d like to see how far it can go.

Continue reading “Hackaday Links: May 15, 2022”

Can You Help NASA Build A Mars Sim In VR?

No matter your project or field of endeavor, simulation is a useful tool for finding out what you don’t know. In many cases, problems or issues aren’t obvious until you try and do something. Where doing that thing is expensive or difficult, a simulation can be a low-stakes way to find out some problems without huge costs or undue risks.

Going to Mars is about as difficult and expensive as it gets. Thus, it’s unsurprising that NASA relies on simulations in planning its missions to the Red Planet. Now, the space agency is working to create a Mars sim in VR for training and assessment purposes. The best part is that you can help!

Continue reading “Can You Help NASA Build A Mars Sim In VR?”

With Rocket Lab’s Daring Midair Catch, Reusable Rockets Go Mainstream

We’ve all marveled at the videos of SpaceX rockets returning to their point of origin and landing on their spindly deployable legs, looking for all the world like something pulled from a 1950s science fiction film.  On countless occasions founder Elon Musk and president Gwynne Shotwell have extolled the virtues of reusable rockets, such as lower operating cost and the higher reliability that comes with each booster having a flight heritage. At this point, even NASA feels confident enough to fly their missions and astronauts on reused SpaceX hardware.

Even so, SpaceX’s reusability program has remained an outlier, as all other launch providers have stayed the course and continue to offer only expendable booster rockets. Competitors such as United Launch Alliance and Blue Origin have teased varying degrees of reusability for their future vehicles, but to date have nothing to show for it beyond some flashy computer-generated imagery. All the while SpaceX continues to streamline their process, reducing turnaround time and refurbishment costs with each successful reuse of a Falcon 9 booster.

But that changed earlier this month, when a helicopter successfully caught one of Rocket Lab’s Electron boosters in midair as it fell back down to Earth under a parachute. While calling the two companies outright competitors might be a stretch given the relative sizes and capabilities of their boosters, SpaceX finally has a sparing partner when it comes to the science of reusability. The Falcon 9 has already smashed the Space Shuttle’s record turnaround time, but perhaps Rocket Lab will be the first to achieve Elon Musk’s stated goal of re-flying a rocket within 24 hours of its recovery.

Continue reading “With Rocket Lab’s Daring Midair Catch, Reusable Rockets Go Mainstream”

Robot arm in Blender

Animate Your Robot In Blender

You’ve built a robot crammed full of servos and now you settle down for the fun part, programming your new dancing animatronic bear! The pain in your life is just beginning. Imagine that you decide the dancing bear should raise it’s arm. If you simply set a servo position, the motor will slew into place as fast as it can. What you need is an animation, and preferably with smooth acceleration.

You could work through all the math yourself. After half an hour of fiddling with the numbers, the bear is gracefully raising it’s arm like a one armed zombie. And then you realize that the bear has 34 more servos.

render of industrial robot type arm with pedestal, base, upperarm and lowerarm and IK ball

Fortunately for everybody who’s done the above, there’s Blender. It’s all about creating smooth motion for animations and computer graphics. Making robot motion with Blender is, if not easy, at least tolerable. We made a sample project, a 3-axis robot arm to illustrate. It has a non-moving pedestal, rotating base, upper arm, and lower arm. We’ll be animating it first in Blender and then translating the file over to something we can use to drive the servos with a little script.

Now, Blender is notorious for a difficult user interface. The good news is that, with revision 2.9, it moved to a much more normal interface. It still definitely is a large program, with 23 different editors and literally thousands of controls, but we’ll only be using a small subset to make our robot move. We won’t teach you Blender here, because there are thousands of great Blender tutorials online.  You want to focus on animation, and the Humane Rigging series is particularly recommended.

Continue reading “Animate Your Robot In Blender”

Bare-Metal STM32: Using The I2C Bus In Master-Transceiver Mode

As one of the most popular buses today for on- and inter-board communication within systems, there’s a good chance you’ll end up using it with an embedded system. I2C offers a variety of speeds while requiring only two wires (clock and data), which makes it significantly easier to handle than alternatives, such as SPI. Within the STM32 family of MCUs, you will find at least one I2C peripheral on each device.

As a shared, half-duplex medium, I2C uses a rather straightforward call-and-response design, where one device controls the clock, and other devices simply wait and listen until their fixed address is sent on the I2C bus. While configuring an STM32 I2C peripheral entails a few steps, it is quite painless to use afterwards, as we will see in this article. Continue reading “Bare-Metal STM32: Using The I2C Bus In Master-Transceiver Mode”

Data Alignment Across Architectures: The Good, The Bad And The Ugly

Even though a computer’s memory map looks pretty smooth and very much byte-addressable at first glance, the same memory on a hardware level is a lot more bumpy. An essential term a developer may come across in this context is data alignment, which refers to how the hardware accesses the system’s random access memory (RAM). This and others are properties of the RAM and memory bus implementation of the system, with a variety of implications for software developers.

For a 32-bit memory bus, the optimal access type for some data would be a four bytes, aligned exactly on a four-byte border within memory. What happens when unaligned access is attempted – such as reading said four-byte value aligned halfway into a word – is implementation defined. Some hardware platforms have hardware support for unaligned access, others throw an exception that the operating system (OS) can catch and fallback to an unaligned routine in software. Other platforms will generally throw a bus error (SIGBUS in POSIX) if you attempt unaligned access.

Yet even if unaligned memory access is allowed, what is the true performance impact? Continue reading “Data Alignment Across Architectures: The Good, The Bad And The Ugly”

Large Scale Carbon Capture Without The Technology

We humans are in something of a pickle, as we’ve put too much carbon dioxide in the atmosphere and caused climate change that might even wipe us out. There may still be people to whom that’s a controversial statement, but knowing something needs to be done about it should be a position for which you don’t necessarily have to be a climate change activist glueing yourself to the gates of a refinery.

It’s obvious that we can reduce our CO2 emissions to tackle the problem, but that’s not the only way that atmospheric CO2 can be reduced. How about removing it from the air? It’s an approach that’s being taken seriously enough for a number of industrial carbon capture solutions to be proposed, and even for a pilot plant to be constructed in Iceland. The most promising idea is that CO2 from power stations can be injected into porous basalt rock where it can react to form calcium carbonate. All of which is very impressive, but is there not a way that this can be achieved without resorting to too much technology? Time for Hackaday to pull out the back-of-envelope calculator, and take a look. Continue reading “Large Scale Carbon Capture Without The Technology”