Studying QR Code Degradation

It’s fair to say that QR codes are a technology that has finally come of age. A decade or more ago they were a little over-hyped and sometimes used in inappropriate or pointless ways, but now they are an accepted and useful part of life.

They’re not without their faults though, one of which is that despite four increasingly redundant levels of error correction, there comes a point at which a degraded QR code can no longer be read. [HumanQR] is soliciting these broken QR codes for research purposes and inclusion in an eventual open-source database, and they’ll even have a shot at repairing your submissions for you.

It’s a problem inherent to all digital media, that once the limit of whatever error correction they contain has been reached, they arrive at a cliff-edge at which they go immediately from readability to non readability. The example given in the linked article is a locator tag on a stray cat, it had been rubbed away in part. Improving its contrast, sharply defining its edges, and improving the definition of its fiducials was able to revive it, we hope leading to the cat being returned home.

The idea is that by studying enough damaged codes it should be possible to identify the means by which they become degraded, and perhaps come up with a way to inform some repair software. Meanwhile if you are interested, you might want to learn more about how they work, the hard way.

Simulating High-Side Bootstrap Circuits With LTSpice

LTSpice is a tool that every electronics nerd should have at least a basic knowledge of. Those of us who work professionally in the analog and power worlds rely heavily on the validity of our simulations. It’s one of the basic skills taught at college, and essential to truly understand how a circuit behaves. [Mano] has quite a collection of videos about the tool, and here is a great video explanation of how a bootstrap circuit works, enabling a high-side driver to work in the context of driving a simple buck converter. However, before understanding what a bootstrap is, we need to talk a little theory.

Bootstrap circuits are very common when NMOS (or NPN) devices are used on the high side of a switching circuit, such as a half-bridge (and by extension, a full bridge) used to drive a motor or pump current into a power supply.

A simple half-bridge driving illustrates the high-side NMOS driving problem.

From a simplistic viewpoint, due to the apparent symmetry, you’d want to have an NMOS device at the bottom and expect a PMOS device to be at the top. However, PMOS and PNP devices are weaker, rarer and more expensive than NMOS, which is all down to the device physics; simply put, the hole mobility in silicon and most other semiconductors is much lower than the electron mobility, which results in much less current. Hence, NMOS and NPN are predominant in power circuits.

As some will be aware, to drive a high-side switching transistor, such as an NPN bipolar or an NMOS device, the source end will not be at ground, but will be tied to the switching node, which for a power supply is the output voltage. You need a way to drive the gate voltage in excess of the source or emitter end by at least the threshold voltage. This is necessary to get the device to fully turn on, to give the lowest resistance, and to cause the least power dissipation. But how do you get from the logic-level PWM control waveform to what the gate needs to switch correctly?

The answer is to use a so-called bootstrap capacitor. The idea is simple enough: during one half of the driving waveform, the capacitor is charged to some fixed voltage with respect to ground, since one end of the capacitor will be grounded periodically. On the other half cycle, the previously grounded end, jumps up to the output voltage (the source end of the high side transistor) which boosts the other side of the capacitor in excess of the source (because it got charged already) providing a temporary high-voltage floating supply than can be used to drive the high-side gate, and reliably switch on the transistor. [Mano] explains it much better in a practical scenario in the video below, but now you get the why and how of the technique.

We see videos about LTSpice quite a bit, like this excellent YouTube resource by [FesZ] for starters.

Continue reading “Simulating High-Side Bootstrap Circuits With LTSpice”

The ZX Spectrum Logic Analyzer

We know [Happy Little Diodes] frequently works with logic analyzer projects. His recent wireless logic analyzer for the ZX Spectrum is one of the oddest ones we’ve seen in a while. The heart of the system is an RP2040, and there are two boards. One board interfaces with the computer, and another hosts the controller.

The logic analyzer core is powered by a common open-source analyzer from [Eldrgusman]. This is one of the nice things about open source tools. Most people probably don’t need a logic analyzer that plugs directly into a ZX Spectrum. But if you do, it is fairly simple to repurpose a more generic piece of code and rework the hardware, if necessary.

Continue reading “The ZX Spectrum Logic Analyzer”

A Single-Pixel Camera Without Moving Parts Using Compressed Sensing

One of the reconstructed images, using all 4,096 matrix patterns as input, next to the original object. (Credit: okooptics, Jon Bumstead)
One of the reconstructed images, using all 4,096 matrix patterns as input, next to the original object. (Credit: okooptics, Jon Bumstead)

