Thunder And Lightning Effect Using Arduino And AC Bulb

Thunder And Lightning Effect System: Today we are going to build a cool project that is the thunder and lightning effect using Arduino. Lightning is the most spectacular part of a thunderstorm. In fact, it is how thunderstorms got their name. The lightning causes the thunderstorm.

A single stroke of lightning can increase the heat of the air to around 30,000°C that can expand fast in the air. This expansion then creates a shockwave which turns into an explosive sound. That is called thunder.

In this Arduino project, we will be going to build an artificial thunder and lightning effect using Arduino, a sound sensor and dfplayer. This project is useful for photography and videography studio to make an artificial lighting effects for shooting effects.

Principle Behind the Thunder And Lightning Effect Using Arduino

This is not just a sound-to-light effects system. We build this project in two different ways. The first one is done using a sound sensor and the second one is done by the dfplayer SD card module.

Let’s talk about the first one. Its working principle is so simple. It is working by sensing the sound beat and sending signals to Arduino. The Arduino then produces an output signal and glows the AC bulb according to rythm.

The second one is a little different. It is not working by sensing sound via a sensor. The dfplayer is used here to produce the signal for glowing the AC bulb. It catches the signal from the SD card sound sample and converts it to a lightning effect.

Must Read Arduino based WS2812B Ambilight for Home Decoration

Thunder And Lightning Effect Using Sound Sensor

Project

Thunder And Lightning Effect Using Sound Sensor

Circuit Diagram

Thunder and lightning effect using a sound sensor circuit

Components Required

  • Arduino Nano
  • Sound Sensor Module
  • 5V Relay Module
  • AC Bulb
  • 9V Battery

Features of PCBWay

1. PCB prototyping and manufacturing

They produce FR-4 and Aluminum boards and advanced PCBs like Rogers, HDI, and Flexible and Rigid-Flex boards, at a very reasonable price.

2. PCB assembly

SMT & THT assembly starts from only $30 with a free stencil and free worldwide shipping. The components can be sourced and provided by PCBWay, or by the clients themselves.

3. Layout and design

Partnering with quality service providers to offer design services.

4. Open-source community

Student sponsorship shared PCB projects and so on.

5. 3D Printing & CNC

On-demand Production and Rapid Prototyping in as Fast as 1 Day Leading the Digital Manufacturing Revolution.

Working Principle of Sound Sensor Based Thunder And Lightning Effect

This circuit is working like a normal relay ON/OFF switching via sound sensor pulse signal. First, we need to adjust the sensitivity of the sound sensor through the pot. After setting the sound sensor, it acts like a switch used to activate the relay module.

The D0 pin of the sound sensor is connected to the D8 pin of the Arduino. Therefore D9 pin of the Arduino is used as the output of the circuit. It is also connected to any input pin (IN1) of the 5V relay module.

Here we define the initial output state to “LOW” when no sound is detected. When a small amount of sound will detect, the current will flow through the input pin of the relay module. In this situation, the circuit will go to the “HIGH” state. Note that this condition is working only when we connect the relay module to the output of the Arduino.

Otherwise, if we want to run a single LED or LED stripe, we need to change the code. In this situation, it should be set to “HIGH” while it is in an initial position. And when a sound will be detected, it will go to the “LOW” condition.

Arduino Code


Thunder And Lightning Effect Using DFplayer

Project

thunder and lightning effect using dfplayer

Circuit Diagram

Thunder and lightning effect using a dfplayer circuit

Components Required

  • Arduino Nano
  • DFplayer Mini Module
  • SD Card
  • 5V Relay Module
  • 1KΩ resistor (x2)

Working Principle of DFPlayer Based Thunder And Lightning Effect

The working principle of DFPlayer based thunder and lightning effect is quite similar to the sound sensor circuit. But there is two extra advantage this can produce the lightning effect and thunder sound both.

The dfplayer collects data from the SD card and sends the output signal to the Arduino. TX, RX and BUSY pins of the dfplayer module then connect to pins D10, D11 and D12 of the Arduino as input.

Therefore a MOSFET is added to the circuit to amplify the signal from the Arduino. The D9 pin of the Arduino then connects to the gate terminal of the IRFZ44N MOSFET as output. After amplifying the signal, it connects to the ground pin of the 5V relay module for activation. Another source terminal of the MOSFET will directly attach to the ground.

Now connect L DAC and R DAC are connected to a stereo amplifier for sound.

Thus this circuit first produces lightning and after a little delay, it produces sound also. It actually works as an original thunderstorm.

DFPlayer Arduino Library

To compile code to the Arduino we need a DFPlayer Mini Mp3 library file. You can just download this from the link.

Arduino Code

Leave a Comment