Skip to main content
PicoScope 5000D FlexRes and a LISN wired into a pytest-driven EMC pre-compliance bench at an Indian electronics lab

PicoScope + pytest: An Automated EMC Pre-Compliance Framework for Indian Labs

GSAS Editorial · · 9 min read

Chamber Time Is the Bottleneck: Pre-Compliance Is the Fix

Every Indian electronics team that has ever shipped a CE, BIS, or CDSCO-certified product knows the same pain: an accredited EMC chamber costs serious money per day, and a failed first visit is devastating to the release schedule. A typical Pune-area EV motor controller team booking a 3-day slot at a Bengaluru or Chennai accredited lab cannot afford to discover on day one that their power-factor-correction stage is pumping third-harmonic current ten decibels over the IEC 61000-3-2 Class A limit. By the time the design team iterates a fix and returns to the chamber, the product launch has slipped a quarter. The standing answer Indian labs have converged on is a bench pre-compliance workflow built around Pico Technology PicoScope hardware and a Python test framework.

The discipline that breaks this cycle is EMC pre-compliance: a repeatable, low-cost measurement bench that approximates the accredited chamber closely enough to catch the big failures on the R&D bench, before you burn a chamber booking. Traditionally this has been a manual activity, a technician hunched over an oscilloscope, manually sweeping a LISN and recording harmonic amplitudes into a notebook. That workflow does not scale when you have 15 SKUs, four product revisions, and a continuous firmware cadence that can change the EMC signature overnight.

This post walks through how Indian EMC pre-compliance labs are wiring PicoScope hardware into a pytest + pyPicoSDK framework that automates the pre-screen of the most common IEC 61000 test cases. It is a domain-specific extension of the general framework covered in our earlier pyPicoSDK + pytest post, if you have not read that one, start there; it establishes the fixtures, folder layout, and CI integration that this post builds on.

What You Can Reasonably Pre-Screen on a PicoScope Bench

The full list of IEC 61000 tests an accredited chamber will run on your product is long. Most of it, radiated emissions above 1 GHz, ESD immunity, radiated immunity, genuinely needs a chamber and specialized antennas. But a surprising amount can be pre-screened on a conducted-emissions bench built around a PicoScope, a LISN, a differential probe set, and Python.

The tests that automate cleanly into a pytest suite:

  • IEC 61000-3-2 harmonic current emissions. Line-current FFT decomposed into integer harmonics of 50 Hz, compared to the Class A/B/C/D limits published in the standard. This is the single most common failure mode for Indian consumer-electronics and LED-lighting products, and it is almost entirely predictable from the front-end PFC topology.
  • IEC 61000-3-3 voltage flicker and fluctuation. A longer-duration recording of the line RMS voltage under varying DUT load, with a flicker-meter model implemented in Python per the standard’s weighting curves.
  • CISPR 11 / CISPR 32 conducted emissions pre-screen (150 kHz – 30 MHz). FFT of the LISN measurement port under swept operating conditions, compared to the quasi-peak and average limits.
  • IEC 61000-4-5 surge immunity waveform validation. Capture of the combination-wave surge generator’s output under a calibrated load and verification that it matches the 1.2/50 μs voltage and 8/20 μs current waveshapes within tolerance.
  • IEC 61000-4-11 voltage dip and short interruption immunity. Capture of the line voltage envelope during programmable dip events and validation that the DUT remains operational, glitches predictably, or resets cleanly as specified.

None of these automated pre-screens produces a legally-defensible compliance report on its own, that is the accredited lab’s job. But they catch the 80% of failures that would have wasted a chamber booking, and they do it on a bench that already exists in the R&D lab.

The Hardware Side: PicoScope Recommendations by Test

