Skip to content
Back to skills

Esp32 Industrial Analog Io

ASecurity

Use when connecting 4–20 mA loops, 0–10 V transmitters, industrial analog inputs, analog outputs or protected field wiring to ESP32.

  • 16 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 7, 2026
ai-agentsnodeapi

Works with

  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 7, 2026

npx -y skills add Esmail-sarhadi/esp32-agent-skills --skill esp32-industrial-analog-io --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Esp32 Industrial Analog Io?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Esp32 Industrial Analog Io
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/esmail-sarhadi-esp32-industrial-analog-io/badge)](https://www.skillsdirectory.com/skills/esmail-sarhadi-esp32-industrial-analog-io)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: esp32-industrial-analog-io
description: Use when connecting 4–20 mA loops, 0–10 V transmitters, industrial analog inputs, analog outputs or protected field wiring to ESP32.
license: MIT
---

# ESP32 Industrial Analog Io

Industrial analog signals cannot be connected directly to ESP32 GPIO. The design must translate field voltage/current into the ADC input range while controlling fault energy, common-mode voltage, noise and calibration error.

## 4–20 mA input

- Choose a precision shunt resistor from the required voltage span and ADC range. For example, 150 Ω produces 0.6–3.0 V across 4–20 mA; verify power, tolerance and fault current before using it.
- Add input protection and filtering based on the loop supply and fault model. A field wire may be miswired to a higher voltage.
- Decide whether the loop is passive or active and whether the ESP32 node supplies loop power.
- For long cable runs or ground potential differences, consider an isolated loop receiver.

## 0–10 V input

- Use a resistor divider plus buffer/protection designed for the maximum credible fault voltage, not just 10 V nominal.
- Include resistor tolerance, temperature coefficient, ADC input impedance, sampling capacitor and source impedance in the error budget.
- Clamp/protect without allowing clamp current to exceed component or GPIO ratings.
- Verify negative transients and common-mode conditions; a divider alone is not isolation.

## ADC and calibration

- Select the ADC unit and pins for the exact SoC. ADC behavior, attenuation and usable range differ across ESP32 families.
- Use calibration APIs or an external precision ADC when accuracy matters; raw counts are not engineering units.
- Store per-channel offset/gain with calibration version and CRC.
- Apply filtering only after defining sample rate, response time and rejection requirements.

## Fault handling

- Detect open loop, short circuit, overrange and under-range separately where hardware permits.
- Define a safe output state for sensor failure and stale data.
- Record raw ADC, calibrated value, quality flag and timestamp for diagnostics.
- Never report MQ sensor raw ADC as ppm without a validated sensor model and calibration.

## Verification matrix

| Condition | Verify |
|---|---|
| 4, 12, 20 mA | Accuracy and monotonicity |
| Open loop / short | Fault detection and safe state |
| Maximum input / miswire | No GPIO damage; protection survives |
| Temperature corners | Drift within budget |
| Wi-Fi transmit burst | No unacceptable ADC disturbance |

## Agent rules

- Draw the analog front end and calculate every node voltage before writing firmware.
- State accuracy, range, protection and isolation assumptions.
- Keep calibration separate from display scaling.
- Require bench measurements before claiming industrial suitability.

Files in this skill

  • LICENSE.txt823 B
  • SKILL.md2.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.