Ikea Clock Gets Wanderlust

We always enjoy unique clocks, and a recent 3D print from [David Kingsman] caught our eye. It converts an Ikea clock into a very unusual-looking “wandering hour” clock that uses a Geneva drive to show a very dynamic view of the current time. The concept is based on an earlier wandering clock, but [David] utilized a different mechanism.

To read the clock, you note which hour numeral is in range of the “minute arc” and read the time directly. So if the 12 hour is over the 20-minute mark, the time is 12:20. Besides the clock, you need a fair number of printed parts, although they all look like relatively simple prints. You’ll also need 13 bearings and some metric hardware. A piece of cardboard used for the face rounds out the build.

Modifying the clock is more than just taking it apart. There is a template file to print, and you’ll need to align it and drill holes as indicated.

If you haven’t seen a Geneva drive before, it translates a continuous rotation into intermittent rotation. This isn’t the first clock we’ve seen use this kind of drive, although the last one we saw represented time differently. If you want something even more mechanical, try a chain-driven clock.

Equipping Rats With Backpacks To Find Victims Under Rubble

When it comes to demining or finding victims after a disaster, dogs are well-known to aid humans by sniffing out threats and trapped humans with ease. Less well-known, but no less impressive are rats, with the African giant pouched rat being the star of the show. Recently a student at the Dutch Technical University of Eindhoven (TU/e) has demonstrated how these rats can sniff out buried victims, aided by a high-tech backpack that gives them a communication link back to their human handler.

All of this is done in association with the Belgian-registered and Tanzania-based NGO APOPO, whose achievements include training gold medal winner Magawa the rat, who helped find 71 landmines and dozens more types of UXO over a 5-year career. These landmine-hunting rats are known as HeroRATs and have been helping demine nations since the 1990s. They may be joined by RescueRats in the near future.

Each RescueRat is equipped with a backpack that contains a camera and battery, as well as GPS and altimeter. Each backpack includes a button that the rat is trained to press when they have found a victim — essentially dropping a pin on their human rescuer’s maps.

Figuring out the location of the victim inside the rubble pile is the real challenge. This is where a (LoRa) radio beacon in the backpack is triangulated using receivers placed around the area, allowing the rescuers to determine with reasonable accuracy where to focus their efforts.

(Thanks to [Roel] for the tip!)

Continue reading “Equipping Rats With Backpacks To Find Victims Under Rubble”

Hacking The Python For Loop

In the early days of C, you’d occasionally see someone — probably a former Pascal programmer — write something like this:

#define BEGIN {
#define END }

This would usually initiate complaints about abusing the preprocessor and generally being anti-C. Surely no modern language would permit such things, right? Perhaps not. Consider [Tushar Sadhwani] who wanted to create a classic C-style for loop inside of Python. He did it, and the journey is perhaps more interesting than the result.

First, you can’t just transport straight C for loops into Python. There has to be some concession to Python syntax. The initial attempt was clever but not clever enough. However, the disassembly of the Python code was telling. The second attempt, however, was particularly interesting.

That attempt used an odd feature to examine the interpreter’s tree structure for the code and then modify it. This is sort of like a very painful C preprocessor but more powerful. That version works although it is pretty convoluted.

Ironically, [Tushar] then set up a third attempt after seeing code that tries to replace Python indentation with braces using a codec. In Python-speak, a codec lets you convert different text encodings. However, you can do other things than text encoding conversion. This is closest in spirit to the C preprocessor method. You can wade through the source code ahead of processing and make whichever changes you see fit.

Is any of this really useful? Probably not as it is. But you never know when you might need to do something exotic and one of these techniques could save the day. You probably couldn’t get away with some of this on MicroPython, of course. Your mileage may vary depending on where you find your Python running — like the Web.

Hackaday Links Column Banner

Hackaday Links: February 5, 2023

Well, this week’s Links article is likely to prove a bit on the spicy side, thanks in no small part to the Chinese balloon that spent the better part of the week meandering across the United States. Putting aside the politics of the whole thing — which we’ll admit is hard to do, given the state of the world today — there are some interesting technical aspects to this story, which the popular press has predictably ignored. Like the size of this thing — it’s enormous. This is not even remotely on the same scale as the hundreds of radiosonde-carrying balloons sent aloft every day, at least if the back-of-the-envelope math thoughtfully sent to us by [Dr_T] holds up. If the “the size of three buses” description given in most media reports is accurate, that means a diameter of about 40 meters, for a volume of 33,500 cubic meters. If it’s filled with helium — a pretty safe bet — that makes its lifting capacity something like three metric tons. So maybe it was a good idea to wait until it was off the Carolinas to shoot it down.

Continue reading “Hackaday Links: February 5, 2023”

Behold A Microscope That Sees By Squashing Things Into It

