Quantum Inspired Algorithm Going Back To The Source

Recently, [Jabrils] set out to accomplish a difficult task: porting a quantum-inspired algorithm to run on a (simulated) quantum computer. Algorithms are often inspired by all sorts of natural phenomena. For example, a solution to the traveling salesman problem models ants and their pheromone trails. Another famous example is neural nets, which are inspired by the neurons in your brain. However, attempting to run a machine learning algorithm on your neurons, even with the assistance of pen and paper would be a nearly impossible exercise.

The quantum-inspired algorithm in question is known as the wavefunction collapse function. In a nutshell, you have a cube of voxels, a graph of nodes, or simply a grid of tiles as well as a list of detailed rules to determine the state of a node or tile. At the start of the algorithm, each node or point is considered in a state of superposition, which means it is considered to be in every possible state. Looking at the list of rules, the algorithm then begins to collapse the states. Unlike a quantum computer, states of superposition is not an intrinsic part of a classic computer, so this solving must be done iteratively. In order to reduce possible conflicts and contradictions later down the line, the nodes with the least entropy (the smallest number of possible states) are solved first. At first, random states are assigned, with the changes propagating through the system. This process is continued until the waveform is ultimately collapsed to a stable state or a contradiction is reached.

What’s interesting is that the ruleset doesn’t need to be coded, it can be inferred from an example. A classic use case of this algorithm is 2D pixel-art level design. By providing a small sample level, the algorithm churns and produces similar but wholly unique output. This makes it easy to provide thousands of unique and beautiful levels from an easy source image, however it comes at a price. Even a small level can take hours to fully collapse. In theory, a quantum computer should be able to do this much faster, since after all, it was the inspiration for this algorithm in the first place.

[Jabrils] spent weeks trying to get things running but ultimately didn’t succeed. However, his efforts give us a peek into the world of quantum computing and this amazing algorithm. We look forward to hearing more about this project from [Jabrils] who is continuing to work on it in his spare time. Maybe give it a shot yourself by learning the basics of quantum computing for yourself.

Continue reading “Quantum Inspired Algorithm Going Back To The Source”

The Clock Under The Dome

In what can only be described as a work of art, [suedbunker] has created a clock under a glass dome. Sporting Nixie tubes, a DS3223, BCD encoders, and MPSA43 transistors driven by an MCP23008 I/O expander it is truly a sight to behold. [suedbunker] has previously created the Circus Clock, a similar clock that celebrated a diversity of ways of displaying the time.

The dome clock represents a continuation of that idea. Reading the clock requires looking at the horizontal and vertical numbers separately. The hours are on the horizontal and minutes are on the vertical. Monday to Sunday is represented in the neon bulbs on the back. The power supply at the bottom provides a wide range of voltages including 5 V, 12 V, 24 V, 45 V, 90 V, 150 V, and -270 V for all the various types of lights. For safety, an optocoupler is used on the -270 volts to drive the clear seven-segment display.

An Arduino Nano controls the whole clock by communicating with the DS3232 real-time clock module and the port expanders via I2C. The soldering and wiring work, in particular, is tidy and beautiful. We look forward to future clocks by [suedbunker] and his wife.

Continue reading “The Clock Under The Dome”

Let The Solar Free

Anyone tackling solar power for the first time will quickly find there’s a truly dizzying amount of information to understand and digest. You might think you just need to buy some solar panels, wire them together, and just sort of plug them in. But there are a hundred and one different questions about how they’ll be connected, the voltage of the panels, and the hardware for driving a load. [Michel], [case06], and [Martin Jäger] have set out to create a simpler and easier to understand charge controller named LibreSolar.

a diagram showing how the libre solar is wired up

A charge controller is fundamentally a simple idea. The goal is to charge a battery with solar panels, which means it’s essentially just a heavy-duty DC/DC buck converter. What makes this project different is that it is an open platform built for extensibility.

There are UEXT connectors included for adding extra peripherals, and with some tweaks to the STM32 firmware, it would be easy to handle small wind turbines (with some rectification to convert to DC, of course). LibreSolar seems to be designed with an eye towards creating a nano-scale localized networked grid. For example, they’ve developed a Raspberry Pi Zero module that uses WiFi to create a CAN bus allowing the boxes to communicate their maximum voltage to each other. This makes the system as plug-and-play as possible, as the bus doesn’t require a master controller to communicate.

With features such as MPPT (Maximum Power Point Tracking), 20 amp peak charging, a USB interface for updating, and several built-in protection mechanisms, it’s clearly a well thought through project. We look forward to seeing it deployed in the real world!

What If You Could Design Your Own Aluminum Hand?

[Ian Davis] has decided to start over on his hand. [Ian] is missing four fingers on his left hand and has for a year now been showcasing DIY prosthetics on his YouTube channel. Back in July, we covered [Ian]’s aluminum hand.

Why aluminum? [Ian] found himself reprinting previous versions’ 3D printed plastic parts multiple times due to damage in the hinged joints, or UV damage rendering them brittle. With an ingenious splaying mechanism and some sensors powered by an Arduino, [Ian] has been wearing the custom machined aluminum hand on a daily basis.

