Connect with us

Automatic system for home light

Discussion in 'Microcontrollers, Programming and IoT' started by Djsarkar, Jul 27, 2020.

Scroll to continue with content
  1. Djsarkar

    Djsarkar

    46
    4
    Jul 27, 2020
    I want to make program flow that detect persons entering into room and turning the light on and when they leave room light shut off
    Update : I am struggling to update image whenever I am uploading image I am getting error message
     
  2. Harald Kapp

    Harald Kapp Moderator Moderator

    10,562
    2,354
    Nov 17, 2011
    Resize your image to less than 300 kB
     
  3. Djsarkar

    Djsarkar

    46
    4
    Jul 27, 2020
    But in my house, I get enough sunlight in the day due to which I do not need to turn on the light. How can we turn off the light in system from 9:00 am to 4:00 pm ?

    programming flowchart

    IMG_20200727_155917.jpg
     
  4. hevans1944

    hevans1944 Hop - AC8NS

    4,541
    2,116
    Jun 21, 2012
    Have you tried Google to find a commercial, off-the-shelf, passive infrared switch (with time-delay to turn-off) that will do exactly as you have described? Is there any particular reason you want to re-invent this wheel? PIR light switches are inexpensive. Or is this just a learning project to get your feet wet with PIR sensors and microcontroller programming?
     
    Djsarkar likes this.
  5. Djsarkar

    Djsarkar

    46
    4
    Jul 27, 2020
    Yes, this is an example project and will help me to solve the challenges come in project development.

    Right now System detects that if someone is inside the room, the light should be on but the challenges is that what happens If somsleeping at night, light should turn off.

    How to design a system that can be keep the lights off at night ? Does this need extra hardware, or we can do this through programming ?
     
  6. Kardo22

    Kardo22

    36
    0
    Mar 7, 2014
    you need to know time of day. Microcontroller with real time clock (RTC) or separate module for it.
     
  7. hevans1944

    hevans1944 Hop - AC8NS

    4,541
    2,116
    Jun 21, 2012
    Many commercial PIR-activated outdoor flood-lights also have a visible-light sensor, often just a simple solar cell or a CdS light-sensitive resistor, to monitor ambient light and prevent the flood-lights from activating during daylight hours. Most street lights also have ambient light sensors so they don't operate during daylight hours. Perhaps adding an appropriately located ambient light sensor to your microcontroller will allow you to do what you want. Problem with using a real-time clock or RTC is it has no idea how dark the room is at night. You can attach a cheap CdS sensor to a long length of twisted-pair wires and tape it to a window glass to "detect" when it is night time.
     
    Djsarkar likes this.
  8. Djsarkar

    Djsarkar

    46
    4
    Jul 27, 2020
    Thanks a lot, different question When you design a project, do you use paper and pen to solve the problem that is coming up in the project and that goes to coding.

    Do you use flow chart or a FSM?

    I want to design a big project I would like to design project on home sefty and security alarm.

    Can you assist me to fix flow chart or state diagram
     
  9. hevans1944

    hevans1944 Hop - AC8NS

    4,541
    2,116
    Jun 21, 2012
    I am not a software professional. I hack small programs, but for anything really sophisticated I have found it best to hire someone who knows better than I how to do it. I haven't used flow charts or state diagrams since college, back in the 1970s. Didn't find either of them particularly useful for what I was doing then, don't think they would be very useful to me now either. You can take online courses to learn computer programming and software design, but why bother for a home safety and security alarm? These are commercially available at reasonable cost, so not much need to re-invent that particular wheel.
     
    Djsarkar likes this.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-