How to use LDR Light Sensor module to Turn ON and OFF AC bulb automatically withe Arduino

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ก.ย. 2024

ความคิดเห็น • 80

  • @lintanglyn264
    @lintanglyn264 2 หลายเดือนก่อน +1

    this works perfectly, thank youu!!

  • @hestonhoyle4857
    @hestonhoyle4857 3 ปีที่แล้ว +4

    The code uses pin 9 not pin 10 like the video shows, make sure you have it in the right slot so the relay switch works.

  • @athulcastro1190
    @athulcastro1190 2 ปีที่แล้ว +1

    Explained very well bro, keep it up 💯💯💯

  • @arielgomez7832
    @arielgomez7832 6 ปีที่แล้ว +1

    Thanks, very clear and useful your explanation

    • @robojax
      @robojax  6 ปีที่แล้ว +1

      you are welcome.

  • @MobileFusion-ki8cs
    @MobileFusion-ki8cs 4 หลายเดือนก่อน

    thank you brother love you

  • @brightideas5782
    @brightideas5782 3 ปีที่แล้ว

    Awesome thank you

  • @satishjain6113
    @satishjain6113 3 ปีที่แล้ว +1

    Hi sir plz help me for this
    I want to make a project on dc motor.
    I want that if i puch 1 time push button then motor will run for 5 sec. And every time i push button then moror will run for 5 sec. How i do this
    I have relay module aurdino uno and dc motor with push button.
    Plz send me a programming for this and circuit diagram also.
    Plz plz plz🙏🙏🙏

    • @robojax
      @robojax  3 ปีที่แล้ว

      Hi, is is related to his project? here are my videos on motorth-cam.com/users/robojaxTVsearch?query=motor and push button th-cam.com/users/robojaxTVsearch?query=push_button

  • @carpenterfamily6198
    @carpenterfamily6198 6 ปีที่แล้ว +1

    This is very interesting, but could be done with a much simpler circuit.

    • @robojax
      @robojax  6 ปีที่แล้ว +1

      You are right but this makes it tidy for learners.

  • @dracorequin872
    @dracorequin872 5 ปีที่แล้ว

    Thank you, I'm going to use a motor instead of the light but I'm sure it's going to work with your system. Good video

    • @robojax
      @robojax  5 ปีที่แล้ว

      Yes it should work. just turn ON or OFF. No speed control.

    • @peterjones3879
      @peterjones3879 4 ปีที่แล้ว

      What about motor direction? Can it go clockwise when its light and anticlockwise when it's dark?

    • @dracorequin872
      @dracorequin872 4 ปีที่แล้ว +1

      @@peterjones3879 Yeah it can. You just have to change the direction of the current. In my case, I use the motor head of a drill. For the time now I just use a clock set for an entire year. It's pretty reliable.

  • @user-bq3yd6vi7h
    @user-bq3yd6vi7h 6 ปีที่แล้ว

    Thanks man, you always save me

    • @robojax
      @robojax  6 ปีที่แล้ว

      You are welcome.

  • @freddyremenado1038
    @freddyremenado1038 3 ปีที่แล้ว +1

    Thank you ❤️❤️❤️

    • @robojax
      @robojax  3 ปีที่แล้ว

      You are so welcome

  • @shannehh9313
    @shannehh9313 4 ปีที่แล้ว +1

    the wire that u fixed is not that clear in this video can u explain me that which colour and put where???

    • @robojax
      @robojax  4 ปีที่แล้ว

      I just played the video . Please watch 1:56 where I have explained the light sensor and you know what each pin is going. At 3:20 Relay is explained. You can click on the time 1:56 to jump directly.

    • @robojax
      @robojax  4 ปีที่แล้ว

      I spent time to watch the video and replied. this is not nice to NOT relay. if someone takes time to do something for you, at least just acknowledge it.

  • @guhasri6620
    @guhasri6620 11 หลายเดือนก่อน

    hello can i know where do AO and DO pin IN THE LIGHT SENSOR connected to? plzz urgent

    • @robojax
      @robojax  11 หลายเดือนก่อน

      waht the video. I have shown it. I have mentioned in the code as well.

  • @TunesYouLike
    @TunesYouLike 2 ปีที่แล้ว

    Sir in this experienment does relay is also to any ac power supply??

    • @robojax
      @robojax  2 ปีที่แล้ว

      Relay is a mechanical switch . It works for anything if you respect the power earring. Here see what is inside relay th-cam.com/video/N-fFk51Eb8s/w-d-xo.html

  • @lokaveer1415
    @lokaveer1415 3 ปีที่แล้ว

    Hey ! This was a very informative video ! Thanks a lot !
    I had a question, if we set digital as true to adjust sensitivity using potentiometer, then do we need to connect the Analog out from the LDR to arduino ? Because I have a LDR module with only DO, hence I wanted clarification whether we can only connect to DO, set digital as true and control sensitivity with potentiometer, without any change in the advanced code.
    Keep up the good job :)

    • @robojax
      @robojax  3 ปีที่แล้ว

      Hi , it seems you may have missed or skipped the video. you are getting the opposite. please watch. Digital means ON or OFF. there is not in between values to adjust.

    • @lokaveer1415
      @lokaveer1415 3 ปีที่แล้ว

      @@robojax Yes, I get that, but my doubt is whether the connection with AO is necessary for the advanced part with digital set as true and sensitivity is with potentiometer. Basically can the advanced code be run on arduino nano without connecting AO and setting digital as true

  • @AGUMEGIDEON
    @AGUMEGIDEON 2 หลายเดือนก่อน

    Very interesting video,can I have a code for this project

    • @robojax
      @robojax  2 หลายเดือนก่อน

      Link in description

  • @JAKOB1977
    @JAKOB1977 2 ปีที่แล้ว

    Can I use this light sensor to measure light frequency with an oscilloscope.?
    is it just supply 5v power and gnd, but which pins of the 4 shall I use for the scopes black and red crocodile clip if I wanna get feedback from the sensor to see the frequency of a screen refresh rate.?
    I would reckon that light-sensor would be able to registrate fast light pulses, and give that waveform on the scopes, but how to hook it up?

    • @robojax
      @robojax  2 ปีที่แล้ว

      this has LDR or light dependent resistor. it is very slow like 5 Hz or 5 times a second if light turns ON or OFF. you can't use it.

  • @nihalj3645
    @nihalj3645 4 ปีที่แล้ว

    Can we connect photosensitive module and relay module without arduino,if yes which pin of photosensitive module should be connected to relay module in.AO or DO pin?

    • @robojax
      @robojax  4 ปีที่แล้ว

      Hi, Yes you can. Depending on the relay module types, you may get reverse effect. when you want to turn ON it may be OFF and when you want it OFF, it might be ON. But there is no timer control. if you want to turn ON or OFF for certain time, then you may use one of the timer modules here th-cam.com/users/robojaxTVsearch?query=timer

  • @drewlawrence8488
    @drewlawrence8488 6 ปีที่แล้ว

    Awesome thank you. Very good
    Do you have this for digispark

    • @robojax
      @robojax  6 ปีที่แล้ว

      You are welcome. I haven't worked with Digispark but it should work with any microcontroller.

  • @paras6270
    @paras6270 4 ปีที่แล้ว

    can we dim the light or increase brightness to maintain certain light percentage?

    • @robojax
      @robojax  4 ปีที่แล้ว +1

      when you use relay, it is just a switch. either ON or OFF. here is dimmer video th-cam.com/video/zJQf6bNodhE/w-d-xo.html

  • @phenomenal0ne10
    @phenomenal0ne10 2 ปีที่แล้ว

    Hii ! Just to clarify, really need ur help? For my project, I'm not using ac bulb but i'm using Led strip WS2812B for smart aquarium (fish tank) as in i want it when turn on, its dark and when turn off, it's not dark. so can this code and wiring works for my led strip ? and also what are the changes of code?

    • @robojax
      @robojax  2 ปีที่แล้ว

      Hi, yes Thai code will work. Relay is just a switch to turn on or off something

  • @JimProng
    @JimProng 5 ปีที่แล้ว

    Good Stuff!

    • @robojax
      @robojax  5 ปีที่แล้ว

      Thank you.

  • @ayyxn_awxsome4770
    @ayyxn_awxsome4770 2 ปีที่แล้ว

    Do we need to have Arduino for both types of code

    • @robojax
      @robojax  2 ปีที่แล้ว

      If you don’t need delay, then you don’t need Arduino

  • @Acorama
    @Acorama 6 ปีที่แล้ว

    very good

    • @robojax
      @robojax  6 ปีที่แล้ว

      Thank you.

  • @omprakashtambi6502
    @omprakashtambi6502 5 ปีที่แล้ว

    U said to use the 5volt pin in both ldr and relay... Can u clear this?? (Urgent)
    Could u please give the schematic diagram??

    • @robojax
      @robojax  5 ปีที่แล้ว

      Connect them to 5V. if your arduino doesn't have 2 tV, then create additional 5V. Watch this video th-cam.com/video/Vmrmp7reHOY/w-d-xo.html
      no schematic. I have explained wring. If you need it then draw it.

  • @creativetimepass4266
    @creativetimepass4266 5 ปีที่แล้ว

    Can't we use only the sensor module with the ldr for automatic street light system????

    • @robojax
      @robojax  5 ปีที่แล้ว

      Yes you can. Use the code from the current video which has the module and use this (new) video to read the LDR value th-cam.com/users/gkyLnEgu7w0

    • @BinuMadhav.NetWork
      @BinuMadhav.NetWork 5 ปีที่แล้ว

      Use this instead:
      Blackt Electrotech BT31P2 230Volt Auto Day/Night on and off Photocell LDR Sensor Water Proof Olive Wood Lighting Switch (White) www.amazon.in/dp/B01KMAQLB4/ref=cm_sw_r_cp_apa_i_-StwDbZJ23TDR

    • @jhkiom
      @jhkiom 4 ปีที่แล้ว

      Robojax p

  • @bapimandal7407
    @bapimandal7407 5 ปีที่แล้ว

    Can the same program dumped into the nodemcu,and will it work???

    • @robojax
      @robojax  4 ปีที่แล้ว

      Hi, yes it will work

  • @anthonyinabo2382
    @anthonyinabo2382 4 ปีที่แล้ว

    Good

    • @robojax
      @robojax  4 ปีที่แล้ว

      Thanks.

  • @bundat267
    @bundat267 4 ปีที่แล้ว

    How would you make it so when its exposed to light it turns on? Thanks

    • @robojax
      @robojax  4 ปีที่แล้ว +2

      I believe that is what I've shown in this tutorial. if you want to reverse the behavior, just change HIGH to LOW and LOW to HIGH in code where it says digitalWrite(....

  • @hasnamanahai442
    @hasnamanahai442 4 ปีที่แล้ว

    sir iwant to use as soler tracker but it wil on when dark i wat to know if it is on sun than it work how can be it possible simple i want soler tracker circuit plz

    • @robojax
      @robojax  4 ปีที่แล้ว

      Solar tracker from the name we know it should track the sun. It needs a little work. Not that simple. It needs motor, actuator, controllers and light sensors with code. I have it on my "to do" list. But don't know when. Thanks Ahmad from Canada.

    • @hasnamanahai442
      @hasnamanahai442 4 ปีที่แล้ว

      @@robojax thanks

  • @andolis49
    @andolis49 4 ปีที่แล้ว

    Hi Robojax! I want to use you cod to control a motor for 3 seconds when it's dark (evening) and the same thing when is light, in the morning for 3 seconds (same command). Can you help me with cod? I'm not beginner but is the first project with Arduino. Thanks!

    • @robojax
      @robojax  4 ปีที่แล้ว

      Hi, you are asking something that needs a separate project. perhaps you start from here th-cam.com/video/Mbb2xa1WcRM/w-d-xo.html

  • @jesusesrael10
    @jesusesrael10 3 ปีที่แล้ว

    May I have the specs of this and all I need ldr and the relay

    • @robojax
      @robojax  3 ปีที่แล้ว

      Hello, if you search for "Arduino Light sensor" you will get very high quality resolution image where you can see all components. just go to google image search .

  • @davvoprod.851
    @davvoprod.851 3 ปีที่แล้ว

    Hey bro. Can I get the fritzing scheme or any jpg scheme image?

    • @robojax
      @robojax  3 ปีที่แล้ว

      You don’t need it. This is for learning. First hardware is fully explained and when later I mention the pin name you would know it. So if you watch it full, you don’t need diagram.

  • @ramadanmohamed2040
    @ramadanmohamed2040 5 ปีที่แล้ว

    what is trade name for light sensor and how much ?

    • @robojax
      @robojax  5 ปีที่แล้ว

      As the name says "light sensor" and may be add "for Arduino" and you can get it from Amazon or eBay.

  • @syedmuhammadwasihasan1335
    @syedmuhammadwasihasan1335 6 ปีที่แล้ว

    Diagram?

    • @robojax
      @robojax  6 ปีที่แล้ว

      www.emartee.com/Images/websites/emartee.com/LightSensorSchematic.png

  • @manuindia5792
    @manuindia5792 4 ปีที่แล้ว +1

    Excellent video and very useful....thank you very much sir for making amazing videos.Thanks for you gratitude...😊

    • @robojax
      @robojax  4 ปีที่แล้ว

      You are welcome. I am glad you found it useful. Thank you for not skipping the ads and keep watching them. This will help me a lot.

  • @kaliboeshoots
    @kaliboeshoots 3 ปีที่แล้ว

    my serial monitor is empty, I set it to 9600 like explained in the video, what am I doing wrong here?

    • @robojax
      @robojax  3 ปีที่แล้ว

      You gotta take my free Arduino course. Here is the lesson serial monitor video th-cam.com/video/WyWRGoACWFs/w-d-xo.html

  • @GaryMcKinnonUFO
    @GaryMcKinnonUFO 5 ปีที่แล้ว

    Thanks Ahmad, very helpful.

    • @robojax
      @robojax  5 ปีที่แล้ว +1

      You are welcome Gary. I am glad you found it helpful.

  • @dovahkiindragonborn3950
    @dovahkiindragonborn3950 5 ปีที่แล้ว

    No timestamps. WHY!!

    • @robojax
      @robojax  5 ปีที่แล้ว

      Your serial monitor is not set to 9600 baud. It is the right lower corner of Serial monitor.