PIR Sensor DC Motor Arduino Project | Arduino To Control Dc Motor When Detected Motion | Thetips4you

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

Thetips4you

Thetips4you

Күн бұрын

#arduino, #arduinoprojects,#pirsensorprojects Hello Friends, Welcome back to my channel. In this tutorial we are going to control a DC Motor when there is a motion detected by PIR sensor.
In this lecture we will go through the step by step instruction for the complete circuit using Arduino UNO, DC motor, PIR sensor and few other components and writing the code.We will be using Tinkercad Simulator, and at the end of this tutorial you can just follow the connection and copy the code to Arduino IDE, upload the code to the Arduino and you will have a running project..
-------------------------------------------------------------------------------------------------------
Schematic and Project Code is available in github.
github.com/sha...
-----------------------------------------------------------------------------------------------------------
Arduino Serial Monitor Tutorial | Potentiometer With Arduino
• Arduino Serial Monitor...
--------------------------------------------------------------------------------------------------------------
PIR Sensor Arduino Project | Motion Detector Arduino UNO
• PIR Sensor Arduino Pro...
--------------------------------------------------------------------------------------------------------------
==========================================================
Follow me @:
/ thetips4you
/ @thetips4you
/ thetipsforyou
www.thetips4you...
========================================================

Пікірлер: 85
@CheerfulCornflowers-gl1bz
@CheerfulCornflowers-gl1bz Ай бұрын
Sir i am a 5 class student pls can you send me the code today bcz i have a project.
@Thetips4you
@Thetips4you Ай бұрын
Check the video description. The code is in GitHub
@mugilanlatchimanan9301
@mugilanlatchimanan9301 3 жыл бұрын
Can we use This project to implement in an aircraft. For example like to calculate the distance between the ground and the aircraft when landing. If yes please tell me how.
@Thetips4you
@Thetips4you 3 жыл бұрын
These are not industrial sensors, you can use the concept. However the sensors has to be changed with precision sensors.
@mugilanlatchimanan9301
@mugilanlatchimanan9301 3 жыл бұрын
@@Thetips4you what are the examples of precision sensors
@christibeabarr
@christibeabarr 3 жыл бұрын
When I add battery, motor just turns on and doesn't stop. I've been trying to troubleshoot with no success. Any ideas by chance?
@Thetips4you
@Thetips4you 3 жыл бұрын
That means the power is always going to motor. Can you share your circuit diagram to me in fb @thetipsforyou. I will have a look.
@telcygomes4770
@telcygomes4770 3 жыл бұрын
Yes what solution could you provide?
@Thetips4you
@Thetips4you 3 жыл бұрын
I have asked Christi to check few things through fb. Are you facing the same issue? What I found out when checking with SoulFrank, by default the pins where giving high voltage. So we had to make some changes in code. Pls contact me through fb@ thetipsforyou.
@mangananjanchristiana.5710
@mangananjanchristiana.5710 2 жыл бұрын
Yes, I have the same problem too, with my project. The motor just keeps on spinning without capturing any motion, can you help me about this sir?
@Enoch_The_Gent
@Enoch_The_Gent 2 жыл бұрын
How can you turn on 3 dc motors with a Pir sensor and have each dc motor to be on for a certain amount of time then turn off?
@Thetips4you
@Thetips4you 2 жыл бұрын
You need to change the circuit and code based on it.
@stanimatorblue
@stanimatorblue Жыл бұрын
The IDE says "Failed Uploading: No Upload Port Provided." It's plugged in. I don't know what I can do. Any suggestions?
@Thetips4you
@Thetips4you Жыл бұрын
In the Arduino ide select the right board and port. Alternatively you can select the tools-ports to select the port
@shahrulanuar6386
@shahrulanuar6386 3 жыл бұрын
Hi.. I followed 100% your instruction. But my dc motor keep rotating even if the sensor detected no motion. Why? is it because of the diode/ transistor that I used? do they have specific value?
@Thetips4you
@Thetips4you 3 жыл бұрын
Can you make sure the pir sensor is connected correctly. It signal pin should not be connected to 5v, in some pir sensors the signal pin will be in different position.
@salamaalali1052
@salamaalali1052 3 жыл бұрын
Hello sir, how can I combine this circuit and code to ultrasonic distance sensor I have the 2 circuits separate. 1- First circuit is ultrasonic distance sensor controlling the 2 DC motors using L293D H-bridge. 2- Second circuit is like the tutorial you did with 2 DC motors. Everything is working in the 2 circuits but I don't know how to combine them. May you help me with that? - The idea of my project is when obstacles or anything comes near my probe the PIR Sensor will detect the motion and the Ultrasonic distance will move backward when it's near 100cm to my probe. And also I will include the dust sensor but still did not do the circuit and I don't think it will work. - One question about the diode transistor I don't have it right now, if I did not include it the circuit will still work? I apologies for the long discussion and I will be happy if you could help. Thank you!
@Thetips4you
@Thetips4you 3 жыл бұрын
Hi, yes we can do that. Please contact me through fb thetipsforyou. Let's see how we can create the circuit and code for your project. Regarding diode, it is used to stop the current flow in reverse direction to protect Arduino, your circuit should work even with out diode.
@keerthu374
@keerthu374 10 ай бұрын
Sir i want to slow my motor if my pir sentor detect a body or else the motor speed should be same If i change the if else statement The motor is high 1st after 1-2 seconds it come to zero on both motion detect or not detect What's the mistake i have made?
@Thetips4you
@Thetips4you 10 ай бұрын
What exactly do you change in the else if statement?
@anafilipovic241
@anafilipovic241 3 жыл бұрын
This is really an amazing tutorial, thank you so much for it. I was wondering would it also work with a somewhat lower voltage? I need it to be as small as possible and with a solar-charged battery, and those are not easy to find. Thanks!
@Thetips4you
@Thetips4you 3 жыл бұрын
Thank you for your feedback. If the voltage is good enough to run the motor yes it should work irrespective of the source.
@lucsonnelson8037
@lucsonnelson8037 3 жыл бұрын
If you need something smaller, it's way easier cause you can just directly use the voltage coming from the arduino. It jus a 5 volt input. No need of all of this transistor. All you need it's a program
@willwood6116
@willwood6116 3 жыл бұрын
Great video. I followed the tutorial and everything is working as it should! I was wondering if there was anyway the PIR sensor could activate the motor for a certain amount of time (2/3 seconds) before stopping and then reversing (for 2/3 seconds) when there is no motion to activate the PIR sensor? I have no idea how to do this any and would be very grateful for any advice.
@Thetips4you
@Thetips4you 3 жыл бұрын
Yes . That is possible. We need to change the circuit and code a little bit. Can you contact me through fb @thetipsforyou or in Instagram @thetips4you
@patrickguinan9360
@patrickguinan9360 3 жыл бұрын
I had it working but then I changed the battery for the motor from a 9V to a battery pack for 6 AA in series - should b e same voltage, I think. It worked few times then stopped. I have gone back to 9V battery but motor still won't engage, although LED in place of motor works. Any advice?
@Thetips4you
@Thetips4you 3 жыл бұрын
Can you test the motor separately, it may be the motor is not working.
@patrickguinan9360
@patrickguinan9360 3 жыл бұрын
@@Thetips4you Thanks for responding. Yes, I have tested the motor and it works fine with just the 9V.
@breadoflifemeditationandhe466
@breadoflifemeditationandhe466 4 жыл бұрын
great work man, i have try it, it is working great, but i want the motor to reward back after sometime, and if it sense motion while rewarding back it should stop, thanks man looking forward for you reply
@Thetips4you
@Thetips4you 4 жыл бұрын
With this circuit it will be difficult to reverse the motor as you will have to reverse the power supply from battery. You can use different method in which the power is decided by pin and cann write the code to control it.
@erinrehm4854
@erinrehm4854 3 жыл бұрын
Hi I was wondering what kind of transistors can be used. Could I use a 2N2222 transistor?
@Thetips4you
@Thetips4you 3 жыл бұрын
Yes probably, but the preferred is nmos or MOSFET.
@prasannak3124
@prasannak3124 3 жыл бұрын
Thanks for the vdo. Can IRF540N MOSFET transistor b used for this? I have 7805 IC, can this be used.
@Thetips4you
@Thetips4you 3 жыл бұрын
Irf540n mosfet should be fine.
@prasannak3124
@prasannak3124 3 жыл бұрын
@@Thetips4you thanks
@bryanmathes9016
@bryanmathes9016 Жыл бұрын
Is this still active chat? I did everything the same ran the test but when put into real materials, the DC motor continues to run
@Thetips4you
@Thetips4you Жыл бұрын
It should work. Check the connections or pin for sensor is connected correctly.
@bryanmathes9016
@bryanmathes9016 Жыл бұрын
@Thetips4you I'm buying a dc motor to see if this is the issue. Should be here tomorrow so I'll let you know. The one I'm using now is 3v -12v so I'm wondering if it is just pulling the power. New one will be 1.5v -6v
@paddymush1
@paddymush1 3 жыл бұрын
hi,, this is great video , i liked and subscribed. im doing this , except im using 5v servo motor , so does this mean , i take away the 9v battery , and run the servo ground , and live to the same as the sensor and then the servos feed to the arduino. thank u
@Thetips4you
@Thetips4you 3 жыл бұрын
Thank you for your comment. Yes it will work with servo motor and power from Arduino. If you have any issues let me know.
@paddymush1
@paddymush1 3 жыл бұрын
@@Thetips4you thank you very much , awesome
@Thetips4you
@Thetips4you 3 жыл бұрын
You are welcome.
@xanh350
@xanh350 3 жыл бұрын
man pls how do I use this RIP sensor as analog? I'd like it to detect only if the green circle is in the middle of that sensor place?
@Thetips4you
@Thetips4you 3 жыл бұрын
What is your exact requirement with PIR sensor?
@xanh350
@xanh350 3 жыл бұрын
@@Thetips4you to put at a door and only detect movement of a human so that it doesn’t react when a dog or cat is there for example, but I just want it to show that in the tinkercad as a demonstration.
@Thetips4you
@Thetips4you 3 жыл бұрын
@@xanh350 You cannot do that with just a PIR sensor. If you need to specifically detect humans I would recommend to go with OpenCV and programmed to detect human.
@danielbigelow2193
@danielbigelow2193 3 жыл бұрын
Thank you sir this was a great tutorial..I don’t have any diodes at the moment so I tried the circuit without and it worked..can I use a LED instead of a normal diode?
@Thetips4you
@Thetips4you 3 жыл бұрын
It may work without diode. The only reason for using the diode is to stop the reverse current flow that breaks your device. LED cannot do the job of diode.
@danielbigelow2193
@danielbigelow2193 3 жыл бұрын
@@Thetips4you could it damage my device if I’m not using the 5V pin? I plan to use 12V on the external pin of Arduino
@Thetips4you
@Thetips4you 3 жыл бұрын
Since the DC motor need higher voltage, if you use 12v and if don't use diode, there is possibility of the device to dead state. So be careful.
@danielbigelow2193
@danielbigelow2193 3 жыл бұрын
@@Thetips4you I’ll test it out and let you know..I think it should be fine since the current of 8 AA batteries in series is the same as 1 AA battery
@fekaduadbeb3058
@fekaduadbeb3058 10 ай бұрын
Where will you connect the neutral of the 9v battrey had it not been on a bread board
@shazrenyusuff
@shazrenyusuff 2 жыл бұрын
Hi can i know why need diode and transistor???
@Thetips4you
@Thetips4you 2 жыл бұрын
It is used to stop reverse current flow.
@Ildeniz1071
@Ildeniz1071 3 жыл бұрын
Great tutorial. Can you use the same system to stop running motor with sensor.
@Thetips4you
@Thetips4you 3 жыл бұрын
Yes, if you are talking about sensor detect can be used to stop a running motor. However you will have to define when the motor should be running as well.
@Ildeniz1071
@Ildeniz1071 3 жыл бұрын
@@Thetips4you I have six indoor cats. I am tired to clean their kitty litter box. I come up project to create self cleaning box. Mechanical parts is done but I have to control a stepper motor when any cat go in and detected by PIR sensor. Simply a cat goes in the box, sensor detects , no motion, when the cat leaves the box sensor triggers the system, 30 seconds delay and then stepper motor turns the system half revolution and turns back the system the beginning position and stops until a cat trigger the system again. I am watching almost all PIR sensor and stepper motor tutorials to combine them. I know you will say "hey, don't bother, pay $500 to buy from the market" but they are not big enough.
@Thetips4you
@Thetips4you 3 жыл бұрын
Great to hear about your project and cats. Here the the problem is that you will not be able to seperate the movement of cat coming and going out. Pir sensor will keep detecting a high value when there is even a small movement. Probably you can try with ultrasonic sensor and if the distance ( cat is going away from sensor) is more than some distance you can rotate the motor.
@jerrybomcool
@jerrybomcool Жыл бұрын
This is exactly what I needed thank you! I just need to make this wireless (running from batteries and not from the wall) I’m assuming this applies the same to the nano
@Thetips4you
@Thetips4you Жыл бұрын
Ok
@Syncz1712
@Syncz1712 Жыл бұрын
bro can you give a reason on why you used servo motor? please i have project to be submitted soon
@Thetips4you
@Thetips4you Жыл бұрын
Where is Servo motor used?
@lucsonnelson8037
@lucsonnelson8037 3 жыл бұрын
Are you sure that the diode is well place in this circuit bro cause in real life it should fried the arduino board.
@Thetips4you
@Thetips4you 3 жыл бұрын
Yes, the diode is kept in the way that the current will not flow towards Arduino. You can test that before making the connection.
@weiyichong7581
@weiyichong7581 4 жыл бұрын
Hi can I ask what type of nmos transistor and diode is used in this project
@Thetips4you
@Thetips4you 4 жыл бұрын
Hello Friend, you can use normal rectifier or PN diode, also MOSFET transistor. In Tinkercad you can easily find diode and nmos transistor.
@weiyichong7581
@weiyichong7581 4 жыл бұрын
So if I were to buy those components I can just tell them to get me a MOSFET transistor and a normal rectifier? Or are there any codenames for the specific component?
@Thetips4you
@Thetips4you 4 жыл бұрын
@@weiyichong7581 Yes. That will be fine. MOSFET NMOS Transistor and Normal diode. You can search in online shopping site and easily available there.
@weiyichong7581
@weiyichong7581 4 жыл бұрын
@@Thetips4you Thanks so much!
@Thetips4you
@Thetips4you 4 жыл бұрын
@@weiyichong7581 You are welcome my friend
@varunsavadatti8457
@varunsavadatti8457 3 жыл бұрын
It was so helpful ✌️
@Thetips4you
@Thetips4you 3 жыл бұрын
Good to hear. Thank you for your feedback.
@whispymagma2535
@whispymagma2535 2 жыл бұрын
I had a lot of problems with this tutorial, My arduino IDE detected all sorts of problems.
@Thetips4you
@Thetips4you 2 жыл бұрын
Do you like to share the details
@whispymagma2535
@whispymagma2535 2 жыл бұрын
@@Thetips4you sure. When I copied what you wrote down on the code on tindercad, I wrote letter to letter, and all the same symbols, and when I copied and pasted it into the arduino IDE, I tried uploading it, and it said stuff about putting this: ';' behind digitalWrite, and canat can not be found
@pcmoba3738
@pcmoba3738 2 жыл бұрын
Can breadboard carry 12v 1a
@trekdetectsicily3515
@trekdetectsicily3515 2 жыл бұрын
value for diode?
@dalenicic5696
@dalenicic5696 3 жыл бұрын
Hi this is an excellent tutorial but im a little confused about which MOSFET and diode to get as there are many available, could you specify which you used please? Also can I control rpm of motor? Thank you
@Thetips4you
@Thetips4you 3 жыл бұрын
Thank you. You will not be able to control the rpm with this circuit. I will check and share you the details on the models.
@dalenicic5696
@dalenicic5696 3 жыл бұрын
@@Thetips4you excellent thank you, also sketch keeps showing errors?
@Thetips4you
@Thetips4you 3 жыл бұрын
@@dalenicic5696 Can you give more details on what you mean by Sketch keep showing errors?
@dalenicic5696
@dalenicic5696 3 жыл бұрын
@@Thetips4you apologies sketch error is my fault, I’m new to arduino
@dalenicic5696
@dalenicic5696 3 жыл бұрын
Although now I have same issue as some other people the motor does not stop spinning
Trigger DC Motor with PIR Sensor & Arduino - Complete Guide
35:29
Rachel De Barros
Рет қаралды 17 М.
Motion-activated Sound Effects with Arduino, PIR Sensor & MP3 Player
25:26
БЕЛКА СЬЕЛА КОТЕНКА?#cat
00:13
Лайки Like
Рет қаралды 2,4 МЛН
А ВЫ ЛЮБИТЕ ШКОЛУ?? #shorts
00:20
Паша Осадчий
Рет қаралды 9 МЛН
How to control a DC motor with an encoder
9:30
Curio Res
Рет қаралды 441 М.
How to Use a PIR Sensor with Arduino (Lesson #26)
6:38
Science Buddies
Рет қаралды 25 М.
How to Control Stepper Motors with Arduino using a GRBL CNC Shield!
8:55
I tried the Cheapest Arduino Alternative (that Nobody heard of)
13:31
How to use PIR Motion Sensor with Arduino | Motion sensor light
5:35
hash include electronics
Рет қаралды 106 М.
20 Mechanical Principles combined in a Useless Lego Machine
7:21
Brick Experiment Channel
Рет қаралды 43 МЛН
Motion-activated Servo Motors with Arduino and PIR Sensor
25:20
Rachel De Barros
Рет қаралды 33 М.