“Look with your eyes, not your hands” is something many of us have heard while growing up, but that doesn’t apply to the touch-sensitive microscope [Steve Mould] got to play with.

Gel pad removed, exposing lens and multi-directional lighting.

The wand-like device is made by Gelsight, and instead of an optical lens like a normal microscope, it sports a gel pad on the sensing end. By squashing an object into the gel, the device is able to carefully illuminate and image the impression created. By taking multiple images lit from different angles, a lot of information can be extracted.

The result is a high-resolution magnification — albeit a monochromatic one — that conveys depth extremely well. It’s pretty neat clearly seeing tiny specks of dust or lint present on surfaces when [Steve] demonstrates imaging things like coin cells.

Many a hacker knows that the devil is in the details when it comes to executing an idea. Even so, the basic principles of the Gelsight seem simple enough and possibly within the realm of inspired DIY in the same way that we saw a CNC gantry and USB microscope repurposed as an optical comparator.

Watch the Gelsight in action in the video below, embedded below the page break.

Continue reading “Behold A Microscope That Sees By Squashing Things Into It”

Dishwasher Repair Nightmare: Chasing Down 3 Faults

It all started with a vague error code (shown in the image above) on [nophead]’s Bosch SMS88TW01G/01 dishwasher, and it touched off a months-long repair nightmare that even involved a logic analyzer. [nophead] is normally able to handily diagnose and repair electronic appliances, but this time he had no idea what he was in for.

Not many dishwashers require breaking out a logic analyzer and 3D-printed custom adapters, but this one did.

Not only were three separate and unrelated faults at play (one of them misrepresented as a communications error that caused a lot of head-scratching) but to top it all off, the machine is just not very repair-friendly. The Bosch device utilized components which are not easily accessible. In the end [nophead] prevailed, but it truly was a nightmare repair of the highest order. So what went wrong?

One error appears to have been due to a manufacturing problem. While reverse-engineering the electronics in the appliance, [nophead] noticed a surface-mounted transistor that looked crooked. It was loose to the touch and fell into pieces when he attempted to desolder it. This part was responsible for switching an optical sensor, so that was one problem solved.

Another issue was a “communications error”. This actually came down to ground leakage due to a corroded and faulty heater, and to say that it was a pain to access is an understatement. Accessing this part requires the machine to be turned upside down, because the only way to get to it is by removing the base of the dishwasher, which itself requires a bizarre series of awkward and unintuitive steps to remove. Oh, and prior to turning the machine upside down, one has to purge the sump pump, which required a 3D-printed adapter… and the list goes on.

And the E02 error code, the thing that started it all? This was solved early in troubleshooting by changing a resistor value by a tiny amount. [nophead] is perfectly aware that this fix makes no sense, but perhaps it was in fact related to the ground leakage problem caused by the corroded heater. It may return to haunt the future, but in the meantime, the machine seems happy.

It goes to show that even though every fault has a cause and a reason, sometimes they are far from clear or accessible, and the road to repair is just a long slog. Heck, even phones these days can be bricked by accidentally swapping a 1.3 mm screw for a 1.2 mm screw.

Dumping script window, showing the bytes being dumped one by one from the STM chip

Need To Dump A Protected STM32F0x? Use Your Pico!

Sometimes, security mechanisms can be bypassed if you just do things slightly out of the ordinary. For instance, readout protection on microcontrollers is a given nowadays, to the point where it’s intentionally enabled and relied upon as a major technical measure to protect intellectual property. The gist is — when you connect to a microcontroller over its debug interface and then ask to read its flash memory, it will politely refuse. However, [Racerxdl] shows us that in practice, it’s not flawless protection – for certain chips, you just need to be a little quicker than usual.

Usually, flashing and debugging software will chat with the microcontroller for a bit, and probe parameters before going for any direct requests. However, if you skip the courtesy and bluntly get to the point immediately right after power is applied to the microcontroller, you can intimidate them just enough to give you one byte of its memory before it refuses to cooperate further. Since that can be any byte you wish, you can read the entire flash — one byte at a time.

You need to power cycle the chip before you can progress, so the hardware does involve a bit more than just an SWD interface, and it will take a fair bit more time than reading out a non-protected chip the usual way; plus, of course, the debugging interface needs to be active for this in the first place, which isn’t always the case. However, it still beats paying a few thousand dollars for a factory in China to decap your chip and read it out using a fancy machine.

[Racerxdl] didn’t just write a proof-of-concept for this attack – they implemented it for one of our favourite chips, the RP2040. As such, you no longer need an unobtainium STM32 to dump an unobtainium STM32.

To be clear, [Racerxdl] didn’t design this attack — it’s been around for some time now. Credit for that goes to Johanes Obermaier. All in all, this is a wonderful reminder that seemingly reliable security mechanisms can be foiled by the simplest tricks. For instance, if your chip erases the flash when you unlock its protection, you can just tell it not to.