Pi_Newbee_2023
Posts: 1
Joined: Sat Jan 28, 2023 4:41 pm

How to set up Pi4 with light sensor

Sat Jan 28, 2023 4:49 pm

Hello, I need to help to set up a raspberry pi 4 to record light exposure.
We will need a light sensor that records the amount of light (lumens) that it is exposed to and when it hits a specific target it outputs a message. Can this be done? Can anyone help and give advise please?
I am helping some students with a project and could do with some expertise as I have never done this before.

terribleted
Posts: 929
Joined: Tue Oct 06, 2020 8:07 pm

Re: How to set up Pi4 with light sensor

Sat Jan 28, 2023 6:28 pm

Depending on where you are, there are numerous vendors.
I'm in the USA, and i use Adafruit a lot....
www.adafruit.com

if you look under "products - sensors" you will find light sensors.
for example, "Adafruit VEML7700 Lux Sensor - I2C Light Sensor "

I'd look for one that uses I2C or SPI, as the PI has no analog inputs to measure voltage.
of course, you can buy an A/D converter.... depends on how complicated you want this project to be (grin)

Adafruit is pretty good at providing a tutorial on their stuff.
(see the "learn" under the product)
Last edited by terribleted on Sat Jan 28, 2023 8:39 pm, edited 1 time in total.
i had a Trash-80 model 1 (circa 1980). upgrading from 4k to 16k of RAM, i thought "i'll never use this much RAM".
Now i have a computer with a million times that much memory. And i keep running out of it.
Not the computer....ME.

MiscBits
Posts: 1419
Joined: Wed Jan 27, 2021 12:48 pm

Re: How to set up Pi4 with light sensor

Sat Jan 28, 2023 7:45 pm

You could use a light dependant resistor (LDR) and capacitor.

It all depends on how accurate or repeatable across devices you need to be...

ullix
Posts: 39
Joined: Thu Sep 15, 2011 3:10 pm

Re: How to set up Pi4 with light sensor

Sun Jan 29, 2023 2:22 pm

I find these I2C based light sensors easy to use on Raspi:

  • LTR390 (has UV and Visible light)
  • BH1750 (also under the name of GY-30 (Visible only)

If only Visible is needed, the latter is hard to beat!

Return to “Automation, sensing and robotics”