Better C Strings, Simply

If you program in C, strings are just in your imagination. What you really have is a character pointer, and we all agree that a string is every character from that point up until one of the characters is zero. While that’s simple and useful, it is also the source of many errors. For example, writing a 32-byte string to a 16-byte array or failing to terminal a string with a zero byte. [Thasso] has been experimenting with a different way to represent strings that is still fairly simple but helps keep things straight.

Like many other languages, this setup uses counted strings and string buffers. You can read and write to a string buffer, but strings are read-only. In either case, there is a length for the contents and, in the case of the buffer, a length for the entire buffer.

Continue reading “Better C Strings, Simply”

Human Civilization And The Black Plastic Kitchen Utensils Panic

Recently there was a bit of a panic in the media regarding a very common item in kitchens all around the world: black plastic utensils used for flipping, scooping and otherwise handling our food while preparing culinary delights. The claim was that the recycled plastic which is used for many of these utensils leak a bad kind of flame-retardant chemical, decabromodiphenyl ether, or BDE-209, at a rate that would bring it dangerously close to the maximum allowed intake limit for humans. Only this claim was incorrect because the researchers who did the original study got their calculation of the intake limit wrong by a factor of ten.

This recent example is emblematic of how simple mistakes can combine with a reluctance to validate conclusions can lead successive consumers down a game of telephone where the original text may already have been wrong, where each node does not validate the provided text, and suddenly everyone knows that using certain kitchen utensils, microwaving dishes or adding that one thing to your food is pretty much guaranteed to kill you.

How does one go about defending oneself from becoming an unwitting factor in creating and propagating misinformation?

Continue reading “Human Civilization And The Black Plastic Kitchen Utensils Panic”

Where This Xmas Card’s Going, We Don’t Need Batteries!

Energy harvesting, the practice of scavenging ambient electromagnetic fields, light, or other energy sources, is a fascinating subject that we don’t see enough of here at Hackaday. It’s pleasing then to see [Jeff Keacher]’s Christmas card: it’s a PCB that lights up some LEDs on a Christmas tree, using 2.4 GHz radiation, and ambient light.

The light sensors are a set of LEDs, but the interesting part lies in the RF harvesting circuit. There’s a PCB antenna, a matching network, and then a voltage multiplier using dome RF Schottky diodes. These in turn charge a supercapacitor, but if there’s not enough light a USB power source can also be hooked up. All of this drives a PIC microcontroller, which drives the LEDs.

Why a microcontroller, you ask? This card has an interesting trick up its sleeve, despite having no WiFi of its own, it can be controlled over WiFi. If the 2.4 GHz source comes via proximity to an access point, there’s a web page that can be visited with a script generating packets in bursts that produce a serial pulse train on the DC from the power harvester. The microcontroller can see this, and it works as a remote. This is in our view, next-level.

Homebrew Electron Beam Lithography With A Scanning Electron Microscope

If you want to build semiconductors at home, it seems like the best place to start might be to find a used scanning electron microscope on eBay. At least that’s how [Peter Bosch] kicked off his electron beam lithography project, and we have to say the results are pretty impressive.

Now, most of the DIY semiconductor efforts we’ve seen start with photolithography, where a pattern is optically projected onto a substrate coated with a photopolymer resist layer so that features can be etched into the surface using various chemical treatments. [Peter]’s method is similar, but with important differences. First, for a resist he chose poly-methyl methacrylate (PMMA), also known as acrylic, dissolved in anisole, an organic substance commonly used in the fragrance industry. The resist solution was spin-coated into a test substrate of aluminized Mylar before going into the chamber of the SEM.

As for the microscope itself, that required a few special modifications of its own. Rather than rastering the beam across his sample and using a pattern mask, [Peter] wanted to draw the pattern onto the resist-covered substrate directly. This required an external deflection modification to the SEM, which we’d love to hear more about. Also, the SEM didn’t support beam blanking, meaning the electron beam would be turned on even while moving across areas that weren’t to be exposed. To get around this, [Peter] slowed down the beam’s movements while exposing areas in the pattern, and sped it up while transitioning to the next feature. It’s a pretty clever hack, and after development and etching with a cocktail of acids, the results were pretty spectacular. Check it out in the video below.

It’s pretty clear that this is all preliminary work, and that there’s much more to come before [Peter] starts etching silicon. He says he’s currently working on a thermal evaporator to deposit thin films, which we’re keen to see. We’ve seen a few sputtering rigs for thin film deposition before, but there are chemical ways to do it, too.

Continue reading “Homebrew Electron Beam Lithography With A Scanning Electron Microscope”

