DEV Community

Tile Saw Lab
Tile Saw Lab

Posted on

Logging Power Tool Amp Draw Spikes with an ESP32 and Python Pandas

In my previous post, I modeled how motor load affects diamond blade rim speed (SFPM) using theoretical torque drop factors. Theoretical models are a great baseline, but real-world porcelain cutting is messy—especially during plunge cuts or when hitting dense material pockets.

To replace estimates with actual telemetry, I built a non-invasive current-logging rig using an ESP32 and a split-core current transformer (CT) sensor, then wrote a Python pipeline to clean the inductive noise.

1. Hardware Setup: Non-Invasive Current Sensing

Cutting into a 120V/240V power tool cord is a terrible idea, especially around a wet tile saw. Instead, I clamped a SCT-013-030 (30A/1V) non-invasive split-core current sensor around the isolated hot wire using a short breakout extension cord.

Key wiring notes for the ESP32 ADC:

  • DC Biasing: Because the SCT-013 outputs an AC voltage wave ($\pm 1\text{V}$), I used a simple voltage divider (two $10\text{k}\Omega$ resistors) plus a $10\mu\text{F}$ decoupling capacitor to shift the signal center to 1.65V so the ESP32's 12-bit ADC (0–3.3V) could read both halves of the waveform.
  • Sampling Rate: Standard 60Hz AC requires sampling well above the Nyquist limit. I configured the ESP32 loop to sample at 1,000 Hz and compute Root Mean Square (RMS) amperage every 200ms, streaming timestamped CSV rows over Serial.

2. Filtering Inductive Motor Noise in Python

Induction and universal motors generate heavy electrical noise and high inrush spikes at startup. Raw CSV logs from the bench test looked jagged, making it difficult to isolate steady-state cutting load from startup surges.

Here is the Python script using pandas and scipy to apply a rolling median filter and segment the test run into three phases: Idle, Inrush Surge, and Active Cut.

import pandas as pd
import numpy as np

# Load raw ESP32 serial telemetry log
df = pd.read_csv("saw_bench_run_04.csv")  # columns: timestamp_ms, rms_amps

# 1. Smooth high-frequency inductive spikes using a 5-sample rolling median
df["filtered_amps"] = df["rms_amps"].rolling(window=5, center=True).median().bfill().ffill()

# 2. Classify operational states based on amperage thresholds
def classify_state(amps: float) -> str:
    if amps < 1.5:
        return "Off / Standby"
    elif amps > 18.0:
        return "Startup Inrush"
    elif amps > 6.5:
        return "Active Porcelain Cut"
    else:
        return "No-Load Spin"

df["state"] = df["filtered_amps"].apply(classify_state)

# 3. Summarize average current draw per phase
summary = df.groupby("state")["filtered_amps"].agg(
    duration_sec=lambda x: round(len(x) * 0.2, 1),
    mean_amps=lambda x: round(x.mean(), 2),
    peak_amps=lambda x: round(x.max(), 2)
).reset_index()

print(summary.to_markdown(index=False))
Enter fullscreen mode Exit fullscreen mode

3. What the Bench Data Revealed

Running this pipeline across multiple test cuts highlighted a clear pattern:

  • Startup Inrush: Universal motors spiked up to 22.4A for roughly 0.6 seconds—a critical metric if you are running a saw on a standard 15A household circuit breaker.
  • Thermal Drift: On continuous 24-inch rip cuts through 10mm porcelain, steady-state current climbed by ~14% over 15 seconds as friction increased.

I am compiling these cleaned telemetry charts and circuit-load benchmarks into the hardware comparison database at Tile Saw Lab so DIYers and contractors can check real amp-draw profiles before buying.

Next Step: Automating Chart Generation

Right now, I am manually exporting Markdown tables and static SVG plots from Python into my static site build. Next up, I plan to automate the CSV-to-JSON ingestion step using a GitHub Action so new bench runs publish automatically.

For anyone building data-heavy static sites, do you prefer pre-rendering SVG charts at build time or rendering lightweight JSON on the client?

Top comments (0)