Introduction: Diwali Special

Picture of Diwali Special

Winter is Coming...festival decorations are everywhere.

One of the gadgets that can be found everywhere are led light diya . They are cheap, clean and not as dangerous as real diya.

Let's start it.....

Step 1: Preparation of the Materials

Picture of Preparation of the Materials

What we need for this DIY is a

  • Diya
  • Leds
  • Arduino uno
  • Gas sensor
  • General purpose Pcb
  • Wire
  • Lm 324 or 358
  • Photodiode
  • Resistances 330 ohm , 10k
  • Potentiometer 10k
  • Hot glue gun
  • A box
  • Soldering iron
  • Screwdrive

Step 2: Preparing the Led Diya

Picture of Preparing the Led Diya

STEPS are :

  1. Takes some Yellow Leds and glue it on Diya with the help of hot glue gun.
  2. Now connect the all leds in parallel (positive to positive and negative to negative) with the help of soldering iron.
  3. Than I drilled the hole for I.R SENSOR and GAS SENSOR wire.

Step 3: Circuit Diagram for Sensor

Picture of Circuit Diagram for Sensor

I used two sensors :

  1. one is I.R SENSOR with the help of I.R SENSOR. I am able to operate my DIWALI SPECIAL DIYA with any I.R remote (T.V, A.C).
  2. second one is GAS SENSOR.

WATCH MY VIDEO if you want to know why i am using Gas sensor in my instructable.

Step 4: Final Touch Up

Picture of Final Touch Up

Take a box and cut it from the bottom portion and glue it on base surface of Diya

Step 5: Code

Picture of Code
int ledPin = 3; // choose the pin for the LED
int switchPin =4; // choose the input pin (for a pushbutton)
int val = 0; // variable for reading the pin status
int counter = 0;
int currentState = 0;
int previousState = 0;
void setup() {
pinMode(ledPin, OUTPUT); // declare LED as output
pinMode(switchPin, INPUT); // declare pushbutton as input
pinMode(A0, INPUT);
}
void loop(){
int pot_value = analogRead(A0);
val = digitalRead(switchPin); // read input value
if(pot_value>=180)
{
digitalWrite(ledPin, HIGH);
 }
else if(pot_value<=180&&pot_value>=150)
{
digitalWrite(ledPin, LOW);
 }
if (val == LOW) { // check if the input is HIGH (button released)
currentState = 1;
}
else {
  currentState = 0;
}
if(currentState != previousState)
{
if(currentState == 1)
{
counter = counter + 1;
}
if(counter%2==0)
{
digitalWrite(ledPin, HIGH);
 }
else
{
digitalWrite(ledPin, LOW);
}
}
previousState = currentState;
delay(250);
}



Comments

DIY Hacks and How Tos (author)2017-09-23

Cool lighting effects

Thanks :)

sue.wimp (author)alok0142017-09-30

I'm trying to find a small 2V solar panel with one color changing LED and rechargeable battery. Any suggestions?

alok014 (author)sue.wimp2017-10-06

i think buy these thing from ebay

kksjunior (author)2017-09-23

Great thought bringing together traditional Diwali decor and electronic lighting...! It would've been better if the video was in English.

About This Instructable

876views

3favorites

Bio: can't say about my self it's totally depends on ur behavior
More by alok014:Diwali SpecialGesture Controlled MouseGetting Started With ARDUINO
Add instructable to: