Lightning and Thunder Effect - Arduino, DfPlayer Mini, NeoPixels

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 มิ.ย. 2024
  • There are many DIY lightning effects out there and a few commercial ones as well. This project allows you to create the effect of lightning flashes followed by thunder using LEDs, Arduino, and a DfPlayer Mini MP3 player. This is an easy project to solder using a Perma-Proto board and a few simple components. Connected to an external amplified speaker and the effect is completely customizable and amazing.
    This project is kludged together from a couple of different concepts with a bit of tinkering thrown in.
    Blog post:
    randommakingencounters.com/li...
    Supplies:
    With the exception of Adafruit, these are affiliate links and will help support my work and the channel at no additional cost to you. Thank you for your support!
    NeoPixel - www.adafruit.com/product/2869
    Arduino Nano - amzn.to/3eGBtwP
    DFPlayer - amzn.to/3eJljCO
    Micro SD card - amzn.to/3eJ4KqD
    Resistor kit - amzn.to/3HsZymZ
    Electrolytic capacitor - amzn.to/32RtkCY
    Terminal block, large - amzn.to/3JCaPmQ
    Terminal block, small - amzn.to/3JtVswV
    Audio jack - amzn.to/3EHOPDn
    Breadboard - amzn.to/3Jxlpvr
    Perma Proto Board - amzn.to/3qFEbIy
    Power supply - amzn.to/3EOAkxQ
    Power jack - amzn.to/3JxnIyB
    Wire - amzn.to/3eGtrnw
    Soldering iron - amzn.to/3sQZ71Z
    Thanks to:
    Adafruit
    learn.adafruit.com/adafruit-n...
    Indrek Luuk - Circuit Journal
    circuitjournal.com/how-to-use...
  • แนวปฏิบัติและการใช้ชีวิต

