https://github.com/pioreactor/spectrometer-reading-plugin
Take a spectrometer reading using the Adafruit AS7341 spectrometer sensor every 5 seconds between OD readings.
https://github.com/pioreactor/spectrometer-reading-plugin
pioreactor-plugin
Last synced: 3 months ago
JSON representation
Take a spectrometer reading using the Adafruit AS7341 spectrometer sensor every 5 seconds between OD readings.
- Host: GitHub
- URL: https://github.com/pioreactor/spectrometer-reading-plugin
- Owner: Pioreactor
- License: mit
- Created: 2022-09-30T14:22:13.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2026-02-22T01:37:22.000Z (3 months ago)
- Last Synced: 2026-02-22T09:25:31.394Z (3 months ago)
- Topics: pioreactor-plugin
- Language: Python
- Size: 69.3 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
## Spectrometer reading plugin
Records spectrometer readings from the Adafruit AS7341 spectrometer sensor attached to your Pioreactor.
Available wavelengths:
-  `415nm`
-  `445nm`
-  `480nm`
-  `515nm`
-  `555nm`
-  `590nm`
-  `630nm`
-  `680nm`
This plugin also installs a SQL table, `as7341_spectrum_readings`, that will store the readings.
### Charts
After installation, you can add specific bands as charts. Add `spec_415=1`, or whatever band(s) you want, to the `[ui.overview.charts]` section, ex:

### Hardware installation
See [notes here](https://github.com/Pioreactor/spectrometer-reading-plugin/wiki#installation).
### How it works
1. In between optical density recordings, the white-light LED on the AS7341 board turns on, and all other LEDs from the Pioreactor's LED channels turn off.
2. The light is reflected back towards the board, with some wavelengths being absorbed by the culture.
3. All sensors for each wavelength are recorded to MQTT and the SQLite3 database (see below)
4. The onboard LED is turned off.
If `od_reading` is not running, this job samples continuously at the same rate as `[od_reading.config].samples_per_second`. When `od_reading` starts, the job switches to dodging mode automatically.
Each wavelength is sent to MQTT under the topics:
```
pioreactor///spectrometer_reading/band_
```
And it is also placed in the SQL table `as7341_spectrum_readings`.
#### Using a different LED
You can provide a 5mm LED instead of using the onboard one. We suggest using the following config to accomplish this:
```
led_current_mA=0
turn_off_leds_during_reading=0
```
### Hardware requirements
- Requires the [Adafruit board AS7341](https://www.adafruit.com/product/4698) and a StemmaQT 4pin cable.
### Vendored dependency
This plugin vendors Adafruit's `adafruit_as7341.py` module in `spectrometer_reading_plugin/_vendor/`.
License and provenance are included in:
- `spectrometer_reading_plugin/_vendor/LICENSE_adafruit_as7341.txt`
- `spectrometer_reading_plugin/_vendor/NOTICE_adafruit_as7341.txt`