Close up of a typewriter annex SMS-receiver

Back To The Future Of Texting: SMS On A Panasonic Typewriter

Among us Hackaday writers, there are quite a few enthusiasts for retro artifacts – and it gets even better when they’re combined in an unusual way. So, when we get a tip about a build like this by [Sam Christy], our hands sure start itching.

The story of this texting typewriter is one that beautifully blends nostalgia and modern technology. [Sam], an engineering teacher, transformed a Panasonic T36 typewriter into a device that can receive SMS messages, print them out, and even display the sender’s name and timestamp. For enthusiasts of retro gadgets, this creation bridges the gap between analog charm and digital convenience.

What makes [Sam]’s hack particularly exciting is its adaptability. By effectively replacing the original keyboard with an ESP32 microcontroller, he designed the setup to work with almost any electric typewriter. The project involves I2C communication, multiplexer circuits, and SMS management via Twilio. The paper feed uses an “infinite” roll of typing paper—something [Sam] humorously notes as outlasting magnetic tape for storage longevity.

Beyond receiving messages, [Sam] is working on features like replying to texts directly from the typewriter. For those still familiar with the art form of typing on a typewriter: how would you elegantly combine these old machines with modern technology? While you’re thinking, don’t overlook part two, which gives a deeper insight in the software behind this marvel!

Continue reading “Back To The Future Of Texting: SMS On A Panasonic Typewriter”

Survival mechanisms in Deinococcus radiodurans bacterium. (Credit: Feng Liu et al., 2023)

Bacterium Demonstrates Extreme Radiation Resistance Courtesy Of An Antioxidant

Extremophile lifeforms on Earth are capable of rather astounding feats, with the secret behind the extreme radiation resistance of one of them now finally teased out by researchers. As one of the most impressive extremophiles, Deinococcus radiodurans is able to endure ionizing radiation levels thousands of times higher than what would decisively kill a multicellular organism like us humans. The trick is the antioxidant which this bacterium synthesizes from multiple metabolites that combine with manganese. An artificial version of this antioxidant has now been created that replicates the protective effect.

The ternary complex dubbed MDP consists of manganese ions, phosphate and a small peptide, which so far has seen application in creating vaccines for chlamydia. As noted in a 2023 study in Radiation Medicine and Protection by [Feng Liu] et al. however, the D. radiodurans bacterium has more survival mechanisms than just this antioxidant. Although much of the ionizing radiation is neutralized this way, it can not be fully prevented. This is where the highly effective DNA repair mechanism comes into play, along with a range of other adaptations.

The upshot of this is the synthesis of a very effective and useful antioxidant, but as alluded to in the press releases, just injecting humans with MDP will not instantly give them the same super powers as our D. radiodurans buddy.

Featured image: Survival mechanisms in Deinococcus radiodurans bacterium. (Credit: Feng Liu et al., 2023)

Simple Fluorometer Makes Nucleic Acid Detection Cheap And Easy

Back in the bad old days, dealing with DNA and RNA in a lab setting was often fraught with peril. Detection technologies were limited to radioisotopes and hideous chemicals like ethidium bromide, a cherry-red solution that was a fast track to cancer if accidentally ingested. It took time, patience, and plenty of training to use them, and even then, mistakes were commonplace.

Luckily, things have progressed a lot since then, and fluorescence detection of nucleic acids has become much more common. The trouble is that the instruments needed to quantify these signals are priced out of the range of those who could benefit most from them. That’s why [Will Anderson] et al. came up with DIYNAFLUOR, an open-source nucleic acid fluorometer that can be built on a budget. The chemical principles behind fluorometry are simple — certain fluorescent dyes have the property of emitting much more light when they are bound to DNA or RNA than when they’re unbound, and that light can be measured easily. DIYNAFLUOR uses 3D-printed parts to hold a sample tube in an optical chamber that has a UV LED for excitation of the sample and a TLS2591 digital light sensor to read the emitted light. Optical bandpass filters clean up the excitation and emission spectra, and an Arduino runs the show.

The DIYNAFLUOR team put a lot of effort into making sure their instrument can get into as many hands as possible. First is the low BOM cost of around $40, which alone will open a lot of opportunities. They’ve also concentrated on making assembly as easy as possible, with a solder-optional design and printed parts that assemble with simple fasteners. The obvious target demographic for DIYNAFLUOR is STEM students, but the group also wants to see this used in austere settings such as field research and environmental monitoring. There’s a preprint available that shows results with commercial fluorescence nucleic acid detection kits, as well as detailing homebrew reagents that can be made in even modestly equipped labs.