How to use PIR Motion Sensor with Arduino | Motion sensor light

  Рет қаралды 107,593

hash include electronics

hash include electronics

Күн бұрын

Пікірлер: 145
@ujwalskill9592
@ujwalskill9592 8 ай бұрын
thank you so much .this project is working
@hashincludeelectronics
@hashincludeelectronics 8 ай бұрын
Nice 👏🏻👍🏻
@Raja-dl5uc
@Raja-dl5uc 9 ай бұрын
thanks i am a 13 year old boy i was searching for guidance for my science expo ur project made my way clear
@hashincludeelectronics
@hashincludeelectronics 9 ай бұрын
I am glad that you liked the video and it was helpful to you. Keep learning and I wish you all the best for your future 👏🏻👏🏻👍🏻
@al-ustad2428
@al-ustad2428 3 ай бұрын
Thanks for helping...🎉
@hashincludeelectronics
@hashincludeelectronics 3 ай бұрын
Thank you very much 👍🏻👏🏻
@propanda5584
@propanda5584 Жыл бұрын
Bro can you tell what is the advantage of using aurduino UNO instead of doing it directly?
@hashincludeelectronics
@hashincludeelectronics Жыл бұрын
You can add any additional handling using Arduino code . You can add delays etc . 👍🏻👏🏻
@memphistomem3576
@memphistomem3576 11 ай бұрын
Hi, I just did this one here, works perfect :) But I just wonder how to make light stay on until I leave the room? Is it just to set pir sensor to HIGH mode?
@hashincludeelectronics
@hashincludeelectronics 11 ай бұрын
Thank you very much for checking out the video and nice comment 👍🏻👏🏻. It will stay high as long as you are there in the room and keeps moving .
@Dinaltium
@Dinaltium 9 ай бұрын
Hey bro, I am a beginner into coding ( I know a bit of Python coding but not C) So can you give me code to adjust the timing for the light to stay on, Mines stay on for a minute or 2 and then switches of after that. Since I need this for my upcoming project exhibition, I want it to switch off faster so I can show again quickly how my project works instead of having to wait for long
@ted_van_loon
@ted_van_loon 3 ай бұрын
this sensor is meant for being used directly without microcontroller so there directly is a knob for adjusting it on the board, the code in the video does nothing more than read the value and copy it to another pin, see 1:23 in the video how to adjust it. since the sensor does a lot already it is slightly harder to use but still easy. so here is what code you would ask for #define SENSOR_PIN 2 #define RELAY_PIN 3 void setup() { pinMode(SENSOR_PIN, INPUT); pinMode(RELAY_PIN, OUTPUT); } bool on = false; int ontime = 1000; //1000 is 1 second void loop() { if (digitalRead(SENSOR_PIN) == HIGH) { if (!on) { on = true; digitalWrite(RELAY_PIN, LOW);//this1 delay(ontime); digitalWrite(RELAY_PIN, HIGH);//this2 } } else { on = false; } } //you might want to change the HIGH and LOW at this1 and this2. //if you alter int ontime then you change the time it stays on, 1000 miliseconds is 1 second. since the module itself can already go down to 3 seconds, I took 1 second now.
@The.Real.Reddit.Chronicles
@The.Real.Reddit.Chronicles Жыл бұрын
did you cut the plug wire yourself? and where can i find a AC Bulb socket like yours?
@hashincludeelectronics
@hashincludeelectronics Жыл бұрын
Yes you can cut the wires as needed . Also you can buy the sockets which are available at your location . No issues in that . 👍🏻 but make sure to make proper connection as it deals with AC voltages .
@ritika7665
@ritika7665 5 ай бұрын
​@@hashincludeelectronicscould u give the link on where I can buy ac plug socket like that
@aryanshinde1882
@aryanshinde1882 4 күн бұрын
Bro what is total costs of this project ? Super project ❣️❣️
@hashincludeelectronics
@hashincludeelectronics 3 күн бұрын
Thank you so much 👍🏻👏🏻
@dr.rashmichovatia4398
@dr.rashmichovatia4398 9 күн бұрын
Can you say from where you have bought ac bulb socket + plug
@hashincludeelectronics
@hashincludeelectronics 9 күн бұрын
@@dr.rashmichovatia4398 you can but it from any electrical shop . Or from any smart mart 👍🏻👏🏻
@jaganjagan5584
@jaganjagan5584 Ай бұрын
Insteadof dc supply i can use lap cpnnection
@hashincludeelectronics
@hashincludeelectronics Ай бұрын
Yes you can 👍🏻👏🏻
@SpaceSoftSystem
@SpaceSoftSystem 7 күн бұрын
Good...
@hashincludeelectronics
@hashincludeelectronics 7 күн бұрын
Thank you so much 👍🏻👏🏻
@rajannachandnkera6892
@rajannachandnkera6892 Жыл бұрын
I want know who to use hw-416-b model pir sensor
@pinkbrush5543
@pinkbrush5543 Жыл бұрын
Hello. Im actually beginner and I have a project to do. I need to control alot of servo motor (12) with motion sensor and at the same time I have to control another thing (kind of robot with arduino). I want to use IR control and motion sensor for the first robot, also with the data flow and the other robot to move simultaneously
@hashincludeelectronics
@hashincludeelectronics Жыл бұрын
This looks like big project . I would suggest to go through my tutorial videos on servo , sensors etc and see if it helps 👍🏻👏🏻
@shabnambhadauria3009
@shabnambhadauria3009 Жыл бұрын
Can i add a voice assistant to this project, and if yes and then how, do you have a video on it , kindly share ,it would helpful
@hashincludeelectronics
@hashincludeelectronics Жыл бұрын
This is very basic project and we can not add voice assistant as it is . 👏🏻👍🏻
@Raja-dl5uc
@Raja-dl5uc 9 ай бұрын
thanks for the code
@hashincludeelectronics
@hashincludeelectronics 9 ай бұрын
You are welcome 🙏
@taefm9712
@taefm9712 Жыл бұрын
can you connect the arduino with thingspeak platform to analysis the data from the sensor and who it does?
@hashincludeelectronics
@hashincludeelectronics Жыл бұрын
I believe thingspeak needs internet and Arduino can not handle that . You need to use modules like esp32
@HappyHermitt
@HappyHermitt Жыл бұрын
I would like to use a servo with a pir. Could this code be edited for it?
@hashincludeelectronics
@hashincludeelectronics Жыл бұрын
Yes you can easily edit this code to use servo motor .
@chandandas647
@chandandas647 10 ай бұрын
You have single channel relay Was used. If I am using a 2 channel relay then where should I put the input of the second relay. I have to connect 2 bulbs
@hashincludeelectronics
@hashincludeelectronics 10 ай бұрын
Use the exact setup and connection 👍🏻👏🏻
@jpena6678
@jpena6678 11 ай бұрын
Well I have another question. The light is turning on while motion is detected but turning off immediately. How do I keep it lighting?
@hashincludeelectronics
@hashincludeelectronics 10 ай бұрын
How long do you want the light to be turned on ? You can add that in code as well 👍🏻👏🏻
@jpena6678
@jpena6678 10 ай бұрын
@@hashincludeelectronics My idea is to just turning the light on then I would manually turn it off.
@jabregazzz7964
@jabregazzz7964 Күн бұрын
By adjusting it on d code
@crispinopesalbon6663
@crispinopesalbon6663 2 жыл бұрын
thanks bro it works
@hashincludeelectronics
@hashincludeelectronics 2 жыл бұрын
Welcome 👍
@NaveenKumarGupta-j1x
@NaveenKumarGupta-j1x 11 ай бұрын
Can you give the link for 7-12 V DC battery as well?
@hashincludeelectronics
@hashincludeelectronics 11 ай бұрын
Yes. You can check my other car videos where I have provided the battery link 👍🏻👏🏻
@4ri8
@4ri8 Жыл бұрын
but i can also connect the output pin of PIR to relay input pin directly without using arduino right?
@hashincludeelectronics
@hashincludeelectronics Жыл бұрын
Yes you can 👍🏻
@ronixbhaskar8263
@ronixbhaskar8263 Жыл бұрын
How to connect the arduino code on the proteus software
@hashincludeelectronics
@hashincludeelectronics Жыл бұрын
Unfortunately I don’t have any idea on that . Please share your findings 👏🏻
@RenzAndreiSuarez
@RenzAndreiSuarez 6 ай бұрын
can i ask about the jumper cable what pin is that is that 10 pin?
@hashincludeelectronics
@hashincludeelectronics 6 ай бұрын
Please check the video for these details 👍🏻👏🏻
@Michaelvicera-c2n
@Michaelvicera-c2n 7 ай бұрын
Will it still work if I replace the bulb with a mini fan?
@Michaelvicera-c2n
@Michaelvicera-c2n 7 ай бұрын
Also will the code still work if I already replaced the bulb with a fan?
@hashincludeelectronics
@hashincludeelectronics 7 ай бұрын
It will work 👍🏻👏🏻
@animeghost_7
@animeghost_7 2 ай бұрын
can i use dc plug direct to the home switch port
@hashincludeelectronics
@hashincludeelectronics 2 ай бұрын
Sorry I did not understand your point 👍🏻👏🏻
@animeghost_7
@animeghost_7 2 ай бұрын
@@hashincludeelectronics can i provide dc supply on both sides
@lancedias9333
@lancedias9333 2 жыл бұрын
In the circuit diagram why isnt the breadboard included?
@hashincludeelectronics
@hashincludeelectronics 2 жыл бұрын
Thanks for checking out the video and for query . Breadboard is just for extending the connections. So i did not include in circuit diagram to keep the connections clear with modules. I hope you are familiar with how to use breadboard . Let me know if you need any help .
@Yer711
@Yer711 13 күн бұрын
Do you need another battery if i don't want to use a/c?
@hashincludeelectronics
@hashincludeelectronics 13 күн бұрын
@@Yer711 we need AC to turn on this bulb 👍🏻👏🏻
@Yer711
@Yer711 11 күн бұрын
@@hashincludeelectronics im currently copying this system to build a solar powered motion sensor light, and i have a dc led, how can i connect the relay to the led?
@hashincludeelectronics
@hashincludeelectronics 11 күн бұрын
@@Yer711 use the same connections . Just instead of AC supply use DC 👍🏻👏🏻
@brianmasangkay9153
@brianmasangkay9153 Жыл бұрын
where we can buy the battery? what is other replacement for it
@hashincludeelectronics
@hashincludeelectronics Жыл бұрын
You can buy it online on Amazon . You can use lion batteries as well . But make sure you use rechargeable battery only .
@ayoraz_0144
@ayoraz_0144 Жыл бұрын
uhhh so i have a question: how can i use the 2 normal rgb leds with 4 pins on this project?
@ted_van_loon
@ted_van_loon 3 ай бұрын
what do you want them to do? if you use a arduino you can just program the arduino to the the special colour effect and colour changing and such. otherwise you can use some transistors or mosfets or some IC's like counters to program in the animation and do it without a arduino. if you plan to litterally use it in a fixed colour then you can just connect them all to the same output with resistors for every led pin. you might want to use a transistor however since the GPIO of a arduino or the pir sensor depending on which one you use, might not deliver enough current for all 6 leds. essentially a 4 pin RGB led, are just 3 different leds in one casing. one of the pins is often ground, which is typically shared between them the others are the input for the 3 leds. in some cases the one pin connected to all leds might be the + pin and the other pins might be - so either test it or read the datasheet to find out. to test it, just connect 2 jumperwires to the arduino, one to +5v and one to gnd. also connect a resistor to one of the jumper wires with a resistance value of around 500 to 1000 Ohm, it might not be needed and you can use lower values, but this is for safety to not accidentally fry a led when testing. then just test pin combinations and you will see which pin is what colour and what direction, etc. also note that you do not need to use the arduino the arduino is litterally just used as a transistor to amplify the signal so you can just use a transistor and 1(or optimally 2) resistors to do the same, next to that the arduino is used as a 5V power suply. but the module supports 5v to 20v. so you can also power it by some 12v or 5v adapter or such, or even from a usb port. other values in between 5v and 20v also work, but if you use a relays to switch the light then make sure it supports the used voltage as driving voltage, which is why 5v and 12v are usefull since they are commonly used. also please be aware that while it supports up to 20V you typically do not want to run it at 20V, while it should not be a problem, since it is always running, typically when such devices support up to 20V it is still best to just use 5v or 12v. not only are they more standardized values, but driving it at 20V might be driving the buildin step down converter to it's limit. since it essentially takes your input voltage and uses a step down converter to reduce it to around 3.3V next to that it might also convert something to 5V but not certain of that. but the output signals are 3.3V. it uses very low power however, so it shouldn't give problems, but still if something runs always you are best of making sure it is really safe, and durable.
@ManuelJarvinALuna
@ManuelJarvinALuna 3 ай бұрын
can i make it send me a message or a call whenever a motion is detected?
@hashincludeelectronics
@hashincludeelectronics 3 ай бұрын
@@ManuelJarvinALuna it’s not possible in this project 👍🏻👏🏻
@cylexarts3598
@cylexarts3598 Жыл бұрын
Slight problem, after 10 secs of activation it just turns off even thougj im moving in front of the sensor...how to fix this?
@yugagawas1004
@yugagawas1004 Ай бұрын
Which jumper wire
@hashincludeelectronics
@hashincludeelectronics Ай бұрын
You can use any jumper wires 👏🏻👍🏻
@_Literallyus
@_Literallyus 8 ай бұрын
How can i use this project for industrial automation
@hashincludeelectronics
@hashincludeelectronics 8 ай бұрын
You can use this wherever you need to take some action based on human movements . Do some research where this can be used 👍🏻👏🏻
@_Literallyus
@_Literallyus 8 ай бұрын
@@hashincludeelectronics Thankyou indeed !!
@artoflivingrajkot
@artoflivingrajkot Жыл бұрын
will it work on my project which is street lights made from LEDs?
@hashincludeelectronics
@hashincludeelectronics Жыл бұрын
It should work 👍🏻👏🏻 However take good care while making this project as we are dealing with AC at the output 👍🏻
@artoflivingrajkot
@artoflivingrajkot Жыл бұрын
@@hashincludeelectronics can you tell me what to use instead of AC bulb socket? Or can I directly connect the wires of LED to arduino UNO?
@hashincludeelectronics
@hashincludeelectronics Жыл бұрын
@@artoflivingrajkot how many LEDs are there ? Is it like a series of LEDs?if these LED bulbs are AC controlled then instead of bulb socket you can use normal plug socket and use it . 👍🏻
@artoflivingrajkot
@artoflivingrajkot Жыл бұрын
@@hashincludeelectronics there are 12 LEDs.and it is not LED bulbs they are 5mm LED diodes.that's why I asked you that it will work or not.
@artoflivingrajkot
@artoflivingrajkot Жыл бұрын
@@hashincludeelectronics sir i will want 9v battery in it so how to insert the positive and negative wires and from where in the relay or arduino i will get the output? please tell me sir tomorrow is my science fair.
@cylexarts3598
@cylexarts3598 Жыл бұрын
What if you are using 2 motion sensors, does that mean you need to use 2 arduino's....and also can this design be use in a 16mhz arduino?
@hashincludeelectronics
@hashincludeelectronics Жыл бұрын
You will have to use only 1 Arduino . Yes it will work for 16mhz Arduino . 👍🏻
@rajaramrr
@rajaramrr Жыл бұрын
Actually you don't even need an Arduino, you can directly connect the output of the PIR sensor to trigger the relay. But it's a very nice tutorial though 👏
@WaqarAli-k5p
@WaqarAli-k5p 4 ай бұрын
Awesome
@hashincludeelectronics
@hashincludeelectronics 4 ай бұрын
Thank you very much 👍🏻👏🏻
@mayuritekar6793
@mayuritekar6793 9 ай бұрын
Can we supply 12v DC power in place of 220v Ac
@hashincludeelectronics
@hashincludeelectronics 9 ай бұрын
Yes you can but you will have to use 12c dc appliance then 👍🏻👏🏻
@mayuritekar6793
@mayuritekar6793 9 ай бұрын
@@hashincludeelectronics what are those appliances
@hashincludeelectronics
@hashincludeelectronics 9 ай бұрын
@@mayuritekar6793 I am not sure . As you want to use 12v dc instead of 220v ac 😂
@mayuritekar6793
@mayuritekar6793 9 ай бұрын
@@hashincludeelectronics no bro.. I have 12v DC solar system, so I want to run entire motion sensor on 12v. Please suggest me bro😥⁦🙏🏻⁩
@hashincludeelectronics
@hashincludeelectronics 9 ай бұрын
@@mayuritekar6793 you can connect it to Arduino vin pin directly then 👍🏻👏🏻
@riddhi2509
@riddhi2509 5 ай бұрын
Breadboard of how much dots?? 80 or 100
@hashincludeelectronics
@hashincludeelectronics 5 ай бұрын
You can buy any 👏🏻👍🏻
@jpena6678
@jpena6678 11 ай бұрын
I didnt understand where you used the Battery? is it not necessary?
@hashincludeelectronics
@hashincludeelectronics 11 ай бұрын
Yes we have used battery . Please check the video and also circuit diagram for reference 👍🏻👏🏻
@jpena6678
@jpena6678 11 ай бұрын
@@hashincludeelectronics thanks for replying. yeah I found that
@kundan.rajput
@kundan.rajput 6 ай бұрын
Hello , I want to ask one thing I have a 5v relay module and 1 pir sensor I have done connection Vcc of sensor and relay are from same charger of 5v 1A Gnd pin is also same Out of sensor is connected to in of relay And relay's No is connected to bulb and common is connected to vcc I am facing the issue Bulb is always onn after power on supply Even after it for not detect human
@hashincludeelectronics
@hashincludeelectronics 5 ай бұрын
Please check the video slowly and carefully for missing steps 👍🏻👏🏻
@furqonoof
@furqonoof 9 ай бұрын
how do i make the project doesnt require battery?
@hashincludeelectronics
@hashincludeelectronics 9 ай бұрын
You will have to use solar cells 👍🏻👏🏻
@mohamadaldawood4949
@mohamadaldawood4949 2 жыл бұрын
Is there a problem using 220 volt electricity?
@hashincludeelectronics
@hashincludeelectronics 2 жыл бұрын
Thanks for checking out video 👍 There is no problem in using 220 V in this project . However good care should be taken while making connections as we are dealing with AC High Voltage. So make sure you connect wires properly. You can check my other video for reference where I have explained how to use relay. Let me know if you face any issue .
@mohamadaldawood4949
@mohamadaldawood4949 2 жыл бұрын
@@hashincludeelectronicsCan I have a video link?
@ZenHulk
@ZenHulk 8 ай бұрын
This set yp is like playing with legos in the 70sm blah, never works, those sensors sell 5 at a time because 3 dont work or work sometimes in the best condition on your bench.
@aathik7229
@aathik7229 Жыл бұрын
One doubt, It is consider as AI Project?
@hashincludeelectronics
@hashincludeelectronics Жыл бұрын
Not really. It’s very basic DIY project 👍🏻👏🏻
@shahnewajbd4623
@shahnewajbd4623 11 ай бұрын
How can we use your link for diagram and code
@hashincludeelectronics
@hashincludeelectronics 11 ай бұрын
You can download the code and diagram from that link and use it 👏🏻👍🏻
@shahnewajbd4623
@shahnewajbd4623 11 ай бұрын
@@hashincludeelectronics i can't see any download options in there
@hashincludeelectronics
@hashincludeelectronics 11 ай бұрын
@@shahnewajbd4623 click on the link . Then it will open something where the code and diagram will be there . Please explore 👏🏻👍🏻
@shahnewajbd4623
@shahnewajbd4623 11 ай бұрын
@@hashincludeelectronics thanks you very much
@prakashchovatia5683
@prakashchovatia5683 Күн бұрын
Please send the pin connection of this whole thing
@magnese7993
@magnese7993 4 ай бұрын
I don't know coding but I know if an else bu I didn't understand the Hi and low???
@hashincludeelectronics
@hashincludeelectronics 4 ай бұрын
High and low is Notting but voltage level. High means 5v and low means 0 volt 👍🏻👏🏻
@magnese7993
@magnese7993 4 ай бұрын
@@hashincludeelectronics Thanks can we built it on the cell and no connected with laptop and on and off switch just like a small box and portable.
@hashincludeelectronics
@hashincludeelectronics 4 ай бұрын
@@magnese7993 yes you can 👍🏻👏🏻
@prabhatverma7538
@prabhatverma7538 3 жыл бұрын
Awesome 👍...
@hashincludeelectronics
@hashincludeelectronics 3 жыл бұрын
Thank you! Cheers!
@talhamalik36699
@talhamalik36699 6 ай бұрын
Please give programming
@hashincludeelectronics
@hashincludeelectronics 6 ай бұрын
Code and diagram link is provided in the description of the video 👏🏻👍🏻
@ShubhamKumar-pj6es
@ShubhamKumar-pj6es 9 ай бұрын
Code wala link open nahi ho Raha hai
@hashincludeelectronics
@hashincludeelectronics 9 ай бұрын
It is opening fine . Please check 👍🏻👏🏻
@biviyu3828
@biviyu3828 Жыл бұрын
Yo, i have a problem with this, can you help me please?
@hashincludeelectronics
@hashincludeelectronics Жыл бұрын
What problem are you facing. ?
@biviyu3828
@biviyu3828 Жыл бұрын
@@hashincludeelectronics my sensor is keep detecting things even though everything around it are standing still
@ArvaHimabindu
@ArvaHimabindu Ай бұрын
Plz send me the code
@hashincludeelectronics
@hashincludeelectronics Ай бұрын
@@ArvaHimabindu code and diagram link is provided in the description of video 👍🏻👏🏻
@mohaiminrahman6592
@mohaiminrahman6592 Жыл бұрын
Everytime of light on and off,I hear the sound of switch😁
@hashincludeelectronics
@hashincludeelectronics Жыл бұрын
Yes thats relay sound 👍🏻. Enjoy it 😂
@seniordirector2281
@seniordirector2281 Жыл бұрын
@@hashincludeelectronics 😂😂😂
@SumanSuman-lq1vg
@SumanSuman-lq1vg Жыл бұрын
Aap sahi se code btao
@hashincludeelectronics
@hashincludeelectronics Жыл бұрын
The code and diagram link is provided in the description of the video 👍🏻👏🏻
@SumanSuman-lq1vg
@SumanSuman-lq1vg Жыл бұрын
@@hashincludeelectronics hamne try kiya but kuch ni ho rha ... plz help kijye
@AyeshanidaNuheen-rj3lb
@AyeshanidaNuheen-rj3lb Жыл бұрын
Switch off on
@clobel55
@clobel55 Жыл бұрын
speak english!!!!!!!!!!
@g42vaishnavihr73
@g42vaishnavihr73 3 ай бұрын
Hello brother thank you for the project it was working first but then the relay green light is blinking continuously started and the red color in relay is on and the bulb is just sparking please provide your email id so i can send you the sample
How to use Gas/Smoke sensor with Arduino | Gas leak alarm system
5:03
hash include electronics
Рет қаралды 94 М.
إخفاء الطعام سرًا تحت الطاولة للتناول لاحقًا 😏🍽️
00:28
حرف إبداعية للمنزل في 5 دقائق
Рет қаралды 53 МЛН
PIR sensor working Explained in Tamil | Students Corner
7:01
STUDENTS CORNER
Рет қаралды 37 М.
Sensors - which one to use
17:06
Electronoobs
Рет қаралды 1,3 МЛН
Effective Ways To Detect People With Common Sensors
7:43
Core Electronics
Рет қаралды 79 М.
Motion Sensor Light without Arduino | PIR sensor
8:20
RoboCircuits
Рет қаралды 18 М.
How to make a Clap Switch using Arduino UNO!
8:17
Sameer Bedwal
Рет қаралды 141 М.
Make a TINY Arduino Drone with FPV Camera - Will It Fly?
20:26
Max Imagination
Рет қаралды 1 МЛН
إخفاء الطعام سرًا تحت الطاولة للتناول لاحقًا 😏🍽️
00:28
حرف إبداعية للمنزل في 5 دقائق
Рет қаралды 53 МЛН