This project was part of the Lane Tech HS Physical Computing Lab course. I created this project as part of the Home Automation / IoT project.
The goal of this project is to make a lamp that turns on/off with a IR Break Beam and Blynk. The IR Break Beam makes an "invisible light switch", and Blynk makes the lamp IOT. Any light can be used since the relay is connected to an extension cord.Testing the IR Break Beam Sensor
When something passes between the emitter and the receiver, the 'beam is broken.' One downside is the it only works up to 25cm / 10". If I was to do this project again I would consider using a PIR sensor for a longer range, and I wouldn't have to worry about lining up a emitter to a receiver.
1 / 2 • IR Breakbeam with LED
To set up Blynk I created a new project and added a button. Once I set the button to the right pin I was able to control the LED from my phone, in addition to the IR Breakbeam.
Extension cord connected to relay
I decided to keep all the components hidden inside a box, and have the IR Break Beam on top of the box so that everything is one piece. The box has 2 holes; one for each end of the extension cord
Issues / What I Learned / Change for Next time
My main problem that I faced with this project was the IR Break Beam Sensor. It was really difficult to make sure that the emitter and receiver were lined up. I think a PIR sensor would have worked better because it is 1 piece and has a farther range.
During this project I learned a lot about relays. The only issue I found with the relay was that the LED would turn on, but the relay wouldn't click. To fix this I has to make sure all the wire connections were secure, and that the extension cord was screwed in tight enough.
final product being tested with fan