Different pre-compliance tests lean on different PicoScope families. The framework is agnostic, pytest fixtures hide the scope model behind a common interface, but the physics of the measurement pushes you toward specific hardware:

  • IEC 61000-3-2 harmonics and 61000-3-3 flicker: The PicoScope 5000D FlexRes at 14 or 16-bit resolution is the right tool. Harmonic amplitudes at the 40th harmonic of 50 Hz (2 kHz) are typically 40 – 60 dB below the fundamental, so you want the dynamic range that hardware resolution gives you. Bandwidth of 60 MHz is more than enough for line-harmonic work; the extra resolution is where the FlexRes family earns its place.
  • Three-phase line current measurement: The PicoScope 4444 with the PicoConnect 442 attenuating differential probe accessory delivers 1000 V CAT III isolation per channel for direct line-voltage capture across all three phases. Four 14-bit differential inputs at 20 MHz bandwidth is the exact specification for 3-phase harmonic and flicker work on Indian industrial mains. Note: the CAT III rating applies to the probe chain, the probe accessory is what earns the rating, not the scope input alone.
  • Conducted emissions 150 kHz – 30 MHz: The PicoScope 6000E at 300 MHz or 500 MHz is overkill on bandwidth but exactly right on memory depth. A CISPR conducted-emissions pre-screen wants a deep FFT with fine resolution-bandwidth, and the 6000E’s 4 GS memory (on the top configurations) gives you that without stitching multiple captures together.
  • Surge and dip immunity waveform validation: The PicoScope 5000D again, 14-bit resolution, up to 512 MS memory, bandwidth sized for the 1.2/50 μs surge rise time. A 100 MHz model handles the fastest surge edges without aliasing.

The common thread: Indian pre-compliance work rewards resolution and memory depth more than raw bandwidth. Most of the test signals live below 30 MHz. The FlexRes and 4000A families punch well above their weight in this regime.

Folder Layout for an EMC Pre-Compliance pytest Suite

Building on the structure from our general pyPicoSDK + pytest post, an EMC pre-compliance suite adds domain-specific test modules and a limits/ directory that encodes the IEC tables as data:

emc-precompliance/
├── conftest.py               # session fixtures: PicoScope, LISN, diff probes
├── lib/
│   ├── __init__.py
│   ├── picoscope_helpers.py  # scope abstraction
│   ├── lisn_helpers.py       # LISN switch control, band selection
│   ├── harmonics.py          # IEC 61000-3-2 harmonic analysis
│   ├── flicker.py            # IEC 61000-3-3 flicker meter model
│   ├── conducted.py          # CISPR conducted-emissions FFT + QP detector
│   ├── surge.py              # IEC 61000-4-5 waveform validation
│   └── reporting.py          # pytest-html + JUnit XML + PDF summary
├── tests/
│   ├── test_iec_61000_3_2_harmonics.py
│   ├── test_iec_61000_3_3_flicker.py
│   ├── test_cispr_conducted_emissions.py
│   ├── test_iec_61000_4_5_surge.py
│   └── test_iec_61000_4_11_dip.py
├── limits/
│   ├── iec_61000_3_2_class_a.yaml
│   ├── iec_61000_3_2_class_c.yaml
│   ├── cispr_32_class_b.yaml
│   └── ...
├── requirements.txt
└── pytest.ini

The limits/ YAML files are the critical piece, they encode the IEC tables as data rather than hard-coded thresholds in Python. When IEC publishes an amendment that tweaks a limit, you change one YAML file instead of hunting through test functions.

Example: Automating IEC 61000-3-2 Harmonic Pre-Screen

Here is what a parameterized harmonic-limit test case looks like:

# tests/test_iec_61000_3_2_harmonics.py
import pytest
from lib.harmonics import measure_line_current_harmonics

@pytest.fixture(scope="module")
def harmonic_limits(test_limits):
    """Load Class A limits from YAML."""
    return test_limits["iec_61000_3_2_class_a"]

@pytest.mark.parametrize("load_condition", [
    "rated_load",
    "half_load",
    "standby",
])
def test_odd_harmonics_class_a(scope_ready, harmonic_limits, load_condition, dut):
    """Verify odd harmonics 3-39 against IEC 61000-3-2 Class A limits."""
    dut.set_load(load_condition)
    waveform = scope_ready.capture_line_current(
        duration_s=2.0,
        sample_rate_hz=50_000,
    )
    harmonics = measure_line_current_harmonics(
        waveform,
        fundamental_hz=50,
        harmonic_range=range(3, 40, 2),
    )
    for h, measured_a in harmonics.items():
        limit_a = harmonic_limits[f"h{h}"]
        assert measured_a <= limit_a, (
            f"Harmonic {h} at {load_condition}: "
            f"{measured_a:.3f} A exceeds limit {limit_a:.3f} A"
        )

