-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test out AS7341 sensor in liquid color matching #87
Comments
Schematic of Picowbell: Update: Following setting is wrong, check #87 (comment) for correct setting
I used a script to see if I can obtain data from the sensor (along with the as7341.py and as7341_sensor.py from the micro-course demo)
However it returned:
It seems the controller is not able to communicate with the AS7341 sensor over the I2C setting. I run the same test code with my micro-course demo(changing the pin back to 27 and 26) it did set up the connection and obtained data from the sensor. |
Are you using the stemma qt port on the picowbell? EDIT: Sorry, realizing answer is yes from context Let's try interchanging some components as a first debugging step. |
This is the correct i2c to use the stemma qt port on the Picowbell:
|
I have modified the wrapped class for AS7341 (AS7341_sensor.py) to add a control for the LED:
Video: IMG_0871.movIt seems that with the LED on, the sensor readings for all channels reach very high values (possibly due to reflection from the enclosure walls). I will have further tests to see if using the LED is necessary. Blue:
Red:
Yellow:
|
Updates for this week: I have a short script to test the sensor: have one measurement with command "read" and "yes or no" to turn on or off LED light on the sensor during the measurement. Click here for sensor test script
I prepared some colors mixture for several trial tests, each well slot has a volume of 280μL. A1: 70% Red, 10% Yellow, 20% Blue Followings are findings after several measurements:
You may refer to this excel file for detail results. I think we will not use the LED for the measurement, so may not need the LED control for the test code (since we need to update the sensor wrapped class as well).And surprisingly, dilution makes the colors less distinguishable, which is the opposite of what we observe with eyes. I also tried to convert the sensor readings into RBG value. I did find a Python API for this task but all the measurement were converted into a deep or light orange/yellow color. I decided to skip this part in current stage, since we only need to compare with the target color measured by the same sensor. For Prefect on OT-2, I think we do not need to install Prefect or modify any codes on OT-2. Just simply include SSH tasks in the Prefect workflow to connect to the OT-2 and then to execute Opentrons protocol code on the robot. I also found some variables in Jackie’s demo code related to Neopixels, which are not necessary for liquid matching. While some of them might be essential variables, but with the Neopixels related naming from the previous code. Do you think I should put in the effort to modify them, or just leave them as they are? I think if we stick with the same naming, we might not need to modify the code for MQTT from the ‘Hello World’ course too much as well. Since my Prefect courses are to held in Dec 17-18 so I think I will finish the documentation for the rest of the software (sensor, PicoW MQTT, OT-2 setup reference, etc) before that days and try to finish the Prefect part after the courses. |
Currently, we have the charging port and sensor package assembled for the liquid color matching demo. It is necessary to test the performance of the AS7341 color sensor for detecting liquid dye in a well plate within the packaging.
I will start by using the code from the micro-course LED color sensor demo for testing.
The text was updated successfully, but these errors were encountered: