Honey, I Ate The Camera

We like cameras here at Hackaday. We like them a lot. But until now that liking has never extended to liking their taste. A build from [Dmitri Tcherbadji] could change all that though, and he’s created a working Fuji Instax Square camera made from gingerbread.

To look at, it’s a straightforward box camera, albeit one made from sheets of gingerbread stuck together with what looks like icing. The film rests in an off-the-shelf development unit but the rest is edible, including unexpectedly the lens which is made of sugar glass. The photos it returns are definitely somewhat cloudy, but that it works at all is a significant feat.

While it’s an unconventional choice it’s clear that gingerbread, or at least a baked material similar to it, could become a useful tool in a maker’s arsenal. In this case it’s light-proof, but were instantly curious about how well a moulded piece of dough might hold its shape when baked. He reports the gingerbread expanding in the oven, however we’re guessing that tuning the quantity of raising agent could help.

Home-made cameras have featured here many times, but Instax seems to pop up most often as a hacked in replacement for obsolete Polaroid packs.

Mozilla Lets Folks Turn AI LLMs Into Single-File Executables

LLMs (Large Language Models) for local use are usually distributed as a set of weights in a multi-gigabyte file. These cannot be directly used on their own, which generally makes them harder to distribute and run compared to other software. A given model can also have undergone changes and tweaks, leading to different results if different versions are used.

To help with that, Mozilla’s innovation group have released llamafile, an open source method of turning a set of weights into a single binary that runs on six different OSes (macOS, Windows, Linux, FreeBSD, OpenBSD, and NetBSD) without needing to be installed. This makes it dramatically easier to distribute and run LLMs, as well as ensuring that a particular version of LLM remains consistent and reproducible, forever.

This wouldn’t be possible without the work of [Justine Tunney], creator of Cosmopolitan, a build-once-run-anywhere framework. The other main part is llama.cpp, and we’ve covered why it is such a big deal when it comes to running self-hosted LLMs.

There are some sample binaries available using the Mistral-7B, WizardCoder-Python-13B, and LLaVA 1.5 LLMs. Just keep in mind that if you’re on a Windows platform, only the LLaVA 1.5 will run, because it’s the only one that squeaks under the 4 GB limit on executable files that Windows has. If you run into issues, check out the gotchas list for troubleshooting tips.

Build Yourself A Screw Propelled Robot To Tackle The Dirt

Wheels and tracks are common choices for robot propulsion, but they’re not the only game in town. You can do some nifty things with long extruded screws , and they work pretty well in soft terrain. [gokux] set about building a small robot using this propulsion method using 3D printed parts.

The build uses a Seeed Studio XIAO ESP32S3 as the brains of the operation. This provides wireless connectivity for remote control, as well as a way to get a low-latency video feed out of the robot from the OV2640 camera. The ESP32 controls a pair of brushed DC gearmotors via a DRV8833 motor driver. Each drives one of the two screws on the robot. By driving the two screws separately, the robot has simple skid steering. Two 18650 lithium-ion cells provide power for the robot, and are charged via a TP4056 battery charger module.

If you want to build a small robot that can handle soft terrain well, screw drives could be just the solution you’re looking for. They’re usually a bit slow, though, especially for human-scale conveyances, so don’t write off wheels or tracks if you don’t have to. And, of course, when your build is done, don’t forget to put it online and tell us all about it!

Update On The BLUFFS Bluetooth Vulnerability

As we first reported in yesterday’s weekly security post, researchers at EURECOM have revealed the details (PDF, references) of a new man-in-the-middle (MITM) attack on Bluetooth 4.2 through 5.4, which has been assigned CVE-2023-24023. Like preceding CVEs, it concerns the session authentication between Bluetooth devices, where the attacker uses spoofed paired or bonded devices to force the use of a much shorter encryption key length.

The name of this newly discovered vulnerability is BLUFFS (Bluetooth Forward and Future Secrecy), where forward and future secrecy are important terms that refer to the protection of secure sessions against compromise in the past (forward, FoS) and future (FuS). The CVE presentation notes that the Bluetooth specification does not cover either FuS or FoS. In total two new architectural vulnerabilities were discovered, both of which attack the security key.

