• Stars
    star
    487
  • Rank 90,352 (Top 2 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created over 2 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A DIY incident light meter

Action Shot

YouTube Channel Views

Instagram

Photon: an open-source incident light meter

Photon reproduces the some of the functionality of more expensive tools, using a few inexpensive/readily available parts. Currently it measures ambient light brightness, as well as the red, green and blue components of the light, which might allow White Balance readings in future iterations.

There is soldering involved, but don't let that put you off, it's easy.

Background

An incident light-meter can be an essential tool in photography (especially film photography with old cameras). The sophisticated computation baked-in to modern cameras devotes a lot of effort guessing 'how much light is falling on the subject?". If you have the option of getting to the subject and taking a reading, no guessing is required and everything becomes a lot easier. A more in-depth description in the video below:

IMAGE ALT TEXT HERE

Components

Assembly

Hardware

Solder the power shim to the pico, following the Pimoroni instructions. Connect the Lipo/LiIon battery to the shim.

Then connect the rest of the components to the GPIO pins as described in the tables below. (VCC and GND are also connected to the pico for all except the switch)

Action Shot

Light Sensor

Pico GPIO BH1745
4 SDA
5 SCL

OLED

Pico GPIO OLED Pin Number
19 DIN/MOSI 25
18 CLK/SCK 24
17 CS 22
20 DC 26
21 RST 27

Rotary Encoder:

Pico GPIO Rotary Encoder
6 CLK
7 DT
8 SW

The Two Switches

Connect one end of the switch to GND, and the other to:

Pico GPIO Switches
15 Measure (Keyboard Switch)
22 ISO (6x6mm switch)

Enclosure Assembly

Once you've tested that things are working, squeeze the parts into an enclosure. If you have access to a 3D printer, there are stl files in the cases directory.

Software

Download a uf2 image from the Pimoroni github repository and install it on the Pico according to the instructions. You need to use the Pimoroni image to be able to use Pimoroni drivers for the light sensor.

Clone this repository to your computer using the commands (from a terminal):

cd ~
git clone https://github.com/veebch/photon.git
cd photon

Check the port of the pico with the port listing command:

python -m serial.tools.list_ports

Now, using the port path (in our case /dev/ttyACM0) copy the contents to the repository by installing ampy and using and the commands:

ampy -p /dev/ttyACM0 put drivers/
ampy -p /dev/ttyACM0 put gui/
ampy -p /dev/ttyACM0 put color_setup.py
ampy -p /dev/ttyACM0 put main.py

(nb. make sure you are using the right port name, as shown in the port listing command above)

Done! All the required files should now be on the Pico. When you disconnect from USB and power on using the button on the power shim the script will autorun.

Contributing to the code

If you look at this, find it interesting, and know you can make it better then please fork the repository and use a feature branch. Pull requests are welcome and encouraged... in a nutshell:

  1. Fork it
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

If that all looks a bit too programmy, and if you have some photography expertise that you think could be embedded in the code then raise an issue on GitHub or contact us.

Licence

GNU GENERAL PUBLIC LICENSE Version 3.0

Appendix

Calculation of Values

The simple calculations that lead to a reading are based on the Wikipedia entry on exposure value.

The illuminance returned by the Pimoroni BH1745 ( $L$ ) is converted to an exposure value ( $E_v$ ) for ISO 100 using

$$E_v=\log _2 {{L} \over {C}},$$

where $C$ is the light meter calibration constant.

This exposure value is then adjusted to an Exposure value for the chosen ISO ( $E_{ISO}$ ) using

$$E_{ISO}=E_v + \log_2 {{ISO}\over{100}}.$$

Then, depending on the priority on the light meter, the remaining value is calculated using

$$t = {{N^2} \over {2^{E_{ISO}}}}$$

or

$$N = \sqrt{t 2^{ E_{ISO}}}$$

where $t$ is shutter speed and $N$ is f-stop. The value is then rounded to the nearest nominal value and displayed on the screen.

More Repositories

1

btcticker

ePaper Cryptocurrency Ticker
Python
305
star
2

boostbox

Some notes on a cli terminal, upcycling an old super 8 film viewer
114
star
3

sploosh

A PID controller for a plant watererer connected to a soil moisture sensor
Python
90
star
4

heat-o-matic

Proportional Integral Derivative controller using pi pico
Python
85
star
5

clock

Running a vintage secondary clock, using DCF77 or WWVB and Raspberry Pi Pico. Also a version that does not use Radio and uses a Pico W.
Python
84
star
6

bbq

RETIRED. Superseded by https://github.com/llvllch/stonks
Python
67
star
7

hometime

A physical progress bar based on Google Calendar events
Python
44
star
8

thedailygrind

An open-source coffee grinder
Python
41
star
9

edify

A quote scraper (r/quotes on reddit) on a Pi Zero with a 2.7 inch epaper screen
Python
30
star
10

ir-see

Infrared photos and HD video using picamera2
Python
28
star
11

stonks

A script to scrape useful things off the internet and display them on HD epaper
Python
26
star
12

doomed

A Fear and Greed index visualiser for Bitcoin on a SSD1351 OLED Screen
Python
21
star
13

palomino

The code for a high definition ePaper display that shows what is currently playing on Volumio
Python
21
star
14

Bip39-Dice

Generate a Bitcoin Wallet Seed Phrase using dice (and a few lines of Python)
Python
20
star
15

teasmade

Python code for a controlling a relay connected to a Raspberry Pi, connected to a 1974 goblin Teasmade
Python
20
star
16

bullion

An epaper display for Precious Metals and Crypto
Python
13
star
17

peeperpam

Python
12
star
18

walkman

Pull the music files from Plex playlists on your server and sync to a portable music player
Python
8
star
19

fob

Python
8
star
20

hbty

A flickering LED candle that plays tunes. Extra birthday points guaranteed
Python
7
star
21

readwire

A script to copy your Highlights from an Amazon Kindle device
Python
6
star
22

twirly

DIY Remote control precision turntable using 3d printed gears
OpenSCAD
5
star
23

cassette

A rudimentary youtube subscription counter
Python
3
star
24

nodemode

How to get a RaspiBlitz to run price ticker code
2
star
25

button

Control network connected devices ( eg some KEFLS50 Wireless speakers) with a flic button
Python
2
star
26

veebch

Config files for my GitHub profile.
2
star
27

veebkeeb

A repository of 3x3 macro pad mappings for a variety of apps
C
1
star