DIY Arduino Tutorial: How to Automate a Lamp for Ceremonial Inaugurations

By Ignite Incubation Centre

 

DIY Arduino Lamp

 

“Knowledge removes ignorance, just as light removes darkness”, as it is wisely said. In India, the ancient tradition of lighting oil lamps has a special significance. Almost all auspicious ceremonies are commenced by lighting a lamp. Hence came the idea to merge our traditional culture with the digital world using this DIY Arduino Lamp. We did this by lighting a series of LEDs wirelessly on an oil lamp by using a smartphone app. By doing so, we believe that we are upholding our tradition as well as trying to do something fun and innovative.

 

DIY Arduino Lamp

 

Below are detailed steps of how we controlled a series of LEDs using an Arduino through Bluetooth via a smartphone app. We hope you will be able to spice up your events or ceremonies by using this DIY Arduino Lamp!

Bill of Materials

  1. HC-05 Bluetooth module
  2. LEDs
  3. Connecting wires
  4. Plastic bowl
  5. PVC pipes
  6. Wood (for making the base. you can use any other alternatives too)
  7. Power bank or power source
  8. Arduino Uno
  9. Flowers (for decoration purpose)
  10. Adhesive
  11. MIT app inventor

How Does it Work?

 

DIY Arduino Lamp

 

The way this DIY Arduino Lamp works is pretty simple. A series of LEDs arranged on the lamp lights up when a command/button is pressed in the smartphone application. The Arduino powers the LEDs when the corresponding Bluetooth command is received via the HC-05 Bluetooth module. If you are new to using the HC-05 Bluetooth module, you can check out this Bluetooth Basics tutorial from Mayoogh Girish to get started.

Connecting the Arduino, Bluetooth Module, and LEDs

Follow the connection diagram below to connect everything:

 

DIY Arduino lamp

Creating the Smartphone App

The first step to making your smartphone application is learning how to make an app through the MIT app inventor. You can download the app we made here: Download Application.
An easier way to control the DIY Arduino Lamp is to download the bluetooth terminal app from the play store. Both of them work the same way, the only difference is that by making our own app, we could change its appearance.

I used buttons to turn the LEDs on and off , while in the terminal you will have to type “1” and press send to the LED on and “0” to turn it off. You can see the difference in the picture below.

 

DIY Arduino Lamp

Uploading the Code for Your DIY Arduino Lamp

The Arduino code is very simple. It checks for characters like “1”, “2”, etc through the Bluetooth serial module HC-05. Corresponding LEDs are then turned ON based on each command. This is the code:

int state;
int pin1=8;
int pin2=9;
int pin3=10;
int pin4=11;
int pin5=12;

void setup(){ 
pinMode(8, OUTPUT); 
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
pinMode(12, OUTPUT);
Serial.begin(9600);
}

void loop(){ 
if (Serial.available()>0)
{ 
state = Serial.read();
if(state == '1')
{ 
digitalWrite(8, HIGH);
delay(1000);
state=0;
} 

if(state == '2')
{ 
digitalWrite(9, HIGH);
delay(1000);
state=0;
} 

if(state == '3')
{ 
digitalWrite(10, HIGH); 
delay(1000); 
state=0; 
} 

if(state == '4') 
{ 
digitalWrite(11, HIGH); 
delay(1000); 
state=0; 
} 

if(state == '5') 
{ 
digitalWrite(12, HIGH);
delay(1000);
state=0; 
}
}
}

 

Making the Lamp Stand

We used wooden sheets that were available from our friend’s home to make the lamp stand. We cut four triangles out of it and a square for their base support. Next, we used PVC pipe as the holder for the bowl that holds the LEDs and Arduino. Next, we fixed the wooden sheets together using adhesive with the pipe in middle. You will be able to get a clear idea by referring to the pictures below. After that, you can cover the base with the help of some fancy gift wrapping and color tape. Next, take a simple plastic bowl and make a hole through its center that is of the size of the PVC pipe.

 

DIY Arduino lamp

 

We have to fix LEDs on the edge of the bowl, so we’ll need to make holes at equal intervals.

 

DIY Arduino Lamp

Setting up the DIY Arduino Lamp

Connect the LEDs and Bluetooth module to the Arduino and place the hardware inside the bowl. Place the bowl on top of the pipe. We used a power bank to power the system and covered it from plain sight.

 

DIY Arduino Lamp

 

Now connect your phone’s Bluetooth to the HC-05 module. The initial password will be 1234 or 0000. If you’re new to the Hc-05, this Bluetooth Basics tutorial by Mayoogh Girish can help you. Now you can control your LEDs wirelessly through your phone!

Finally, cover the whole thing up and decorate it with flowers to make it presentable. The video below shows how the  LEDs are turned on one after another and the picture shows our final DIY Arduino lamp dressed up in ceremonial form. The aim of our project to create something interesting, easy, quick, and new for our inaugural ceremony was successfully fulfilled!

 

 

 

 

 

Recommended Posts
Showing 2 comments
  • SHRENIK KUWAD
    Reply

    CAN U ALSO TELL METHOD TO CONFIGURE THE HC-05 BEFORE USING YOUR APP. BECAUSE I DONT KNOW HOW TO DO IT AND I WANT AS EARLY AS POSSIBLE BECAUSE I AM PLANNING TO SURPRISE MY MOM FOR HER POOJA. I HAVE DONE ALL THE REST THINGS

  • Internet of Things
    Reply

    This would work on weddings, nice idea, nice implementation! Thank you!

Leave a Comment

− 7 = 2

Start typing and press Enter to search