Diwali Special

1,613

3

5

Introduction: Diwali Special

About: I am an Engineer in the field of Embedded system & Robotics.

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.....

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: 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

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

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

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

Step 5: 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);
}



Be the First to Share

    Recommendations

    • LED Strip Speed Challenge

      LED Strip Speed Challenge
    • Sculpting Challenge

      Sculpting Challenge
    • Clocks Contest

      Clocks Contest

    5 Discussions

    0
    robopathshala
    robopathshala

    Reply 2 years ago

    Thanks :)

    0
    sue.wimp
    sue.wimp

    Reply 2 years ago

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

    0
    robopathshala
    robopathshala

    Reply 2 years ago

    i think buy these thing from ebay

    0
    kksjunior
    kksjunior

    2 years ago

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