Baremetal Rust On the Horizon

Rust Programming Langauge has grown by leaps and bounds since it was announced in 2010 by Mozilla. It has since become a very popular language owing to features such as memory safety and its ownership system. And now, news has arrived of an Embedded Devices Working Group for Rust aiming at improving support for microcontrollers.

Rust is quite similar to C++ in terms of syntax, however Rust does not allow for null or dangling pointers which makes for more reliable code in the hands of a newbie. With this new initiative, embedded development across different microcontroller architectures could see a more consistent and standardized experience which will result in code portability out of the box. The proposed improvements include IDE and CLI tools for development and setup code generation. There is also talk of RTOS implementations and protocol stack integration which would take community involvement to a whole new level.

This is something to be really excited about because Rust has the potential to be an alternative to C++ for embedded development as rust code runs with a very minimal runtime. Before Arduino many were afraid of the outcome of a simple piece of code but with rust, it would be possible to write memory-safe code without a significant performance hit. With a little community support, Rust could be a more efficient alternative. We have seen some Rust based efforts on ARM controllers and have covered the basics of Rust programming in the past if you want to get started. Good times ahead for hardware hackers.

Rescuing An Antique Saw Set

Who doesn’t like old tools? Even if they aren’t practical to use for production, plenty of old tools still have a life to offer the hobbyist or home worker.  Some tools might seem a bit too far gone – due to age, rust, or practicality, to use. That’s where [Hand Tool Rescue] comes in. [HTR] finds rusty, dirty old tools, and brings them back to life. Sometimes they’re practical tools, other times, they’re a bit out there. In a recent video, he restored a BeMaCo automatic saw set from the 1940’s. Saw sets are tools which bend each tooth of a saw blade slightly. Typically they are pliers-like devices.

The slight bend of each tooth on the blade widens the saw’s kerf and prevents binding. Typically these tools are pliers-like devices. The BeMaCo set is something else — it pulls the blade through tooth by tooth, while a spring-loaded head pecks away, bending each tooth. It’s something Rube Goldberg would have loved.

[HTR’s] filming style borrows a lot from [Jimmy DiResta], who we’ve covered here before. There are no words, and most of the video is sped up. Even with the fast video, [HTR] probably has many hours of footage to pare down to a 20-minute video.

The restoration begins with tearing the saw set apart. Every nut and bolt is removed. All the parts are cleaned, chemically de-rusted, and wire-wheeled. Even the motor is torn down, cleaned, and wired up. Then come the re-assembly. [HTR] gets every piece back in its proper place. We’re wondering how many times he had to refer to the teardown video to get everything right. Finally, the saw set is complete — ready for another 70 years of work.

Rusty ARM

You’ve probably heard that Rust is a systems programming language that has quite the following growing. It purports to be fast like C, but has features like guaranteed memory and thread safety, generics, and it prevents segmentation faults. Sounds like just the thing for an embedded system, right? [Jorge Aparicio] was frustrated because his CPU of choice, an STM32 ARM Cortex-M didn’t have native support for Rust.

Apparently, you can easily bind C functions into a Rust program but that wasn’t what he was after. So he set out to build pure Rust programs that could access the device’s hardware and he documented the effort.

Continue reading “Rusty ARM”

Rust Running on the Realtek RTL8710: ESP8266 Alternative?

For simply getting your project connected to WiFi, a least among hacker circles, nothing beats the ESP8266. But it’s not the only player out there, and we love to see diversity in the parts and languages that we use. One of the big shortcomings of the ESP8266 is the slightly-oddball Xtensa CPU. It’s just not as widely supported by various toolchains as its ARM-based brethren.

And so, when [Zach] wanted to do some embedded work in Rust, the ESP8266 was out of the picture. He turned to the RTL8710, a very similar WiFi module made by Realtek. Documentation for the RTL8710 is, at the moment, crappy, much as the ESP8266 documentation was before the hacker community had at it. But in trade for this shortcoming, [Zach] got to use the LLVM compiler, which supports the ARM architecture, and that means he can code in Rust.

In the end, the setup that [Zach] describes is a mix of FreeRTOS and some of the mbed libraries, which should be more than enough to get you up and running fairly painlessly on the chip. We’ve actually ordered a couple of these modules ourselves, and were looking to get started in straight C, but having Rust examples working doesn’t hurt, and doesn’t look all that different.

Is anyone else using the RTL8710? An ARM-based, cheap WiFi chip should be interesting.

MRRF: Tasty Filament from Proto-Pasta

