How to use IR sensor with arduino? (With full code)

Поделиться
HTML-код
  • Опубликовано: 25 окт 2024

Комментарии • 319

  • @TamalBarua-nv2gp
    @TamalBarua-nv2gp 3 года назад +19

    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.

    • @bongtechguide3732
      @bongtechguide3732  3 года назад +2

      Thank you so much.. please subscribe to my channel for more informative videos

  • @fareedahmed1369
    @fareedahmed1369 2 года назад +3

    You deserve 100k subs

  • @santanubhandary9193
    @santanubhandary9193 7 месяцев назад

    Very good explanation with practical

  • @lpavlovic100
    @lpavlovic100 2 года назад

    Indian tutorials are the best

  • @BabiiHuiling
    @BabiiHuiling 3 года назад +3

    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?

    • @bongtechguide3732
      @bongtechguide3732  3 года назад +2

      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.

  • @terunks9567
    @terunks9567 3 года назад

    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

  • @shreyakavitha5873
    @shreyakavitha5873 Год назад

    Sir whether it works even in sunlight

  • @innovative_ideas
    @innovative_ideas 4 года назад +1

    Awesome brother

  • @cadillacescalade5428
    @cadillacescalade5428 6 месяцев назад

    I am wanting to use servo and IR sensor for a small sweep sketch
    How would I go about that ?

  • @spursten4259
    @spursten4259 Год назад +4

    Hello there i have done the same as yours but my LED light is without an abstraction with the two red IPR lights on

  • @akshat13
    @akshat13 3 года назад +1

    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

  • @noobdevloper8177
    @noobdevloper8177 Год назад +1

    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

  • @chandrasekharraghumanda9716
    @chandrasekharraghumanda9716 2 года назад +1

    sir can the control pin of ir sensor can be connected to analog pin

  • @lgc8334
    @lgc8334 3 года назад +2

    hi there, is it possible to use 4 ir sensors with 4 led light? what should I change with the coding. tq

  • @kishanthnishanth6315
    @kishanthnishanth6315 6 месяцев назад +1

    What will be the cost of these products sir!!

  • @dipayandutta9929
    @dipayandutta9929 2 года назад +1

    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.

    • @hatchman1640
      @hatchman1640 2 года назад

      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

  • @sayedmariya9636
    @sayedmariya9636 2 года назад

    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??

    • @bongtechguide3732
      @bongtechguide3732  2 года назад

      Yes you can use ir sensor for measure your heart beat but you need to write more complex code for this.

  • @farseenbasheer1928
    @farseenbasheer1928 4 года назад

    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..

    • @bongtechguide3732
      @bongtechguide3732  4 года назад

      Yes you can use any microcontroller for controlling IR sensor. And you can also use camera with microcontroller

    • @farseenbasheer1928
      @farseenbasheer1928 4 года назад

      @@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??

    • @bongtechguide3732
      @bongtechguide3732  4 года назад

      When Ir sensor is low then you turn on your camera on that time and take the picture

    • @farseenbasheer1928
      @farseenbasheer1928 4 года назад

      @@bongtechguide3732 thank you tech guide..for fast and apt reply

    • @farseenbasheer1928
      @farseenbasheer1928 4 года назад

      @@bongtechguide3732 which camera can be used which can be connected to both microcontroller and pc at the same time

  • @ProKamExplained
    @ProKamExplained 2 года назад

    #Arduino #IR #sensor
    How to use an IR sensor with Arduino? | Arduino के साथ IR सेंसर का उपयोग कैसे करें | Simple Projects
    ruclips.net/video/NbdbgItDDk4/видео.html

  • @kunalghosh4334
    @kunalghosh4334 Год назад

    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 ?

  • @neerajpandey6585
    @neerajpandey6585 3 года назад

    Really helpful brother may God bless. U

  • @romeoromejr7501
    @romeoromejr7501 3 года назад

    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.

  • @ravikumarshahu358
    @ravikumarshahu358 Год назад

    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.

  • @arundoylenka5705
    @arundoylenka5705 Год назад

    Hello, in the IR sensor..
    The black led is the IR Receiver and the white led is the IR TRANSMITTER right?

  • @devisriadithya5907
    @devisriadithya5907 2 года назад

    the explanation and code i undurstood but the example u used ,can u give link like for the ir sensor example

  • @statusforever47
    @statusforever47 3 года назад

    Instant of led shall we put speaker

  • @rahulreddy3038
    @rahulreddy3038 4 года назад

    Broo you made ur own coding?? Or given in the examples??

  • @mazharameerpg0643
    @mazharameerpg0643 3 года назад

    can we use buzzer with it to make like a alram

  • @fahimmontasir2083
    @fahimmontasir2083 Год назад

    does it work same as the PIR?

  • @keshavkakde1034
    @keshavkakde1034 3 года назад +1

    Sir can we place motor in place of led

  • @theglowingsisters7178
    @theglowingsisters7178 2 года назад

    Can we use ir sensor to detect potholes

    • @bongtechguide3732
      @bongtechguide3732  2 года назад

      If potholes are black colour then only IR sensor can detect otherwise you need to go with Ultrasonic sensor

  • @peepopray7214
    @peepopray7214 3 года назад

    what software do you use to code and put the command inside the arduino.

  • @saffanhal-turki6522
    @saffanhal-turki6522 4 года назад +1

    hi, i need help ;(
    Q: can i connect the IR sensor with dot matrix LED ? and what kind of code should i use

    • @bongtechguide3732
      @bongtechguide3732  4 года назад

      Yes ...You can use and you need to change little bit of this code

    • @saffanhal-turki6522
      @saffanhal-turki6522 4 года назад

      @@bongtechguide3732 any hints on how,,?

    • @saffanhal-turki6522
      @saffanhal-turki6522 4 года назад

      @@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

  • @abhinavrajesh2975
    @abhinavrajesh2975 Год назад

    The ir sensor i have turns off when it detects a obstacle is possible to get the intened result by interchanging the high low?

  • @shandinesh4925
    @shandinesh4925 3 года назад +1

    Can i control the motor in one direction by the same way??

  • @samarthdeshmukh193
    @samarthdeshmukh193 4 года назад

    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 ?

    • @bongtechguide3732
      @bongtechguide3732  4 года назад

      You need apply invert logic in your code...and go to description the full code is there

    • @samarthdeshmukh193
      @samarthdeshmukh193 4 года назад

      @@bongtechguide3732 So should I make all High - Low and all Low - High ?

    • @bongtechguide3732
      @bongtechguide3732  4 года назад

      Yes...First apply the code which is given

    • @samarthdeshmukh193
      @samarthdeshmukh193 4 года назад

      @@bongtechguide3732 got it. Thanks brother.

    • @bongtechguide3732
      @bongtechguide3732  4 года назад

      Please subscribe to my channel for more videos

  • @saveriocosta271
    @saveriocosta271 3 года назад

    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?

    • @bongtechguide3732
      @bongtechguide3732  3 года назад

      Its possible..but you need to write your own logic to execute that

  • @Anonymous-nm1uo
    @Anonymous-nm1uo 4 года назад +4

    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

    • @neoh1530
      @neoh1530 4 месяца назад

      could you solved it????

  • @rajput2477
    @rajput2477 3 года назад

    Can we use this with remote ?

  • @sumanthjadala
    @sumanthjadala 2 года назад +1

    how much minimum distance from the obstacle and IR sensor , to detect the object ?

    • @hatchman1640
      @hatchman1640 2 года назад

      turn the potentiometer with a screw driver to adjust the sensitivity and thus the distance

  • @suvajitghosh7557
    @suvajitghosh7557 2 года назад +2

    How to connect arduino board in computer and how connect coding part in arduino

  • @inderjeetkaur8270
    @inderjeetkaur8270 3 года назад

    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?

  • @statusforever47
    @statusforever47 3 года назад

    Which Arduino we will take to make this

    • @bongtechguide3732
      @bongtechguide3732  3 года назад +1

      Arduino uno, mega, nano any Arduino board

    • @statusforever47
      @statusforever47 3 года назад

      @@bongtechguide3732 in Arduino Uno which microcontroller and atmega320p is which one should we use

    • @bongtechguide3732
      @bongtechguide3732  3 года назад +1

      Any micro controller you can use

    • @statusforever47
      @statusforever47 3 года назад

      @@bongtechguide3732 sir I'm doing the project on audio with Arduino is it sutible suitable that Arduino and in place of led which u puted in output of Arduino board shall we use speaker

    • @bongtechguide3732
      @bongtechguide3732  3 года назад

      no..for the speaker you need a Speaker driver for that...If you use buzzer then it's ok

  • @manojmistryeee9443
    @manojmistryeee9443 2 года назад +1

    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

  • @chanchaljaiswal3162
    @chanchaljaiswal3162 4 года назад +1

    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

  • @sheanespanola6128
    @sheanespanola6128 8 месяцев назад

    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

    • @xyz.5512
      @xyz.5512 7 месяцев назад

      you can use the POT given on sensor module to tune it accordingly with the distance u want sensor to detect

  • @ahmaddian8707
    @ahmaddian8707 2 года назад

    Sir why my out put led in ir sensor not working but i already adjust the sensitivity

  • @santhoshboopathi651
    @santhoshboopathi651 4 года назад +1

    Does IR sensor sense the transparent plastic bottle?

  • @rudragaming128
    @rudragaming128 20 дней назад

    Bro which app in laptop

  • @phoenixplays0702
    @phoenixplays0702 2 года назад

    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

  • @tusharkhobragade8094
    @tusharkhobragade8094 3 года назад

    Give me rhe link of your using instruments because i wants to do it as my electrnics project

  • @techtamilan893
    @techtamilan893 3 года назад +1

    this is so usful for me

  • @dhruvajindal4932
    @dhruvajindal4932 4 года назад +1

    To detech obstacles, which is better and vheap- ultrasonic sensor or ir sensor

    • @bongtechguide3732
      @bongtechguide3732  4 года назад

      ultra sonic sensor is better than IR...

    • @dhruvajindal4932
      @dhruvajindal4932 4 года назад

      @@bongtechguide3732 And why is that so? Also which is cheaper. And i just want to sense if some movemetn has happened near the sensor. As close as 5 cm. i don;t want to measure distance for this project so would you still reccond ultrasonic?

    • @bongtechguide3732
      @bongtechguide3732  4 года назад

      just check it out my PIR sensor video..which is in my playlist...I think after watching this video you conseption will clear

  • @mohammedabdulla8693
    @mohammedabdulla8693 2 года назад

    Hello, I am searching for 0mm to 5mm measurable sensor, request to help in this regard please

  • @rishikeshnimker212
    @rishikeshnimker212 3 года назад

    Bro can I connect a motor so that when the ir detects a object it blinks and motor turns on and when it doesn't the motor offs??

    • @bongtechguide3732
      @bongtechguide3732  3 года назад

      Yess.. you can..but you need a motor driver for drive your motor with Arduino. You can find the motor driver video in my channel.

    • @rishikeshnimker212
      @rishikeshnimker212 3 года назад

      @@bongtechguide3732 sorry its a water pump not a motor

    • @rishikeshnimker212
      @rishikeshnimker212 3 года назад

      @@bongtechguide3732 bro can I contact u it would be a great jesture of help ..its urgent

    • @bongtechguide3732
      @bongtechguide3732  3 года назад

      yes you can mail me in pabitrakumarghorai25@gmail.com

  • @pavanibhanuchandramurthy539
    @pavanibhanuchandramurthy539 4 года назад

    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....?

    • @bongtechguide3732
      @bongtechguide3732  4 года назад

      Yes you can ...but you need a motor driver to drive the motor

  • @coachtusharraut
    @coachtusharraut 3 года назад +1

    Good one. Thanks.

  • @anupprasad1342
    @anupprasad1342 3 года назад

    Sir would you help me to connect relay modules IR sensor and ardrino..

  • @Mukeshmyson
    @Mukeshmyson 4 года назад +5

    sir please can you give me the code for two IR sensors please

    • @RiteekMeher
      @RiteekMeher 3 года назад

      Bro did you get the code?? Please reply me ASAP

  • @soumyajitbhattacharjee
    @soumyajitbhattacharjee 4 года назад +2

    Plz make tuitorial2 IR logic that we use to control a gate

  • @luqkiiim
    @luqkiiim 3 года назад +5

    Hi, really helpful video. How far can the IR Sensor detect obstacles?

    • @hatchman1640
      @hatchman1640 2 года назад +3

      Set the distance by turning the potentiometer, that adjusts the sensitivity and thus the distance required

    • @YoussoufElMamy
      @YoussoufElMamy Год назад

      @@hatchman1640 what is a potentiometer ? and how can i do this exactly?

  • @madhuvlogs3946
    @madhuvlogs3946 2 года назад

    Supper bro and thank u

  • @Aryan_dabhade
    @Aryan_dabhade 8 месяцев назад

    Hi how can I connect speaker with it and also code

  • @tonyclixby
    @tonyclixby 7 месяцев назад

    Thank you. Easy to follow.

  • @odontosdental
    @odontosdental 4 года назад

    Awesome bhai

  • @2.2mviews70
    @2.2mviews70 3 года назад

    Can we ON sensor for particular time?
    Pls reply
    Btw, nice video keep doing❤️❤️❤️

    • @bongtechguide3732
      @bongtechguide3732  3 года назад +1

      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

  • @vikramjeetpaul
    @vikramjeetpaul 4 года назад

    So, the IR Sensor is an analog sensor or digital sensor?

  • @afanshayan1594
    @afanshayan1594 25 дней назад

    The is not working it says completion error what do i do

  • @RixtronixLAB
    @RixtronixLAB 2 года назад +1

    Creative video, thanks for sharing :)

  • @arjun._.3581
    @arjun._.3581 3 года назад

    Could u measure the distance between the it and the obstacle

  • @muhammadnuryassin9033
    @muhammadnuryassin9033 Год назад

    Question, how to make the led light turns green when sensor don't sense anything and if it sense something it will turn red?

  • @ilhammiranto5974
    @ilhammiranto5974 4 года назад +2

    THANKS FOR THIS TUTORIAL. You help me from this. THANK YOU.

  • @ilhammiranto5974
    @ilhammiranto5974 4 года назад +1

    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

  • @subramanyamn
    @subramanyamn 4 года назад +1

    What is the current drawn when it is sensing?

  • @asgamezz4192
    @asgamezz4192 3 года назад

    Instant of led glow shall we connect their speaker and it will sound plzz send this code

  • @Gk.kordzaa1
    @Gk.kordzaa1 Год назад

    Are you using male to female or female to male?

  • @9chickenwingz
    @9chickenwingz 2 года назад +1

    How do I use NIR sensor and arduino to measure glucose ?

  • @patrickalerta2623
    @patrickalerta2623 Год назад

    why is my led always lights without the sensor detecting anything?

  • @nrityachanda3971
    @nrityachanda3971 4 года назад

    Does the ir sensor work with adafruit motor shield? plz reply

  • @jishnuprasad2270
    @jishnuprasad2270 2 года назад

    what is the use of delay here please explain?

    • @bongtechguide3732
      @bongtechguide3732  2 года назад

      If you not use the delay , you can't able to see the led light is glowing

    • @jishnuprasad2270
      @jishnuprasad2270 2 года назад

      @@bongtechguide3732 ok bro

  • @hilarryhenry831
    @hilarryhenry831 3 года назад

    great explanation!

  • @hillolebhattacharyya1189
    @hillolebhattacharyya1189 3 года назад

    Sir I am going to build up a project using some sensors, so is it possible for you to give me the codes for arduino?

  • @mohammedbaageil5459
    @mohammedbaageil5459 5 лет назад

    can we connect screen with arduino and IR sensor ?
    this screen give the sentens when IR sensor work .

    • @bongtechguide3732
      @bongtechguide3732  5 лет назад

      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.

    • @mohammedbaageil5459
      @mohammedbaageil5459 4 года назад

      Tech Guide, Okay thanks my friend i will check in next two days and will tell u the result.

  • @timlo8934
    @timlo8934 Год назад

    hello, can i replace the light bulb with a motor instead?

    • @poweritup2
      @poweritup2 Год назад

      yes u can but see the voltage requirement

  • @KSM963
    @KSM963 3 года назад +1

    I got a problem in Arduino Uno compilation error

  • @Anonymous-ok9ul
    @Anonymous-ok9ul 2 года назад +1

    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.

  • @mayankrajpootEE
    @mayankrajpootEE Год назад

    how to delay only the off time of led and
    On time of led should be fast

  • @The_Passion_Tech
    @The_Passion_Tech 3 года назад

    Thank you so much, I thought my sensor didn't work by seeing another videos

    • @bongtechguide3732
      @bongtechguide3732  3 года назад +1

      Please subscribe to my channel.. and share this video with your friends

    • @The_Passion_Tech
      @The_Passion_Tech 3 года назад

      @@bongtechguide3732 Ok I will but you should also subscribe to my channel.. and share my RUclips channel with your friends

    • @The_Passion_Tech
      @The_Passion_Tech 3 года назад

      did you get an other subscriber

    • @bongtechguide3732
      @bongtechguide3732  3 года назад +1

      ok..no problem

  • @sunilprasad4463
    @sunilprasad4463 3 года назад

    How to blink 3 second when object come to front of ir sensor and after 3second led off atomatic

    • @bongtechguide3732
      @bongtechguide3732  3 года назад

      You need to use a delay function after your led blinking statement

  • @rajkumarbera6607
    @rajkumarbera6607 4 года назад

    Two pir sensor ,,one arduino board me kayse program kare....sir...plz....tell me.....

  • @samikshawattamwar8354
    @samikshawattamwar8354 3 года назад

    sir,can you show me how to do that on tinkercad software or any other software??

  • @origami1871
    @origami1871 3 года назад

    what is the range of ir sensor

  • @EventXGamers
    @EventXGamers Год назад +1

    Boards can't be detected

  • @tejasvisn5695
    @tejasvisn5695 10 месяцев назад

    dada led light jolche na ki korbo ami

  • @tanmayurane7888
    @tanmayurane7888 4 года назад

    Sir i want to interface a 9v dc motor with a relay with ir sensor to despense water for 2 to 3 seconds

    • @bongtechguide3732
      @bongtechguide3732  4 года назад

      just check this video ruclips.net/video/reWHDiVle9w/видео.html

    • @halaboly8915
      @halaboly8915 4 года назад

      That's literally like my project xD

  • @kewatautomation5313
    @kewatautomation5313 4 года назад

    Dear Plz provide me code for on delay timer.
    1- if put my hand in range of ir sensor then led on only for 10 Sec.

    • @bongtechguide3732
      @bongtechguide3732  4 года назад

      when your led will glow..in that section of your code you need to write delay(1000)

  • @ISNLFN
    @ISNLFN Год назад

    How to show signal on serial monitor

  • @he1385
    @he1385 2 года назад

    plz, what is the exact name of Arduino?

  • @rajiraj-wx2ts
    @rajiraj-wx2ts 6 месяцев назад

    Nice

  • @manishshaw3862
    @manishshaw3862 Год назад

    Thanks Brother