Skip to main content

✔ DIY LED STUDY LAMP | ARDUINO TUTORIAL





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

Popular posts from this blog

HOW TO MAKE A ROBOTIC BIRD | FLAPPING MECHANISM | GEARBOX DESIGN | ORNIT...

The following video aims at designing the flapping wing mechanism for a robotic bird (Ornithopter). The robotic bird can be controlled with a Remote Control. The design is made in solidworks software and the motion study of the mechanism is also done on the same software.

��HOW TO INTERFACE IR SENSOR WITH ARDUINO | VISITOR COUNTER | ARDUINO TUT...

(via  https://www.youtube.com/watch?v=lkbPh8IV1t HELLO EVERYONE. TODAY WE WILL LEARN HOW TO INTERFACE IR SENSOR WITH ARDUINO AND HOW TO MAKE VISITOR COUNTER WITH IT.  TO START WITH, AN IR SENSOR HAS 3 PINS, NAMELY FOR VCC, GND, AND DATA. THROUGH THE DATA PIN, WE TAKE IN THE INPUT AND DETECT WHETHER THESE IS SOME OBSTACLE IN FRONT OR NOT. IR SENSOR WORKS ON THE PRINCIPLE OF REFLECTION OF LIGHT WAVES. BY USING THE DIGITAL READ FUNCTION, WE CAN READ THE VALUE OF INPUT TO BE 1 OR 0, AND DO COMPUTATION ACCORDINGLY. TO MAKE THE PROJECT THE COMPONENTS REQUIRED ARE: 1. ARDUINO 2. LCD MODULE. 3. IR SENSOR MODULE. 4. BREAD BOARD. 5. POTENTIOMETER. 6. RESISTORS. 7. CONNECTING WIRES. CONNECTIONS: FOR LCD CONNECTION, YOU CAN VISIT MY PREVIOUS VIDEO AT:  https://youtu.be/Li-ZkPfosvE NOW CONNECT THE DATA PIN OF THE IR SENSOR TO THE ANALOG PIN A0, OF THE ARDUINO. NOW YOU CAN PERFORM BOTH DIGITAL AND ANALOG READ FUNCTION ON THIS PIN, DEPENDING UPON YO...

��HOW TO MAKE DOOR LOCK SYSTEM USING ARDUINO | ARDUINO TUTORIALS | INTERF...

HELLO EVERYONE, TODAY WE WILL LEARN HOW TO MAKE A DOOR LOCK SYSTEM USING ARDUINO, KEYPAD, LCD, AND A SERVO MOTOR. TO BEGIN WITH, LET'S HAVE A LIST OF COMPONENTS THAT WE REQUIRE FOR THIS PROJECT: 1. ARDUINO MEGA. 2. LCD MODULE. 3. KEYPAD MODULE. 4. BUZZER. 5. RGB LED. 6. BREADBOARD. 7. CONNECTING WIRES. 8. RESISTORS. 9. POTENTIOMETER. ONCE, THE COMPONENTS ARE COLLECTED, WE NEED TO SETUP THE CIRCUIT, AS PER THE SCHEMATICS GIVEN IN THE VIDEO. ALSO YOU CAN SETUP INDIVIDUAL COMPONENTS LIKE 1. LCD: https://youtu.be/Li-ZkPfosvE 2. KEYPAD: https://youtu.be/nex5usOycSM 3. RGB LED: https://youtu.be/NLr56HLcWWk 4. SERVO MOTORS BY VISITING THE CORRESPONDING LINKS GIVEN ABOVE. AFTER THE CIRCUIT IS COMPLETE, YOU NEED TO UPLOAD THE CODE: #include<Keypad.h> // KEYPAD LIBRARY FOR KEYPAD INTERFACING #include<LiquidCrystal.h> // LIBRARY FOR LCD INTERFACING #include<Servo.h>// LIBRARY FOR SERVO MOTOR //#include<String.h> #define buzzer 10 // DEFININ...