Grading Tomatoes With An ESP32 And ML

If you’ve ever worked with produce, you might know about grading. In addition to deciding if, say, a strawberry is good or not, they also have to sort them by color. Turns out, you don’t care if one package of berries is a bit redder than another, but you do care if one package has too much color variation. [Pmalfa31] applied an ESP32 and machine learning to grading tomatoes.

The system knows in advance if you are processing standard tomatoes or cherry tomatoes and uses two different sets of learned data depending on which you select. The program receives raw data from an optical sensor and then processes it to remove empty belt images, compute statistical information, and group readings for a single fruit together.

Continue reading “Grading Tomatoes With An ESP32 And ML”

The BBC Tetris Companion

[Leaded Solder] took on an interesting challenge. The BBC, apparently, produced a game console known as the BBC Bridge Companion that connected to your TV and helped you learn to play Bridge back in 1985. At £200, we doubt many were sold new, but there were nine ROM cartridges available, presumably at an additional cost. [Leaded Solder] doesn’t care about playing bridge, but decided to teach the computer itself to play Tetris.

Inside is what you might expect for 1985. A Z80 and TI video chip, although naturally enough, it is the PAL variant. With 16K of VRAM the machine would have been very capable for its day. Unlike some game systems, the Bridge Companion runs its own code before launching what’s on the ROM cartridge. That required a few evenings of reverse engineering to figure out the correct header. Meanwhile, the surplus real hardware needed a quick repair on its cartridge slot before he could test it with real metal.

There were more hurdles, including adapting the PAL output for a composite monitor. Don’t miss the second part of the series for more technical details, and we’ll be interested in following the posts to their conclusion later this month.

Oddly enough, we think this is the first time the BBC Bridge Companion has made an appearance on Hackaday. However, we’ve had no shortage of card shufflers.

This Filesystem Is Born To Fail

Sandboxing a Linux process usually means spending a lot of effort deciding what it isn’t allowed to see. You might put it in a mount namespace, bind-mount a few directories into place, hide some others, add a chroot, and generally construct a carefully restricted version of the filesystem. But a new Linux kernel feature is about to change all of that. Instead of carefully hiding most of the filesystem, why not just take the filesystem away?

That’s essentially the idea behind FailFS, a tiny pseudo-filesystem expected to land in Linux 7.3. As the name suggests, it doesn’t do very much. In fact, that’s the point: every operation that reaches FailFS returns EOPNOTSUPP, meaning “operation not supported.”

The interesting bit is what happens when a process uses FailFS as its root or current working directory. At that point, normal pathname lookup essentially ceases to work. Absolute paths fail. Absolute symbolic links fail. Relative paths using the normal current-directory mechanism fail. If the application tries to open /etc/passwd, there simply isn’t a useful /etc to find.

Continue reading “This Filesystem Is Born To Fail”

A 3D Printed Cycloidal Gearbox

Stepper motors are undeniably useful, but sometimes they need a bit of gearing to help perform their task. [Gjhudson2008] has a compact gearbox for NEMA 17 or 23 steppers that is mostly 3D printed. How compact? The gearbox, named VANTIX, is exactly the height of a standard NEMA 17 axle.

However, for it to be that thin, your stepper has to have the D-bore on the shaft go all the way down. Some steppers leave a shank uncut at the base, and that won’t work for VANTIX.

The recommendation is to print in ABS with a 0.2 mm nozzle for certain parts to help improve tolerance. Most of the assembly is either press fit or installed during the printing process. Some parts of the gearbox are better to print with a larger nozzle, too.

There are some heat-set inserts and, of course, you’ll need lube to keep everything moving smoothly. There are a few top plates you can print to fit various mounting scenarios.

We have seen a number of similar designs. We’ve also looked at some e-bike-inspired drives.

Rubidium Frequency Standard Explained

You’ve probably heard of rubidium frequency standards, which are used where you need an extremely accurate time or frequency reference. [IMSAI] guy has a good explainer video about what’s actually going on inside one of these standards. Much of the basic idea also applies to cesium standards.

The explainer starts with the periodic table. Rubidium and cesium are both alkali metals, with a single electron in their outermost electron shell. Rubidium has 37 electrons, with the outermost one relatively loosely bound. Naturally occurring rubidium consists mainly of two isotopes, rubidium-85 and rubidium-87, which have the same number of protons and electrons but different numbers of neutrons.

A rubidium standard typically has three gas cells that have a bit of rubidium in them. An RF-excited rubidium-87 discharge lamp produces light at very specific wavelengths. The RF energy excites rubidium atoms into higher electronic states, and when their electrons fall back to lower-energy states, the atoms emit photons.

That light passes through a filter cell containing rubidium-85. The filter preferentially absorbs part of the lamp’s spectrum, leaving light that optically pumps the rubidium-87 atoms in the second resonance cell into one of two closely spaced hyperfine states of the atom’s ground state.

Those two states differ because of the interaction between the magnetic moment of the outer electron and that of the rubidium-87 nucleus. Their energy separation corresponds to a microwave frequency of about 6.835 GHz.

The resonance cell is illuminated by the filtered light while also being exposed to microwave energy from a local oscillator. When the microwave frequency is exactly equal to the rubidium-87 hyperfine transition frequency, it transfers atoms between the two ground-state hyperfine levels. That changes how strongly the cell absorbs the optical pumping light, producing a detectable dip in the light reaching a photodetector.

Electronics then servo the microwave oscillator onto the center of that absorption dip, using a feedback technique somewhat analogous to a phase-locked loop. Once locked, the oscillator is effectively referenced to an atomic transition rather than to the dimensions or mechanical properties of a crystal, giving you an extremely stable frequency standard.

Continue reading “Rubidium Frequency Standard Explained”

Calculus-Free PID (Almost) In A Spreadsheet

PID controllers are everywhere. They regulate temperature, motor speed, power supplies, positioning systems, process equipment, and probably a dozen things within arm’s reach of you right now.

They’re also frequently explained with enough calculus to make them seem more mysterious than they really are. Granted, the I and D in PID stand for calculus terms, but they are easy enough to build into a spreadsheet. Grab a copy and keep it open while you read this post.

The Google Sheet implements a simple simulated PID controller along with a simulated process — the thing we’re trying to control. You can change the controller gains, alter the process, introduce disturbances, and watch what happens without compiling anything or wiring up a heater that might accidentally become a toaster. Continue reading “Calculus-Free PID (Almost) In A Spreadsheet”

FitzRoy’s Glass: Victorian Weather Marvel Or Glorified Thermometer?

Everyone talks about the weather. This is doubly true for sailors, where bad weather could mean a very bad day. So it isn’t surprising that navies around the world have had a keen interest in weather forecasting. But how did you predict the weather before modern instruments, radar, and satellite images? Vice Admiral Robert FitzRoy had great faith in “storm glasses,” a glass chamber containing some chemicals that he didn’t invent, but did document and promote heavily during the 1860s.

Did it work? Apparently not, but the device is still interesting in its own right. FitzRoy was a pioneer of meteorology, replacing folklore with actual observations and attempts at scientific rigor. While he did arm observation stations with conventional things like thermometers and barometers, he was also a proponent of the weather glass. Continue reading “FitzRoy’s Glass: Victorian Weather Marvel Or Glorified Thermometer?”