Hash Functions With The Golden Ratio

In the realm of computer science, it’s hard to go too far without encountering hashing or hash functions. The concept appears throughout security, from encryption to password storage to crypto, and more generally whenever large or complex data must be efficiently mapped to a smaller, fixed-size set. Hashing makes the process of looking for data much faster for a computer than performing a search and can be incredibly powerful when mastered. [Malte] did some investigation into hash functions and seems to have found a method called Fibonacci hashing that not only seems to have been largely forgotten but which speeds up this lookup process even further.

In a typical hashing operation, the data is transformed in some way, with part of this new value used to store it in a specific location. That second step is often done with an integer modulo function. But the problem with any hashing operation is that two different pieces of data end up with the same value after the modulo operation is performed, resulting in these two different pieces of data being placed at the same point. The Fibonacci hash, on the other hand, uses the golden ratio rather than the modulo function to map the final location of the data, resulting in many fewer instances of collisions like these while also being much faster. It also appears to do a better job of using the smaller fixed-size set more evenly as a consequence of being based around Fibonacci numbers, just as long as the input data doesn’t have a large number of Fibonacci numbers themselves.

Going through the math that [Malte] goes over in his paper shows that, at least as far as performing the mapping part of a hash function, the Fibonacci hash performs much better than integer modulo. Some of the comments mention that it’s a specific type of a more general method called multiplicative hashing. For those using hash functions in their code it might be worth taking a look at either way, and [Malte] admits to not knowing everything about this branch of computer science as well but still goes into an incredible amount of depth about this specific method. If you’re more of a newcomer to this topic, take a look at this person who put an enormous bounty on a bitcoin wallet which shows why reverse-hashing is so hard.

Game Boy PCB Assembled With Low-Cost Tools

As computers have gotten smaller and less expensive over the years, so have their components. While many of us got our start in the age of through-hole PCBs, this size reduction has led to more and more projects that need the use of surface-mount components and their unique set of tools. These tools tend to be more elaborate than what would be needed for through-hole construction but [Tobi] has a new project that goes into some details about how to build surface-mount projects without breaking the bank.

The project here is interesting in its own right, too: a display module upgrade for the classic Game Boy based on an RP2350B microprocessor. To get all of the components onto a PCB that actually fits into the original case, though, surface-mount is required. For that [Tobi] is using a small USB-powered hotplate to reflow the solder, a Pinecil, and a healthy amount of flux. The hotplate is good enough for a small PCB like this, and any solder bridges can be quickly cleaned up with some extra flux and a quick pass with a soldering iron.

The build goes into a lot of detail about how a process like this works, so if you’ve been hesitant to start working with surface mount components this might be a good introduction. Not only that, but we also appreciate the restoration of the retro video game handheld complete with some new features that doesn’t disturb the original look of the console. One of the other benefits of using the RP2350 for this build is that it’s a lot simpler than using an FPGA, but there are perks to taking the more complicated route as well.

Continue reading “Game Boy PCB Assembled With Low-Cost Tools”

Restoration Of Six-Player Arcade Game From The Early 90s

Although the video game crash of the mid-80s caused a major decline in arcades from their peak popularity, the industry didn’t completely die off. In fact, there was a revival that lasted until the 90s with plenty of companies like Capcom, Midway, SEGA, and Konami all competing to get quarters, francs, loonies, yen, and other coins from around the world. During this time, Namco — another game company — built a colossal 28-player prototype shooter game. Eventually, they cut it down to a (still titanic) six-player game that was actually released to the world. [PhilWIP] and his associates are currently restoring one of the few remaining room-sized games that are still surviving.

Continue reading “Restoration Of Six-Player Arcade Game From The Early 90s”

Low Cost Oscilloscope Gets Low Cost Upgrades

Entry-level oscilloscopes are a great way to get some low-cost instrumentation on a test bench, whether it’s for a garage lab or a schoolroom. But the cheapest ones are often cheap for a reason, and even though they work well for the price they won’t stand up to more advanced equipment. But missing features don’t have to stay missing forever, as it’s possible to augment them to get some of these features. [Tommy’s] project shows you one way to make a silk purse from a sow’s ear, at least as it relates to oscilloscopes.

