EQ-18 · Flame sensor
See how the infrared sensor responds
An infrared sensor with an adjustable threshold for classroom light-detection experiments.

How to use it
You’ll need: ESP32-S3, IR flame sensor module, jumpers, and an ordinary infrared TV remote if available.
Connections
This example uses one part at a time on the MoloWorks ESP32-S3. If a course uses different GPIO pins, follow that course’s wiring and code together. Disconnect USB and any external power before changing wires.
| On the part | Connect to |
|---|---|
| Module VCC | ESP32 3V3 |
| Module GND | ESP32 GND |
| Module DO | ESP32 GPIO5 (digital input) |
| Module AO (optional) | ESP32 GPIO4 (ADC1) |
- Start with the module at 3.3 V. Check the output level before connecting DO and record its state in the room with no test source.
- Try aiming a nearby infrared TV remote at the sensor and pressing a button. Adjust the trimmer in small steps if needed. Compare the module indicator and the console while moving the remote closer or farther away.
- Room light and different remote controls can change the result. Keep the sensor away from open flame and heat. Use this as an infrared experiment; it is not a fire alarm.
MicroPython example
Run this on the board with your MicroPython editor. Set up the ESP32-S3 first if you don’t have a working connection.
from machine import Pin
from time import sleep_ms
ir = Pin(5, Pin.IN)
idle = ir.value()
print("idle:", idle)
for _ in range(100):
changed = False
for _ in range(100):
if ir.value() != idle:
changed = True
sleep_ms(1)
if changed:
print("IR threshold changed")What to look for: A suitable infrared source can change DO. If the remote does not trigger it, check the room-light baseline, trimmer and remote type before judging the sensor.
AI prompt
Copy the prompt and replace any brackets with details from your kit. Check the suggested wiring against the labels on your parts before applying power.
See how the infrared sensor responds
I have the MoloWorks IR flame sensor module powered at 3.3 V with DO on GPIO5 of a MicroPython ESP32-S3. Design a short experiment using ambient light and, if suitable, a TV IR remote. Show how to measure idle, catch a change, and adjust the trimmer. Keep the experiment away from open flame and explain why a threshold change is not reliable fire detection.