However, as with many makers, he had that itch to revisit and refine the project. Even though the last version was a big jump in quality of life, he still found room for improvement. One particular problem was that the sensors tended to shift around and made it hard to get an accurate reading. To overcome this, [Ian] turned to a molding process. However, adding a stabilizing silicon layer meant that the design of the prosthetic needed to change. With several improvements in mind, [Ian] started the process of creating the plaster positive of his palm, working to create a silicon negative. The next step from here was to create a fiberglass shell that can go over the silicone with sensor wires embedded into the fiberglass shell.

It has been amazing to see the explosion in 3D printed prosthetics over the past few years and hope the trend continues. We look forward to seeing the next steps in [Ian’s] journey towards their ideal prosthetic!

Continue reading “What If You Could Design Your Own Aluminum Hand?”

Taking A Crack At The Traveling Salesman Problem

The human mind is a path-planning wizard. Think back to pre-lockdown days when we all ran multiple errands back to back across town. There was always a mental dance in the back of your head to make sense of how you planned the day. It might go something like “first to the bank, then to drop off the dry-cleaning. Since the post office is on the way to the grocery store, I’ll pop by and send that box that’s been sitting in the trunk for a week.”

This sort of mental gymnastics doesn’t come naturally to machines — it’s actually a famous problem in computer science known as the traveling salesman problem. While it is classified in the industry as an NP-hard problem in combinatorial optimization, a more succinct and understandable definition would be: given a list of destinations, what’s the best round-trip route that visits every location?

This summer brought news that the 44-year old record for solving the problem has been broken. Let’s take a look at why this is a hard problem, and how the research team from the University of Washington took a different approach to achieve the speed up.

Continue reading “Taking A Crack At The Traveling Salesman Problem”

Motorized Magic Over HDMI

There is a certain warmth that seems to emanate from stereo receivers of the 70s, 80s, and 90s. Despite their large footprint and considerable heft, the soft glow of the indicator lights and solid kerthunk of switches provide a sense of coziness. When [Tom] recently swapped his receiver for a 1970s Pioneer SX-950, he found himself getting up from the couch to adjust the volume when watching TV far too often for his liking. Resolving to do something about it, he added some magic in the form of a motorized volume knob. One of the coolest tricks for stereos was to have a small motor attached to the volume knob so that it could turn the volume up or down via a remote.

The first obstacle came when [Tom] had to forgo the center tap on the potentiometer to get a motorized one. This meant the volume compensation feature would be disabled, which is but a small price to pay for convenience. After scouring the internet, he finally had the part in hand only to discover some troublesome capacitors in the way. The new pot had a rather large motor hanging off the back that the previous one didn’t have. Fortunately, there was a good bit of space between the PCB and the bottom of the chassis, so Tom was able to just flip the capacitors to the underside of the board and bend them on their sides.

The next problem to solve was how to change the volume remotely. IR was considered as well as optical cable control signals. What [Tom] did instead was to implement HDMI CEC (consumer electronics control). CEC was well documented and seemed simple to implement on an ATTINY4313 with the help of a half-H driver. The CEC protocol implemented by [Tom’s] TV seemed to be very sensitive to timing, so an external crystal was used to get more precise timing and additional handshaking was implemented to get the TV to accept the microcontroller as valid. A few fail-safes were added to make sure the motor didn’t burn out if something went wrong with the CEC protocol and a nice enclosure wrapped up the build quite nicely.

We’ve seen CEC implemented before on a PIC 18F87J50, but as a sender of CEC commands not a receiver. [Tom’s] code is available on GitHub and might prove useful if you’re looking to implement CEC on an AVR.

Thanks [Tom] for sending this one in!

A Lawnmower That Looks Where You’re Going

As a kid, one of the stories my dad told me was about mowing a fairly large field of grass on the farm with a gas-powered push mower. One day, some sort of farm tool was left in the field and the old industrial mower shredded it, sending a large piece of sharp metal hurtling toward his leg. Luckily for my dad, the large plastic wheel managed to stop the piece of metal, destroying the wheel. My grandfather was frustrated that he needed to repair the lawnmower but was grateful that my dad still had both feet attached.

Of course, this story was used as a lesson for me not to gripe about having to mow the lawn when it was my turn, but there was also the lesson that lawnmowers can be dangerous. [DuctTape Mechanic] took it upon himself to see if he could prevent that sort of accident altogether and has created an automatic safety shutdown mechanism for his family lawnmower. (Video embedded below.)

This uses an inductive sensor that can detect metal before it gets sucked into the mower itself. The sensor trips a relay which forcibly shuts the mower down by grounding the ignition coil. While it doesn’t physically stop the blade like other safety mechanisms, it does prevent a situation from escalating by turning off power to the blade as soon as possible. Getting to the ignition coil wasn’t easy as it required getting deep into the engine itself, but now [DuctTape Mechanic] has a mower that could be expanded further with things such as with a capacitive sensor or more smarts to determine if it is detecting underground or above ground metal.

Someday we’ll have robotic mowers, but until then, we laud the efforts of hackers out there trying to make the world a little safer.

Continue reading “A Lawnmower That Looks Where You’re Going”