Most of the problem with these lower-cost tools is their low precision due to fewer bits of analog-digital conversion. They also tend to be quite noisy, further lowering the quality of the oscilloscope. [Tommy] is focusing his efforts on the DSO138-mini, an oscilloscope with a bandwidth of 100 kHz and an effective resolution of 10 bits. The first step is to add an anti-aliasing filter to the input, which is essentially a low-pass filter that removes high frequency components of the signal, which could cause a problem due to the lower resolution of the device. After that, digital post-processing is done on the output, which removes noise caused by the system’s power supply, among other things, and essentially acts as a second low-pass filter.

Continue reading “Low Cost Oscilloscope Gets Low Cost Upgrades”

A Pi-Based LiDAR Scanner

Although there are plenty of methods for effectively imaging a 3D space, LIDAR is widely regarded as one of the most effective methods. These systems use a rapid succession of laser pulses over a wide area to create an accurate 3D map. Early LIDAR systems were cumbersome and expensive but as the march of time continues on, these systems have become much more accessible to the average person. So much so that you can quickly attach one to a Raspberry Pi and perform LiDAR imaging for a very reasonable cost.

This software suite is a custom serial driver and scanning system for the Raspberry Pi, designed to work with LDRobot LIDAR modules like the LD06, LD19, and STL27L. Although still in active development, it offers an impressive set of features: real-time 2D visualizations, vertex color extraction, generation of 360-degree panoramic maps using fisheye camera images, and export capabilities for integration with other tools. The hardware setup includes a stepper motor for quick full-area scanning, and power options that include either a USB battery bank or a pair of 18650 lithium cells—making the system portable and self-contained during scans.

LIDAR systems are quickly becoming a dominant player for anything needing to map out or navigate a complex 3D space, from self-driving cars to small Arduino-powered robots. The capabilities a system like this brings are substantial for a reasonable cost, and we expect to see more LiDAR modules in other hardware as the technology matures further.

Thanks to [Dirk] for the tip!

Presence Detection Augments 1930s Home

It can be jarring to see various sensors, smart switches, cameras, and other technology in a house built in the 1930s, like [Chris]’s was. But he still wanted presence detection so as to not stub any toes in the dark. The result is a sensor that blends in with the home’s aesthetics a bit better than anything you’re likely to find at the Big Box electronics store.

For the presence detection sensors, [Chris] chose to go with 24 GHz mmwave radar modules that, unlike infrared sensors, can detect if a human is in an area even if they are incredibly still. Paired with the diminutive ESP32-S2 Mini, each pair takes up very little real estate on a wall.

Although he doesn’t have a 3D printer to really pare down the size of the enclosure to the maximum, he found pre-made enclosures instead that are fairly inconspicuous on the wall. Another design goal here was to make sure that everything was powered so he wouldn’t have to perpetually change batteries, so a small wire leads from the prototype unit as well.

The radar module and ESP pair are set up with some code to get them running in Home Assistant, which [Chris] has provided on the project’s page. With everything up and running he has a module that can control lights without completely changing the aesthetic or behavior of his home. If you’re still using other presence sensors and are new to millimeter wave radar, take a look at this project for a good guide on getting started with this fairly new technology.

Windows On ARM On Arm

While some companies like Apple have gone all-in on the ARM architecture, others are more hesitant to dive into the deep end. For example, Microsoft remains heavily invested in the x86 architecture and although it does have some ARM offerings, a lot of them feel a bit half-baked. So you might question why someone like [Gustave] has spent so much time getting Windows to run on unusual ARM platforms. But we don’t need much of a reason to do something off-the-wall like that around these parts, so take a look at his efforts to get Windows for ARM running on a smartwatch.

The smartwatch in question here is a Pixel Watch 3, which normally runs a closed-source Android implementation called Wear OS. The bootloader can be unlocked, so [Gustave] took that approach to implement a few clever workarounds to get Windows to boot including adding UEFI to the watch. During the process Google updated these devices to Android 15, though, which broke some of these workarounds. The solution at that point was to fake a kernel header and re-implement UEFI and then load Windows (technically Windows PE) onto the watch.

Although this project was released on April 1, and is by [Gustave]’s own admission fairly ridiculous and not something he actually recommends anyone do, he does claim that it’s real and provides everything needed for others to run Windows on their smartwatches if they want to. Perhaps one of our readers will be brave enough to reproduce the results and post about it in the comments. In the meantime, there are a few more open options for smartwatches available if you’re looking for something to tinker with instead.

Thanks to [Ruhan] for the tip!