There’s a strange allure to single-pixel cameras due to the simultaneous simplicity and yet fascinating features that they can offer, such as no set resolution limit. That said, the typical implementations that use some kind of scanning (MEMS) mirror or similar approach suffer from various issues even when you’re photographing a perfectly stationary and static scene due to their complex mechanical nature. Yet there’s a way around this, involving a LED matrix and a single photoresistor, as covered by [Jon Bumstead] in an article with accompanying video.

As he points out, this isn’t a new concept, with research papers cited that go back many years. At the core lies the signal processing technique called compressed sensing, which is incidentally also used with computed tomography (CT) and magnetic resonance imaging (MRI) scanners. Compressed sensing enables the reconstruction of a signal from a series of samples, by using existing knowledge of the signal.

In the case of this single-pixel camera, the known information is the illumination, which is a Hadamard matrix pattern displayed on the 64 x 64 pixel LED matrix, ergo 4,096 possible patterns. A total of 4,096 samples are thus recorded, which are subsequently processed with a Matlab script. As pointed out, even 50% of the maximum possible matrices can suffice here, with appropriately chosen patterns.

While not an incredibly fast method, it is fully solid-state, can be adapted to use other wavelengths, and with some tweaking of the used components probably could cut down the sampling time required.

Continue reading “A Single-Pixel Camera Without Moving Parts Using Compressed Sensing”

Work, Eat, Sleep, Repeat: Become A Human Tamagotchi

When [Terence Grover] set out to build a Tamagotchi-inspired simulator, he didn’t just add a few modern tweaks. He ditched the entire concept and rebuilt it from the ground up. Forget cute wide-eyed blobby animals and pixel-poop. This Raspberry Pi-powered project ditches nostalgia in favour of brutal realism: inflation, burnout, capitalism, and the occasional existential crisis. Think Sims meets cyberpunk, rendered charmingly in Python on a low-res RGB LED matrix.

Instead of hunger and poop meters, this dystopian pet juggles Maslow’s hierarchy: hunger, rest, safety, social life, esteem, and money. Players make real-life-inspired decisions like working, socialising, and going into education – each affecting the stats in logical (and often unfair) ways. No free lunch here: food requires money, money requires mind-numbing labour, and labour tanks your rest. You can even die of overwork à la Amazon warehouse. The UI and animation logic are all hand-coded, and there’s a working buzzer, pixel-perfect sprite movement, and even mini-games to simulate job repetition.

It’s equal parts social commentary and pixel art fever dream. While we have covered Tamagotchi recreations some time ago, this one makes you the needy survivor. Want your own dystopia in 64×32? Head over to [Terence Grover]’s Github and fork the full open source code. We’ll be watching. The Tamagotchi certainly is.

Continue reading “Work, Eat, Sleep, Repeat: Become A Human Tamagotchi”

Unwinding An Unusual Slide Rule

If the Otis King slide rule in [Chris Staecker’s] latest video looks a bit familiar, you might be getting up there in age, or you might remember seeing us talk about one in our collection. Actually, we have two floating around one of the Hackaday bunkers, and they are quite the conversation piece. You can watch the video below.

The device is often mistaken for a spyglass, but it is really a huge slide rule with the scale wrapped around in a rod-shaped form factor. The video says the scale is the same as a 30-inch scale, but we think it is closer to 66 inches.

Continue reading “Unwinding An Unusual Slide Rule”

Semiconductor Simulator Lets You Play IC Designer

For circuit simulation, we have always been enthralled with the Falstad simulator which is a simple, Spice-like simulator that runs in the browser. [Brandon] has a simulator, too, but it simulates semiconductor devices. With help from [Paul Falstad], that simulator also runs in the browser.

This simulator takes a little thinking and lets you build devices as you might on an IC die. The key is to use the drop-down that initially says “Interact” to select a tool. Then, the drop-down below lets you select what you are drawing, which can be a voltage source, metal, or various materials you find in semiconductor devices, like n-type or a dielectric.

It is a bit tricky, but if you check out the examples first (like this diode), it gets easier. The main page has many examples. You can even build up entire subsystems like a ring oscillator or a DRAM cell.

Designing at this level has its own quirks. For example, in the real world, you think of resistors as something you can use with great precision, and capacitors are often “sloppy.” On an IC substrate, resistors are often the sloppy component. While capacitor values might not be exact, it is very easy to get an extremely precise ratio of two capacitors because the plate size is tightly controlled. This leads to a different mindset than you are used to when designing with discrete components.

Of course, this is just a simulation, so everything can be perfect. If, for some reason, you don’t know about the Falstad simulator, check it out now.