<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[M5Stack Reflective IR Sensor Always Reads 0]]></title><description><![CDATA[<p dir="auto">Issue: M5Stack Reflective IR Sensor Always Reads 0</p>
<p dir="auto">Environment:</p>
<p dir="auto">Device:M5Stack Basic<br />
Board: LilyGO T-Display (ESP32-D0WDQ6-V3)<br />
Sensor Module: M5Stack Reflective IR<br />
Development Environment:<br />
Arduino IDE (ESP32 board configuration)<br />
M5Unified library<br />
Wiring:<br />
VCC → 5V (or 3.3V)<br />
GND → GND<br />
Analog OUT → GPIO36 (VP)<br />
Digital OUT → GPIO26<br />
Problem:<br />
The M5Stack Reflective IR sensor is connected properly, but when reading the analog value using analogRead(36), the result is always 0 and does not change.</p>
<p dir="auto">What I Have Tried:</p>
<p dir="auto">Checked Serial Monitor Output (Baud Rate: 115200 bps)</p>
<p dir="auto">Used Serial.println(analogRead(36));<br />
The value remains 0 at all times.<br />
Tested with Hand in Front of Sensor</p>
<p dir="auto">Expected the analog value (0-4095) to change.<br />
No change in the output.<br />
Checked Sensor Wiring</p>
<p dir="auto">VCC is correctly connected to 5V (or 3.3V).<br />
GND is properly connected to GND.<br />
Analog OUT is connected to GPIO36 (ESP32 ADC pin).<br />
The wiring appears to be correct.<br />
Measured Voltage with Multimeter</p>
<p dir="auto">VCC-GND voltage: 5V (or 3.3V) → OK<br />
Analog OUT-GND voltage: 0V → No change even when hand is placed in front of the sensor.<br />
Tried a Minimal Test Code:</p>
<p dir="auto">void setup() {<br />
Serial.begin(115200);<br />
analogReadResolution(12);  // Set ADC to 12-bit<br />
pinMode(36, INPUT);<br />
}</p>
<p dir="auto">void loop() {<br />
int analogValue = analogRead(36);<br />
Serial.println(analogValue);<br />
delay(500);<br />
}<br />
Still always reads 0.<br />
Checked Digital Output (GPIO26)</p>
<p dir="auto">Used digitalRead(26), but the output remains LOW at all times.<br />
Seems like the sensor is not responding at all.<br />
Tested on Another ESP32 Board (M5Stack Basic)</p>
<p dir="auto">Same issue: Analog OUT remains 0 at all times.<br />
Possible Causes:</p>
<p dir="auto">Sensor might be defective since Analog OUT is always 0V.<br />
ESP32 ADC issue, but tested on another board with the same result.<br />
Incorrect voltage supply, but tested with both 5V and 3.3V without any difference.<br />
Questions:</p>
<p dir="auto">Is it normal for the M5Stack Reflective IR sensor's Analog OUT to stay at 0V?<br />
If adjusting the sensitivity (potentiometer) does not change the output, could this indicate a defective sensor?<br />
Are there any additional debugging steps I should try?<br />
I would appreciate any insights from anyone who has experience with this sensor. Thank you!</p>
]]></description><link>https://community.m5stack.com/topic/7279/m5stack-reflective-ir-sensor-always-reads-0</link><generator>RSS for Node</generator><lastBuildDate>Sat, 09 May 2026 14:51:35 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/7279.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 09 Feb 2025 14:56:47 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to M5Stack Reflective IR Sensor Always Reads 0 on Wed, 12 Feb 2025 15:34:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/shinshin8" aria-label="Profile: shinshin8">@<bdi>shinshin8</bdi></a> You must ignore that the Arduino IDE reports lilygo boards and select your own Core from the drop down. The IDE is just trying to be helpful, but is always wrong, just ignore it and select the correct board from the drop down list in the little window here:<img src="/assets/uploads/files/1739373850129-1600.jpg" alt="1600.jpg" class=" img-fluid img-markdown" /></p>
<p dir="auto">Also questions:<br />
Are you using this example:<br />
<a href="https://github.com/m5stack/M5Unit-ReflectiveIR/blob/main/examples/detect.ino" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/m5stack/M5Unit-ReflectiveIR/blob/main/examples/detect.ino</a>?</p>
<p dir="auto">Have you tried adjusting the sensitivity trim pot full scale, CW, CCW?</p>
<p dir="auto">Your hand may not reflect enough IR.</p>
<p dir="auto">The output is active low, so you should see 0Vdc when a reflective object is in the path. ADC will output 0 digital, Off as well.</p>
]]></description><link>https://community.m5stack.com/post/28184</link><guid isPermaLink="true">https://community.m5stack.com/post/28184</guid><dc:creator><![CDATA[teastain]]></dc:creator><pubDate>Wed, 12 Feb 2025 15:34:29 GMT</pubDate></item><item><title><![CDATA[Reply to M5Stack Reflective IR Sensor Always Reads 0 on Wed, 12 Feb 2025 05:18:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/teastain" aria-label="Profile: teastain">@<bdi>teastain</bdi></a><br />
I followed your instructions and set the board to <strong>M5Core</strong>, installed the <strong>CH9102_VCP_SER_Windows.exe</strong> driver, but the port still displays as <strong>"LilyGO T-Display"</strong>.</p>
<p dir="auto">I also checked the <strong>IR LED using the iPhone 13 mini front camera</strong>, but I couldn’t see any infrared light.</p>
<p dir="auto">Do you have any suggestions for further troubleshooting?</p>
<p dir="auto"><img src="/assets/uploads/files/1739337469371-22e8c480-2155-4749-a9d9-a019e851bcc9-image-resized.png" alt="22e8c480-2155-4749-a9d9-a019e851bcc9-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/post/28178</link><guid isPermaLink="true">https://community.m5stack.com/post/28178</guid><dc:creator><![CDATA[shinshin8]]></dc:creator><pubDate>Wed, 12 Feb 2025 05:18:07 GMT</pubDate></item><item><title><![CDATA[Reply to M5Stack Reflective IR Sensor Always Reads 0 on Mon, 10 Feb 2025 20:48:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/shinshin8" aria-label="Profile: shinshin8">@<bdi>shinshin8</bdi></a> said in <a href="/post/28163">M5Stack Reflective IR Sensor Always Reads 0</a>:</p>
<blockquote>
<p dir="auto">Board: LilyGO T-Display (ESP32-D0WDQ6-V3)</p>
</blockquote>
<p dir="auto">What do you mean 'Board: LilyGO T-Display (ESP32-D0WDQ6-V3)'<br />
What version of Arduino IDE are you using?<br />
Are you using this example:<br />
<a href="https://github.com/m5stack/M5Unit-ReflectiveIR/blob/main/examples/detect.ino" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/m5stack/M5Unit-ReflectiveIR/blob/main/examples/detect.ino</a></p>
<p dir="auto">Later edit:<br />
Is the IR LED turned on?<br />
You can use a phone camera to observe near IR.<br />
Have you tried adjusting the sensitivity trim pot full scale, CW, CCW?<br />
Your hand may not reflect enough IR.<br />
The output is active low, so you should see 0Vdc when a reflective object is in the path. ADC 0Vdc as well.<br />
<img src="/assets/uploads/files/1739220398019-screenshot-2025-02-10-at-3.45.54-pm-resized.png" alt="Screenshot 2025-02-10 at 3.45.54 PM.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/post/28165</link><guid isPermaLink="true">https://community.m5stack.com/post/28165</guid><dc:creator><![CDATA[teastain]]></dc:creator><pubDate>Mon, 10 Feb 2025 20:48:46 GMT</pubDate></item></channel></rss>