Motion-activated Sound Effects with Arduino, PIR Sensor & MP3 Player

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 พ.ค. 2024
  • My Arduino tutorial will show you how to create spooky sound effects triggered by motion using a PIR sensor, MP3 player, and Arduino Uno! Learn how to wire a PIR motion sensor and mp3 player module to an Arduino Uno and then write Arduino code examples with me to trigger a variety of sound effect based on motion.
    🛠🎨 Join my Engineering Artists Discord Community for LIVE WORKSHOPS & COMMUNITY BUILDS (Zoom) ▶︎ racheldebarros.com/community
    🔗 Full Tutorial: racheldebarros.com/trigger-so...
    BUILD YOUR OWN Motion-activated MP3 Player Module with PIR Sensor and Arduino:
    🛒 PIR Sensor: amzn.to/49CagWn
    🛒 MP3 Player Module (I used DFRobot PlayerMini): amzn.to/49vEzgW
    🛒 Speakers (I used 2W 8 Ohm): amzn.to/49lFRew
    🛒 Arduino Uno: amzn.to/48jRlyr
    🛒 Micro SD Card (DFRobot PlayerMini accepts 32 GB): amzn.to/4alUP5n
    🛒 Breadboard: amzn.to/42FZZGk
    🛒 Jumper Wires: amzn.to/42K4kbv
    This is perfect for adding life to your DIY props, animatronics, robots, and more! In this Arduino tutorial, you'll learn:
    ▻ Meet the Components: Get to know the Arduino Uno, PIR (Passive Infrared) motion sensor, and the versatile MP3 player module. Learn about their functionalities and how they can be integrated to create dynamic sound effects triggered by motion.
    ▻ Wiring It All Together: A step-by-step guide on correctly connecting the PIR motion sensor and the MP3 player module to the Arduino Uno. Understand the wiring logic and how each component communicates with one another.
    ▻ Coding for Interactivity: Launch the Arduino IDE as I walk you through various code snippets and examples. Learn how to program your Arduino to detect motion with the PIR sensor and trigger specific sound files stored on your MP3 player module. From simple sound playback to more complex scenarios involving multiple sounds and conditions, I cover it all.
    ▻ Troubleshooting Tips: Encounter an issue? No worries! I share common pitfalls and their solutions to help you overcome any technical hurdles effortlessly.
    🎬 VIDEO CHAPTERS: Motion-activated MP3 Player with Arduino Wiring & Code
    0:00 Welcome
    0:27 PIR Sensor Pinout
    0:40 PIR Sensor Time Delay, Sensitivity & Trigger Mode
    2:16 Breadboard Power & Ground
    3:05 Wire a PIR Sensor to Arduino Uno
    3:37 MP3 Player Module Pinout
    4:21 Wire an MP3 Player to Arduino Uno
    7:21 Arduino Code: Test PIR Sensor
    13:15 Arduino Code: MP3 Player Set Up & Libraries
    17:28 Arduino Code: Play Sound Track with Motion Detection
    18:06 Arduino Code: Play Different Tracks with & without Motion Detection
    18:41 Arduino Code: Play Tracks Sequentially with Motion Detection
    22:38 Arduino Code: Play Tracks Randomly with Motion Detection
    24:54 Get Full Tutorial with Code
    25:10 Join the Community
    💬 Have any questions or want to share your own experiences, tips and advice about using a PIR sensor to trigger sound effects from an mp3 player with Arduino? Drop a comment below - I love hearing from you!
    🔔 If you find this video helpful, please hit that like button 👍 and consider subscribing to my channel for more props/animatronics/robot tutorials, tips, and tricks. Your support helps me create more content like this!
    Some links included here are to affiliate sites. If you purchase something through them, I may earn a small commission - which costs you nothing! I am very grateful for your support when you use my links to make a purchase.
    #arduino #pirsensor #mp3player #arduinotutorial #arduinocode #arduinoproject #props #animatronics
  • วิทยาศาสตร์และเทคโนโลยี

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

  • @jamesmoon5632
    @jamesmoon5632 25 วันที่ผ่านมา +2

    What i love about your videos is you get straight into it and quickly tell us what we need precisely. Like the personality as well keep these coming as i love the content

  • @electronics.unmessed
    @electronics.unmessed หลายเดือนก่อน +7

    Good explanation, I am about to plan some projects using PIR sensors .. Thanks for sharing!

  • @jogosProgramEletronica
    @jogosProgramEletronica หลายเดือนก่อน +3

    great explanation

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

    Yay - you just helped me get my crow audio working - my next feat is to get the code into Bottango so I can get my animatronic self sufficient! Thanks so much for sharing this info and helping our community

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

      Post your updates on Discord because I'd love to see how you implement Bottango with this!

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

      @@RachelDeBarrosLive It’s a learning process, that’s for sure! I’m learning Arduino coding, Bottango, and how to work with servos and other hardware all at the same time. But who wants an easy way to learn?

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

    Hey Rachel You are so nice. I really enjoy your tutorial. Seems like you shop at the randomest "T" shirt shop in Beverley Hills or some EXCLUSIVE venue to seek out those quirky cuts and phrases. I don't have a full grasp of Arduino code still but using your vid's as reference it is likely to present a road map of method . Thank you!

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

      Let me know how you make out. I actually get most of my tees from Amazon of all places! Three Amigos is one of my favorite movies - you can never have too many pinatas 🤣

    • @jackrichards1863
      @jackrichards1863 29 วันที่ผ่านมา

      @@RachelDeBarrosLive 😄 I will. Thanks for showing interest! I like that .

  • @user-xt8on4kf5o
    @user-xt8on4kf5o หลายเดือนก่อน +1

    Love it! Thank you :) This is giving me creative inspiration.

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

    Great Video and explanation. going to put this one to good use.

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

      Excellent! Let me know how you make out with your project!

  • @baguk21
    @baguk21 19 วันที่ผ่านมา +1

    well explained

  • @alleynecostin6709
    @alleynecostin6709 26 วันที่ผ่านมา

    Rachel you must have been trained by train the trainer program. Each step and explanation is spot on. great job. keep it going. Thank you.

  • @DBB-KE5DUO
    @DBB-KE5DUO หลายเดือนก่อน

    🎉😊 See me waving like a crazy person, too? You make this look so easy!! 🥳🥳🥳

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

      😁 Put your hands in the air like you just don't care! 🥳

  • @nashaut7635
    @nashaut7635 23 วันที่ผ่านมา

    Hi Rachel. The resistor you've talked about @7:15 is not for "smoothing" things. The thing is the DFPlayer inputs are not 5V tolerant and you need logic level shifting to not destroy those inputs. It is indicated (though it does not really stand out) in the datasheet. Even though the entire module is powered with 5V, the inputs can only accept 3.3V maximum. A bare minimal level shifter (from a 5V output) is a 2/3 resistor divider, e.g. 1k / 2.2k ohms - you can also build one with a PNP transistor or a P-channel MOSFET. The 5V input (Rx) of the Arduino however can cope with the 3.3V level and take it as a logic one. However it is close to the minimal value for a logic one (see the datasheet of the ATmega328 for reference).

  • @HEATRACER24
    @HEATRACER24 หลายเดือนก่อน +3

    I love your shirt!!!

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

      grateful!

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

      The Three Amigos is a great movie - so many great lines!

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

      @@RachelDeBarrosLive Little Neddy Kanickas

  • @solutionreplays6622
    @solutionreplays6622 28 วันที่ผ่านมา

    Great video, how/where did you learn to code? I want to learn but it can be daunting.

  • @hucobo
    @hucobo 23 วันที่ผ่านมา

    How nice that you can choose the track you want to play. Is it possible to play tracks of different lenghts?

  • @charles8111
    @charles8111 21 วันที่ผ่านมา

    Will this work with an IR sensor as well

  • @whoopzKERRY
    @whoopzKERRY 19 ชั่วโมงที่ผ่านมา

    thanks for sharing..
    can you make it an IOT by connecting that device into smartphones using bluetooth? by the uSe of MIT APP INVENTOR can you make a video about the block code of that also? thankies

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

    I just turned my subscription to "ALL". This is a great job Rachel! Great pedagogy! Great project! He-youtubers should worry... You're better than most of them!

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

      Thank you for the feedback and let me know if there's any topic you'd like me to cover!

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

    I might have missed it but does the PIR have a test mode like a full motion sensor? It only stays on for a couple seconds then resets. I have all these parts but the player and I was wondering about using sounds, so this is perfect. Can you use multiple sensors? Like one on the front and back with different audio outputs?

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

      For the PIR sensor like the one I'm using, you can adjust the Time Delay, which is the length of time it remains HIGH before going LOW. To rock through the examples quickly, I set my Time Delay to the shortest time but you can increase the time so the sensor doesn't go LOW so fast. There's also a Sensitvity knob where you can adjust the distance it can sense (3-7 meters).
      You can certainly use more than one sensor and attach specific sounds to each.

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

      @@RachelDeBarrosLive Ok so the shortest time is pretty short, usually it's at least a minute glavin! mm-hoy

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

    I don't see the link to the code.

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

      I got a little behind and am working on the write-up now. The link will be there early this week! 👍

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

      I just put it up: racheldebarros.com/trigger-sound-effects-with-arduino-pir-motion-sensor/ (also in the description)

    • @MyTube4Utoo
      @MyTube4Utoo 25 วันที่ผ่านมา

      @@RachelDeBarrosLive Thank You! New sub. here. Love your channel.

  • @ZenHulk
    @ZenHulk 29 วันที่ผ่านมา

    Please don't go anywhere. Tuesday i have to have a cornea transplant, no screens for 4 weeks, no typing maybe longer.

    • @trickstur5994
      @trickstur5994 22 วันที่ผ่านมา

      I hope everything went great for you.

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

    Marry me!

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

    Player! Affect, cereal assign you're not crazy, Ladie?