No video

Trigger DC Motor with PIR Sensor & Arduino - Complete Guide

  Рет қаралды 15,257

Rachel De Barros

Rachel De Barros

Күн бұрын

Пікірлер: 71
@ZenHulk
@ZenHulk 5 ай бұрын
I have learned more from the way you teach this than anyone else online, better than all my Stanford instructors back a decade ago. Now I'm rewatching all your other videos.
@Naturalis.nature
@Naturalis.nature 18 күн бұрын
10/10 Best instructor!
@toolooselowtrek7523
@toolooselowtrek7523 14 күн бұрын
You are one smart informative engineer! Thanks, Rachel!
@bigdog0u81
@bigdog0u81 16 күн бұрын
Been watching your videos before I operate on my Strager things demogorgon animatronic. Thanks for all the good info. I love the shirt. Shop smart shop S-mart.
@RachelDeBarrosLive
@RachelDeBarrosLive 16 күн бұрын
Loooove Army of Darkness! Your project sounds awesome!
@sammkablaam
@sammkablaam 5 ай бұрын
You couldn’t have timed this video any better. I mean really! I’m teaching myself how to use an Arduino. My first motor driver was just delivered today. I’ll be doing this tomorrow. Go get yourself a cookie!
@wfsterling
@wfsterling 22 сағат бұрын
Success! Great videos by an awesome instructor. Thanks for helping to make Uncle Fester a reality this year:)
@AEMIROBAYEH
@AEMIROBAYEH 4 ай бұрын
you are really a genius please do wiper or servo motor control using rain detection sensor based on real-time rain intensity for windshield wiper system control?
@Holly-ku8vz
@Holly-ku8vz 5 ай бұрын
Thanks for this really well detailed video and for links to each component!
@RachelDeBarrosLive
@RachelDeBarrosLive 5 ай бұрын
No problem! Hopefully it takes some of the guess work out 👍
@martingodbout2561
@martingodbout2561 Ай бұрын
Thank you for your video, I am in the process of making an autonomous mower and I was there for the programming on the speed, thank you one of the best explanatory videos I have seen.
@RachelDeBarrosLive
@RachelDeBarrosLive Ай бұрын
Glad I could help! Let me know how you make out with your mower project - it sounds cool!
@meiowalot7570
@meiowalot7570 5 ай бұрын
It doesn't get any better than a new video from you. Thank-you!
@RachelDeBarrosLive
@RachelDeBarrosLive 5 ай бұрын
My pleasure! 👍😄
@kyawaung2254
@kyawaung2254 5 ай бұрын
PLEASE KEEP DOING I LIKE WIPER MOTOR SUCH KING OF TUTORIAL
@xyzheng9672
@xyzheng9672 4 ай бұрын
Really impressed by this informative and practical tutorial video!😃Looking foward to having more potential working possibility with u
@dailydoseofnews4828
@dailydoseofnews4828 5 ай бұрын
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 ? Cheers
@RachelDeBarrosLive
@RachelDeBarrosLive 5 ай бұрын
That's a great idea! There are lots of good things to harvest off them.
@jstro-hobbytech
@jstro-hobbytech 5 ай бұрын
​@@RachelDeBarrosLivewhere I live they have heavy garbage pickup in the spring and there's hoverboards, games consoles, stereos and so much needless waste. I fix the stuff or repurpose and give it away. I live in a rural area so there's no danger poking around.
@damianbutterworth2434
@damianbutterworth2434 5 ай бұрын
I`ve just made a garage alarm using the same PIR sensor. I tested it for a week and got one false reading. Might of been the sun light coming through a window. I`ve added a 10k ohm pull down resistor to the 5 volt signal just in case that caused it. I also use a window screen wiper motor to pull an insulated cover over in the greenhouse to keep the plants warm at night and keep the lighting right. :)
@RachelDeBarrosLive
@RachelDeBarrosLive 5 ай бұрын
How has the PIR sensor worked since you put on the resistor? I love your greenhouse cover idea too - great project!
@damianbutterworth2434
@damianbutterworth2434 5 ай бұрын
@@RachelDeBarrosLive It`s worked ok this week. But it` moved out the Sun too. I was worried it would go off in the night and wake up the neighbours.:)
@damianbutterworth2434
@damianbutterworth2434 5 ай бұрын
Here is my code for a garage alarm with a magnetic door sensor and PIR. Had to use a PI Pico with the Arduino IDE in the end due to the Arduino stopped connecting. :) int n=0; int alarm_mode=0; int door=0; int on_off=0; int pir=0; int exit_time=0; int entry_time=0; int intruder=0; int alarm_time=0; void setup() { pinMode(8, INPUT); // ON/OFF SWITCH pinMode(9, OUTPUT); // BUZZER pinMode(10, INPUT); // DOOR MAGNETIC SWITCH pinMode(11, INPUT); // PIR SENSOR pinMode(12, OUTPUT); // ALARM RELAY pinMode(13, OUTPUT); // LED digitalWrite(9, LOW); // SET BUZZER LOW = OFF digitalWrite(12, LOW); // ALARM RELAY DEFAULT HIGH = OFF digitalWrite(13, LOW); //SET THE LED LOW = OFF delay(1000); } void loop() { on_off=digitalRead(8); delay(4); door=digitalRead(10); delay(4); pir=digitalRead(11); intruder=0; if(pir == HIGH){ intruder=1; } if(door == LOW){ intruder=1; } if (intruder == 0){digitalWrite(13, LOW);} if (intruder == 1){digitalWrite(13, HIGH);} if (on_off == LOW){ alarm_mode=0; digitalWrite(12, LOW); noTone(9); } if (alarm_mode == 0 && on_off == HIGH){ alarm_mode=1; exit_time=6000; // 60 seconds } if (alarm_mode == 1){ // ALARM SET AND WAITING 60 SECONDS TO GET OUT. exit_time=exit_time-1; if (n==0){tone(9, 1000);} if (n==20){noTone(9);} if (exit_time == 0){ alarm_mode=2; } } if (alarm_mode == 2){ // ALARM SET. WAITING FOR AN INTRUDER. noTone(9); if (intruder == 1){ alarm_mode=3; entry_time=3000; // 30 seconds } } if (alarm_mode ==3){ // Coming into the garage and the alarm enter timer is activated. if (n==0){tone(9, 800);} if (n==50){noTone(9);} entry_time=entry_time-1; if (entry_time == 0){ alarm_mode=4; alarm_time=1000; } } if (alarm_mode == 4){ noTone(9); digitalWrite(12, HIGH); // ALARM RELAY ACTIVATED. alarm_time=alarm_time-1; if (alarm_time == 0){ digitalWrite(12, LOW); alarm_mode=5; } } if (alarm_mode ==5){ // Alarm has been activated and now warns me of an intruder has been in. if (n==0){tone(9, 1500);} if (n==5){noTone(9);} } n=n+1; if(n >= 100){ n=0; } delay(2); }
@wishicouldarduino8880
@wishicouldarduino8880 4 ай бұрын
I haven't used a pir yet cool video😁
@HectorRoldan
@HectorRoldan 5 ай бұрын
If Bill and Ted's kids had coding/engineering kids, you would be that awesome thing ❤
@RachelDeBarrosLive
@RachelDeBarrosLive 5 ай бұрын
🤣👍
@lappieslatandra
@lappieslatandra 14 күн бұрын
Hi Rachel, is there a way to use variable speed without the 'for' statement?
@scubaken89
@scubaken89 5 ай бұрын
Another great teaching video. Maybe you or one of your other followers can help me. I am working on a greenhouse project and I am trying to figure out how to timestamp when the water meter (hall effect) sensor starts and stops counting.
@jackrichards1863
@jackrichards1863 5 ай бұрын
Thank you Rachel.
@lappieslatandra
@lappieslatandra 14 күн бұрын
Hi Rachel, is there a way to use variable speed without using the 'for' statement? the reason is I got limit switches to stop and start the motor but when I use the for statement the limit switches does not work.
@qzorn4440
@qzorn4440 5 ай бұрын
I like this video a lot. 🥳 Smart girls rock. Thank you.
@HFSPOOKYJ
@HFSPOOKYJ 4 ай бұрын
This is a great lesson. I learned a lot. Have you tried to use the park feature of the wiper motor maybe wired on the second side of the motor controller. I was thinking of a popup prop and then park as return to start.
@RachelDeBarrosLive
@RachelDeBarrosLive 4 ай бұрын
That's a great idea! I've only used the park feature with a switch so far and not with the Arduino.
@ottopetren8372
@ottopetren8372 4 ай бұрын
Hello, I've a question. In many wiring schemes I see online, the xy160d is also powering the Arduino itself. I can't get that to work. Have i misunderstood something
@TheOldKid
@TheOldKid 3 ай бұрын
A question for anyone. I was using an l293d as dual h-bridge running a mg996r servo and a motor from a powerwheels grave digger with flysky. Worked fine until smoke and fire. I realized later one of the wires from my main voltage supply had broke loose and shorted across the l293d. I ordered the same driver Rachael uses in this video and cannot seem to get it to work. The l293d had EN1&2 , 5v, input 1&2, output 1&2 and main power input. The xy160d has same type pin labels. The only thing that i see possibly different is l293d has EN1&2 the xy160d has PWM1 on docs where board says EN. Arduino pins 5&6 went to input 2&7 on l293d and arduino 9 went to transmitter. Could it be that with the new board i need a pwm signal from the arduino to the EN/PWN on the driver along with another pin from arduino to transmitter? Im no programmer by any stretch. Im a fabricator and welder. I can imagine to everyone in the microcontroller world this is a simple no brainer but im old, melt metal. If i cant straighten it with a sledge hammer or welder i have a torch. This is the last piece to my puzzle to have my project operational so all help, any help or advice is greatly appreciated
@darrell271
@darrell271 3 ай бұрын
Why can't I connect the sensor to the Arduino 5v and the motor to the aux+ power connection rather than use the breadboard?
@Jondon-hm7nh
@Jondon-hm7nh 5 ай бұрын
good stuff. Perfect guidance
@RachelDeBarrosLive
@RachelDeBarrosLive 5 ай бұрын
Glad you think so!
@kyawaung2254
@kyawaung2254 5 ай бұрын
Negelet any negative comment plese keep doing
@user-hr5dc4ly3q
@user-hr5dc4ly3q 5 ай бұрын
Hi i hope you are fine .. when i use relay and arduino and i2c LCD relay even contain diod the spike inside relay let LCD become freeze if you know to solve this problem tell me
@Firemandave911
@Firemandave911 5 ай бұрын
Who else is here just because Rachel is so damn easy on the eyes!!!!!!!??????
@bobmirror7164
@bobmirror7164 4 ай бұрын
She looks like she could be my old girl friends kid.
@TheOldKid
@TheOldKid 3 ай бұрын
End up watching multiple times because she tends to pull attention off components. Oh well. It helps view counts.
@petergaudiomonte1080
@petergaudiomonte1080 2 күн бұрын
She is pretty but I'm here for her knowledge and intelligence! She's a wonderful teacher!
@TT3TT3
@TT3TT3 5 ай бұрын
Thanks!🎉
@RachelDeBarrosLive
@RachelDeBarrosLive 5 ай бұрын
🥳
@kyawaung2254
@kyawaung2254 5 ай бұрын
CAN BE USE WITH ANY KIND OF DC MOTOR?
@BobMoraneRetro
@BobMoraneRetro 5 ай бұрын
Hello, is it possible to make a tutorial to make the dc motor run with sensor but without arduino or any other materials ?
@jamessheehan2694
@jamessheehan2694 Ай бұрын
sweet!
@71sixpak
@71sixpak 5 ай бұрын
I have a question for you about an electrical board and also Mopars. Where is a good place to message you ?
@AnitaLea9277
@AnitaLea9277 5 ай бұрын
Hey, I am going to be building auto doors for my smallish shelf unit. I now have 2 ideas as to how i would like to do it, after seeing this video. I watched a video on using a 2 button idea and thought that would be fantastic but, now i am thinking 2 pir's or motion sensors. i have not drawn up any plans at the moment as i went through some medical things. I do like to play with led lights strips and have them nearly everywhere in my room lol. Is there any chance you might be able to do a tutorial on making something like that Pretty Please ? And Yes, i have to agree, this tutorial was awesome as.
@RachelDeBarrosLive
@RachelDeBarrosLive 5 ай бұрын
I can definitely do one on controlling an LED strip with Arduino so you can program some cool lighting animations!
@AnitaLea9277
@AnitaLea9277 5 ай бұрын
@@RachelDeBarrosLive, I was actually talking about the sensors for the auto door open and closing. I have already succeeded in doing the led light strip with the addressable strips using youtube videos on that subject. Thankyou a whole heap though. I just read my comment i put up lmao, that question at the end was supposed to be at the end of when i was talking about the auto doors for my cupboard (silly me). So i do apologise for that.
@robertmatel8136
@robertmatel8136 5 ай бұрын
Hi, are you aware of the "auto format" tool in the IDE?
@RachelDeBarrosLive
@RachelDeBarrosLive 5 ай бұрын
Thanks for letting me know! 👍 I also need to update the IDE to the latest version 🤦‍♀️😆
@g3-is-me
@g3-is-me 5 ай бұрын
@@RachelDeBarrosLiveDon't remove the old IDE when you install the new one. There are sometimes incompatibilities on the new version. Just stumbled on your channel today. I'm enjoying these!
@harrypatel-j5k
@harrypatel-j5k Ай бұрын
Please send me a parts list and company name
@harrypatel-j5k
@harrypatel-j5k Ай бұрын
Please send me a list and thoughts company name
@Suzukii-Krypto
@Suzukii-Krypto 4 ай бұрын
Love the new Eyewear in this video, well new to me since this is the 2nd video of yours I'm watching, this time, with my 10-year-old son and sometimes my 8-year-old daughter. You're so Easy to learn from and (rudely stare at). Stoooooop!! Why couldn't you be a scary, semi-balding, cock-eyed old evil Scientist? (Kidding of course)😅😂
@DavidSmith-rl7zw
@DavidSmith-rl7zw Ай бұрын
Beautiful. Intelligent, Interesting. You are gorgeous woman😂
@DBB-KE5DUO
@DBB-KE5DUO 5 ай бұрын
My ghost friend (Tesla) just told me about Bluetooth power 😂 - the downside is it constantly makes that motor whining noise 🤣
@RachelDeBarrosLive
@RachelDeBarrosLive 5 ай бұрын
🤣😁
@naeemhaq3504
@naeemhaq3504 5 ай бұрын
too many mistakes in the video
@jstro-hobbytech
@jstro-hobbytech 5 ай бұрын
I think it's meant to be fun brother. Great for kids and people with just an arduino kit. The code is verbose as anything but it's not an enterprise level deployment haha. Cheers
@naeemhaq3504
@naeemhaq3504 5 ай бұрын
@@jstro-hobbytech plz dont mind sister you are in learning phase keep trying
@jstro-hobbytech
@jstro-hobbytech 5 ай бұрын
@@naeemhaq3504 I'm a software engineer ya dope haha
@naeemhaq3504
@naeemhaq3504 4 ай бұрын
@@jstro-hobbytech but your presentation is good. i like software engineers i am electronics engineer
@jstro-hobbytech
@jstro-hobbytech 4 ай бұрын
@@naeemhaq3504 cool. That's what I should've studied. I'm thinking about going back to school
@jeffryweiss4736
@jeffryweiss4736 3 ай бұрын
😩 *Promosm*
@jstro-hobbytech
@jstro-hobbytech 5 ай бұрын
Youre a great teacher but that code was overly verbose. I kid, arduinos are for fun and no one needs to be an engineer 😅
@bobmirror7164
@bobmirror7164 4 ай бұрын
Yes it was verbose, but excellent for old people like me that are just starting out. It really helps to see the thought process in writing code.
Motion-activated Sound Effects with Arduino, PIR Sensor & MP3 Player
25:26
а ты любишь париться?
00:41
KATYA KLON LIFE
Рет қаралды 3,5 МЛН
Whoa
01:00
Justin Flom
Рет қаралды 31 МЛН
How to Wire Multiple LEDs: Series vs. Parallel LED Circuits
21:24
Rachel De Barros
Рет қаралды 59 М.
Motion-activated Servo Motors with Arduino and PIR Sensor
25:20
Rachel De Barros
Рет қаралды 28 М.
More easy ways to add pipes to synchronous motors
9:36
Brian Benson
Рет қаралды 1,5 М.
How to Control a 12V Motor with Arduino: Easy Wiring & Code Examples
44:13
Effective Ways To Detect People With Common Sensors
7:43
Core Electronics
Рет қаралды 70 М.
How to Use Arduino Interrupts The Easy Way
33:28
Rachel De Barros
Рет қаралды 82 М.
Make Posable, Movable, Articulating Joints for your PVC Props
36:33
Rachel De Barros
Рет қаралды 54 М.