I pushed my firmware and my analysis notebook to Github.

The repository is here.
https://github.com/kbob/ESP32_Fan_Analysis

The Jupyter notebook that created the upthread graphs is here.
https://github.com/kbob/ESP32_Fan_Analysis/blob/bb9b301058848362991cbcb2453ec73eb7901afd/src/fan%20analysis.ipynb

#FanSpeed #Jupyter #YourBiggestFan

GitHub - kbob/ESP32_Fan_Analysis: Control a fan with PWM, read its tach, analyze and filter the tach output.

Control a fan with PWM, read its tach, analyze and filter the tach output. - kbob/ESP32_Fan_Analysis

GitHub

Let's find those bands and see what's up. I analyzed both the half speed and full speed runs, as they both show the banding clearly.

The space between bands is 813-824 clocks, or 97-98 KHz. I can only guess why they're different.

If I understand Nyquist correctly, I can down sample my traces to 200 KHz and not lose any resolution.

#FanSpeed #Jupyter #YourBiggestFan

My next hypothesis is that the tach signal is not a direct measurement of some analog signal but is generated by the fan controller and is quantized by the controller's clock.

So let's switch from looking at RPM to looking at intervals. This graph shows the same data, but the Y axis is the interval between edges, measured in ESP32 APB clocks (80 MHz). There are two pulses per fan revolution, so I've colored the two pulses differently.

#FanSpeed #Jupyter #YourBiggestFan

I re-plotted the half speed run, calculating speed using the intervals between rising edges and the intervals between falling edges. These plots show both, all in one color. (Maybe I should have colorized them again.)

The small bands gaps are gone. There are still bands, but they're evenly spaced.

#FanSpeed #Jupyter #YourBiggestFan

So what's going on with that banding? I calculated the time difference between every two tach edges and plotted them all together.

Hypothesis: There are four edges per rotation. Maybe the edges are not spaced exactly 90° apart.

Here, I've colored the bands for the constant speed runs. You can see that the rising edges are in one set of bands and the falling edges are in the others. So that's solved.

#FanSpeed #Jupyter #YourBiggestFan

Anyway, there's more to come. Now that I've gotten the raw trace buffers slurped in and sanitized and figured out how to plot them, I can start applying some filters. I also know exactly how noisy the tach signal is.

I won't speculate yet about the speed banding in the constant speed tests or the initial humps, but I do have thoughts...

#ESP32 #Jupyter #YourBiggestFan

Entdecken Sie den Text des Liedes “Your Biggest Fan” von Never Shout Never
#NeverShoutNever #YourBiggestFan
https://daletra.top/never-shout-never/liedtexte/your-biggest-fan.html
Your Biggest Fan - Never Shout Never

I'm a real big fan of yours. But I'm quite the joke to you. But girl it wasn't a joke when you. Kissed me in your room and replied. "I love you too".

DaLetra
Scopri il testo della canzone “Your Biggest Fan” di Never Shout Never
#NeverShoutNever #YourBiggestFan
https://daletra.online/never-shout-never/testi/your-biggest-fan.html
Your Biggest Fan - Never Shout Never

I'm a real big fan of yours. But I'm quite the joke to you. But girl it wasn't a joke when you. Kissed me in your room and replied. "I love you too".

DaLetra
Sehen Sie den Text des Liedes “Your Biggest Fan” von Never Shout Never
#NeverShoutNever #YourBiggestFan
https://daletra.top/never-shout-never/liedtexte/your-biggest-fan.html
Your Biggest Fan - Never Shout Never

I'm a real big fan of yours. But I'm quite the joke to you. But girl it wasn't a joke when you. Kissed me in your room and replied. "I love you too".

DaLetra