The Bluetooth SIG has released a statement regarding this attack method. Although serious, it would seem that the core issue is that some implementations allow for encryption key lengths below 7 octets:

Continue reading “Update On The BLUFFS Bluetooth Vulnerability”

The Physics Lesson I Keep Re-Learning

One of the most broadly applicable ideas I’ve ever encountered is the concept of impedance matching. If you’re into radio frequency electronics, you’re probably thinking that I mean getting all your circuit elements working to a common characteristic resistance for maximum power transfer. (If you’re not, you’re probably wondering what that jumble of words even means. Fear not!)

But I mean impedance matching in the larger sense. Think about driving a stick-shift automobile. In low gear, the engine has a lot of torque on the wheels, but it can’t spin them all that fast. In high, the wheels turn fastest, but there’s not enough torque to get you started from a standstill. Sometimes you need more force and less motion, other times more motion and less force. The gearbox lets you match the motor’s power to the resistance – the impedance – it’s trying to overcome.

Or think about a cello. The strings are tight, and vibrate with quite a bit of force, but they don’t move all that much. Air, which is destined to carry the sound to your ear, doesn’t take much force to move, and the cello would play louder if it moved more of it. So the bridge conveys the small, but strong, vibrations of the strings and pushes against the top of the resonant box that makes up the body of the instrument. This in turn pushes a lot of air, but not very hard. This is also why speakers have cones, and also why your ear has that crazy stirrup mechanism. Indeed, counting the number of impedance matches between Yo Yo Ma and your brain, I come up with four or five, including electrical matches in the pre-amp.

I mention this because I recently ran into a mismatch. Fans blow air either hard or in large volume. If you pick a fan that’s designed for volume, and put it in a pressure application, it’s like trying to start driving in fifth gear. It stalled, and almost no air got pushed up through the beans in my new “improved” coffee roaster, meaning I had to rebuild it with the old fan, and quick before the next cup was due.

I ran into this mismatch even though I knew there was a possible impedance issue there. I simply don’t have a good intuitive feel how much pressure I needed to push the beans around – the impedance in question – and I bought the wrong fan. But still, knowing that there is a trade-off is a good start. I hope this helps you avoid walking in my footsteps!

Generating Motion Via Nitinol Wires

Generally, when we’re looking to build something that moves we reach for motors, servos, or steppers — which ultimately are all just variations on the same concept. But there are other methods of locomotion available. As [Jamie Matthews] demonstrates, Nitinol wires can be another way to help get things moving.

Nitinol is a type of metal wire made of nickel and titanium that is also known as “memory wire”, because it can remember its former shape and transition back to it with a temperature change. [Jamie] uses this property to create a simple hand that is actuated by pieces of wire sourced from Amazon. This is actually a neat way to go, as it goes some way to mimicking how our own hands are moved by our tendons.

[Jamie] does a great job of explaining how to get started with Nitinol and how it works in a practical sense. We’ve seen it put to some wacky uses before, too, such as the basis for an airless tire.

Continue reading “Generating Motion Via Nitinol Wires”

LED Tester Also Calculates Resistor For Target Voltage

[mircemk] built a slick-looking LED tester with a couple handy functions built in. Not only can one select a target current to put through an LED, but by providing a target voltage, the system will automatically calculate the necessary series resistor. If for example the LED is destined for 14 V, this device will not only show how the LED looks at the chosen current, but will calculate the required resistor to get the same results on a 14 V system.

The buttons on the left control the target current and the voltage of the destination system. Once an LED is connected it will light up and the display indicates the LED’s forward voltage, the LED current, and the calculated series resistor value to obtain the same result at the selected target voltage. It’s a handy way to empirically dial in LED brightness values without needing to actually set up any particular test environment.

On the inside there’s little more than a handful of passive components, an Arduino, an LCD display, and a few buttons. This kind of tool reminds us of the highly clever component testers that hit the hobbyist scene years ago, showing what kind of advanced tricks a modern microcontroller is capable of with the right programming. (Here’s a look at how those work, if you’re interested in some deeper details.)

[mircemk] demonstrates his tool in the video, embedded below. We particularly like the attention he paid to the enclosure, giving it a very functional layout. It goes to show that when designing something, it’s never too early to consider enclosure and UI layout.

Continue reading “LED Tester Also Calculates Resistor For Target Voltage”