Arduino Automatic Night Lamp

by Vivian Chang in Circuits > Arduino

178 Views, 0 Favorites, 0 Comments

Arduino Automatic Night Lamp

截圖 2020-05-28 上午12.11.08.png
截圖 2020-05-28 上午12.18.59.png

Do you ever feel lonely and scared when you were just a little kid, about 5 or 6 years old, and you have to sleep alone? On the other hand, you are too lazy to remember to turn on the night lamb every time your room is dark. Also, considering the issue of global warming, it wouldn't be a good idea to always turning the light up. The automatic night lamp can solve the problem and consideration you are struggling with; determining the light of the environment and turn up in when you're suffering from the lonely in the dark. If it's already in the morning of tomorrow, yet you are still asleep, it will be a great function for the lamp of closing automatically to save the electricity. The blue light gives people an atmosphere of calm and relaxing mood, protecting you from the darkness while providing you a great night.

Prepare Materials

Materials need for the Circuit

  • Arduino Uno x1
  • Breadboard x1
  • Jumper Wires x1
  • Resistors 10k Ohm x1
  • Resistors 100 Ohm x1
  • LED light (blue) x1
  • LDR sensor x1

Other materials

  • Paper box as the base of your lamp
  • Wax
  • Soldering Appliance

Code

截圖 2020-05-27 下午10.13.49.png
截圖 2020-05-27 下午10.15.05.png

The code is here.

The first picture is the setting up of Serial print. Then the second picture is about the main program we have for the product.

Downloads

Start Assembling!

截圖 2020-05-27 下午11.22.16.png
截圖 2020-05-28 上午12.10.52.png
截圖 2020-05-28 上午12.10.20.png
截圖 2020-05-28 上午12.10.45.png

Follow the circuit picture above or follow the instruction below:

Sensor:

  1. Connect 5v to the positively charged line (+)
  2. Connect GND to the negatively charged line (-)
  3. Assemble the part of the LDR sensor, which doesn't matter which leg you connected them with (remember to use the resistor of 100 Ohm)

LED Light:

  1. DPin 8 as the positive side and connected with the longer leg of the LED light
  2. Connect the negatively charged line to the resistor of 10k Ohm
  3. Adding another wire to connect with the shorter leg of the LED light

Appearance

截圖 2020-05-28 上午12.10.37.png
截圖 2020-05-28 上午12.11.08.png

As an official product, the appearance has to be creative and unique too. Therefore, I decided to use wax to make a ball-like lamp cover, which is hollowed inside and with a matte surface. After finishing the ball-shape cover for the light, it's time to open space, or a tunnel, for the light and LDR sensor to be placed inside the cover. By using the soldering appliance, we can successfully open a hole at the bottom of the ball.

Congratulation!

Arduino Night Lamp

Congratulation!!! All the work is done, you get a brand new night lamp and you can change the light with different colors by making the lamp by yourself.