Design Constraints Bring Lockbox To Life

One of the most paradoxical aspects of creating art is the fact that constraints, whether arbitrary or real, and whether in space, time, materials, or rules, often cause creativity to flourish rather than to wither. Picasso’s blue period, Gadsby by Ernest Vincent Wright, Tetris, and even the Volkswagen Beetle are all famous examples of constraint-driven artistic brilliance. Similarly, in the world of electronics we can always reach for a microcontroller but this project from [Peter] has the constraint of only using passive components, and it is all the better for it.

The project is a lockbox, a small container that reveals a small keypad and the associated locking circuitry when opened. When the correct combination of push buttons is pressed, the box unlocks the hidden drawer. This works by setting a series of hidden switches in a certain way to program the combination. These switches are connected through various diodes to a series of relays, so that each correct press of a button activates the next relay. When the final correct button is pushed, power is applied to a solenoid which unlocks the drawer. An incorrect button push will disable a relay providing power to the rest of the relays, resetting the system back to the start.

The project uses a lot of clever tricks to do all of this without using a single microcontroller, including using capacitors that carefully provide timing to the relays to make them behave properly rather than all energizing at the same time. The woodworking is also notable as well, with the circuit components highlighted when the lid is opened (but importantly, hiding the combination switches). Using relays for logic is not a novel concept, though; they can be used for all kinds of complex tasks including replacing transistors in single-board computers.

Continue reading “Design Constraints Bring Lockbox To Life”

Digital Squid’s Behavior Shaped By Neural Network

In the 90s, a video game craze took over the youth of the world — but unlike today’s games that rely on powerful PCs or consoles, these were simple, standalone devices with monochrome screens, each home to a digital pet. Often clipped to a keychain, they could travel everywhere with their owner, which was ideal from the pet’s perspective since, like real animals, they needed attention around the clock. [ViciousSquid] is updating this 90s idea for the 20s with a digital pet squid that uses a neural network to shape its behavior.

The neural network that controls the squid’s behavior takes a large number of variables into account, including whether or not it’s hungry or sleepy, or if it sees food. The neural network adapts as different conditions are encountered, allowing the squid to make decisions and strengthen its algorithms. [ViciousSquid] is using a Hebbian learning algorithm which strengthens connections between neurons which activate often together. Additionally, the squid’s can form both short- and long-term memories, and the neural network can even form new neurons on its own as needed.

[ViciousSquid] is still working on this project, and hopes to eventually implement a management system in the future, allowing the various behavior variables to be tracked over time and overall allow it to act in a way more familiar to the 90s digital pets it’s modeled after. It’s an interesting and fun take on those games, though, and much of the code is available on GitHub for others to experiment with as well. For those looking for the original 90s games, head over to this project where an emulator for Tamagotchis was created using modern microcontroller platforms.

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!