Two very similar diffraction patterns are shown, in patterns of green dots against a blue background. The left image is labelled "Kompressions-algorithmus", and the one on the right is labelled "Licht & Zweibelzellen".

Why Diffraction Gratings Create Fourier Transforms

When last we saw [xoreaxeax], he had built a lens-less optical microscope that deduced the structure of a sample by recording the diffraction patterns formed by shining a laser beam through it. At the time, he noted that the diffraction pattern was a frequency decomposition of the specimen’s features – in other terms, a Fourier transform. Now, he’s back with an explanation of why this is, deriving equations for the Fourier transform from the first principles of diffraction (German video, but with auto-translated English subtitles. Beware: what should be “Huygens principle” is variously translated as “squirrel principle,” “principle of hearing,” and “principle of the horn”).

The first assumption was that light is a wave that can be adequately represented by a sinusoidal function. For the sake of simplicity (you’ll have to take our word for this), the formula for a sine wave was converted to a complex number in exponential form. According to the Huygens principle, when light emerges from a point in the sample, it spreads out in spherical waves, and the wave at a given point can therefore be calculated simply as a function of distance. The principle of superposition means that whenever two waves pass through the same point, the amplitude at that point is the sum of the two. Extending this summation to all the various light sources emerging from the sample resulted in an infinite integral, which simplified to a particular form of the Fourier transform.

One surprising consequence of the relation is the JPEG representation of a micrograph of some onion cells. JPEG compression calculates the Fourier transform of an image and stores it as a series of sine-wave striped patterns. If one arranges tiles of these striped patterns according to stripe frequency and orientation, then shades each tile according to that pattern’s contribution to the final image, one gets a speckle pattern with a bright point in the center. This closely resembles the diffraction pattern created by shining a laser through those onion cells.

For the original experiment that generated these patterns, check out [xoreaxeax]’s original ptychographical microscope. Going in the opposite direction, researchers have also used physical structures to calculate Fourier transforms.

Continue reading “Why Diffraction Gratings Create Fourier Transforms”

The edge of a laptop is shown with a USB cable plugged into it. the other end of the cable is plugged into a Raspberry Pi Zero.

SSH Over USB On A Raspberry Pi

Setting up access to a headless Raspberry Pi is one of those tasks that should take a few minutes, but for some reason always seems to take much longer. The most common method is to configure Wi-Fi access and an SSH service on the Pi before starting it, which can go wrong in many different ways. This author, for example, recently spent a few hours failing to set up a headless Pi on a network secured with Protected EAP, and was eventually driven to using SSH over Bluetooth. This could thankfully soon be a thing of the past, as [Paul Oberosler] developed a package for SSH over USB, which is included in the latest versions of Raspberry Pi OS.

The idea behind rpi-usb-gadget is that a Raspberry Pi in gadget mode can be plugged into a host machine, which recognizes it as a network adapter. The Pi itself is presented as a host on that network, and the host machine can then SSH into it. Additionally, using Internet Connection Sharing (ICS), the Pi can use the host machine’s internet access. Gadget mode can be enabled and configured from the Raspberry Pi Imager. Setting up ICS is less plug-and-play, since an extra driver needs to be installed on Windows machines. Enabling gadget mode only lets the selected USB port work as a power input and USB network port, not as a host port for other peripherals.

An older way to get USB terminal access is using OTG mode, which we’ve seen used to simplify the configuration of a Pi as a simultaneous AP and client. If you want to set up headless access to Raspberry Pi desktop, we have a guide for that.

Thanks to [Gregg Levine] for the tip!

A pair of printed circuit boards are shown against a pink background. The right circuit board is plugged into a USB cable, and has several LED indicators on. The left board is plugged into the other at 45-degree angle, and has no visible components.

Tamper Detection With Time-Domain Reflectometry

For certain high-security devices, such as card readers, ATMs, and hardware security modules, normal physical security isn’t enough – they need to wipe out their sensitive data if someone starts drilling through the case. Such devices, therefore, often integrate circuit meshes into their cases and regularly monitor them for changes that could indicate damage. To improve the sensitivity and accuracy of such countermeasures, [Jan Sebastian Götte] and [Björn Scheuermann] recently designed a time-domain reflectometer to monitor meshes (pre-print paper).

Many meshes are made from flexible circuit boards with winding traces built into the case, so cutting or drilling into the case breaks a trace. The problem is that most common ways to detect broken traces, such as by resistance or capacitance measurements, aren’t easy to implement with both high sensitivity and low error rates. Instead, this system uses time-domain reflectometry: it sends a sharp pulse into the mesh, then times the returning echoes to create a mesh fingerprint. When the circuit is damaged, it creates an additional echo, which is detected by classifier software. If enough subsequent measurements find a significant fingerprint change, it triggers a data wipe.

The most novel aspect of this design is its affordability. An STM32G4-series microcontroller manages the timing, pulse generation, and measurement, thanks to its two fast ADCs and a high-resolution timer with sub-200 picosecond resolution. For a pulse-shaping amplifier, [Jan] and [Björn] used the high-speed amplifiers in an HDMI redriver chip, which would normally compensate for cable and connector losses. Despite its inexpensive design, the circuit was sensitive enough to detect when oscilloscope probes contacted the trace, pick up temperature changes, and even discern the tiny variations between different copies of the same mesh.

It’s not absolutely impossible for an attacker to bypass this system, nor was it intended to be, but overcoming it would take a great deal of skill and some custom equipment, such as a non-conductive drill bit. If you’re interested in seeing such a system in the real world, check out this teardown of a payment terminal. One of the same authors also previously wrote a KiCad plugin to generate anti-tamper meshes.

