Arduino Birthday Candle

About: Maker | Open source ❤ | Engineer

In this instructables I will show you how to make a birthday candle that can be turned off by blowing on it, and based on delay given on the program it turns on back again. The main part of this project is microphone sound sensor.

Step 1: Basic Idea

How does a Microphone Work ?

A microphone is an acoustic to an electric transducer or sensor that detects sound signals and converts them into an electrical signal. In short, wind is not sound, will this project work ?

My answer is yes!

To generate an electrical signal all you need to do is make movements in the diaphragm. So when blowing on a microphone sound sensor, microphone’s diaphragm responds because it is a displacement of air molecules pushing on one side of the membrane to the other causing electrical signal in the microphone to make it seem like sound.

Step 2: Components Required:

  • 1×Microphone Sound Sensor
  • 1×Arduino Uno (or any Arduino Boards)
  • 1×LED
  • 1× 220 ohm resistor
  • 1×Breadboard(For prototyping)

Step 3: Microphone Sound Sensor

I have used a LM393 Microphone sound Sensor, It is having built-in Potentiometer to adjust the sensitivity of digital output pin. This module allows you to detect when wind(sound) has exceeded a set point you select by varying potentiometer. Sound is detected via microphone and fed into an LM393 op-amp for the digital input to the Arduino Board.

Step 4: Circuit Diagram &Schematics

Step 5: How to Connect ?

  • Connect OUT pin of LM393 microphone sound sensor to Arduino Digital pin 7
  • Connect GND pin of sensor to GND pin of ArduinoConnect VCC pin of sesnor to 5V of Arduino
  • Connect a 220 ohm resistor series with negative terminal of LED and connect resistor to GND of Arduino.
  • Connect positive terminal of LED to Arduino Pin 13

Note:

The value of resistor in series with LED may be a different value than 220 ohm ,the LED will lit up also with values up to 1k ohm.

Step 6: Prototype

Step 7: Code

upload the following code to your Arduino Board

int ledPin=13;
int sensorPin=7; boolean val =0;

void setup() { pinMode(ledPin, OUTPUT); pinMode(sensorPin, INPUT); Serial.begin (9600); } void loop () { val =digitalRead(sensorPin); Serial.println (val); // when the sensor detects a signal above the threshold value, LED turns off based on delay if (val==HIGH) { digitalWrite(ledPin, LOW ); delay(2000); // turns off for 2 seconds } else { digitalWrite(ledPin, HIGH); } }


Step 8: Demonstration

After Uploading the code , you can blow next to the sensor .If the led is not lighting up, you need change the sensor sensitivity (reduce Sensitivity) by rotating the potentiometer .

Here in this video I am demonstrating how the prototype works. The full circuit can be made into birthday candle as your imagination and idea .
Happy Making :)

Share

    Recommendations

    • Toys Contest

      Toys Contest
    • Make it Glow Contest 2018

      Make it Glow Contest 2018
    • First Time Author

      First Time Author

    2 Discussions

    0
    None
    AmalMathewtoutoune

    Reply 2 months ago

    Thanks for commenting :)

    I had seen the project that you mentioned , That project gave a basic idea for building my project . And i wanted to do something differently, so i made this project.