Writing Your Own FFT in Python and STM32
Tutorial Alexander Ross Tutorial Alexander Ross

Writing Your Own FFT in Python and STM32

In this post, we’ll be diving into the process of writing our own custom Fast Fourier Transform (FFT) implementation from scratch. The FFT is a foundational algorithm in digital signal processing, used to convert time-domain signals into their frequency-domain representation. While many libraries and tools offer ready-made FFT functions, coding one yourself is a great way to build a deeper understanding of how it works under the hood.

I’ll start by lightly covering a bit of the theory but try and discuss implementing the algorithm itself in more detail. From there, we’ll jump into writing the code in Python, which allows us to test and visualize the results quickly. Then, we’ll bring it down to the hardware level by implementing the same FFT logic on an STM32 microcontroller, where things like memory usage and performance really start to matter.

The goal here isn’t to create the fastest or most optimized FFT, but to build something simple.

Read More
Cooking LTspice with Python
Tutorial Alexander Ross Tutorial Alexander Ross

Cooking LTspice with Python

Did you know that you can use Python to automate and improve your workflow when simulating circuits in LTspice? It’s surprisingly straightforward, and it opens up a wide range of possibilities. LTspice is a powerful and free SPICE simulator that has been a staple in the electronics world for years, but it hasn’t seen many major updates or modern integrations. That’s where Python comes in.

By combining LTspice with Python, you can script your simulations, sweep parameters, analyze results, and even generate plots automatically. Whether you’re running repetitive simulations, batch processing netlists, or just want to organize your results more effectively, Python can save you time and reduce errors.

In this post, I’ll walk through how to set up a simple Python script that runs an LTspice simulation, extracts data from the raw output files, and displays results in a clean, customizable way. It’s a great way to bring new life to an old but dependable tool, and it can be a game-changer if you’re doing a lot of circuit simulation work.

Read More
Numerically Controlled Oscillator in Python and STM32
Tutorial Alexander Ross Tutorial Alexander Ross

Numerically Controlled Oscillator in Python and STM32

In this post, I’ll cover the basics of creating a Numerically Controlled Oscillator (NCO) from the ground up. An NCO is a digital signal generator that uses a phase accumulator and a waveform lookup table to produce precise, periodic signals—usually sine, square, or triangle waves. These waveforms are generated entirely in the digital domain, making NCOs extremely useful in systems where analog components are limited or where digital precision is required.

NCOs are widely used in a variety of applications, including digital communications, frequency synthesis, software-defined radio (SDR), and audio signal generation. Their ability to generate stable, tunable frequencies with minimal hardware makes them a valuable tool in embedded and signal processing systems.

We’ll begin by modeling the NCO in Python. This lets us explore and visualize the underlying concepts like phase resolution, tuning words, and waveform table indexing without worrying about hardware limitations. Once the behavior is well understood, we’ll transition to implementing the NCO in C on an STM32 microcontroller, where we’ll focus on efficient fixed-point arithmetic and real-time constraints.

Read More
Seriously, Make Your Own Symbols & Footprints
Alexander Ross Alexander Ross

Seriously, Make Your Own Symbols & Footprints

In this post, I’ll highlight the two main problems with using premade symbols and footprints - whether they come from built-in software libraries (like those in Altium Vault or KiCad) or are downloaded from the internet. While it might seem like a time-saver, it’s often much more reliable to create your own. Most datasheets provide detailed and accurate information to help you build correct symbols and footprints with minimal effort.

If you still choose to use premade components, make sure to thoroughly review every symbol and footprint yourself. A quick check now can save you days of debugging and a lot of wasted time and money down the line.

Read More
FFT with Python
Tutorial Alexander Ross Tutorial Alexander Ross

FFT with Python

In this post, I’ll walk through the basics of creating and plotting a discrete-time signal, then show how to analyze it in the frequency domain using the Fast Fourier Transform (FFT). Understanding how a signal behaves in both the time and frequency domains is a key skill in digital signal processing, and the FFT is one of the most powerful tools for doing that.

We’ll start by building a simple signal in Python, visualize it, and then compute its frequency spectrum. From there, we’ll run into a common and sometimes confusing issue called spectral leakage. It’s an important concept that affects how you interpret frequency-domain plots, especially when working with real-world signals. To address spectral leakage, we’ll introduce windowing, a technique that tapers the edges of the signal before performing the FFT. We’ll explore a few popular window types, understand how they work, and see their effects through practical examples.

This post is meant to be hands-on and applied.

Read More
Using Spyder with Python Virtual Environment
Tutorial Alexander Ross Tutorial Alexander Ross

Using Spyder with Python Virtual Environment

In this post, I’ll walk you through how I set up my Spyder IDE to use a Python virtual environment and enable interactive plots with ipympl.

Spyder is a great IDE for scientific and engineering applications in Python - especially if you're coming from a Matlab background. Its interface closely resembles Matlab, making it easier to work with arrays, matrices, and plots compared to something like Visual Studio Code. This is particularly helpful when analyzing data during debugging or after your code runs.

Read More