Motion-activated Servo Motors with Arduino and PIR Sensor

  Рет қаралды 25,072

Rachel De Barros

Rachel De Barros

Күн бұрын

Ever dreamed of props that react to their surroundings? In this all-in-one guide, I'll show you how to make motion-activated servo motors with Arduino and PIR sensors! It's perfect for creating spooky props, animatronics, and even interactive attractions!
No coding experience? No problem! I'll break down everything step-by-step, from understanding how to wire a PIR sensor to an Arduino to controlling servo motors based on motion detection with simple Arduino code examples.
🔗 Full Tutorial: racheldebarros.com/motion-act...
🔗 Join the Engineering Artists Community: racheldebarros.com/members
Build Your Own Motion-activated Servo with PIR Sensor and Arduino:
🛒 PIR Sensor: amzn.to/49CagWn
🛒 Micro Servo: amzn.to/3OP34Ozn
🛒 Arduino Uno: amzn.to/48jRlyr
🛒 Battery Holder: amzn.to/4bKXeYD
🛒 Breadboard: amzn.to/42FZZGk
🛒 Jumper Wires: amzn.to/42K4kbv
🎬 Video Chapters: Motion-activated Servo with Arduino Wiring & Code
0:00 Welcome
0:18 PIR Sensor Pinout
0:43 PIR Sensor Settings
2:20 How to Wire a PIR Sensor to an Arduino
2:57 How to Wire a Servo to an Arduino
4:13 Arduino Code to Test PIR Sensor
10:18 Arduino Code to Rotate Servo with PIR Sensor
14:38 Arduino Code to Sweep Servo with PIR Sensor
22:35 Arduino Code for Servo Motion Sequence with PIR Sensor
24:12 Wrap Up
24:28 Read the Full Tutorial with Arduino Code
24:47 Join the Community
💬 Have any questions or want to share your own experiences, tips and advice about using PIR sensors to motion-activate a servo motor 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 #servo #servomotors #arduinotutorial #arduinocode #props #animatronics

