In this CD4017 project, I have shown how to make a motion sensor light using the E18-D80NK IR proximity sensor and CD4017 IC.
You can use this motion-activated light circuit as an automatic washroom light switch. I have not used any microcontroller or Arduino for this 4017 IC project.
When anyone enters the washroom the IR proximity sensor senses the motion and turns on the washroom light.
After that, when he or she exits the washroom, the IR sensor again senses the motion and turns off the light automatically.
Here, each time the IR proximity sensor detects any motion, it sends the clock pulse to CD4017 IC. Then the 4017 IC changes the previous state of PIN 2.
You can also control the light with manual switch.
Circuit of the Motion Sensor Light Switch
How the Motion Sensor Circuit works
- The IR proximity sensor continuously emits infrared. When any object comes within the range, some amount of infrared reflects from the object’s surface and that reflected infrared can be detected by the IR proximity sensor.
- When any motion detects, the output pin (connected with the base of BC557 PNP transistor) of the IR proximity sensor becomes LOW. So the BC557 PNP transistor turns ON.
- The clock pin (Pin-14) of CD4017 IC is connected with the Emitter of the BC557 transistor. So when any motion is detected, the 4017 IC receives a clock pulse and changes the current state of Pin-2.
- The Pin-2 of CD4017 is connected with the base of the BC547 NPN transistor, So when the Pin-2 becomes high the transistor turns on.
- When the transistor turns on, the current can flow through the relay coil. So the load connected with the relay also turns on.
- When the IR LEDs detect any motion the second time, it sends the next clock pulse to CD4017 IC. Then the Pin-2 becomes low.
- If the Pin-2 becomes low, the transistor turns off, and accordingly, the load connected with the relay also turns off.
PCB Layout of the Motion Sensor Switch
Please download the PCB layout, then print it on the A4 page.
Please check the PCB size while printing, it should be the same as mentioned in Layout.
Required Components for this 4017 Project:
1) CD4017 IC
2) BC557 PNP Transistor
3) BC547 NPN Transistor
4) 100uF 25V Capacitor
5) 1000uF 25V Capacitor
6) 220-ohm 0.25watt Resistors – 3 no
7) 1k 0.25watt Resistor
8) 10k 0.25watt Resistor
9) LEDs 5mm – 2no
10) E18-D80NK IR proximity sensor
11) 1N4007 Diode
12) 5V SPDT Relay
13) HLK-PM01 5V AC to DC converter
14) Connectors & IC Base
Tutorial Video on Motion Sensor Light Switch
In this tutorial video, I have explained all the steps to make the homemade PCB for the LED chaser light circuit. To make the PCB I have used an acrylic sheet.
But you can also download the PCB Gerber file for this project, and order the custom design PCB for this CD4017 IC project.
PCB for this Motion Sensor Light Switch
You can also order the custom design PCB for this electronics project from PCBWay.
About PCBWay and their services
- PCB Prototyping and Manufacturing
PCBWay not only produces FR-4 and Aluminum boards, but also advanced PCB like Rogers, HDI, Flexible, and Rigid-Flex boards, at a very reasonable price.
For the online instant quote page please visit – pcbway.com/orderonline
Inspect your Gerber file before placing the order – OnlineGerberViewer
- PCB assembly
The SMT & THT assembly starts from only $30 with the free stencil and free worldwide shipping.
The components can be sourced and provided by us, or by the clients themselves
Rough quote online – pcbway.com/pcb-assembly
Testing the IR Proximity Motion Sensor Switch
While testing the circuit, whenever the IR Proximity sensor detects any object nearby, the RED LED turns ON, and toggles the current state of the relay. The Green LED is the indicator for the relay.
Connect the Motion Switch with Toilet Light
Please refer to the above circuit diagram to connect the motion switch circuit with the AC supply, switch, and AC lamp.
Please take proper safety precautions while working with high voltage.
Please share your feedback on this mini-project and also let me know if you have any queries.
You can also subscribe to our newsletter to receive more such useful electronics projects through email.
I hope you have liked this electronics project, Thank you for your time.