Arduino Ultrasonic Sensor Light Switcher

by Austin Wang in Circuits > Arduino

278 Views, 1 Favorites, 0 Comments

Arduino Ultrasonic Sensor Light Switcher

Arduino Light Switcher
IMG_0905.JPG

Hey guys, today I am going to make a light switcher. Some times I have things in my hand, and I don't have an extra hand to turn on the light, and it becomes an awkward situation. So I decide to make a light switcher that can help me turn on the light without touching the controller. And here is how I do it...

Material

1 Arduino board (I use Leonardo, you can use Uno or others too)

1 breadboard

1 ultrasonic sensor

1 servo motor (I use S03T STD)

10+ jump wire

Circuit

Screen Shot 2020-05-30 at 6.05.43 PM.png

Now to the circuit part, you can just follow the circuit instruction above. These jump wire's position is changeable. You can change the position of the pin but then you'll have to change the code either, so if you can, don't change it.

Code

The detail of the code is written in the code (sorry for the bad English).

Downloads

The Controller

IMG_0906.JPG

The switch for the light is a bit different in my house, we use a remote controller like TV. So if your light switch is on the wall, you can attach the servo on the wall.

Make It Look Better

IMG_0907.JPG

We all agreed that we want our room to look beautiful and organized. So you can cover the circuit with a box to make it look better.

Run It!

Arduino Light Switcher

After assembling all the things and put the servo on the controller, you can run it now. You can see in the video that you just have to walk by it and the ultrasonic sensor will sense you and the servo will help you open the light! Convenient, right?