opto:farm / 26 July 2022
Monitoring light protocols with an I2C spectrometer
Would you like to document the execution of a long optogenetic experiment? We can be as confident as we can in instrumentation and user skills in preparing the right light protocols, but the documentation of the execution of an experiment is always useful, particularly when troubleshooting is necessary. Then, light sensors installed within incubators used [...]

Would you like to document the execution of a long optogenetic experiment? We can be as confident as we can in instrumentation and user skills in preparing the right light protocols, but the documentation of the execution of an experiment is always useful, particularly when troubleshooting is necessary.
Then, light sensors installed within incubators used for optogenetics are extremely useful. Here we briefly present the AS734, a multispectral light sensor by AMS AG. The data-sheet can be found on the manufacturer’s website but a (2022) copy we used for coding can be downloaded below. Like all the sensors we have been integrating in the opto:farm ecosystem – at least for now – the AS7341 is an I2C sensor that requires only 4 wires to be connected to the microcontroller and can be daisy-chained with other devices.
The AS7341 provides 11 measurements on spectral windows across the visible and near infrared spectra (NIR): 8 visible, one NIR and two unfiltered measurements. The ‘clear’ measurement is used to detect the intensity measured without the use of filters, including the 730-850 wavelengths not covered by filtered sensor. the other unfiltered sensor, the ‘flicker’ channels is utilized to detect flickering, not implemented in the opto:farm.

From the AMS manual. Depiction of the 11 spectral windows.
The AS7341 sensor is great but the Adafruit’s breakout circuit (see featured image at the top of the page) is even greater. As always, Adafruit Industries provides us with great solutions for DIYers both experts and novices. The Adafruit AS7341 breakout sports two Qwiic connectors for daisy-chaining I2C devices without the need for soldering, in addition to optional terminals.
Unsurprisingly, Adafruit offers plenty of details on their webpage for those of you who wish to experiment with different designs and a library to use the AS7341 with Arduino on GitHub.
But we are stubborn and wish to integrate this great sensor with the micro:bit to be as usable as possible to everyone without needing expertise. Compared to other sensors we handled, the AS7341 is a beast and took us quite a while to tame it. We started by porting the Adafruit library to TypeScript for MakeCode which we provide separately on our GitHub repository. You can use it to build a light spectrometer for any applications as shown here with the XINABOX display and micro:bit breakout board.
[
View this post on Instagram
](https://www.instagram.com/tv/Cgc5c53F7Vm/?utm_source=ig_embed&utm_campaign=loading)
Or you can add AS7341 in each opto:pods (er… as we intended it). The AS7341 is already integrated into our opto:farm extension.
Enjoy!
Original source: optofarm.wordpress.com