ความคิดเห็น • 150

  • @cr2n
    @cr2n 2 ปีที่แล้ว

    Thank you for making this accessible

    • @RandomMakingEncounters
      @RandomMakingEncounters  2 ปีที่แล้ว

      You bet! I'm still digging into combining the DfPlayer and LED effects. I have a nook that has an audio track that has some lightning that needs to be timed to the flash. I think I have a plan on the code but it requires faking some multitasking. Cheers!

  • @user-st2vq6pe2x
    @user-st2vq6pe2x 4 หลายเดือนก่อน

    I really appreciate this video. I want to set this up on my model railroad. Thank you for making it easy to understand.

    • @RandomMakingEncounters
      @RandomMakingEncounters  4 หลายเดือนก่อน

      Awesome! All the best with adding a little weather to the layout! Cheers!

  • @peterplantec7911
    @peterplantec7911 ปีที่แล้ว

    That is a nice design and a challenging tutorial to put together. You did well. I wish you had demoed it in a dark room but that’s no big deal.

    • @RandomMakingEncounters
      @RandomMakingEncounters  ปีที่แล้ว +1

      Thanks for the input. This was a fairly early-ish video and I’m constantly trying to understand what makes for more interesting footage. I appreciate the feedback and will keep that in mind as I work on other projects. All the best!

  • @only1genious
    @only1genious 4 หลายเดือนก่อน

    Awesome project!

    • @RandomMakingEncounters
      @RandomMakingEncounters  4 หลายเดือนก่อน +1

      Thanks! It’s a handy one because lighting and sound can add a lot of impact to a project. This is probably more complicated than most applications. Thanks again for the kind words.

  • @carolinstone3070
    @carolinstone3070 3 ปีที่แล้ว

    Thank you so much for this video. I'm using this effect in my booknooks and it looks awesome.

    • @RandomMakingEncounters
      @RandomMakingEncounters  3 ปีที่แล้ว +2

      Nice! I have a nook or two where I want to use this as well. It's pretty versatile and, once you get into controlling LEDs with Arduino, you can really go wild with lighting. Thanks for watching!

    • @carolinstone3070
      @carolinstone3070 3 ปีที่แล้ว +1

      @@RandomMakingEncounters I have, obviously, credited you every time I've shown the animation.

    • @RandomMakingEncounters
      @RandomMakingEncounters  3 ปีที่แล้ว +1

      Thanks! I appreciate that. Cheers!

  • @chrisgallagher85
    @chrisgallagher85 ปีที่แล้ว

    thanks for sharing - very helpful

    • @RandomMakingEncounters
      @RandomMakingEncounters  ปีที่แล้ว +1

      You bet! There are a bunch of ways to try to get to this effect but I think the big thing is to try to build randomness into the code so you end up with variety without complexity… if that makes sense. I’ve done some fun little dioramas where I just flash a couple of plain white LEDs to imply a stormy sea… no muss… no fuss… just a lotta random fast pin toggling. Thanks for the comment and cheers!

    • @chrisgallagher85
      @chrisgallagher85 ปีที่แล้ว +1

      @@RandomMakingEncounters Randomness - great approach to be sure particularly involving nature

  • @tadythefish
    @tadythefish ปีที่แล้ว +1

    Great project! I am waiting for parts to see how it looks. I do have a question about the sound. You provided the site for downloading the sounds and I know I need to change longestTrack to the one I have. But what I want to know is the order of the files on the SD card. Is it random or is it better if the shorter track is first and longest last?
    Thank you

    • @RandomMakingEncounters
      @RandomMakingEncounters  ปีที่แล้ว +1

      Really good question! Soooo, there are a bunch of ways to code this and I kinda took the lazy way out. It's not super critical to know precisely when the sound ends for this effect because the lights flash firs and then the sound plays-the lights aren't synchronized with the sound. That means that I only needed to know how long the longest sound lasts and make sure there is enough of a delay at the end before looping to avoid cutting off the audio. So... to answer your question... the order of the songs on the SD card is unimportant. The only variable you'll need to change is:
      // longests track length - ms
      int longestTrack = 18000;
      You don't need to be precise to the millisecond. My longest thunder sound was about eighteen seconds and I probably added a bit for good measure. I hope that helps! I'm always kinda just wingin' it on the code. I'm sure there are smarter coders out there that would have a more elegant solution but I try to keep it reasonably understandable and basic... which is just about my speed!
      Best of luck with your project! Cheers!

  • @stevetyler9141
    @stevetyler9141 ปีที่แล้ว +2

    First of all, *great* project, and exactly what I was looking for! The time delay between flashes and the audio is perfect, and the adjustment of brightness to match the delay interval is genius IMHO! You are generous in your credit to those whose code, etc. you consulted to build the project, but I've seen no other project as well thought out and flexible as yours, whatever its roots!
    However, when I began to put it all together (in breadboard version, before attempting to convert it to the semi-permanent form in your video), I ran into a series of problems, most of which I've been able to successfully troubleshoot. The remaining issue is that the DF Player Mini doesn't seem to play the files when commanded by the Nano. Thinking the problem might be a defective player, I wired together a simple player lash-up on a breadboard, using a prepackaged sketch, and it seems to work (there's a bit of background noise when the files play, but that's an issue for another day, and one I can live with if necessary).
    One thing I noticed was the LED lighting on the player with each file played in the simple sketch, but not at all with your thunder and lightning sketch. I recheck all the wiring and found nothing amiss, even swapping out the wire connecting the Nano to the player. So, I dived into your code, and noticed you had included some helpful serial print lines for troubleshooting. When I called up the serial monitor, sure enough it reported the "[c]onnection failed". Any thoughts on what might be going wrong?
    One thought was that, instead of the Nano, I used an Uno board to test the player (it enabled me to leave all the T&L wiring in place on the breadboard, and instead build the player test lashup on a separate breadboard). Could my problem possibly be a bad Nano (or pin on the Nano)? It shouldn't be too hard to wire in the Uno in place of the Nano, or possibly change the player pin(s) in your code for the Nano. What do you think?
    Sorry for the longish post, but I'm a bit stuck. On the good side, while waiting for the NeoPixel strips to arrive (and now, waiting for the solderless connectors to arrive!), I found that a plain old white LED dropped into the circuit in place of the NeoPixel control wire flickered just fine -- not very bright, but more than adequate to confirm the flashing code produced the effect I was looking for! Thanks again for sharing your project, and I hope you can help get me unstuck! 😏

    • @stevetyler9141
      @stevetyler9141 ปีที่แล้ว +1

      Never mind -- after a *long* debugging process (details too numerous to spell out, but details upon request), I finally got it all to work, not only in breadboard form but installed on my O scale train layout! Here's a short (minute and three-quarters) video showing the system in action: th-cam.com/video/QSXlqlBJGIY/w-d-xo.html However, there were some valuable lessons I learned in the process that might help others avoid some of the potholes:
      - First, be clear that the Neopixel Strips will require some *very* fiddly soldering to connect, since they do not come with leads, nor does Adafruit offer any sort of solderless connectors for them AFAICS. I purchased a set of four-wire connectors that actually line up with the connectors on the Neopixel strips, but they would not work without extensive (and problematic) modifications, so I ended up stripping them out the connectors and just using the wires -- an expensive way to wire them up! My suggestion would be to modify the project to use LEDs with solderless connectors, since not all of us have the soldering skills needed to connect the Neopixel strips.
      - Second, while I am satisfied with the result, for larger applications like my train layout a much brighter LED array would be much, much better. For smaller applications like dioramas or book nooks (who knew that was a thing?), the Neopixel strips would do fine, but I'd gladly trade the color flexibility of the Neopixel for a brighter 'flash', in a heartbeat!
      - Third, the DF Player Mini has a well-known history of fiddly audio problems (google it), most of which I experienced in some form at one point or another. Be prepared to spend some time debugging the audio. For instance, no guidance was offered on mandatory MP3 file naming and locating conventions, (there are some, though I found most can be disregarded, which may explain the oversight).
      On the plus side, the random delays built into the coding, adjusting the brightness of flashes, and coordinating the delay and volume of the thunder, works exactly as advertised, and this project is IMHO far and away the best DIY thunder and lightning simulation currently available.

    • @RandomMakingEncounters
      @RandomMakingEncounters  ปีที่แล้ว

      Sorry for the late reply. I'm really happy to hear you found solutions. It looks great on the layout! I also appreciate your long comments, your input will be really helpful for others looking to try this out. I think the two things that jump out are:
      - Neopixels are not the easiest to solder. You really need to pay attention to the in and out pads on the data line and soldering wires to pads isn't fun. I keep thinking I'll find an easy/lazy way to do it but I haven't really... yet. Pre-tinning the solder pads and wire helps but those pads are still tiny and my eyes are getting old.
      - The DFPlayer Mini is twitchy. I've seen tutorials where people connect the Arduino data straight to the Player data where others say the player data in isn't rated for the voltage? Putting the voltage divider in makes for more complexity but hopefully longer life.
      The random function is one of my favorite! Most of the lighting I do is for nooks or small dioramas and it's important for it to be believable. Nature is random so finding ways to get the most variety out the fewest lines of code is an interesting challenge. I really want to put a real time clock on one of my projects and have the lighting change throughout the day... and maybe even throughout the year.
      Thank you for sharing your experiences and providing so much valuable information. Cheers!

    • @stevetyler9141
      @stevetyler9141 ปีที่แล้ว

      @@RandomMakingEncounters Oh, no problem on the delay -- I figured you had better things to do than instantly reply to my kvetching, and in any event I muddled through. 😜Thanks for confirming that my struggles were not unique to my personal skill level, but were to some extent inherent to the hardware itself; giving a heads-up (and some possible solutions/cautions) to those tempted to wade in would be helpful IMHO.
      One final question: any suggestions on how to make the lightning flash stronger? The Neopixel strips are more than adequate for a small diorama or book nook, but for a train layout of even modest size (mine is 8' by 8'), the light provided is at best adequate. It appears I could just daisy-chain more Neopixel strips with the current setup, but they're rather expensive for the unit output, so if it would be possible to trade the color flexibility of the Neopixel for a higher output, cheaper white LED string (or better yet, two, as used in the BLI Lightning & Thunder set (www.broadway-limited.com/1598lightningandthunderaccessoryforany-scalelayout.aspx), which appears to alternately flash the two strips, much like you do with the two groups of LEDs on each of the Neopixel strips in your design). ISTM it should be relatively easy to utilize the same basic code to randomize the flashing and coordinate it with the thunder, but instead direct the output to cheap LED strips or other stronger emitting devices (I've seen small LED spotlights that would be perfect!) that would provide a much stronger flash effect. Next upgrade? 😏

    • @RandomMakingEncounters
      @RandomMakingEncounters  ปีที่แล้ว

      Take a look at this post - randommakingencounters.com/arduino-dfplayer-mini-fets/. It's not too big of a change to swap out Neopixels for a strand of 12 volt white LEDs. The big differences are you now have to wrangle multiple voltages for your overall project, you have to choose a method to quickly turn the LEDs on and off, and you need to make sure that all of your components can handle the amps without risk of overheating. I think the easiest way is to use off-the-shelf modules for both the power management and LED control. If you swap out the Neopixel for a simple on/off command that turns either a relay or MOSFET on and off... voila... brighter LEDs. If you wanted to flash two strips, you would use two pins to control a pair of relays or MOSFETs. Relays are noisy but less worry about heat dissipation... MOSFETs are more flexible but you need to heatsink 'em if you start to run higher amps through them. I'm self-taught so I always get a little twitchy when making things that have to potential to... ya know... light things on fire.

  • @tomlewis2477
    @tomlewis2477 ปีที่แล้ว

    This is really cool, but at 3:28, you said, "Without anymore talking..." but I'm glad you kept talking :-). I do have one suggestion. Position the board horizontally (right reading according to the printing on the board), then you can zoom in on it a little more, and the non-powered rails will be vertical, as opposed to horizontal. Just my 2 cents. Thanks for the tutorial.

    • @RandomMakingEncounters
      @RandomMakingEncounters  ปีที่แล้ว

      Thanks for the input. I'm always really happy to hear what people think will make my videos a bit more informative or easy to understand. It's pretty challenging compressing tons of info into a reasonable amount of time. I have more Arduino videos in the editing queue right now. They're a bit of a "get back to basics" to help people who've never dreamed they could use a microcontroller. Thanks again and all the best!

  • @wells5150
    @wells5150 3 ปีที่แล้ว +2

    Yes! - this is for me! I'm doing a project with this effect & NeoPixels. I am finding a lot tutorials that do not do not work, some do but are so laiden with numerous components. This is relatively simplistic. What is up with that 'Busy' pin? Still confused about it. Next can you do same effect with DotStars?

    • @RandomMakingEncounters
      @RandomMakingEncounters  3 ปีที่แล้ว +1

      Glad to hear it! The Busy pin on the DFPlayer is something to explore. According to the pinout, while a track is playing, the pin goes low (which generally means it's dropped to ground and is showing very low voltage). When there is no track playing, the pin goes high (again... usually meaning it will show some voltage above a certain threshold). Right now, my sketch has enough delay built into it to account for the longest audio track. I was being kinda lazy because I wasn't sure the concept was going to work overall so I was trying to keep it sorta simple. A much better solution would be to connect the DFPlayer busy pin to the Nano and then use digitalRead() to detect if the pin is high or low. While the pin is low, you'd just hang out at the end before looping back to the beginning. With that change, you wouldn't have to worry how long any track was and could have longer and shorter tracks without building unnecessary delay.
      Hope that helps a little.
      This should work with DotStar! You would need to tweak the code to use the DotStar library and DotStars take another connection to the microcontroller for communications. I don't have any DotStars but the research I did in Adafruit seems to indicate they're pretty similar in use. It looks like the advantage of DotStar is the speed they can be controlled and a bit more universal plug and play across other microcontrollers. I've found that I have never needed the speed to justify the extra cost so I've never played with them. I think DotStar would be the solution if you needed really high refresh rates on a lot of LEDs... projects where NeoPixels may appear to "flicker".
      All the best with your project(s)!!

    • @wells5150
      @wells5150 3 ปีที่แล้ว +1

      @@RandomMakingEncounters thank you much! I will try everything you mentioned and get back to you a couple of days. 🖖🏾

  • @JORJOOOOO
    @JORJOOOOO 3 ปีที่แล้ว

    Great project. This is the only ot worked for me! How many ohms/watt for speaker? I have a 4ohm/3watts but the sound is too low...

    • @RandomMakingEncounters
      @RandomMakingEncounters  3 ปีที่แล้ว

      Your speaker is about all the onboard amp will handle. I've found that if I really want good volume, I need to switch to using the audio line out pins on the player and connect an external amplified set of speakers-something like cheap computer speakers. The onboard amp is OK if you need to keep it all compact and small but it's a little wimpy if you really want some volume. Hope that helps! All the best!

  • @Jeffs225
    @Jeffs225 7 หลายเดือนก่อน

    Thanks for the informative video! I may have missed it in the comments. But what would you recommend to run this off a light sensor? For example a box opens then the light triggers this? I'd also like to run it off a battery as I'm attempting to make a gift box

    • @RandomMakingEncounters
      @RandomMakingEncounters  7 หลายเดือนก่อน

      Man I'm lame! So long on the reply. The gift giving has probably come and gone. However, the short answer is yes. There are a bunch of ways you could trigger the effect. One way would be to connect a micro switch to the Arduino. The lid would hold the lever on the switch down. When the lid is lifted, the switch opens (or closes depending on the type of switch) and is detected by the Arduino. This kicks off the effect and could allow it to loop for as long as the switch is active. Your idea of a light sensor is also fantastic and maybe even a bit better since you don't have to worry about the mechanics of getting the lid to hold a switch closed. It's the same concept except you connect a photoresistor to the Arduino and measure the value. When it hits a certain amount because it's exposed to enough light, the effect loop plays. This tutorial shows how to toggle an led but could easily be modified to simply run a bit of code - projecthub.arduino.cc/tropicalbean/how-to-use-a-photoresistor-1143fd
      I hope you were able to get it all sorted. All the best with your projects!

  • @MagnumPopeye
    @MagnumPopeye 2 ปีที่แล้ว

    Can you play the sound file and run the neopixal at the same time? Do you have to wait for the sound to stop before the LEDs will flash? I know there have been a few saying this was an issue? That both would not run at the same time....

    • @RandomMakingEncounters
      @RandomMakingEncounters  2 ปีที่แล้ว

      You can for sure. There are a ton of different ways you can code this. I did a book nook where the audio plays while the lights flash. Basically... all the Arduino code does is trigger the audio track. Once you've kicked off the audio playback, you can have your code move on to do other things. Some things to plan for are:
      - do you need to try to closely synch audio to other things?
      - do you have tracks of varying length?
      - is it important to know when the audio ends?
      The hardest part is synchronization within an audio track. If you had a long series of lightning sounds at different portions of the track and wanted to flash the LEDs when they play, something like that is doable but would require that you have the Arduino basically "listen" to the sound levels and then respond/flash accordingly. I guess that's a long way of saying I took kinda the easy way out and people more familiar with programming could probably make it jump through all sorts of hoops.
      All the best!

  • @webhead215
    @webhead215 ปีที่แล้ว

    Do you think the basic logic & components of this project would translate to a version of your haunted radio prop? I'm wanting to build a radio that is not activated by a switch or motion sensor, but rather is controlled by an Arduino. As a complete electronics novice, though, I wasn't sure where to start. Ideally, I want the prop to remain in standby for a predetermined interval (say, several minutes at a time), then trigger a randomly selected audio track, power a set of LED lights for the duration of the track, and then return to standby for the next interval. Looking at this, it seems it could accomplish that goal if I remove the randomized LED brightness, delay, and flashing... but I'm wondering if you agree and/or if there's a simpler method that I just haven't considered?

    • @RandomMakingEncounters
      @RandomMakingEncounters  ปีที่แล้ว +1

      Totally doable! I've been looking at a slightly different player than the DFPlayer Mini. While I like it for its cost and size, it does require the addition of a few external components which adds to the complexity. The board I've been fiddling with is called - KOOBOOK 2Pcs Voice Playback Module MP3 Trigger Player Board SD/TF Card for Arduino. It has its own quirks to be sure but I think it may be easier to program once you get the hang of it. There's also an Arduino library you can load for it. Your program flow is pretty straightforward and you've outlined it well. If you wanted to use regular LEDs, you could turn them on and off with either a relay or MOSFET controlled by the Arduino. There are modules that you can find online or tutorials around how to control higher voltages with Arduino. You can only power one... maybe two LEDs from an Arduino pin which is why NeoPixels are powered directly from a power source and not the board. I've been wanting to do a series of videos that touch on all of these things but life keeps interrupting. Good luck with your project!

  • @theminiatureunderground
    @theminiatureunderground 3 ปีที่แล้ว +1

    This is very intriguing to me. Also very intimidating. I can incision so many ideas be it a book nook (which I'm looking to do my first one) or elaborate terrain pieces. I wanna do a Necromunda themed book nook for my first one. I want it to be very grim dark as it's set in the 41st millennia (40k) some random flashes in the background with gunfire sounds or different colored light effects with energy sounds like a plasma coil or something firing up. That sort of thing. Do any of these control boards have the ability to control multiple things with different timings for each? Also is there a more close look/in depth tutorial for these products or what I'm looking to achieve? I dont mean to imply that your videos aren't great by asking. I'm just not following all of what you're trying to convey. Other than tea lights in a complete noob to electronics and lighting in my builds but I very much want to learn more. I feel like technology in general is a weak point for me and I'd like to change that especially where my hobbying is concerned. Thank you in advance and thank you for your videos 😁
    Jeremy

    • @RandomMakingEncounters
      @RandomMakingEncounters  3 ปีที่แล้ว +4

      The quick answer is yes they do! Based on what you're describing, an Arduino would be a good solution. I'm currently painting an Ironstrider that I want to build either a diorama or a nook with flashes and explosions. I'm also working on a design for a circuit board that would make soldering up these parts a lot easier. Arduino is pretty easy as a programming language but it takes some getting used to. The thing that is nice about it is it's reasonably simple to learn but the downside is that simple also means you have to be clever when you want to mess with the timing of things. It's not a "multithreaded" processor which means it just does one thing after another and then repeats it. I think that Ironstrider example may be just what you're looking for. I can break out just a video on the electronics for it... basically flashes and explosion sounds... battle scenes... random screaming... ya know... all the fun stuff.

    • @theminiatureunderground
      @theminiatureunderground 3 ปีที่แล้ว

      @@RandomMakingEncounters yes I'll wait to see the next video then. I have plenty of research to do and 3d printing prep work before I dive into it anyways. I appreciate your reply and the work you put into the tutorials. They're proving quite useful.
      Aslo, im sure you know about this but if not, there's a handy tool for connecting wires and leads that doesn't involve soldering. It was featured on Tabletop Witch Crafts mist recent video. I've never seen it before that but it's around $12 on Amazon. It won't save you from the necessary soldering when it comes to bread boards and certain other components but it looks to be a real time saver for anything with a lead such as LEDs ect. I thought it might be worth a look as it's something you and your other viewers might find useful.
      Thanks again

    • @theminiatureunderground
      @theminiatureunderground 3 ปีที่แล้ว

      Sorry, that tool was $22. My bad

    • @RandomMakingEncounters
      @RandomMakingEncounters  3 ปีที่แล้ว +1

      That's a pretty cool tool. I think I saw a video where they used to use those wire wrappers to create or prototype old circuit designs-everything old is new!

  • @gregsmelt5608
    @gregsmelt5608 ปีที่แล้ว

    I'm building one right now and adding an rf relay to trigger a big crash on demand!

    • @RandomMakingEncounters
      @RandomMakingEncounters  ปีที่แล้ว +1

      Nice! This project is really just a starting point. You can swizzle is a bunch of different ways. Adding either a MOSFET or a relay opens up the possibility of driving other things! All the best with your project! Cheers.

  • @tonylee-delisle7954
    @tonylee-delisle7954 2 ปีที่แล้ว +1

    You mentioned possibly applying this to a battle scene, I think it would be extra cool the include a smoke generator from a cheap E cigarette and get the arduino to puff a bit of smoke in time to the explosion. What do you think?

    • @RandomMakingEncounters
      @RandomMakingEncounters  2 ปีที่แล้ว

      YES! They have some stuff that is also made for railroad dioramas that do little puffs. I want to say that there's a video over on Boulder Creek Railroads where he uses a smoke generator. You could use a relay on the Arduino to trigger the smoke.
      I've been toying with trying to work some smoke into my videos for "dramatic effect" but maybe it could be incorporated into the diorama/book nook. I have a Warhammer idea I've been noodling that it could be cool with. I also have an Arcane idea as well that a bit of smoke could work with.
      Hmmmmmmmmm.

    • @peterplantec7911
      @peterplantec7911 ปีที่แล้ว

      Tony, I built one with a tiny aquarium air pump and a $5.00 atomizer from a disposable vape. I am using hidden pico size LEDs to flash in the smoke. I haven’t engaged this arduino approach yet, but the visual is awesome.

    • @tonylee-delisle7954
      @tonylee-delisle7954 ปีที่แล้ว

      @@peterplantec7911 thanks for the idea. I will look into the aquarium pump but my first thought it would be quite a big thing to hide

  • @jonesmadsen
    @jonesmadsen 2 ปีที่แล้ว

    Thx for video, just what i was looking for.
    Is it possible to use batteri (5v or 9v) instead of a power suppler pluged in the wall?

    • @RandomMakingEncounters
      @RandomMakingEncounters  2 ปีที่แล้ว

      The quick answer is yes. The longer answer is there are some things to consider. The Arduino Nano can run on a 5 volt regulated power supply through USB or pin 27. It has a built in voltage regulator on pin 30 that can handle 6 to 12 volts. NeoPixels are 5 volt devices. Having said all of that, you could run this off of a battery pack of 3 1.5 volt alkaline batteries for a total of 4.5 volts or 4 1.2 volt rechargeable batteries for a total of 4.8 volts. You could also potentially use a USB power bank that has a 5 volt output as well but there are some issues with power banks not detecting current and shutting off. Another option would be to use a larger battery pack and then use a voltage regulator to step the voltage down to 5. There are some ready to go versions if you search for "buck regulator". Most regulators require a higher voltage than the target voltage to work (have I said "voltage" enough). I would avoid 9 volt batteries because they don't have enough capacity to power anything for too long. They're great for low current projects but you may want a bit more gas in the tank.
      Back to the beginning... the easy answer is heck yes! While everything I just said may make it seem like I know what I'm talking about, the real experts and a great resource is here - learn.adafruit.com/adafruit-neopixel-uberguide/powering-neopixels
      I hope that helps and have fun with your project! Cheers!

    • @jonesmadsen
      @jonesmadsen 2 ปีที่แล้ว

      @@RandomMakingEncounters WAUW thanks for the quick answer, just what i’m looking fore.
      Now i just have too add at small speaker ad fit i all inside my homemade lightningrod

  • @THLauren
    @THLauren 3 ปีที่แล้ว +3

    Can u please make a video of soldering these things. I'm trying to learn how to create one of these boards for sound and light for a Harry Potter book nook and I'm just not experienced enough but I'd love to learn

    • @RandomMakingEncounters
      @RandomMakingEncounters  3 ปีที่แล้ว +3

      Indeed! Thanks for asking. I'll get this in the queue. Also... more to come on a circuit board to make this a whole lot easier... no fiddling with protoboards but still fun with soldering! All the best!

    • @LanceAndCarina
      @LanceAndCarina 9 หลายเดือนก่อน

      Did this ever happen? I’m in the same boat. Can’t get the lights to turn on and they are basic led strip lights.

  • @Mieke-hc5de
    @Mieke-hc5de 7 หลายเดือนก่อน

    Is it possible to start with switching the power on, and to stop again with the power off.
    Or is there a other way to do this, for example with a relais contact?

    • @RandomMakingEncounters
      @RandomMakingEncounters  7 หลายเดือนก่อน

      Absolutely! Rather than having the effect immediately start playing when you power up the Arduino, you can connect a normally open switch to the Arduino. Then, you have the code keep an eye on the status of the switch. If the switch is pressed (closes), run the lightning routine. It could play once if the switch is momentarily closed or it could play continuously if the switch is held closed. This is a better approach than controlling it by powering the board on and off since it will give you more immediate control over when the lightning starts. Powering the board takes a second or two while it boots. Sorry this took a couple of weeks to reply. Hope this helps and all the best with your project! All the best!

  • @richardbalassaitis4901
    @richardbalassaitis4901 2 ปีที่แล้ว

    While you are trying to find free Thunder .mp3's, I have 2 more questions. The Adafruit neopixels come on a 1 cm board that contains 4 connections. Way beyond my capacity to solder onto. Is there a female connector to slip on the ends (with wire pigtails), what is it called and where can I find them. I have tried searching on eBay but cannot find anything that seems rights. Probably because I don't know what they are called.
    2nd question what is the name of the blue screw terminals that plug into your breadboard. I also cannot find them probably due to incorrect nomenclature.

    • @RandomMakingEncounters
      @RandomMakingEncounters  2 ปีที่แล้ว

      Here's a resource for free thunder effects - mixkit.co/free-sound-effects/thunder/ the effects that have green labels are paid but there are around 40 that are completely free to download.
      The NeoPixel soldering is a tricky one. There isn't something that will connect or slide over the ends and connect with the solder pads. What I've done in some instances is solder some header pins onto the pads and then use some RC servo connectors to plug into the pins. Using the header pins made it a bit easier to solder since I'm not trying to solder wire that keeps moving all over the place. While there are four connectors, only three are needed-there are two ground pads. Not really sure why... maybe just so you have a choice of picking the side you want the ground on. Power, ground, and data are all you need.
      Snap to length header pins - www.amazon.com/MCIGICM-Header-2-45mm-Arduino-Connector/dp/B07PKKY8BX
      Servo wires - www.amazon.com/dp/B01LA9YDEI
      I took a look on the Adafruit site, there really aren't any NeoPixels that come prewired. There are flexible strips that have wiring on them only if you buy over 4 meters and even then you're not guaranteed that you'll get an end with a connector.
      The screw terminals are called just that. They can be tricky to find in search because they are also called terminal blocks or other things. Make sure the ones you buy will fit a breadboard. Spaces on the pins and the thickness of the pins can differ making them tough to fit. If you're using relatively stiff solid core wire, you can also just push the wire straight into the breadboard without needing the terminal. I use the terminal blocks because I will eventually move all of the components over to something like a Perma-Proto board and solder the whole thing up once I know it's working.
      Proto boards - www.amazon.com/s?k=perma+proto+board
      Terminal blocks - www.amazon.com/DAOKI-Terminal-Connector-Phillips-Screwdriver/dp/B08214GL5F
      Side note... none of these are affiliate links and I don't specifically recommend you buy these exact items. This stuff comes in a thousand different flavors and prices but I just want to point you in the direction of what to search for if you have a preference to buy from other sources like Ebay.

    • @richardbalassaitis4901
      @richardbalassaitis4901 2 ปีที่แล้ว

      Thank you.

  • @provablepigeon6826
    @provablepigeon6826 ปีที่แล้ว

    Hello, can you please advise me on which links to download the necessary libraries to the arduino?

    • @RandomMakingEncounters
      @RandomMakingEncounters  ปีที่แล้ว

      For the lightning project, the two libraries you would need are the Adafruit NeoPixel library and the DFPlayer library. Both should be available through the Arduino IDE. For more details, you can check out the following resources - learn.adafruit.com/adafruit-neopixel-uberguide and wiki.dfrobot.com/DFPlayer_Mini_SKU_DFR0299

  • @pillaroftruth2830
    @pillaroftruth2830 ปีที่แล้ว +1

    what file names do you give to the mp3 recordings?

    • @RandomMakingEncounters
      @RandomMakingEncounters  8 หลายเดือนก่อน

      Sorry for the really slow reply. Things have been a little crazy. I hope you found a solution to your question. The best resource for this module is the online documentation - wiki.dfrobot.com/DFPlayer_Mini_SKU_DFR0299. If you scroll to the bottom, it has some information on file naming and some things to look out for if you're using a Mac. They require a four digit number but you can then use additional characters in the name. I would avoid spaces and special characters and only use numbers and letters. Again... sorry for the slow reply and all the best with your projects! Cheers!

  • @usersniper1
    @usersniper1 2 ปีที่แล้ว

    G'day,
    Thank you very much for this video it is very well made, I do have some question tho. I would appreciate it if you havce time to reply, thanks.
    I was wondering if its possible to relink a few of the links posted here, as I cannot seem to beable to locate them (error 404)?
    Another question I had was in regards to adding/splitting lights so that it looks as if the lighting travels from a central point? My question is how would I go about doing that?
    Lastly I want to add a deffuser to it how can I connect the defuser (with a switch so only utlise it sometimes) to this desigm? (is it possible or do I need to redesign it)
    Thanks, I am really new to this but your video has encouraged me to try.

    • @RandomMakingEncounters
      @RandomMakingEncounters  2 ปีที่แล้ว +1

      Thanks for pointing out those links! I just updated my blog and broke a few things.
      So... short answer is yes on the splitting of the lights. The really cool thing about NeoPixels (or similar LEDs) is that you can control each individual LED and sequence them in whatever way you would like.
      I'm not sure what you mean by diffuser but you can absolutely add a switch that will control the way the LEDs light up. If the switch is on... it will look one way... off... some other way.
      I think the best thing to do would be to DM me over on Instagram with more details on your project and we can see what we'd need to tweak to make it work!
      Cheers!

    • @usersniper1
      @usersniper1 2 ปีที่แล้ว

      @@RandomMakingEncounters Thanks Ill be incontact soon!

  • @mikepeers
    @mikepeers ปีที่แล้ว

    It looks like your blog post has been replaced with a generic post (eg Lorem Ipsum under all headings). I was hoping to grab the code from your website. Are you able to re-post the code, either to your website, or here in TH-cam? Thanks

    • @RandomMakingEncounters
      @RandomMakingEncounters  ปีที่แล้ว

      Fixed. I managed to break my little corner of the interwebs. Thanks for the heads up.

  • @MrSealines28
    @MrSealines28 3 ปีที่แล้ว +2

    what is the size of the capacitor you used please

    • @RandomMakingEncounters
      @RandomMakingEncounters  3 ปีที่แล้ว +2

      So... it's a 470uF 25 volt electrolytic. This capacitor is basically a "smoothing" capacitor that is there to prevent large spikes from damaging things. If you look at the Adafruit NeoPixel guide (learn.adafruit.com/adafruit-neopixel-uberguide/basic-connections), they recommend a 1,000uF capacitor. Basically... ya just want a kinda big capacitor in there to be a bit of a buffer when you apply power.

  • @bobdawson777
    @bobdawson777 8 หลายเดือนก่อน

    I love your work and would love to build this project. Is the thunder audio file library still available? Thank you.

    • @RandomMakingEncounters
      @RandomMakingEncounters  8 หลายเดือนก่อน

      I looked for the files but couldn't find 'em. Some of the files I used were copyrighted because they're part of a subscription service. One place you can find a bunch of free sounds is here - freesound.org/search/?q=thunder If you need to edit the files or change their format, www.audacityteam.org/ is a free tool that has a ton of functionality. All the best with your project! Cheers!

  • @haywardhaunter2620
    @haywardhaunter2620 ปีที่แล้ว

    That's very clever driving the sound based on the flashes you've randomly generated. I've always approached this from the other direction--making the sound drive the flashes--which makes delays between the flashes and the thunder a tricky proposition.

    • @RandomMakingEncounters
      @RandomMakingEncounters  ปีที่แล้ว +1

      The idea of varying the LED brightness by letting the volume adjust the juice going to the light is a great way to get a lot of variety out of an audio track. The interesting thing is, it's not really how we experience lightning. We usually see a series of flashes and then, depending on how close the strike, the loudness of the thunder. Now... that's a great justification but, for me, this was actually a bit easier to put together since I didn't need to convert audio strength to lighting brightness. It was a bit of a cheat if I have to be honest! Laziness is the motherhood of invention! Thanks for the comment. Cheers!

    • @haywardhaunter2620
      @haywardhaunter2620 ปีที่แล้ว

      @@RandomMakingEncounters I've simulated the delay between the lightning and the thunder by mixing the stereo down to mono and then saving the result on both the left and right channels with the right channel ahead of the left. I generate the lightning flashes from the right channel while playing only the left channel.

    • @RandomMakingEncounters
      @RandomMakingEncounters  ปีที่แล้ว

      @@haywardhaunter2620 Nice! I did an animatronic pirate skull and thought about splitting channels... one for audio and one for movement. It's great that you're treating those as distinct data sources and manipulating the effect that way!

  • @StayInfinite
    @StayInfinite 2 ปีที่แล้ว

    Could this same build potentially support multiple LED strips that are all synced to the same board?
    And example would be spreading out storm clouds further away from each other, all in sync.

    • @RandomMakingEncounters
      @RandomMakingEncounters  2 ปีที่แล้ว +1

      You bet! There are a bunch of ways you could approach this but the simplest is to run a strip of NeoPixels where you want the first area of lightning, then run lengths of wire to the next area and connect another strand of NeoPixels and then repeat. One thing to note is that there is a maximum distance between NeoPixels on the digital wire. If they get too far away, the signal that controls the NeoPixel drops out... I've read six feet but I think it really varies. I've also read adding a single NeoPixel at intervals to act as a repeater can help... you just don't light it up.
      You can use another pin on your Arduino to directly control a set of NeoPixels. That means, if you have enough available pins, you can control each area from a specific pin instead of running a long, continuous strand. All of the strands can run to common power and ground and then each digital wire would have it's own unique pin with inline resistor.
      Another approach (a bit easier but more expensive) is to just run a long strand throughout your clouds and then only light up the pixels you need. One huge advantage of NeoPixels over strands of regular LEDs is you can turn each one on and off individually. This feels a little wasteful to me because you're paying for LEDs you're not using.
      All of this assumes you are playing one audio track and are generally following the "flashes then thunder" approach. Since the DFPlayer can only play one track at a time, you can't layer sound. However, if the idea was to go crazy full immersive with layered flashes and sound (epic storm), I would probably build individual clouds with their own boards, speakers, sounds, and random timing. I've never done it but there are also ways that one Arduino can communicate or control another so you could have Nanos for each cloud and then one Nano to rule them all! The "controller" Arduino would simply be the board that orchestrates the whole show.
      Lot's of possibilities out there. I use the first two options all of the time when running NeoPixels. I'm also intrigued by the strategy of using one board to control another. Arduinos cannot truly multitask without a bit of code trickery. In some instance, since Nanos are relatively inexpensive, it may make sense to dedicate one board for each specific, major tasks and have one that is the controller. If I end up with a project like that, I'll be sure to post a video.
      Hope this helped and all the best with your project!!

    • @provablepigeon6826
      @provablepigeon6826 ปีที่แล้ว

      Hello, can you please advise me on which links to download the necessary libraries to the arduino?

    • @tadythefish
      @tadythefish ปีที่แล้ว

      @@provablepigeon6826 copy paste the SoftwareSerial , DFRobotDFPlayerMini, Adafruit_NeoPixel into the library manager and klick install ( Sketch -> Include library -> Manage libraries)
      As fore the multiple stripes, I am trying to do the same thing. Yes you can do it but you need to modify the code. I declared multiple strips and added randomBolt. Now I am waiting for parts so I can test

  • @rbb6640
    @rbb6640 ปีที่แล้ว

    Could you send me a list of the parts required? I'm thinking I will try it out on a small scale then maybe I will do some research on how to work this out for my car :)

    • @RandomMakingEncounters
      @RandomMakingEncounters  ปีที่แล้ว

      Here's a link to my blog post with more details and a parts list - randommakingencounters.com/lightning-and-thunder-effect-arduino-dfplayer-mini-neopixels/

  • @leetokyo1178
    @leetokyo1178 2 ปีที่แล้ว

    Also is there a way just to make a simpler version of this

    • @RandomMakingEncounters
      @RandomMakingEncounters  2 ปีที่แล้ว

      You bet! The first thing that could make the project simpler (sorta) is to use regular LEDs. If you don't need RGB, you could just use a handful of bright white LEDs. The one thing with that is you can't control/power the LEDs with the Arduino but it's pretty simple to use a power transistor to switch the higher current on and off. There are inexpensive pre-built boards you can buy online that avoid having to build your own from scratch.
      The next thing is to maybe use a different board instead of combining the DFPlayer and Nano. If you check out Adafruit, they have the Adafruit Audio FX Sound Board. It's still Arduino but it has audio storage and the amp onboard. This would eliminate the need to build out all of the connections to get the Arduino talking to the DFPlayer. It doesn't use MP3 audio but OGG... so some conversion is needed.
      Last but not least, you can trigger the audio on the DFPlayer by tying one of the pins to ground (check the player documentation to see which pins). This is a really simple way to toggle sound instead of writing code to control and monitor the audio. I was trying to randomize the sounds and flashes so it didn't feel repetitive. That added a lot of extra stuff to the code that could be stripped out.
      Instead of soldering up things like relays and power transistors, I always check the web for pre-built boards. Arduino is such a popular platform that there are TONS of things out there that are a handful of dollars and are usually just a single pin and power. There are also a lot of Arduino samples in the IDE... you may already be aware and an Arduino wizard so forgive if this is a bit redundant.
      Good luck with your project. I love the idea of creating worlds that do things. An actual living world is even better!

  • @peterplantec7911
    @peterplantec7911 ปีที่แล้ว

    Are you sharing the arduino code? There was a lot of thought put into it.

    • @RandomMakingEncounters
      @RandomMakingEncounters  ปีที่แล้ว

      Yes. The code is posted on my site randommakingencounters.com... which I managed to break for a period of time. All the best!

  • @kostasmav237
    @kostasmav237 2 ปีที่แล้ว

    Hi
    Can this circuit works with led strip?

    • @RandomMakingEncounters
      @RandomMakingEncounters  2 ปีที่แล้ว

      Thanks for asking! Unfortunately, this is really intended to drive NeoPixels or similar controllable RGB LEDs. Strip LEDs usually work off of higher voltages and obviously don't need all of the color code. If you wanted to use the concept of the DFPlayer and strip LED lighting, you could use a lot of the code but, instead of turning NeoPixels on and off, you could use the Arduino to control the current to the LED strip through a transistor. The basic idea is the higher voltage is controlled by the lower voltage of the Arduino through the use of a transistor.
      Here's a link to the concept on the Arduino site - create.arduino.cc/projecthub/SBR/switching-using-transistor-c9114a
      One thing to make sure of is you use a transistor that is rated to handle the total amperage of your LED strip(s). Think of the transistor as a "switch" so, like all things electronic, that switch needs to be able to handle the amps flowing through it.
      I hope that points you to a possible solution!

  • @Yonbii91
    @Yonbii91 ปีที่แล้ว

    You could use an rgb w2812?

    • @RandomMakingEncounters
      @RandomMakingEncounters  ปีที่แล้ว

      In theory, sure! If I’m understanding the w2812 correctly, it’s an individually addressable rgb LED. You may need to tweak the Arduino code to a different library but the concept is the same.

  • @rbb6640
    @rbb6640 ปีที่แล้ว

    This would be great for use under my hotrod at car shows.... but I'm not really good at small scale electrical projects. Would like to find someone to make something like this for me.

    • @RandomMakingEncounters
      @RandomMakingEncounters  ปีที่แล้ว

      I would think it would be something doable for someone that has experience doing car lighting effects. The big thing is adapting it to be able to handle whatever voltage those lights run on and then tying it to the car sound system maybe? You’d want some sort of buttons or controls so you could roll up and blast some thunder and lightning :)! You might look to see if there is a Maker Space in your area. They may have members that have all of the mad skillz to pull something like this together. All the best and good luck!

  • @leetokyo1178
    @leetokyo1178 2 ปีที่แล้ว

    Now is there anyway to put this on a second time I’m trying to use it for my terrarium with my sprinkler set up

    • @RandomMakingEncounters
      @RandomMakingEncounters  2 ปีที่แล้ว

      There are a bunch of ways to approach this. Since the Arduino just loops through endlessly, you could throw a delay() at the end of the code to pause for some amount of time. It sounds like you may be building something a bit more sophisticated where you may want the thunder and lightning to play while the sprinkler runs. Totally doable but might need a few more components. Here are some random thoughts... you may already be way ahead on your build:
      - How often does it need to run? If the schedule is pretty simple, you can control it all through Arduino using really long delays.
      - What is the voltage for your sprinkler? You can't control higher voltages or currents directly through an Arduino but there are a TON of relay modules made to be pretty plug and play. You could use the Arduino to turn on the sprinkler and also loop through the lightning and thunder.
      - Do you need RGB LEDs or would a string of bright white LEDs do the trick? You can kinda simplify things in the code by simply flashing regular LEDs but you add a bit of complexity by needing to control the LEDs through a power transistor (again... lotsa tutorials on the web for controlling higher voltages with Arduino)
      In the end... you could create a terrarium sprinkler storm system all controlled by your microcontroller. I see you also had a second comment. I'll post some additional noodling there. Cheers!

    • @provablepigeon6826
      @provablepigeon6826 ปีที่แล้ว

      Hello, can you please advise me on which links to download the necessary libraries to the arduino?

    • @RandomMakingEncounters
      @RandomMakingEncounters  ปีที่แล้ว

      @@provablepigeon6826 I think I may have replied to you in another comment but, just to make sure, the two libraries are available through the Arduino IDE and are the Adafruit NeoPixel library and the DFPlayer Mini library from DF Robot… I believe. There are a couple of DFPlayer libraries kicking around.

  • @JORJOOOOO
    @JORJOOOOO 3 ปีที่แล้ว +1

    Hello.
    I tryied to add a 144 ledstrip but it lights up only the first 31.
    I changed the code inside for 144 leds.
    I tested the ledstrip and every led working fine.
    Is it my power supply (i will test it at night) or i need to change something in code?
    Thanks.

    • @RandomMakingEncounters
      @RandomMakingEncounters  3 ปีที่แล้ว

      What kind of led strip are you using? That will determine some of the tweaks to the code.

    • @JORJOOOOO
      @JORJOOOOO 3 ปีที่แล้ว

      @@RandomMakingEncounters Hello. This is my ledstrip: www.ebay.com/itm/373152807734?var=641935879348

    • @JORJOOOOO
      @JORJOOOOO 3 ปีที่แล้ว

      @@RandomMakingEncounters hello again. I create it in tinkercad (i removed some code for mp3 module, as i can't add this library on tinkercad). As you can see, it doesn't light up all the leds. Also, i realized, that if i set 144 leds, it overcomes some leds in first lead strip, so maybe the code expand across the led strip? I don't know. Here is the link: www.tinkercad.com/things/1IqHRkIEl0f-magnificent-blad

    • @RandomMakingEncounters
      @RandomMakingEncounters  3 ปีที่แล้ว +1

      Let me dig into this a bit. The code that I posted is for NeoPixels and not specifically the RGB LEDs. The good news is that there will be a way to make them work but we may need to tweak the code a bit more extensively. There may be a slightly different library we need to use. Let me do a bit of research. I did a quick search and found this tutorial - howtomechatronics.com/tutorials/arduino/how-to-control-ws2812b-individually-addressable-leds-using-arduino/ It might help get things working a bit better. The first step is to see if we can get all of your LEDs lighting.

    • @JORJOOOOO
      @JORJOOOOO 3 ปีที่แล้ว +1

      @@RandomMakingEncounters sure and thanks for your research. if you make it work, please inform me :)

  • @TOOSP0RTST3R
    @TOOSP0RTST3R 3 ปีที่แล้ว

    Can you buy this already put together

    • @RandomMakingEncounters
      @RandomMakingEncounters  3 ปีที่แล้ว +1

      I have been working on a circuit board to make it easier to assemble but it would still require soldering and buying a the Arduino Nano and DFMini player.

  • @LanceAndCarina
    @LanceAndCarina 9 หลายเดือนก่อน

    Whats the layout for using a basic Lighting strip you can get on Amazon? Im trying to incorporate that now but you have 3 wires and im only working with 2 for the light strip. Its not powering on still. Thank you

    • @RandomMakingEncounters
      @RandomMakingEncounters  8 หลายเดือนก่อน

      This project was really intended to use NeoPixels for the lighting. What that means is that toggling the lights on and off relies on using the NeoPixel library where power to the LEDs is separate from the Arduino and the third wire is used to digitally control the LEDs. If you purchased a standard strip of LEDs that run off of a small transformer (maybe USB) or are 12 volt, that will require a bit of a different approach. Here's a quick overview... forgive me if this is already obvious to you... there are a couple of ways to power and Arduino. If you use USB, it's five volts in. If you wire directly to the power pins you'll need more like 9 volts to provide enough power to the onboard voltage regulators. However, all of the output pins are 5 volts but very minimal amps... you can only safely power one... maybe two LEDs on an Arduino pin. What this means is you will need to connect your LED strip to it's own power source that can safely handle the power needs of the strip and then use the Arduino to "switch" the power on and off rapidly. There are two basic ways to do this. The first is to use a relay. A relay is a mechanical switch that can be controlled by the Arduino to toggle on and off. They're a bit slow and a bit noisy so a better solution is to use a power MOSFET module. They're like a relay but not mechanical. If you search online for "Arduino MOSFET" you should find a bunch out there. They'll usually have connections for whatever the power source is and connections for whatever you're powering. There will also probably be three pins that you connect to the Arduino. One for power. One for ground. One for data. Switching things on and off is as easy as toggling the data pin HIGH or LOW. They're fast and silent. using something like this simplifies the code because you don't have to worry about any of the Neopixel stuff. You would simply define the pin you have connected to the MOSFET and then quickly make it go HIGH and LOW to simulate the lightning. I know that is super high level but I hope it points you in a useful direction. With all of these things, make sure that the module you use is rated for the voltage and amps that your LEDs need. Strips are often 12 volts and long strips can start to draw a lot of amps. Whatever you use to power and control the strip needs to be able to safely handle the current without overheating.
      Here's post that I found when I started researching this project - adam-meyer.com/arduino/rfp30n06le-arduino
      Here's an example of a MOSFET module that is rated for 15 amps - www.amazon.com/gp/product/B08RRTBNSS
      One thing you would ideally want to find is a module that has an opto isolator that physically separates the higher voltage side of the circuit with the lower voltage control side. That provides the best solution to protect your Arduino from any chance of being fried should something go horribly wrong with the MOSFET.
      Something like this - www.amazon.com/3-7-27VDC-4-Channel-Driver-Amplifier-Circuit/dp/B07QGXY7F3
      All the very best with your project!

    • @LanceAndCarina
      @LanceAndCarina 8 หลายเดือนก่อน

      @@RandomMakingEncounters that’s all great info and thank you for taking the time to explain. It makes sense to me the difference. Do you sell the same set up you sold to VanOaks Props for his changing portrait? I would buy your services in a heartbeat.

    • @RandomMakingEncounters
      @RandomMakingEncounters  8 หลายเดือนก่อน

      @@LanceAndCarina Unfortunately I don't. I'm not a trained electronics person and it makes me very nervous making things for others. I worked with VanOaks as a bit of a collab but it caused me a fair amount of stress. I generally feel that I'm always working within the specs of what my circuits need to be to safely handle the voltages and currents but there are so many variables that I feel I'm not in a position to really be able to say that anything I make is the really real way you should do it. My videos are more along the lines of... "this is how I did it and it seemed to work and it seems to be based on how people say you should do it!" I'm also generally working with low voltages and low amps so the risk of catastrophic failure is also low 😄!

    • @LanceAndCarina
      @LanceAndCarina 8 หลายเดือนก่อน

      @@RandomMakingEncounters do you have the map for VanOaks Props like you showed for this set up? I’m so close to completing but there are a couple places I need position clarity without getting a degree in arduinos 😅. I would be so grateful for anything to complete this project. I won’t hold you accountable for anything ever and have my project almost complete. I have the printed 2 changing portraits, the frames and all the parts to complete but just don’t have the final electrical set up. You would be making my world!

    • @RandomMakingEncounters
      @RandomMakingEncounters  8 หลายเดือนก่อน +1

      @@LanceAndCarina I think I put together a Fritzing layout using a MOSFET and some sample code. Let me take a look and see if I can dig that up. How to do this is a common question and I have toyed with the idea of a follow up video... I may even have a draft blog post. I'll reply when I've had a chance to scrounge.

  • @handzen
    @handzen 5 หลายเดือนก่อน

    I need something like this t for a Castle grey skull diorama

    • @RandomMakingEncounters
      @RandomMakingEncounters  5 หลายเดือนก่อน

      BY THE POWER OF ARDUINO!!! Thanks for the comment and I hope you make that diorama! Cheers!

  • @richardbalassaitis4901
    @richardbalassaitis4901 3 ปีที่แล้ว

    Where is the .mp3 for the thunder?

    • @RandomMakingEncounters
      @RandomMakingEncounters  2 ปีที่แล้ว

      I’ve used effects files from Epidemic Sound. Unfortunately, it’s a paid account and they’re not shareable. However, I did manage to find some good free files… lemme see if I can find them again. There isn’t any specific file you need and the code can be tweaked for any thunder file you might come across on the interwebs.

  • @TheAdamMitchel
    @TheAdamMitchel ปีที่แล้ว

    What if the led lights require 12v DC to power them? Can the Arduino handle the power?

    • @RandomMakingEncounters
      @RandomMakingEncounters  ปีที่แล้ว +2

      Even when using NeoPixels, power to the LED strand is provided directly to the strand from the power source with the only connection from the Arduino being the data input. A pin on an Arduino can only power a single LED... give or take... they're 5 volts and can't provide much in the way of current. If you're looking to control a strand of 12 volt LEDs, you might consider using a MOSFET. There are modules available that allow an Arduino to control higher voltages without too much complicated wiring. You'll still need a five volt supply for the microcontroller and a 12 supply for the LEDs. It will be very critical to use a MOSFET module that is rated for the voltage and the amperage of your strand to prevent overheating. An Arduino MOSFET power module might be a solution. There are also some tutorials out there that cover controlling higher voltages using an Arduino. The code would be MUCH simpler. Instead of all of the things needed to support the NeoPixels, you'd probably need a single pin connected to the module that you quickly switch from HIGH to LOW. I haven't really built anything like this for a project but I've fiddled around a bit with the concept. I hope this gets you a little further along on your project. All the best!

    • @TheAdamMitchel
      @TheAdamMitchel 8 หลายเดือนก่อน

      My led light strips require 12v 10amp power supply, is there a mosfet module you could recommend?

  • @Mieke-hc5de
    @Mieke-hc5de 7 หลายเดือนก่อน

    how do you start the sequence?

    • @RandomMakingEncounters
      @RandomMakingEncounters  7 หลายเดือนก่อน

      Sorry for the slow reply. The sequence starts when I power up the board. Not very elegant. I see you have another comment. I'll get into more details there. Cheers!

  • @itolond
    @itolond 2 หลายเดือนก่อน

    I guess I could use something similar for SFX for electrical short (flicker white light - mark arc sounds?)

    • @RandomMakingEncounters
      @RandomMakingEncounters  2 หลายเดือนก่อน

      Absolutely! I used something similar for a haunted tombstone radio that has a short in it. It's even simpler than the example. You don't need NeoPixels. I used two or three cold white LEDs wired to three pins. I trigger the electrical arcing sound and then quickly and slightly randomly flicker the LEDs for the duration of the sound.

    • @itolond
      @itolond 2 หลายเดือนก่อน

      @@RandomMakingEncounters can you make a track loop - e.g signal to commence FX.......loop single track when signal lost - cease?

    • @RandomMakingEncounters
      @RandomMakingEncounters  2 หลายเดือนก่อน

      @@itolond the DFPlayer mini has a pin on it that signals when the track is playing. You can monitor that pin so the effect stops when the track stops. Not sure if that answers your question but I hope that helps.

    • @itolond
      @itolond 2 หลายเดือนก่อน

      @@RandomMakingEncounters maybe end track signal restart track? - Aussme there is a stop play?

    • @RandomMakingEncounters
      @RandomMakingEncounters  2 หลายเดือนก่อน

      @@itolond indeed there is! Plenty of control options on the Mini. Here's a link to the wiki - wiki.dfrobot.com/DFPlayer_Mini_SKU_DFR0299. There's also an Arduino library that supports the player. Here's a link to the GitHub repo - github.com/DFRobot/DFRobotDFPlayerMini. It's not as detailed and mostly points back to the wiki but there may be some goodies in there.

  • @aquiles2375
    @aquiles2375 ปีที่แล้ว

    I'd like to add a transmitter to send the sound to a wireless speaker.

    • @RandomMakingEncounters
      @RandomMakingEncounters  ปีที่แล้ว

      That should... in theory be easily doable. The DFPlayer has a line out connection. That could be plugged into some sort of wireless speaker hub that has a line in connection. Awesome idea! All the best!

  • @ruiguedes4789
    @ruiguedes4789 2 ปีที่แล้ว +1

    Hello my friend good job😉. Do you Change the code? I'm asking because yours colors LED's its white and for me give me all colors, i'm noobs do you can help please.

    • @RandomMakingEncounters
      @RandomMakingEncounters  2 ปีที่แล้ว

      Thank you! There are a couple of things that could be going on. The very first thing to look at is the type of NeoPixel you have. There are two types RGBW and RGB. The easiest way to tell is RGBW will have a bit of yellow on the LED - that's the white light part of the LED. It's very possible that you have just RGB and so you are seeing color instead of white.
      You'll see in the code that I have the following:
      Adafruit_NeoPixel ledStrip = Adafruit_NeoPixel(numPix, neoPin, NEO_GRBW + NEO_KHZ800);
      If you have RGB only NeoPixels, you would remove the W in GRBW to look like:
      Adafruit_NeoPixel ledStrip = Adafruit_NeoPixel(numPix, neoPin, NEO_GRB + NEO_KHZ800);
      Now the program knows that you have RGB instead of RGBW. The next thing you would need to tweak is the color values you're setting your pixels to. This is a little tricky because I'm using the white part of the LED for most of the effect and the color just to add a hint of color to the flashes. With RGB LEDs, we need to use the full intensity of the LED to create as close to white light as we can.
      Try changing: color = ledStrip.Color(r + colorV, g + colorV, b + colorV, flashBrightness);
      To: color = ledStrip.Color(r + colorV, g + colorV, b + colorV);
      This removes the white LED value (flashBrightness) and now will set the color on just the RGB values.
      Now we want to pump up the intensity of the RGB to make as close to white light as we can.
      Try changing:
      int r = random(40, 80);
      int g = random(10, 25);
      int b = random(0, 10);
      To
      int r = random(180, 200);
      int g = random(180, 200);
      int b = random(180, 200);
      This will set your RGB values randomly between 180 and 200. 255 is the maximum value but I also have another random value later on that adds between 0 and 50 to the values when it flickers the LED. All of these random numbers are intended to create a bit of variation in the effect so it doesn't get too boring.
      This should maybe get ya going. You'll be left with some variables that aren't used or needed anymore but shouldn't mess things up. If you find the color is still too colorful, and you've confirmed that you only have RGB NeoPixels, I've found you could pick up some RGBW versions. If I'm just doing color lighting and I know I never will need true white light, RGB is great. If I'm not sure and may need real white, RGBW is the way to go. There are even different color warmth from cool to natural to warm white just like light bulbs.
      I hope that helps and wish you all the best with your project! Cheers!

    • @ruiguedes4789
      @ruiguedes4789 2 ปีที่แล้ว

      Hi my friend, thank you very much for replying, you are right my LEDs are RGB 😉 I still don't understand the difference very well, because my LEDs are very identical to yours, they have 3 wires, 5v, gnd, data.😅 You can't imagine how happy I am I did everything as I said gave 100% result. From the bottom of my heart, thank you very much for your great help and availability, I'm going to implement this project with my son 💪. Have a Merry Christmas and a Happy New Year, big hug 💪

    • @RandomMakingEncounters
      @RandomMakingEncounters  2 ปีที่แล้ว +1

      Same to you and yours!

    • @provablepigeon6826
      @provablepigeon6826 ปีที่แล้ว

      Hello, can you please advise me on which links to download the necessary libraries to the arduino?

  • @othoapproto9603
    @othoapproto9603 2 ปีที่แล้ว

    Do you purposely leave big gaps in your documentation?

    • @RandomMakingEncounters
      @RandomMakingEncounters  2 ปีที่แล้ว

      I don't. Happy to answer questions if people have them. The main purpose is to show the art of the possible to get people interested in doing deeper dives for themselves. In some cases, people have never used an Arduino and no single video or tutorial can be all inclusive and cover every challenge that might come up. Many, if not all, of my projects are riffs and mashups of other projects out on the web and there is a lot of documentation out there. I am not purposely leaving out information and really am a hobbyist trying to make videos long enough to be interesting but short enough to keep a bit of engagement. Thanks for the question! Cheers.

  • @ruhanpieter
    @ruhanpieter ปีที่แล้ว

    Lovely project, close to what I am looking for, I am VERY new to Arduino and coding but I am willing to try, I am into Model railroading and busy with a layout scene, I would love to have a "Disco Scene, with lights, and got it on separate sketches but struggle to make it one. I am Using an Uno with Mini sd card for music and new pixels for light, can you please help. If you can/will I can send you my files(found on web and tweaked) so far. thank you

    • @RandomMakingEncounters
      @RandomMakingEncounters  ปีที่แล้ว

      I'm a bit like you... search the Web and patch it together. I'm semi-okay-ish at programming... connect with me on my blog (randommakingencounters.com) and I'll take a look and see if I can get you pointed in the right direction.

    • @RandomMakingEncounters
      @RandomMakingEncounters  ปีที่แล้ว

      Pieter... thanks for reaching out on my blog. I've replied a couple of times but I'm not sure the emails are getting to you. Please see if they're getting caught up in spam.

    • @ruhanpieter
      @ruhanpieter ปีที่แล้ว

      Hi, yes I receive, but can not send to you, I tried to send the code I am using, but nothing.

    • @ruhanpieter
      @ruhanpieter ปีที่แล้ว

      Just get error message

    • @RandomMakingEncounters
      @RandomMakingEncounters  ปีที่แล้ว +1

      @@ruhanpieter thank you. I'll try another email address. Stay tuned.

  • @seanwilkinson5403
    @seanwilkinson5403 2 ปีที่แล้ว

    This is cool as hell but damn it this isn't what I was looking for hahaha, anyone have any idea how to make lightning bolts without the clouds?

    • @RandomMakingEncounters
      @RandomMakingEncounters  2 ปีที่แล้ว

      Thanks! Are we talking Tesla coil lightning bolts or diorama lightning bolts that don’t risk electrocution? For lightning effects, I’ve seen them done with either backlighting on a translucent backdrop similar to the hallway of paintings in the Haunted Mansion. It could also be done with projection onto a surface… that requires a projector. Another interesting material is EL wire. I wonder if that could be used in some way. Then again… there’s always Tesla coils! Keep us posted if you find a solution and happy making!! Cheers!

  • @AnxBeta
    @AnxBeta ปีที่แล้ว

    Where is the code?

    • @RandomMakingEncounters
      @RandomMakingEncounters  ปีที่แล้ว

      Thanks for watching. A link to the blog post containing the code is posted in the description. Here’s the link to bubble it up to the comments threads - randommakingencounters.com/lightning-and-thunder-effect-arduino-dfplayer-mini-neopixels/ Cheers.

  • @Badmusic4people
    @Badmusic4people 2 ปีที่แล้ว

    Code?

    • @RandomMakingEncounters
      @RandomMakingEncounters  2 ปีที่แล้ว

      Sorry for the pokey reply... here's a bit more info - randommakingencounters.com/index.php/2020/09/27/lightning-and-thunder-effect-arduino-dfplayer-mini-neopixels/