element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Sensors
  • Technologies
  • More
Sensors
Sensor Forum Struggling to get a digital sensor to see my indoor ambient light
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Sensors to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 8 replies
  • Answers 5 answers
  • Subscribers 342 subscribers
  • Views 1583 views
  • Users 0 members are here
  • light sensor
  • photodiode
  • ambient light sensor
  • photoresistor
Related

Struggling to get a digital sensor to see my indoor ambient light

suitcase
suitcase over 5 years ago

I wanted to use a Raspberry Pi to check whether my room's ceiling light was on. I’m an electronics amateur and do not want to solder anything, so I am using a Pi Zero W with presoldered pins, and using female-to-female Dupont cables I bought to connect the GPIO pins to the sensor board.

 

I bought this cheap little photoresistor board: https://www.aliexpress.com/item/32806322505.html

 

I set it up successfully (using the digital out, since a regular Pi can't see analog signals). I can easily set it up so that flashing my phone flashlight at it will make it return something different over the digital out.

 

But with all the adjusting I'm doing of the potentiometer, I just can't get it to reliably trigger when the ambient room light changes. If I am REALLY careful with it, tweaking the potentiometer to the point the “DO-LED” starts flickering on and off, barely turning on, I can get it to work for a few minutes to return 1 or 0 over the digital output based on the room’s light, but it’s very flaky. Right now I just thought I got it right, but after five minutes, find it’s flickering between 0 and 1 again.

 

What would be a better, more reliable room sensor I could purchase? I bought a similar board that used a photodiode instead, and it's just as bad. Maybe worse, because photodiodes are more directional, I guess. It just seems like these little potentiometer-adjustable sensors have a microscopic “sweet spot” for detecting ambient room light, which doesn’t make sense to me.

 

One critical thing is that I don’t want to solder anything, or use a breadboard, or anything that seems complicated. I really liked my little setup with the dupont cables and this board, and I’d like something that is just as doable with my hands alone. What should I get?

  • Sign in to reply
  • Cancel

Top Replies

  • jw0752
    jw0752 over 5 years ago +7 suggested
    Hi, You might want to check to see if you can find a module that has a hysteresis adjustment as well as a sensitivity control. The hysteresis will allow you to adjust the turn on and turn off points to…
  • dougw
    dougw over 5 years ago +6 suggested
    You could try putting a little cup reflector around the sensor to collect more light onto the sensor surface. something like aluminum foil should work, but be careful not to short out the sensor leads…
  • fmilburn
    fmilburn over 5 years ago +5 suggested
    There are more precise sensors like the one by Rohm that is included in the RoadTest here . Adafruit also sells one that I have used. They should be relatively easy to set up over I2C on the Pi although…
Parents
  • jw0752
    0 jw0752 over 5 years ago

    Hi,

    You might want to check to see if you can find a module that has a hysteresis adjustment as well as a sensitivity control. The hysteresis will allow you to adjust the turn on and turn off points to different light levels. Flickering is a sign that the module doesn't have sufficient difference between the turn on and turn off points. The other point is that a module with both adjustments might have a better design. One final observation is that there may be subtle light changes in your room that the sensor can detect that you can't. Our eyes continually adjust to changing light levels and this make it difficult to detect changes that can easily affect a sensor.

     

    John

    • Cancel
    • Vote Up +7 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Reply
  • jw0752
    0 jw0752 over 5 years ago

    Hi,

    You might want to check to see if you can find a module that has a hysteresis adjustment as well as a sensitivity control. The hysteresis will allow you to adjust the turn on and turn off points to different light levels. Flickering is a sign that the module doesn't have sufficient difference between the turn on and turn off points. The other point is that a module with both adjustments might have a better design. One final observation is that there may be subtle light changes in your room that the sensor can detect that you can't. Our eyes continually adjust to changing light levels and this make it difficult to detect changes that can easily affect a sensor.

     

    John

    • Cancel
    • Vote Up +7 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Children
  • suitcase
    0 suitcase over 5 years ago in reply to jw0752

    Thank you! These are useful things to keep in mind, especially about the subtleness of the light. If I find a sensor that provides a more accurate response, I might have an actual answer in terms of lux that tells me how sensitive I really needed this to be.

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube