Smart Wall Lamp (That Swivels and Changes Shades Controlled by Your Smart Phone

by devamparmar000 in Workshop > Lighting

1203 Views, 11 Favorites, 0 Comments

Smart Wall Lamp (That Swivels and Changes Shades Controlled by Your Smart Phone

Screenshot_20201119-180110_Video_Player-01-02[1].jpeg

Hello and welcome back ;

As I like fiddling with leds and basically we all like leds to some extent . The main part where the leds come into picture is Home Decor and to go even deeper Wall Lamps .

But what if we can control Wall lamps with our smart phone change the color anytime and rotate to any desired degree .

SO HANG ON THIS ARTICLE IS FOR YOU !!!

And I will fulfill every requirements mentioned above .

SO LETS START THE BUILD.

FIRST WATCH THE VIDEO !!

🎊SMART LAMP🎊 ( swivels and Shades on smart phone command)

FOR better understanding watch the video !!! FIRST

BUILDING THE ENCLOSURE - 1

Screenshot_20201119-211516_Video_Player[1].jpg
Screenshot_20201119-211536_Video_Player[1].jpg
Screenshot_20201119-211633_Video_Player[1].jpg
Screenshot_20201119-211741_Video_Player[1].jpg
Screenshot_20201119-211758_Video_Player[1].jpg

First lets start with the enclosure for wall lamp I took around 6 old useless so called use and throw pens the adjusted the scale at the middle point around 6.5cm marked the point then repeated the process for the remaining ones .

Then started ripping them apart as per the markings .

BUILDING THE ENCLOSURE - 2

Screenshot_20201119-211824_Video_Player[1].jpg
Screenshot_20201119-211842_Video_Player[1].jpg
Screenshot_20201119-211855_Video_Player[1].jpg

Then I took a 5mm thick plywood marked a square of around 7cm* 7cm leaving some margin for the pens to fit in and started slaughtering it apart

After that was complete I placed 4 of the pieces of earlier cut pens on the plywood piece and then glued them together firmly !!

BUILDING THE ENCLOSURE - 3

Screenshot_20201119-211935_Video_Player[1].jpg
Screenshot_20201119-211949_Video_Player[1].jpg
Screenshot_20201119-212008_Video_Player[1].jpg

Then I replicated the same process for another 4 pen structure glued them together and took the distance measurement between the top and the bottom before fixed all the pens in a cubical structure .

I glued pillars between the top and bottom squares and well the enclosure of the lamp was complete and would be not an exact cube but somewhere between cube and cuboid .

BASE OF THE LAMP

Screenshot_20201119-212047_Video_Player[1].jpg
Screenshot_20201119-212123_Video_Player[1].jpg
Screenshot_20201119-212143_Video_Player[1].jpg

Heading towards the base of the lamp which has to be sturdier and firm so that the lamp does not fall of the wall

And instead of wall lamp become a mere lamp LOL!!

Anyways I had cut the wooden pieces earlier and then took a small piece of sand paper and started furnishing the surface as well as the sharpening the edges .

FIXING THE SERVO MOTOR

Screenshot_20201119-212155_Video_Player[1].jpg
Screenshot_20201119-212213_Video_Player[1].jpg
Screenshot_20201119-212232_Video_Player[1].jpg
Screenshot_20201119-212331_Video_Player[1].jpg

Now the question arises which motor to use for angle control and the best choice seem to be Servo motor and even better is a heavy duty one like MG995.

Servos are widely used for angle control due to their closed loop control .

Then took a circular blade fixed it with the screw tightly at the top . Marked the position exactly at the center drilled a hole and glued it firmly and then checked the distance between the side plates and motor so the microcontroller fits perfectly inside .

WRAPPING ACRYLIC SHEET

Screenshot_20201119-212432_Video_Player[1].jpg
Screenshot_20201119-212448_Video_Player[1].jpg
Screenshot_20201119-212455_Video_Player[1].jpg
Screenshot_20201119-212514_Video_Player[1].jpg

Then I cut a small piece of wood fixed it on the servo motor which will rotate our lamp .

Fixed the lamp enclosure on it . So it looks good now .And now it was time to use some wrapping for our enclosure .

So I took a acrylic sheet marked according to the dimensions of lamp enclosure and fragmented some pieces of acrylic sheet .

BASE READY!!!!

Screenshot_20201119-212520_Video_Player[1].jpg

After tapping and gluing everything together the mechanical build was complete

DEGREE / ANGLE CONTROL TESTING

Screenshot_20201119-212536_Video_Player[1].jpg
Screenshot_20201119-212544_Video_Player[1].jpg
Screenshot_20201119-212611_Video_Player[1].jpg

You can see in the pictures as well as in the video that the test is successful and it covers the entire degree range from 0 to 180 degree which will be perfectly suited for wall lamps .

With this feature you can adjust wall lamp at any desired degree remotely without touching it !!!

ELECTRONICS USED

Screenshot_20201119-212623_Video_Player[1].jpg
Screenshot_20201119-212637_Video_Player[1].jpg
Screenshot_20201119-212645_Video_Player[1].jpg

let's dive into the electronics

To make it automated the main role is played by the HC-05 Bluetooth module which will use a serial communication to communicate with our smart phone and controlling unit is obviously an arduino.

BUILDING THE APP

Screenshot_20201119-212659_Video_Player[1].jpg
Screenshot_20201119-212708_Video_Player[1].jpg

The application build here in is easy to interpret and does not require any rocket science .

The application is the same as the one in my earlier article as well as earlier video which you can understand by watching it . Anyways there is one change there is an enhanced feature of degree control . We can adjust the lamp to 30 45 90 120 150 or 180

FIXING THE RGB LEDS

Screenshot_20201119-212719_Video_Player[1].jpg
🎊PERFECT DIWALI DECORATION🎊Shades🎨 Using Sierpinski's 🔺️triangle🔺️smart phone📲

Then inside the enclosure we will fix some RGB leds and wire all the red blue and green together according to the wiring scheme in my previous video !!

ENJOY THE SHADES

Screenshot_20201118-213817_Video_Player[1].jpg
Screenshot_20201119-180121_Video_Player[1].jpg
Screenshot_20201119-211342_Video_Player[2].jpg
Screenshot_20201119-211410_Video_Player[1].jpg
Screenshot_20201119-211416_Video_Player[1].jpg

SO now the last test which is shade adjustment test also works fine !!!

PROGRAMMING PART

#include

Servo butServo;

const int redPin = 3; const int bluePin = 6; const int greenPin = 5; char color = 0;

void setup() { // put your setup code here, to run once: butServo.attach(9); butServo.write(0); pinMode(redPin,OUTPUT); pinMode(bluePin,OUTPUT); pinMode(greenPin,OUTPUT); Serial.begin(9600);

analogWrite(redPin,0); analogWrite(bluePin,0); analogWrite(greenPin,0);

}

void loop() { // put your main code here, to run repeatedly: if(Serial.available()>0){ color = Serial.read(); char value = char(color); if(value != '0') { Serial.println(value); } }

if(color == 'Y'){ analogWrite(redPin,0); analogWrite(bluePin,255); analogWrite(greenPin,0); } if(color == 'W'){ analogWrite(redPin,0); analogWrite(bluePin,0); analogWrite(greenPin,0); } if(color == 'R'){ analogWrite(redPin,0); analogWrite(bluePin,255); analogWrite(greenPin,255); } if(color == 'P'){ analogWrite(redPin,0); analogWrite(bluePin,80); analogWrite(greenPin,70); } if(color == 'O'){ analogWrite(redPin,0); analogWrite(bluePin,255); analogWrite(greenPin,90); } if(color == 'M'){ analogWrite(redPin,0); analogWrite(bluePin,0); analogWrite(greenPin,255); } if(color == 'C'){ analogWrite(redPin,255); analogWrite(bluePin,0); analogWrite(greenPin,0); } if(color == 'G'){ analogWrite(redPin,255); analogWrite(bluePin,255); analogWrite(greenPin,0); } if(color == 'B'){ analogWrite(redPin,255); analogWrite(bluePin,0); analogWrite(greenPin,255); } if(color == ':'){ butServo.write(30); delay(250); } if(color == ';'){ butServo.write(45); delay(250); } if(color == '<'){ butServo.write(90); delay(250); } if(color == '='){ butServo.write(120); delay(250); } if(color == '>'){ butServo.write(150); delay(250); } if(color == '?'){ butServo.write(180); delay(250); } }

FINAL WORKING

Screenshot_20201119-211350_Video_Player[1].jpg
Screenshot_20201119-211443_Video_Player[1].jpg
Screenshot_20201119-211451_Video_Player[1].jpg
Screenshot_20201118-213808_Video_Player[1].jpg
Screenshot_20201119-211416_Video_Player[1].jpg
Screenshot_20201119-211342_Video_Player[1].jpg

ALL IN ALL THIS WALL LAMP IS VERSATILE ROBUST AND EASY TO BUILD HAS MANY FEATURES LIKE ANGLE ADJUSTMENT AND COLOR ADJUSTMENT USING YOUR SMART PHONE AND SOME COOL LOOK FOR HOME DECOR!!!!

THANY YOU FOR READING IF YOU LIKE THE ARTICLE FOLLOW ME ON YOUTUBE AND SUBSCRIBE TO MY CHANNEL