Three parameterizations (rated, half, standby) × 19 odd harmonics = 57 discrete pass/fail results reported to pytest-html and the JUnit XML feed. When a Hyderabad LED-driver team runs this against a new firmware drop, a regression in the PFC control loop shows up as a specific failed harmonic in a specific load condition, not as a hand-waved “EMC looks worse now”.

Flicker, Conducted Emissions, and Surge Validation

The same pattern extends to the other tests:

  • Flicker (test_iec_61000_3_3_flicker.py): Long-duration RMS capture during programmatic DUT load transitions, fed through a Python implementation of the IEC flicker-meter weighting curves. Short-term flicker severity Pst is computed and compared to the standard’s limit.
  • Conducted emissions (test_cispr_conducted_emissions.py): Segmented FFT of the LISN output across the 150 kHz – 30 MHz band, with a quasi-peak detector model applied to each resolution bin and the result plotted against the CISPR 32 Class B envelope. Failures are reported as “bin N exceeds limit by X dB”.
  • Surge validation (test_iec_61000_4_5_surge.py): The DUT is replaced with a calibrated load, and the PicoScope captures the surge generator’s output waveform. The test validates rise time, duration, and peak amplitude against the 1.2/50 μs voltage / 8/20 μs current envelope.
  • Dip and interruption (test_iec_61000_4_11_dip.py): The test bench programs the mains-source to generate a dip event, and the PicoScope captures both the mains envelope and the DUT’s operating state (via a status GPIO or a measured rail). The test passes if the DUT either rides through or recovers within the standard’s specified time.

Indian Context: Who Needs This Most

Indian engineering organizations with the highest ROI on automated EMC pre-compliance:

  • Solar inverter OEMs in Gujarat and Rajasthan shipping grid-tied equipment under BIS. Harmonic compliance under IEC 61000-3-2 / IEEE 1547 is a day-one release gate.
  • EV component teams in Bengaluru, Pune, and Chennai: charger, BMS, and traction-inverter groups all face AIS-004 and related ARAI requirements that lean heavily on conducted emissions and surge immunity.
  • Medical device makers filing with CDSCO: IEC 60601-1-2 is the binding EMC standard, and its conducted-emissions and immunity requirements map directly onto the pre-screen suite above.
  • Industrial automation and drive makers in Maharashtra and Gujarat under BIS and IEC 61800-3 for power drive systems.
  • Consumer-electronics and LED-lighting teams in Delhi NCR, Noida, and Mumbai shipping at volume under BIS and CE, where IEC 61000-3-2 Class C/D limits are the single most common pre-compliance failure.

None of these teams will replace their accredited chamber visit, that remains legally necessary. But every one of them can save multiple chamber bookings per year by catching the loud failures on the pre-screen bench first.

Instrument Recommendation

  • Entry pre-compliance bench (one product, one engineer): PicoScope 5000D FlexRes at 14-bit resolution, plus a basic LISN and a current clamp.
  • Professional pre-compliance bench (multi-SKU R&D lab): Add the PicoScope 4444 with the PicoConnect 442 probe accessory for 3-phase line measurements at 1000 V CAT III isolation.
  • Full-stack pre-compliance bench (EMS/manufacturing line, CM lab): Add the PicoScope 6000E for deep-memory conducted-emissions FFT across the full CISPR band.

All three build against the same pyPicoSDK and pytest framework.

Further Reading

GSAS Micro Systems is India’s authorized engineering partner for Pico Technology. Our EMC pre-compliance advisory, PicoScope hardware, and pyPicoSDK framework support is available from our Bengaluru, Chennai, Hyderabad, Delhi NCR, Mumbai, and Pune offices.

Interested in Pico Technology tools?

Talk to our application engineers for personalized tool recommendations.

Stay in the Loop

Get monthly compliance updates, product insights, and engineering best practices delivered to your inbox.