Пікірлер: 51
@DBB-KE5DUO
@DBB-KE5DUO 5 ай бұрын
This is a PIRfect example of embedded programming! 🎉🎉 I always learn something new when watching you!! Plus I never get bored 'cuz you have so much fun energy !! I can hardly wait for the next stage of the talking unigoyal !! 😊
@VinodKumar-kw4kn
@VinodKumar-kw4kn 2 ай бұрын
I really appreciate you made it easy to understand , programme codes and its execution. Beginners can learn easily.
@utahwaxwing
@utahwaxwing 5 ай бұрын
I really appreciate how you clarify so much and make it fun
@raysimon1368
@raysimon1368 2 ай бұрын
First time seeing one of your videos i can build just about anything i want to but when it comes to driving it with a motor thats when things get complicated im a machinist certified welder and a fabricator all that i understand but wiring a driver much less writing a code just went over my head just want to thank you for your great teaching skills i will make sure to pay attention to your next video love your upbeat personality and you are as beautiful as you are you are a good teacher thanks for sharing
@robertmccully2792
@robertmccully2792 5 ай бұрын
I can actually follow what you’re saying. Not talking over our heads trying to prove how smart you are.😊
@scaresandsparks
@scaresandsparks 5 ай бұрын
I really like your videos. You're so natural in front of the camera. Or at least you look it! I will send people to your channel for intro stuff as you explain the basics so well.
@scubaken89
@scubaken89 5 ай бұрын
Another helpful tutorial explained very well and easy to understand. Can't wait for the next one.
@Loosatsu
@Loosatsu 3 күн бұрын
I need most new things explained step by step like this. This is awesome 🤘
@RachelDeBarrosLive
@RachelDeBarrosLive 2 күн бұрын
Awesome, thank you! 👍
@RiDankulous
@RiDankulous 3 ай бұрын
This is very interesting, thanks. I have a suggestion for a build and its a sun tracker. I've vaguely recall seeing it done before. One purpose is to find the optimal vertical and horizontal angle to adjust solar panels. If I make an oven heated by a parabolic mirror, the system can find optimal angle for maximum heat. After initial acquisition, it can track periodically and move when needed. It can monitor the temperature with a digital thermometer, and if it's too high then offset just a bit from being directly at the sun, which turns down the heat. And if too low, the reverse. Also, I could set a timer for the cooking time. When complete, the parabolic dish can turn enough away to effectively 'turn off' the oven.
@berlinjackson1847
@berlinjackson1847 2 ай бұрын
I like your videos. I learn a lot from you.
@michaegi4717
@michaegi4717 5 ай бұрын
I've messed around with those sensors for long time. And I always struggled with false detections... but now I found out that this might only be the calibration phase 🤯
@user-gk9oj3nb1m
@user-gk9oj3nb1m 4 ай бұрын
OMG, Just another brilliant tutorial!
@JamesCotter-be4se
@JamesCotter-be4se 5 ай бұрын
This is a great series Thanks
@mazharkhaliq1971
@mazharkhaliq1971 4 ай бұрын
Thank you for the video
@davidanddavidstrading
@davidanddavidstrading 4 ай бұрын
New fav channel!
@robertparenton7470
@robertparenton7470 5 ай бұрын
Thank You from Frisco, TX.
@proyectostogo1462
@proyectostogo1462 5 ай бұрын
Great !!! I will make this project next and thank uuuuu love tour cahnnel
@AJayTheStageArtist
@AJayTheStageArtist 5 ай бұрын
❤awesome tutorial 👍
@user-zv3lj1ef7l
@user-zv3lj1ef7l 5 ай бұрын
There she is, my favorite influential arduino Teacher.
@nwvortex
@nwvortex Ай бұрын
Would be fun to use this example/code to officiate a game of "Red Light/Green Light," where you have red and green lights tied to the pirState, then introduce a random off time.
@ControlsEngineerOne
@ControlsEngineerOne 5 ай бұрын
An other awesome show!
@lesliefoster9027
@lesliefoster9027 5 ай бұрын
Great, thank you, thank you.
@dailydoseofnews4828
@dailydoseofnews4828 4 ай бұрын
Hey Rachel . Would love to see some guide from you based on hoverboards. They are dirt cheap and easy for ppl to get. Comes with motors, batteries and reusable logicboards. For example a RC skateboard or mower ?
@ZenHulk
@ZenHulk 5 ай бұрын
Thank You
@user-dj9ps3qg8r
@user-dj9ps3qg8r 5 ай бұрын
lovely
@damianbutterworth2434
@damianbutterworth2434 2 ай бұрын
Hi Rachel, I made a burglar alarm using a pen laser shining onto a LDR. Works great. Feel free to use the idea. Might be good in America for protecting large area`s. We don`t have large area`s in the UK. :)
@edparker9837
@edparker9837 4 ай бұрын
I look forward to the "misfit toys" because that is what I plan on making.
@lgallant2486
@lgallant2486 5 ай бұрын
Hi Rachel, what sensor type would you recommend to make a creepy portrait with eyes that follow you? 😮
@monark175
@monark175 4 ай бұрын
love watching your shows. i have a problem with my code. i am trying to get my leds to flash and sweep my servo, i also have leds that are on. my servo doesnt sweep.
@cadillacescalade5428
@cadillacescalade5428 4 ай бұрын
HI, I need this with a IR sensor and sound added In sweep mode.
@monark175
@monark175 4 ай бұрын
also using pir to start sequence. i have simulated smoke, fire, fire station alarms and want to open doors to fire station.
@cobalt01snet
@cobalt01snet 3 ай бұрын
Hi Rachel, I have a project a switch that activates a servo form 0 to xxx, with a delay on the xxx position before returning to position 0, can you help
@ajad4222
@ajad4222 Ай бұрын
can i ask wht is the servo library
@anapamelabandoy927
@anapamelabandoy927 2 ай бұрын
Hi just want to ask, how can I code when I add a speaker in this set-up. I'm having a hard time adding the speaker to the set-up. It's like when the PI Sensor can detect a motion it will send a trigger for the Servo motor and the speaker to activate. I hope you can help
@jamiemoles7275
@jamiemoles7275 4 ай бұрын
Need help programming mine ardniuo uno R3 I need a two prong vibration sensor hooked up to it to activate my relay. I do not know how to do that I do not know how to write the program can you please please help me I have tried looking it up. It didn’t do me no good.
@raulirimes1945
@raulirimes1945 25 күн бұрын
when im trying to type "Servo scaryServo" idk why mine didnt get orange. Do someone know what i have to do to get it orange or what library i need to have? i use arduino uno
@cx3268
@cx3268 5 ай бұрын
How to have the controller to sleep and have the PIR wake it up (interrupt) & do something. This will save a lot of battery.
@MarioRossibless
@MarioRossibless 2 ай бұрын
You are espectacular great classes . You're channel is very helpfull. Thank you
@Jenxqw74
@Jenxqw74 Ай бұрын
Mblock vers plss
@jaguarke069
@jaguarke069 5 ай бұрын
Should the pos =0 be 0 respectively? as the ++ -- happens after the check I think you'll end up with 181 and -1 degrees. Is my understanding correct?
@Sovvyy
@Sovvyy 4 ай бұрын
Yes, you would outside the loop as the ++ / - - occurs at the end of each loop iteration. They're using an Int here so the >= 0 condition will be met (unlike with a Byte).
@jaguarke069
@jaguarke069 4 ай бұрын
@@Sovvyy cheers!
@berlinjackson1847
@berlinjackson1847 2 ай бұрын
Hello Rachel, I am a retired electronic engineer and for a hobby I am learning C++. Are you using a Chromebook with C++. ?
@RachelDeBarrosLive
@RachelDeBarrosLive 2 ай бұрын
I'm using the Arduino IDE which is free software you can download from their site to program the Arduino microcontrollers. The code is based on C/C++.
@JyskMaker
@JyskMaker 5 ай бұрын
"int" take 2 byte (-32768 to 32767) so if you use Byte 0 to 255 you only use 1 byte.
@juansantana8448
@juansantana8448 Ай бұрын
why do you always keep referring to inanimate things as "he"?
@user-lo7nr4lx2k
@user-lo7nr4lx2k 13 күн бұрын
devil
@louiepauda6275
@louiepauda6275 5 ай бұрын
Hey! You know you like electronics! I like electronics what you say maybe I can introduce you to my "Mom"?
@BrodeySheppard
@BrodeySheppard 3 ай бұрын
Not going to lie, ChatGPT. I just tell it my hardware, some specs on hardware, tell it to "Ask questions if you need to know anything" and tell it what I want. Gives me code that is pretty close first time every time.
Trigger DC Motor with PIR Sensor & Arduino - Complete Guide
35:29
Rachel De Barros
Рет қаралды 13 М.
Motion-activated Sound Effects with Arduino, PIR Sensor & MP3 Player
25:26
How Many Balloons Does It Take To Fly?
00:18
MrBeast
Рет қаралды 186 МЛН
What it feels like cleaning up after a toddler.
00:40
Daniel LaBelle
Рет қаралды 79 МЛН
Playing hide and seek with my dog 🐶
00:25
Zach King
Рет қаралды 33 МЛН
Llegó al techo 😱
00:37
Juan De Dios Pantoja
Рет қаралды 54 МЛН
3D Printed Linear Servo Actuator with Position Feedback
23:59
How To Mechatronics
Рет қаралды 203 М.
Face Tracking Turret made with Arduino and Open CV2
2:36
Owen O'Brien
Рет қаралды 15 М.
How to Wire and Control an AC Servo with Arduino: Step-by-Step Guide
10:11
Tarehjerne Tarehjerne
Рет қаралды 9 М.
Make Posable, Movable, Articulating Joints for your PVC Props
36:33
Rachel De Barros
Рет қаралды 49 М.
HOW TO USE WS2812B NEOPIXELS WITH FASTLED ON ARDUINO
24:32
Gadget Reboot
Рет қаралды 179 М.
Wiring a Wiper Motor for Your Motorized Props!
26:54
Rachel De Barros
Рет қаралды 39 М.
Sensors - which one to use
17:06
Electronoobs
Рет қаралды 1,3 МЛН
How to Control a 12V Motor with Arduino: Easy Wiring & Code Examples
44:13
Новые iPhone 16 и 16 Pro Max
0:42
Romancev768
Рет қаралды 1,8 МЛН
iPhone 15 Pro в реальной жизни
24:07
HUDAKOV
Рет қаралды 458 М.
Здесь упор в процессор
18:02
Рома, Просто Рома
Рет қаралды 420 М.
Look, this is the 97th generation of the phone?
0:13
Edcers
Рет қаралды 7 МЛН