Go Down

Topic: Halloween project for Arduino (Read 316 times) previous topic - next topic

One_Guy_One_Blog

Hello, my friends, I made a quick Halloween project for Arduino.

It emulates lightning and thunder by flashing white LED strips and playing thunder sound files (mp3). It only requires some basic components:

  • Arduino Nano
  • DFPlayer Mini MP3 player module
  • Micro SD card (8 GB)
  • Breadboard and jumper wires
  • MOSFET (1x IRFZ44N)
  • Resistors (2x 1K)
  • LED strip (5m, 12V, cool white)
  • Test leads with alligator clips
  • Power supply (12V, 2A)


This is not a "sound to light" system. The sketch (randomly) flashes the LEDs first and then plays the sound file after a short (random) delay. I think that's more realistic than flashing the LEDs in reaction to the volume of the sound like other projects/systems do.

In the near future, I want to convert it from Arduino to ESP8266 or ESP32.


Find the project description on my blog: Lightning & thunder: Arduino Halloween DIY project


Watch the short YouTube movie here: Lightning & thunder: Arduino Halloween DIY project




Adrianotiger

A nice project!
I made a similar project using the same components for a sky (sky with 60 leds + cloud with 60 leds) and the DFplayer, simulating thunders and rain with the leds :D

If you just play a short sound (up to 20-30 seconds), you can try the WT588D, so you don't need a TF-card.

I used a BT-module to setup it over my smartphone, but on a new project I would also use an ESP32 :)
On the ESP32 you could also play MP3 and WAV over 2 output pins.

One_Guy_One_Blog

Hi Adrianotiger, I never heard of the WT588D. It looks interesting, I will try to find one for some experimentation.


I made a similar project using the same components for a sky (sky with 60 leds + cloud with 60 leds) and the DFplayer, simulating thunders and rain with the leds :D

This sounds awesome, do you have any information on this project online somewhere? I would love to see it  8)

Adrianotiger

Hi,
Yes I made some videos:
Youtube channel

And a blog:
http://roomsky.projects.petrucci.ch/


I was impressed of the power of the Arduino Mega, I attached a lot of devices on it. Since it is in the Kids room, I didn't wanted any wireless devices, so the BT will power off automatically after 5 minutes if not used.

If you want download the code you can check this:
https://hackaday.io/project/13143-roomsky

But I used the DFrobot device too in this project. In a project like yours I would use the WT588D, since you just jave 5-10 waves and each has only 5-10 seconds.

ScottHooper

Hi,
Yes I made some videos:
Youtube channel

And a blog

I was impressed of the power of the Arduino Mega, I attached a lot of devices on it. Since it is in the Kids room, I didn't wanted any wireless devices, so the BT will power off automatically after 5 minutes if not used.

If you want download the code you can check this:
https://hackaday.io/project/13143-roomsky

But I used the DFrobot device too in this project. In a project like yours I would use the WT588D, since you just jave 5-10 waves and each has only 5-10 seconds.

I really like your youtube channel, great videos. Thank you for sharing!

Wederkinck

Great project!

I'm wondering about the MOSFET. What does it do?
I'm new to building circuits, I'm building a project were Christmas lights are blinking to music. I can get it to work, but when only a few lights are on, I get a lot of noise in the speakers. Maybe I'm missing a MOSFET?

Regards

Adrianotiger

Great project!

I'm wondering about the MOSFET. What does it do?
I'm new to building circuits, I'm building a project were Christmas lights are blinking to music. I can get it to work, but when only a few lights are on, I get a lot of noise in the speakers. Maybe I'm missing a MOSFET?

Regards
No, the MOSFET is just an electronic "switch". The Arduino output has 50mA, if you try to get more, you will destroy that pin on your Arduino.

So, if you have a led strip that uses 2000-5000mA, you need a MOSFET, so you can power on the strip with just 1mA from your Arduino and the current will be drawn directly from the power adapter.

But since 10 years, you can solve it with the pixel-leds. The WS2812b is one of them. You can connect the strip directly to your Arduino and power them externally. The advantage is that you do not need a mosfet and that you can set the color of every LED individually (even if they are connected like every other LED strips).

Go Up