AUTOMATED DESK LAMP

by devamparmar000 in Circuits > Electronics

1682 Views, 8 Favorites, 0 Comments

AUTOMATED DESK LAMP

20201006_120355-01[1].jpeg

Those who work frequently on Laptop and computers as well as read books more often need to have a desk lamp handy . So In this Article I will tell your how I created my own Automated Desk Lamp .So lets get started with the build .

And One More thing If you want to make related projects go visit my channel on YouTube : GO ELECTRONICS

GO ELECTRONICS

IDEA OF BUILDING THIS PROJECT

Screenshot_20201011-155036_Video_Player[1].jpg
Screenshot_20201011-155043_Video_Player[1].jpg

A Couple of days ago I was cleaning my room and I found something Rather Interesting . It was this desk lamp but it had one drawback it had to adjusted manually . So I thought Why Not to create an AUTOMATED DESK LAMP. And Power it with some Bright LEDS instead of using an AC bulb .

But this works just awesome and is very bright and useful as well as cost effective and creative . SO let's delve into the building of it step by step.

CREATING a 3D MODEL

20201011_160048[1].jpg
20201011_160829[1].jpg
20201011_160911[1].jpg
20201011_160943[1].jpg
20201011_161017[1].jpg

As this idea was a weird one and before breaking or shaking anything I started with building A 3D MODEL first and then made it more concrete .

First of all I started with the base as it has to firm as well as bulky so that the lamp does not fall of as there will be a lot of angular movements .

The big Dilemma was which motor to use can it be any dc motor or I have to use some precise motor type .

Then I decided to use 2 sg90 servo motors for precise angle measurement and angular position arrangement .The first servo motor fits between the base and the first arm which sets the angular movement of the first arm.
And the second servo motor fits between the first arm and the second arm where the light is connected.

Light is nothing but a simple bottle cap with 4 LEDS adjusted radially,

3D Printing or Wood Cutting

20201011_162314[1].jpg
20201011_162510[1].jpg

First I thought maybe I should 3D print the model which would save me much time and effort but not having a 3D printer and not having a perfect source for 3D printing I thought maybe I could just 3mm Thick Plywood and Cut it using My HAND SAW.

BUILDING THE BASE

20201006_111900[1].jpg
20201006_112337[1].jpg
20201006_114431[1].jpg

First of all I carved a not so good looking base and drilled a hole of around 5 mm in diameter for wiring and then fixed the first servo motor on the base plate . And then fixed that on the base with some added support at the back.

Gluing them all together with some two component adhesive which made it firm as well as secure.

and then we were ready to build the arms of the lamp

ADDING THE ARMS

20201006_112402[1].jpg
20201006_112411[1].jpg

After making the base firm I joined both the arms together with a servo motor in between which could flexibly move but it is good idea to add a rubber band because all the load falls between the first arm and the second arm .

and now finally it was time to add our last component which were the LEDS.

FITTING THE LEDS

20201011_163928[1].jpg

SO the final step of our mechanical build was drilling six holes radially and fixing the LEDS inside it .

Looks like I am not good at counting you might think . Only 4 leds and 5 holes ........

Yes 6 holes 4 for leds and 2 for wiring .

And now finally our mechanical build was complete .lets look at the software and the components used.

COMPONENTS USED

20201011_165505[1].jpg
20201011_165517[1].jpg
20201011_165527[1].jpg
sg90-.jpg

First and foremost the brain of the circuit is obviously an Arduino

so lets look at the list of components :

1. Arduino

2. 2 Potentiometers

3. Breadboard

4. 2 Sg90 Servo motor (you can use any)

5. LEdS

6. 3mm Plywood

7. Wires

DIAGRAM AND CODE

20201011_165538[1].jpg

Now lets look at the diagram

As you all know Arduino has a 10Bit ADC so first of all . The potentiometer 1 gives a analog signal A1 of Arduino when we rotate its knob and Potentiometer 2 gives signal to A2 of Arduino which is a 8 bit signal or 0-255 Then Arduino's ADC converts 8Bit analog Signal to 10Bit Digital Signal or what we call a PWM signal which drives the servo motor which monitors the angle due to is close loop system and moves the arm according to the feedback.

CODE :

#include

Servo servo1; Servo servo2;

int Servo1 = A0; int Servo2 = A1;

int ledPin = 6; void setup() { // put your setup code here, to run once: Serial.begin(9600); servo1.attach(10); servo2.attach(11);

pinMode(ledPin,OUTPUT); }

void loop() { // put your main code here, to run repeatedly: int x = analogRead(A0); Serial.print(" X Value :"); Serial.print(x); Serial.print(" "); int xMapped = map(x,0,1023,0,180); servo1.write(xMapped); delay(20); int y = analogRead(A1); Serial.print(" Y Value : "); Serial.print(y); Serial.println(" "); int yMapped = map(y,0,1023,0,180); servo2.write(yMapped);

if( y >= 250){ digitalWrite(ledPin,HIGH); } else{ digitalWrite(ledPin,LOW); } }

CODE is rather simple on and self explanatory.

FINALLY THE WORKING

AUTOMATED ROBOTIC DESK LAMP!!!!

FOR THE WORKING YOU CAN GO AND VISIT MY CHANNEL .

YOU CAN W+EVEN AUTOMATE IT MORE BY USING A BLUETOOH MODULE AND CONTROLLING IT VIA A SMARTPHONE
BUT THAT'S A TOPIC FOR ANOTHER ARTICLE SO TILL THEN SEE YOU AND PLEASE DON'T FORGET TO VISIT MY CHANNEL.

FINAL WORKING OF THE PROJECT : GO ELECTRONICS