IR Relay Control
![sensor - 5.jpg](/proxy/?url=https://content.instructables.com/FBK/4NY1/L6C6Y9VJ/FBK4NY1L6C6Y9VJ.jpg&filename=sensor - 5.jpg)
This project shows a simple way to detect a near object (like a model train passing) and activate a relay.
Supplies
![sensor - 1.jpg](/proxy/?url=https://content.instructables.com/F2V/XSLO/L6C6Y9VD/F2VXSLOL6C6Y9VD.jpg&filename=sensor - 1.jpg)
5 volt relay module
IR detector module
![sensor - 2.jpg](/proxy/?url=https://content.instructables.com/FFX/AUY4/L6C6Y9VG/FFXAUY4L6C6Y9VG.jpg&filename=sensor - 2.jpg)
![sensor - 4.jpg](/proxy/?url=https://content.instructables.com/FAT/K8KF/L6C6Y9VI/FATK8KFL6C6Y9VI.jpg&filename=sensor - 4.jpg)
Make sure the little yellow jumper is placed close to the "L" end (the IR sensor goes low when it detects an object).
![sensor - 3.jpg](/proxy/?url=https://content.instructables.com/FR0/2Y2E/L6C6Y9VH/FR02Y2EL6C6Y9VH.jpg&filename=sensor - 3.jpg)
![sensor - 7.jpg](/proxy/?url=https://content.instructables.com/FV8/J2ID/L6C6Y9VL/FV8J2IDL6C6Y9VL.jpg&filename=sensor - 7.jpg)
Connect according to this schematic. The power supply used is 5 volts dc. The small blue potentiometer can be turned to adjust sensitivity.
![sensor - 6.jpg](/proxy/?url=https://content.instructables.com/F8A/XXS9/L6C6Y9VK/F8AXXS9L6C6Y9VK.jpg&filename=sensor - 6.jpg)
![sensor - 5.jpg](/proxy/?url=https://content.instructables.com/FZE/WWUZ/L6C6YAM9/FZEWWUZL6C6YAM9.jpg&filename=sensor - 5.jpg)
When the object is close, the relay will close (note the small red light on the relay module). When the object is not close, the relay will open.