The following video shows how to make a mini Study lamp using SMD LED and Arduino. It is of great importance for Student who have to study late night during exam without disturbing others. So they can easily make one such Night Lamp at home.
The components required are:
1. Mica Sheet.
2. Servo Motor/
3. LDR Sensor.
4. Arduino.
5. Connecting Wire.
6. PCB Plate.
7. Soldering IRON.
8. Solder Wire.
9. Bi-cycle Spoke.
10. Super Glue.
Procedure:
1. Cut Two pieces of 2.5 * 3 cm in size and also cut-off PCB of same size.
2. Now, solder the SMD Led onto the PCB Plate and make all cathodes common and all anodes common and connect them to two different pins.
3. Now, paste the pcb with the mica sheet using double side tape.
4. Now, for making stand, take mica sheet and cut of parts as shown in video, as per your requirement of height.
5. After attaching all components together, your NIGHT LAMP is ready. Now you need to connect the circuit.
Circuit Arrangement:
1. Make the VCC and GND of Servo Motor, LED's and LDR Sensor common.
2. Now Connect the Signal pin of Servo Motor to pin number 9 of Arduino Mega.
3. Connect the Data pin of LDR Sensor to pin number 4 of arduino mega.
4. Connect the VCC of LED's with the pin number 3 of Arduino.
Now with the completed circuit, you now need to code the arduino to make the project run. For that , Copy and paste the following code onto your arduino IDE and then upload it on your Arduino board.
Code:
#include<Servo.h>
Servo myservo;
#define led_active 3 // pin for lighting the led
#define sensor 4// pin for photo sensor
void setup() {
myservo.attach(9); // attaching servo motor
pinMode(3,OUTPUT);
pinMode(4,INPUT);// defining mode of pins
}
void loop() {
while(digitalRead(sensor)== 0 )// while there is darkness
{
myservo.attach(9);
myservo.write(90);
delay(500);
myservo.detach();
digitalWrite(led_active,HIGH); // light the leds.
delay(1000);
delay(1);
}
myservo.attach(9); // else off leds.
myservo.write(1);
delay(1500);
myservo.detach();
digitalWrite(led_active, LOW);
delay(100);
delay(1);
}// thank you. please subscribe channel for more projects. :)
After the code is uploaded, your project is ready to run.
Enjoy Studying using the Night Lamp you just created, don't forget to subscribe the channel for more exciting projects. Till then byee and happy learning. :)
Comments
Post a Comment