FFT: drawing the perfect circle using a bunch of random-length sticks

I came up with the idea of expanding the “PID vs ML” article series to seriously investigate what are the real-world possibilities of augmenting classical PID controllers with self-diagnostics capabilities using FFT (unbalanced motor torque, gearbox damage, bearing faults, etc.).

Of course my nature immediately kicked in. Instead of just slapping FFT onto the PID routines, calling it a day and ticking the ‘done’ box like a normal person, I did what I always do - tore the whole thing apart into pieces and started cursing stupid imperfection of the real computer world (as opposed to that beautiful, clean mathematical fantasy we all pretend exists). We’re talking about a finite number of samples, precision butchered by IEEE 754 float/double quirks, rounding errors that sneak in like uninvited guests, and … You think I’m nitpicking again…? Yeah, probably. My nature. But hold my coffee - I’ve got a perfect real-world example coming right up that shows why sometimes being this pedantic actually saves your ass.

February 23, 2026 · 11 min

Fake chips in production will cost You Your reputation: a real case study + dead simple trics to spot counterfeits

You only get one good name

Letting fake chips slip into production can torch your reputation overnight. You end up buried under endless warranty claims nobody pays for and a legion of seriously pissed-off customers.

Not long ago the entire electronics world was choking on component shortages. Legit distributors quoted lead times stretching 6–12 months. Real choice was simple: shut down production for a year… or hunt for alternatives and roll the dice.

February 13, 2026 · 6 min

Analog Computers – Part 2: No clock. No CPU. No mercy - the analog revival

Hope you had some fun tinkering with that simple analog temperature comparator from the previous part. That circuit was stripped down to the bone – a classic “how to even do linear signal processing with op-amps” example. But the world doesn’t end at a comparator. You can build 4–20 mA → voltage converters, voltage → frequency, even a basic PID… But today let’s zero in on what used to actually be called an analog process computer.

February 5, 2026 · 5 min

Analog Computers – Part 1: From Vacuum Tubes to Op-Amps

To kick off our adventure with analog computing systems, let’s start with a bit of history.

It all began in 1947 when John Bardeen and Walter Brattain built the first working transistor prototype using germanium at Bell Labs. Sidenote: in reality, many labs around the world were working on the concept, so it’s a collective achievement.

The jump from bulky vacuum tubes to tiny transistors was a game-changer - it triggered explosive growth in electronics. The next big milestone came quickly: in 1967 Karl D. Swartzel developed the first operational amplifier - an electronic building block that could perform mathematical operations:

February 4, 2026 · 3 min

„Screw PID, it's for boomers” – challenge accepted (part 3)

As I said in Part 2, I tried to keep it dead simple: how to actually train your own ML model. I know ML purists would call it superficial - but let’s face it: I’m not here to teach you the secrets of deep learning. I want hardware devs to see a real-world way that works on actual silicon – without drowning in theory rabbit holes.
Let’s move on.

From ONNX to C code – let’s see what X-CUBE-AI does with it

Open CubeMX.
Make sure you have X-CUBE-AI installed (the add-on that turns ONNX models into C code – the language the MCU compiler actually speaks). It should show up in the Middleware section. Click “Add network”, name it something like “pid”, switch format from Keras to ONNX, browse to your file, set compression and optimization options, then hit “Analyze”.

January 23, 2026 · 6 min

„Screw PID, it's for boomers” - challenge accepted (part 2)

As menioned in part 1 I wasn’t in the mood for classic Hardware-in-the-Loop (where the model learns to regulate speed entirely on its own), I took a shortcut. I logged several hundred thousand records of the running PID regulator in different conditions:

  • no load
  • constant load
  • ramping load up
  • ramping load down
  • and a few cases in between

All done with simple Python scripts dumping values via UART/DMA. Zero CPU overhead on the MCU side.

January 22, 2026 · 4 min

„Screw PID, it's for boomers” - challenge accepted (part 1)

A few days ago someone casually dropped the line online:
„f%$# PID, that’s good for boomers.”

PID regulation has been the daily bread of process automation for decades. Has something really changed, or are the boomers just stuck in the previous century…?

I’ve been doing electronics for a long time, so that jab hit home. I raised my hand and said: „Challenge accepted. Let’s see.”

test setup

I was already working on a PID regulator for a commercial project. Since commercial projects live and die by price, I picked the cheapest possible MCU that could still do the job: STM32F051 (Cortex-M0, 16 kB Flash). The rest of the hardware: DRV8842 H-bridge driver chip.

My hardware setup for the ML / PID challenge

Hardware setup: DRV8842 driver chip + STM32F051

January 21, 2026 · 3 min

real-time with Raspberry Pi

In the previous post I described a PID controller tested with randomly generated data in a controlled range. The simulation phase is now complete and the results look promising.

Time to move to real hardware: connecting the algorithm to an actual pH probe.

critical requirement: galvanic isolation

Due to very low signal levels and extremely high input impedance of typical pH electrodes, full galvanic isolation between the probe circuitry and the rest of the system is mandatory. Any ground loop or leakage current destroys measurement accuracy.

March 29, 2025 · 3 min

dsp in pid regulators

Recently, I have been developing a PID controller class for my Qt projects. During implementation, I encountered a very interesting problem from the field of signal theory that I believe is worth sharing.

A classic PID controller works in fixed time steps dt. At each step it compares the current process value with the setpoint, considers the previous value and computes the output. And right here the first serious problem shows up - the inertia inherent in real-world measurement system.

March 27, 2025 · 4 min

pushing material beyond their limits: breakdown voltage

Breakdown voltage is a critical parameter in power electronics - it determines whether a device survives high voltage stress or fails catastrophically. Here’s a breakdown of the physics and practical implications.

what is breakdown voltage?

The breakdown voltage (also called withstand voltage) is the maximum reverse voltage a semiconductor device - such as a diode, triac, MOSFET or IGBT power transistor - can withstand across its terminals before it’s blown.

February 28, 2025 · 5 min