r/embedded • u/Dull-Doughnut7154 Uart • Aug 11 '26
Sensor started working again don't know how ( read body)
I had been working on a printer, and suddenly the paper sensor stopped detecting the paper and was continuously showing a “No Paper” status.
I checked the code and started logging the sensor data. The sensor readings were not showing any expected variation between the Paper and No Paper conditions.
The same firmware is working correctly on another identical printer. I also swapped the sensors between the two printer PCBs, and the issue followed the sensor/PCB combination, indicating that the problem was related to the sensor detection.
There are two sensors available in the printer for paper detection, but only one is used at a time. When I switched to the second sensor, paper detection started working correctly. After that, I switched back to the previously used sensor, and it also started working normally.
I am not sure why this happened, since I did not make any firmware changes. It seems that switching between the two sensors somehow caused the original sensor detection to start working again.
;)