Alongside printers from all walks of manufacturing, one can naturally expect to find people selling different kinds of filament at a 3D printing festival. One of these purveyors of plastic was Proto-pasta out of Vancouver, WA. Proto-pasta prides themselves on unique offerings and complete transparency about their manufacturing processes.

Almost all of their filaments are either PLA or HTPLA with something special added during extrusion. The menu includes steel, iron, carbon, and finely ground coffee. The coffee filament was one of our favorites for sure. The print they brought with them looked solidified light roast and had a transparent kind of lollipop quality to it. I couldn’t detect the coffee scent due to allergies, but [Alex] assured me that printing with this filament will make your house or hackerspace smell terrific.

[Alex] was giving away samples of their stainless steel composite PLA. This one can be polished to a smooth shine with a series of papers that run from 400 to 8,000-grit. Another of their newer offerings is PLA infused with magnetic iron particles. Prints made with this stuff can be rusted to achieve an antique, steampunk, or shabby chic aesthetic.

Proto-pasta also has an electrically conductive composite carbon PLA. This one is great for capacitive applications like making a custom, ergonomic stylus or your own game controller. According to the site, the resistivity of printed parts is 30 ohms per centimeter as measured perpendicular to the layers, and 115 ohms along the layers.

Have you made anything awesome with conductive or magnetic filament? Have you had any problems with unorthodox filaments? Let us know in the comments.

Laser Removes Rust Like Magic

If you’ve worked with steel or iron, you will be very familiar with rust. You will have an impressive armoury of wire brushes and chemicals to deal with it, and your sandblasting guy is probably in your speed-dial list.

We’ve had more than one Hackaday reader contact us of late with videos showing an apparently miraculous handheld laser unit effortlessly stripping away rust, and leaving a near-perfect surface with little mess. Can it be real, they ask, is it an internet hoax? After all if you have done battle with the dreaded iron oxide you’ll know there is no miracle fix to the problem, however you deal with it there has traditionally been hard work involved.

So after a bit of research, we find CleanLaser, the German company whose products feature in the videos. Quoting their website: “Powerful, very short, rapid and moving laser pulses produce micro-plasma bursts, shockwaves and thermal pressure resulting in sublimation and ejection of the target material”. So yes, it seems they’re real.

The website is at pains to stress the environmental benefits of the devices over comparable sandblasting or similar technologies, but has very little information on their safety. They are available in power ratings from 12W to 1KW which is a hell of a lot of laser power to be projecting, yet the operators seem only to be wearing goggles. Perhaps this comes back to the “Powerful, very short, rapid and moving” bit in the quote above, is there no point source to sear your retina? Laser experts please enlighten us in the comments.

If you work with metal or grew up in a metalworking business, this machine probably has you salivating. Sadly for hackers and makers though it’s probable that it and ones like it will be out of our price range for quite some time. Still, the prospect of a guy with one in an industrial unit appearing in most towns can’t be too far away, and that can only be a good thing

The video shows the machine in action. Rusty fire-grate in, perfect shiny surface out. Perhaps only those of you who have spent many hours with a wire brush will understand.

Continue reading “Laser Removes Rust Like Magic”

3D Printing Metal from Rust

It seems backwards, but engineers from Northwestern University have made 3D printing metal easier (and eventually cheaper) by adding extra production steps to the procedure. (Paper available in PDF).

Laser sintering works by laying down a thin layer of metal powder and then hitting it with a strong enough laser to sinter the particles together. (Sintering sticks the grains together without getting the metal hot enough to melt it.) The rapid local heating and cooling required to build up 3D objects expands and cools the metal, and can result in stresses inside the resulting object.

The Northwestern team still lays down layers of powder, but glues the layers together with a quick-drying polymer instead of fusing them with a laser. Once the full model is printed, they then sinter it in one piece in an oven.

anewwaytopri_tn
3D-printed copper lattice. Credit: Ramille Shah and David Dunand

The advantages of adding this extra step are higher printing speed — squirting the liquid out of syringe heads can be faster than fusing metal particles with a laser — and increased structural integrity because the whole model is heated and cooled at one time. A fringe benefit is that the model is still a bit flexible before firing, opening up possibilities for printing a flat model and then bending it into shape before sintering.

And if that weren’t enough, the team figured that they’d add a third step to the procedure to allow it to be used with rust (iron oxide) as the starting powder. They print the rust and polymer model, then un-rust the iron using hydrogen, and then fire it as before. Why rust? Do you know anything cheaper to use as a raw material?

What do you think? The basic idea may even be DIYable — glue metal particles together and heat them up enough to stick. Not in my microwave oven, though. We’d love to see a more energy-efficient 3D metal printer.

Thanks to [Joe] for the tip!