Thanks to [mark999] for the tip!

An aluminium top is shown spinning on a plastic disk in front of a tablet showing the text "2:07:49.5"

Self-Powered Top Spins For Hours

The meaning of Inception’s ending famously revolves around a top which spins forever in dreams, but in real life comes to a stop like any other top. Any other top, that is, except for [Aaed Musa]’s self-spinning top, which can continuously spin for about two hours before coming to a stop.

The one constraint was that every functional component had to be contained within the top’s shell, and [Aaed]’s first approach was to build a reaction wheel into the top. When a motor accelerates a weighted wheel, conservation of angular momentum applies an equal and opposite torque to the motor. The problem is that motors eventually reach a top speed and stop accelerating, which puts an end to the torque. This is known as saturation, and the only way to desaturate a reaction wheel is to slow it down, which counteracts the originally generated torque. [Aaed] originally planned to mount the motor in a one-way bearing, which would let it bleed off speed without producing torque against the rest of the top, but it was rather choppy in practice.

The solution occurred to [Aaed] while watching the aforementioned final scene, when it occurred to him that the wobbling of a top could actually generate rotation. A prototype proved that an off-center weight rotating at a constant speed did successfully spin the top by rotating the center of mass, and after that, it was a matter of incremental testing and improvement. A higher moment of inertia worked better, as did a lower center of gravity and a tip made from a hard, low-friction silicon nitride ball bearing. He made housings out of both 3D-printed plastic and CNC-milled aluminium, which each contained a tiny brushless motor, an electric speed controller, a microcontroller, and a small rechargeable lithium battery.

If you allow for external power, you can make the top itself the rotor of a motor, and drive it from a base. Alternatively, if you levitate your top in a vacuum, it could spin for longer than recorded history.

A device rather resembling a megaphone is lying on a table. The handle is made of black plastic. The horn is made of grey plastic, is hexagonal, and is not tapered. At the back of the horn is an array of silver ultrasonic transducers.

Accurately Aiming Audio With An Ultrasonic Array

When [Electron Impressions] used a powerful ultrasonic array to project a narrow beam of sound toward a target, he described it as potentially useful in getting someone’s attention from across a crowded room without disturbing other people. This is quite a courteous use compared to some of the ideas that occur to us, and particularly compared to the crowd-control applications that various militaries and police departments put directional speakers to.

Regardless of how one uses it, however, the physics behind such directional speakers is interesting. Normal speakers tend to disperse their sound widely because the size of the diaphragm is small compared to the wavelength of the sound they produce; just like light waves passing through a pinhole or thin slit, the sound waves diffract outwards in all directions from their source. Audible frequencies have wavelengths too long to make a handheld directional speaker, but ultrasonic waves are short enough to work well; [Electron Impressions] used 40 kHz, which has a wavelength of just eight millimeters. To make the output even more directional, he used an array of evenly-spaced parallel emitters, which interfere constructively to the front and destructively to the sides. Continue reading “Accurately Aiming Audio With An Ultrasonic Array”

A red-and-blue image of a nebula is shown, shaped somewhat like an eye, with a plume of gas emitting from the center.

Is The Theory Of Special Relativity Wrong?

There’s an adage coined by [Ian Betteridge] that any headline ending in a question mark can be answered by the word “No”. However, Lorentz invariance – the theory that the same rules of physics apply in the same way in all frames of reference, and an essential component of special relativity – has been questioned for some time by researchers trying to unify general relativity and quantum field theory into a theory of quantum gravity. Many theories of quantum gravity break Lorentz invariance by giving photons with different energy levels very slightly different speeds of light – a prediction which now looks less likely since researchers recently analyzed gamma ray data from pulsed astronomical sources, and found no evidence of speed variation (open-access paper).

The researchers specifically looked for the invariance violations predicted by the Standard-Model Extension (SME), an effective field theory that unifies special relativity with the Standard Model. The variations in light speed which it predicts are too small to measure directly, so instead, the researchers analyzed gamma ray flare data collected from pulsars, active galactic nuclei, and gamma-ray bursts (only sources that emitted gamma rays in simultaneous pulses could be used). Over such great distances as these photons had traveled, even slight differences in speed between photons with different energy levels should have added up to a detectable delay between photons, but none was found.

This work doesn’t disprove the SME, but it does place stricter bounds on the Lorentz invariance violations it allows, about one and a half orders of magnitude stricter than those previously found. This study also provides a method for new experimental data to be more easily integrated into the SME. Fair warning to anyone reading the paper: the authors call their work “straightforward,” from which we can only conclude that the word takes on a new meaning after a few years studying mathematics.

If you want to catch up on relativity and Lorentz invariance, check out this quick refresher, or this somewhat mind-bending explanation. For an amateur, it’s easier to prove general relativity than special relativity.


Top image: Crab Pulsar, one of the gamma ray sources analysed. (Credit: J. Hester et al., NASA/HST/ASU/J)

A pair of glass vacuum tubes can be seen on a workbench, each with complex copper structures inside. One is mounted on top of a metal chassis with a motor and some other circuitry visible.

Taking A Look At Variable Vacuum Capacitors

Variable capacitors may be useful, but the air gap that provides their capacitance is their greatest weakness. Rather than deal with the poor dielectric properties of air, some high-end variable capacitors replace it with a vacuum, which presents some obvious mechanical difficulties, but does give the resulting capacitor a remarkable quality factor, high-voltage performance, and higher capacitance for plate area than their air-gapped brethren. [Shahriar] of [The Signal Path] managed to acquire a pair of these and took a detailed look at their construction and performance in a recent video.

Continue reading “Taking A Look At Variable Vacuum Capacitors”