iiOTESP32 Brasil
Contingency mode: public pages and downloads remain available; login, community, and server data may be unavailable.
Back to project list
IntermediateIIoT applicationCompleted

Industrial production counter with ESP32

Real-time piece-counting system with an inductive optical sensor, hardware/software debounce and production-speed calculation.

#ESP32#Interrupções C++#Hardware Debounce#MQTT

Communication and architecture flow

24 V inductive sensorPC817 optocouplerESP32 interruptMQTTProduction dashboard

Industrial challenge / problem:

Manufacturing lines without automation lose visibility into hourly production rates and depend on manual entries.

Technical solution developed:

An inductive sensor connected to an optoisolated ESP32 input records fast pulses through external interrupts and sends data to the management system.

Project component list:

  • ESP32 DevKit
  • PNP M12 inductive sensor
  • PC817 optocoupler module

Expected result in operation:

Accurate piece counting without lost pulses up to 5,000 pieces per minute.

Open the tutorial

Open the tutorial

Install the environment, assemble the circuit, compile and validate it—with the complete firmware and PDF manual available to download.

Open the tutorial