RuTiTe - my standalone runtime tester project

I’m slowly working on documentation, as well as some images of my setup. Have enjoyed testing, as well as learning some new things about both Python and sensors in general.

It still needs some tidying up, but here's a peek at what this looks like for my integrating...shoebox.

At the top is the Raspberry Pi Zero. The breadboard is really only used for the status LEDs, and the wires run to the sensor at the bottom. If you don't want the LEDs, it's as easy as running a wire from the Pi to the sensor, which I know Oweban has chosen to do.

Great project! I love this kind of things :heart_eyes:
Thanks a lot for sharing!!!

An Adafruit VEML7700 Ambient Light Sensor arrived today! :cowboy_hat_face:

There are some nice examples for the VEML7700:

Hardware used so far:
Raspberry Pi Zero W
FLIRC case
Adafruit 40x3” (75cm) Female/Female Jumper Wires
Adafruit VEML7700 Ambient Light Sensor

Raspian/Raspberry Pi OS Lite in headless mode.

I was getting an I2C address error initially. I had forgotten to enable I2C. Doh!
sudo raspi-config
Interfacing Options > I2C > Yes > OK > Finish

After installing dependencies with pip3, matplotlib then ran into a few missing libraries:
sudo apt-get install libopenjp2-7 libtiff5

I modified rutite.py locally by adding a few lines and commenting some out:
import adafruit_veml7700
sensor_ceiling = 120000.0
sensor = adafruit_veml7700.VEML7700(i2c)
sensor.light_gain = veml7700.ALS_GAIN_1_8

I found the new ceiling value and the gain value by looking at the VEML7700 datasheet:

Detectable maximum illuminance | With ALS_GAIN = “10” | 120 000
ALS_GAIN 10 | ALS gain x (1/8)

The VEML7700 driver code has an example of ALS_GAIN_2:

Time to build a white box to put this in…

Before you white box it how does it compare to whatever off the shelf meter you use for just regular lux readings using different light sources (LED, ambient/sun, incan)?

I don’t have any commercial light meters (photography etc). I’ve got a TinyCircuits TSL2572 Ambient Light Sensor but never had a use for it until now.

VEML7700 seems to react when I shine an SC64c LE at it from across a room.

Your post history is too new for me to stalk what popular single cell lights you have. If you have one that may have been reviewed by enough people to see lux measurement (kcd) not lumens you can re-create that test.

I only ask because getting a baseline on this sensor seems important before you put it into your own white box with too many variables to reverse engineer. I think user oweban might be doing a VEML7700 config at some point as well.

I’m really into home automation side of things but not so much arduino/pi (except that all my home automation runs on a pi4). In any case I stumbled upon what might be a good solution to plot this data in real time:

MQTT to handle serving up sensor data and Grafana to ultimately plot it. Just a thought…

I’ve a ZL SC64c LE, H600Fc, Olight i3T.

Use Olight i3T (with full-ish battery) and measure out a distance of like 10-15 feet (3-5 meters, 1-2 kangaroos) - record exact distance and shine light right at sensor on high. Come back with lux measurement from sensor and distance and we can probably figure out if it’s calibrated like a lux meter.

edit; I guess I should also say do it in an area that is at least a little bit dark. doesnt have to be pitch black (you could even measure the “ambient” light in room with sensor first)

I might pick a VEML up to compare - my TSL2591 recorded very similar readings to my UT383S.

Olight i3T

LADDA AAA battery voltage 1.34V

Distance: 225cm

Lux on high was between 161 and 168.

Lux on low was exactly 5.0687999999999995 each time.

#!/usr/bin/env python3
import time
import board
import busio
import adafruit_veml7700

i2c = busio.I2C(board.SCL, board.SDA)
veml7700 = adafruit_veml7700.VEML7700(i2c)
veml7700.light_gain = veml7700.ALS_GAIN_1_8

while True:
print("lux:", veml7700.lux)
time.sleep(0.3)

Interesting project.

Sorry to ask, but isn’t it simpler to just use a phone app?
Or will it drain the phone on long runtime tests?

= 850cd = 58.3m throw

specs on box say 60m throw, one review says 67m

It sounds like it’s at least in the ballpark for this test.

I addressed all that in the original post. I have trouble keeping the phone still, my phone has very poor resolution, and it often crashes on very long tests thanks to Android killing apps after a while. This option is cheaper, more configurable, and just overall better for my use case.

Thanks for sharing. Might have to look into this at some point in the future.

bmengineer, any new progress or additions to this or did you get it set up how you wanted and it already serves its purpose as is?

I have it set up how I like it, but I should check that the repository is up to date. If you’re trying it and either need help, want to use a different sensor, or need a specific feature, let me know.

Do you ssh to the Pi to check the status or run a webserver on it? Would be cool to have a webserver that shows the current values and a historic chart.

Right now I just ssh. I agree that a webserver would be more convenient, just haven’t picked and learned the tools that would require yet