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 thunder and lightning effect using Arduino. Lightning is the most spectacular part of a thunderstorm. In fact, it is how thunderstorm got its 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, sound sensor and dfplayer. This project is useful for photography and videography studio to make an artificial lighting effect 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 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 sends signals to Arduino. The Arduino then produce an output signal and glow 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

Circuit Design Using PCB Software

To make the circuit compact and give a professional look, I have designed the PCB after testing all the features of the thunder and lightning effect using a sound sensor on the breadboard. I will explain in detail how we can design and order PCB for our project.

Thunder and lightning effect using the sound sensor pcb

Gerber file for Thunder and lightning effect using the sound sensor.

Order PCB From PCBWay

This project is sponsored by PCBWay.com. PCBWay is a Chinese-based PCB (printed circuit board) prototype, PCB assembly, SMD Stencil, and Flexible PCB manufacturer. They ship to more than 170 countries worldwide and process more than 2100 PCB orders a day. It feels like PCBWay gives an excellent price and customer service factor in one single serving. The quality of the PCB is awesome and its thickness is really great. What is also spectacular about PCBWay to me, as a maker and customer, is their service. From their friendly support staff to their intuitive, user-friendly website features, it all counts towards what makes PCBWay an ideal company and brand for any electronic hobbyists In this article, I will state that how can we order PCB from PCBWay with step by step guide.

Features of PCBWay

1. PCB prototyping and manufacturing

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

Visit the link for Instant Quote

Visit the link for Gerber file viewer

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 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 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 “LOW” condition.

Arduino Code

Video Output


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)

Circuit Design Using PCB Software

To make the circuit compact and give a professional look, I have designed the PCB after testing all the features of the thunder and lightning effect using a dfplayer on the breadboard. I will explain in detail how we can design and order PCB for our project.

Thunder and lightning effect using a dfplayer pcb

Gerber file for Thunder and lightning effect using a dfplayer.

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 that is 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 pin 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. 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

Video Output

Leave a Comment