WSAL12224 – Infrared Proximity Sensor/en
Erscheinungsbild
Documentation notice: This technical documentation was independently rewritten from an archived supplier source. Check technical details and commands against the product version and manufacturer documentation before use.
Summary
Technical overview of the Waveshare infrared proximity sensor (WSAL12224): operating principle, specifications, pinout and wiring for Pico, STM32 and Arduino.
Related products at JW Tech
Technical overview
- Operating principle: An IR LED emits infrared light; an IR receiver converts reflected light into an electrical signal. The LM393 comparator outputs a digital signal and a green LED indicates detection status.
- Power supply: 3.3 V to 5 V via the VCC pins.
- Dimensions: 39 mm × 15.5 mm (including the IR LED); mounting holes are 3 mm in diameter.
- Detection range: approximately 2 cm to 30 cm, depending on the obstacle's color; a white object gives the longest range.
- Detection angle: 35°.
- Recommended environment: indoor use, avoid direct sunlight.
- Pinout: 1 DOUT (digital output), 2 AOUT (analog output), 3 GND, 4 VCC (3.3–5 V).
- Sensitivity adjustment: The onboard potentiometer knob sets the effective detection distance; the default is about 5 cm.
Commands and examples – verify before use:
sudo apt-get install p7zip-full
cd ~
sudo wget https://files.waveshare.com/upload/0/05/Infrared_Proximity_Sensor_Demo.7z
7z x Infrared_Proximity_Sensor_Demo.7z -o./Infrared_Proximity_Sensor_Demo
cd ~/Infrared_Proximity_Sensor_Demo/Pico/c/build/
cmake ..
make -j9
cp main.uf2 /media/pi/RPI-RP2/
Notes and version constraints
- The URLs present in the source material were included only as command-line commands; their validity must be verified before execution.
- The Pico guide assumes flashing MicroPython firmware over USB; the exact firmware version may be version-sensitive – human confirmation required.
- The STM32 examples are based on STM32F103RBT6 or STM32H743; other STM32 boards require custom porting and adjusted pin mapping.
- The Arduino examples target the Arduino UNO; compatibility with other boards must be checked separately.
- The stated default range of about 5 cm is a reference value and can vary with the surface of the detected object.
- No safety, certification, or warranty claims are present in the source; such statements must not be added.
Source and revision record
- Infrared Proximity Sensor - Waveshare Wiki
- Source revision: 70266
- Captured: 2026-08-30T03:20:28+00:00
- SHA-256:
57f28d16b783964b805e728164e6f9c8181864ac7b81199cf828b0f5bd624126