How to use IR sensor with arduino? (With full code)
ฝัง
- เผยแพร่เมื่อ 26 มิ.ย. 2019
- IR (Infrared Sensor) is an electronic instrument that is used to detect any type of obstacle/object & it is also used to detecting the black & white colour.
In this video, I am showing a basic operation of IR sensor. You can use this concept to make your project.
You can buy IR sensor from your nearest electronics market & also you can buy from Amazon also.
//// Coding///
github.com/PabitraKumarGhorai... - วิทยาศาสตร์และเทคโนโลยี
Your explanation is too good. I love the way you explain. But I am really confused, some other guys on YT showed that the IR sensor will give "1" or "HIGH" as output when any object is detected in its range. But in your video, it's been showed that the IR sensor will give "0" or "LOW" as output when an object is detected in its range, as you said, "IR sensor works as Negative Logic" - in1min 23 sec scence.
Thank you so much.. please subscribe to my channel for more informative videos
Really helpful brother may God bless. U
Creative video, thanks for sharing :)
The ir sensor i have turns off when it detects a obstacle is possible to get the intened result by interchanging the high low?
Very good explanation with practical
Hello there i have done the same as yours but my LED light is without an abstraction with the two red IPR lights on
Hello I am doing a project on drip irrigation and I want to make a smart drip irrigation that the motor can start automatically and off automatically in the given time. So which kind of sensor is used and what are the coding of it.
i want my led that is connected to IR sensor to not to give any output(LED ON) in first detection but internally just count it as 1 and however, in second detection the LED should turn ON and it should stay on forever. It would be great if anybody can guide me onto it since i have been looking for it all over the internet and couldn't find any relevant info.
You deserve 100k subs
Thanks be with me
Thank you. Easy to follow.
THANKS FOR THIS TUTORIAL. You help me from this. THANK YOU.
I am wanting to use servo and IR sensor for a small sweep sketch
How would I go about that ?
really helpful, Can you please share what will be the IR sensor code for black line detection?
Actually, I'm making a bot car which should follow a black line.
have it pointed down, when the output reads high it means it detects black, probably as most black materials don't reflect IR light, so if it reads low it's gone wrong. I'd recommend having a white surface with the black line, and whatever you use to make the black one make sure it doesn't reflect IR light. It won't be able to detect other colours though
Indian tutorials are the best
Bro thanks for this video i want to connect 2 ir sensor in the ardiuo but i dont know program pls refer us thank you
Plz make tuitorial2 IR logic that we use to control a gate
Ok I will do..pls stay tuned with my channel
hi there, is it possible to use 4 ir sensors with 4 led light? what should I change with the coding. tq
You should write 4 ir sensor logic.. that's all
How do I use NIR sensor and arduino to measure glucose ?
uh i cant get my ir sensor to work when i plug it in it displays 2 green lights instead of 1 as shown in the video
could you solved it????
Good knowledge
the explanation and code i undurstood but the example u used ,can u give link like for the ir sensor example
can you make it like a toggle switch .. means if it sense one time led remains on and it sensed next time LEd will be off?
Its possible..but you need to write your own logic to execute that
Sir why my out put led in ir sensor not working but i already adjust the sensitivity
Awesome brother
Thank you
Sir
Touch sensor+ir sensor
Arduino led bilnk code
2sensor touch sensor+ir sensor
2Led bilnk Arduino code
Hi! I connected according to your video and key in the codes too, but my LED light remains permanently on despite not having any obstacle in front of how. How should I fix this?
In your IR sensor, It has a potentiometer for adjusting the sensitivity of the ir sensor. You need adjust this potentiometer by using a screw driver.
Hey I had a doubt can u please tell me what pins stands for what in my sensor , it says : G o/P 5v for the three pins from left to right , so which pin is what
Is this Arduino microcontroller?
@@bongtechguide3732 Arduino Uno
Please connect the IR sensor according to my video..
Can u make video such u put the sensor on bag then u put something like screwdriver in the bag.. if the screwdriver is taken out.. then buzzer will ON.. i want to connect the buzzer with this IR sensor.. because i need to do the project.. but i dont know how to do it.. if u can explain.. u deserved my subscribe bro
Supper bro and thank u
Sir whether it works even in sunlight
How to make a switch with help of it sensor?? I mean once I will bring my hand fir one second led will turn on.. I should be glowing until I bring my hand again... How to do that?
great explanation!
Thank you
THANK YOU BRO 😀
Awesome bhai
Thank you stay with my channel
Hello, in the IR sensor..
The black led is the IR Receiver and the white led is the IR TRANSMITTER right?
yes
thank you
Thanks
Hello, I am searching for 0mm to 5mm measurable sensor, request to help in this regard please
is there an option where i can set a specific distance where the IR sensor detects and if the obstacle reaches in that distance then it will tell the led to turn on
you can use the POT given on sensor module to tune it accordingly with the distance u want sensor to detect
Good one. Thanks.
Welcome brother
i suggest that this project is design for indoor only if you use for outdoor its not siutable bcoz its detect the sunlight and they will activate it connot turn off or on or vice versa.
I only purchased the IR Sensors for a project avoidance. Do I also need to go back and purchase an aduino board to reprogram them as well?
For controlling any sensor you need a Arduino. Without Arduino you can't get your desired output
@@bongtechguide3732 Thank You...I went ahead and ordered it from Amazon. Is the software free and easy to install?
Yes..just go Arduino.cc and download the software
Can we ON sensor for particular time?
Pls reply
Btw, nice video keep doing❤️❤️❤️
You need to use delay otherwise you need to make Real Time Operating system for your microcontroller for ON your sensor for a particular time
All is good but in my project the led in arduino will continuously blow even if obstacle is not there is there any solution for this
is it possible to have more range like a tv remote control ?
Does the ir sensor work with adafruit motor shield? plz reply
Yes..It will work
hi, i need help ;(
Q: can i connect the IR sensor with dot matrix LED ? and what kind of code should i use
Yes ...You can use and you need to change little bit of this code
@@bongtechguide3732 any hints on how,,?
@@bongtechguide3732 you see ... my idea is when the sensor detects an object -> the lights turn on -> and also a mp3 sound plays.
so i have these work separately not together, how can i connect them
Nice
#Arduino #IR #sensor
How to use an IR sensor with Arduino? | Arduino के साथ IR सेंसर का उपयोग कैसे करें | Simple Projects
th-cam.com/video/NbdbgItDDk4/w-d-xo.html
how do i use an ir sensor and an arduino to measure ph of liquids
That's not what it's for, you would have to use a different sensor, this is only checking for the presence of an object.
what is the range of ir sensor
Instant of led shall we put speaker
can we use buzzer with it to make like a alram
yes you can..
Hi how can I connect speaker with it and also code
Sir can you please make a upside down coding
Means when we put our hand infront of IR sensor, then the light should turn off and when we remove our hand the light should turn on
Coding will same as shown in my video
how much minimum distance from the obstacle and IR sensor , to detect the object ?
turn the potentiometer with a screw driver to adjust the sensitivity and thus the distance
He'llo sir I have a doubt that can we use this sensor for counting our heart beat?? I want to know what should be the working that led will glow if I put finger on IR sensor??
Yes you can use ir sensor for measure your heart beat but you need to write more complex code for this.
Hi, really helpful video. How far can the IR Sensor detect obstacles?
Set the distance by turning the potentiometer, that adjusts the sensitivity and thus the distance required
@@hatchman1640 what is a potentiometer ? and how can i do this exactly?
It’s like a screw u can find on the senor adjust it using a screwdriver
Question, how to make the led light turns green when sensor don't sense anything and if it sense something it will turn red?
same
this is so usful for me
Thank you so much
sir can the control pin of ir sensor can be connected to analog pin
Yes
Thanks Brother
Can we use this with remote ?
What is the current drawn when it is sensing?
Its drawn in the range of mA
Instant of led glow shall we connect their speaker and it will sound plzz send this code
what software do you use to code and put the command inside the arduino.
Arduino Ide
Thanks bro
Does IR sensor sense the transparent plastic bottle?
Make the bottle black colour
good
sir please can you give me the code for two IR sensors please
Bro did you get the code?? Please reply me ASAP
why is my led always lights without the sensor detecting anything?
hello actually my ir sensor's light is always glowing and the buzzer(I used buzzer instead of light) sound is also coming always when I connect what should I do I tried moving that screw with screwdriver but its not really working
Moving it slowly
@@bongtechguide3732 what do u mean
if i remove it a little bit fast will it work?
*move
Sir would you help me to connect relay modules IR sensor and ardrino..
ok tell me your problem
How to connect arduino board in computer and how connect coding part in arduino
U can use usb-b cable
Broo you made ur own coding?? Or given in the examples??
yes I make my own coding
Make tutorial with time(Delay) if IR detected object lamp on for 1 minute and will off. Can u make that ? because i need that
Check the coding part
good
Dada, where to buy the components of any this type of project online or offline where is cheap ?
If offline where from to buy and where online ?
Go for offline market, chadni market is best.
Thank you so much, I thought my sensor didn't work by seeing another videos
Please subscribe to my channel.. and share this video with your friends
@@bongtechguide3732 Ok I will but you should also subscribe to my channel.. and share my TH-cam channel with your friends
did you get an other subscriber
ok..no problem
how to delay only the off time of led and
On time of led should be fast
can we connect screen with arduino and IR sensor ?
this screen give the sentens when IR sensor work .
yeah..you can connect Arduino ir sensor and display...Check my video list there is a video on display with arduino. After if u not understand then comment me again.
Tech Guide, Okay thanks my friend i will check in next two days and will tell u the result.
Sir i want to interface a 9v dc motor with a relay with ir sensor to despense water for 2 to 3 seconds
just check this video th-cam.com/video/reWHDiVle9w/w-d-xo.html
That's literally like my project xD
Thanks Bro
Thank you..please subscribe to my channel
does it work same as the PIR?
PIR I have separate video
Can we use ir sensor to detect potholes
If potholes are black colour then only IR sensor can detect otherwise you need to go with Ultrasonic sensor
Sir can we place motor in place of led
Yes..you need to use a motor driver or relay..
Thanks pro bro
Please subscribe to my channel
@@bongtechguide3732 ok
hello, can i replace the light bulb with a motor instead?
yes u can but see the voltage requirement
Can i control the motor in one direction by the same way??
For controlling a motor You need to use l298 motor driver.
@@bongtechguide3732 ok tq
INSTEAD OF LED,Can i put motar here,that is D.C,5 VOLTS TO 12 VOLTS....
Purpose of this is accidents prevention in drunk and drive cases....?
Yes you can ...but you need a motor driver to drive the motor
How I measure wind speed with the help of IRsensor
you can use IR sensor but better if you use hall sensor in place of IR sensor then it will better.. I will definitely make a video on motion detecting using hall sensor...So pls stay tuned with my channel
Thank you
Welcome.. please subscribe to my channel
Hi, In my IR sensor the led is remaining on if there is no obstacle infront of it and turns off when obstacle is placed how can I invert its output ?
You need apply invert logic in your code...and go to description the full code is there
@@bongtechguide3732 So should I make all High - Low and all Low - High ?
Yes...First apply the code which is given
@@bongtechguide3732 got it. Thanks brother.
Please subscribe to my channel for more videos
Can we use any microcontroller to control ir sensor..if yes..which microcontroller...and when it sense the obstacle,can we send a signal to a camera module to take a picture..
Yes you can use any microcontroller for controlling IR sensor. And you can also use camera with microcontroller
@@bongtechguide3732 i want to do a project in which after sensing an obstacle,a picture should be taken by camera module.how can this be implemented??
When Ir sensor is low then you turn on your camera on that time and take the picture
@@bongtechguide3732 thank you tech guide..for fast and apt reply
@@bongtechguide3732 which camera can be used which can be connected to both microcontroller and pc at the same time
i want to make automatic sanatization dispenser using IR sensor can u help me
what types of help you need?
How to show signal on serial monitor
Sir amader bujhte kono problem hoyeni, amra ebar Xm e toh 100/100 pabo.
I got a problem in Arduino Uno compilation error
What types of error you have?
How to blink 3 second when object come to front of ir sensor and after 3second led off atomatic
You need to use a delay function after your led blinking statement
Can we use ir sensor for counting seed (small size)???
Could u measure the distance between the it and the obstacle
We can't measure the distance using ir sensor
And also how to calibrate the distance of that IR sensor
Turn the potentiometer with a screwdriver