HX711 Stress Test

Static README snapshot; an interactive deployment can be added later.

HX711 Stress Test

ESP-IDF firmware plus a Python plotter for sweeping an ESP32 test clock into eight HX711s and logging the resulting ADC stability.

On ESP32 this project generates the test clock on GPIO18 with LEDC high-speed PWM. The default sweep covers 10 MHz through 30 MHz in 100 kHz requested steps. Raw 80 MHz clock-out is not generated on GPIO18 because ESP32's internal clock-output peripheral is restricted to IO0/IO1/IO3 in ESP-IDF 5.5.

Wiring

Default pins in `main/main.c`:

| Signal | ESP32 pin |

| --- | --- |

| LEDC test clock | GPIO18 |

| HX711 DOUT0..7 | GPIO4, GPIO13, GPIO14, GPIO16, GPIO17, GPIO19, GPIO21, GPIO22 |

| Shared HX711 SCK | GPIO5 |

Connect ESP32 ground to HX711 ground. Tie all eight HX711 `SCK` pins together to GPIO5. Connect each HX711 `DOUT` pin to its own ESP32 GPIO listed above. Feed the generated GPIO18 clock into the clock point you are testing on your HX711 setup.

Firmware

From an ESP-IDF shell:

idf.py set-target esp32
idf.py build
idf.py -p COM5 flash monitor

The firmware prints CSV rows:

channel,requested_freq_MHz,actual_freq_MHz,mean,stddev,outliers,stuck,valid,read_errors
0,10.0000,10.0000,-12345.67,12.34,2,0,1000,0

Each tested frequency now emits eight rows, one per HX711 channel, after a synchronized parallel read cycle.

To adjust the sweep, edit `SWEEP_START_HZ`, `SWEEP_STOP_HZ`, `SWEEP_STEP_HZ`, or `HX_DOUT_PINS` in `main/main.c`.

If you want raw sample lines for FFT plots, set `EMIT_RAW_SAMPLES` to `1` in `main/main.c` and rebuild. Raw rows are tagged as `RAW:<channel>:<value>`.

Plotter

Install host dependencies:

python -m pip install -r requirements.txt

Run the live plotter:

python tools/plot_hx711.py --port COM5

The plotter writes `hx711_sweep.csv` and updates live graphs for standard deviation, outliers, and read errors for all eight channels.