Interesting day of experimentation today 25 may 2017. I made significant changes to the firmware in the krph source tree.
- Removed voltage ratio code. Vcc measurments are taken using direct measurements available in the arduino library and I wondered whether varying voltages contributed to the variability in the AD reads when the LEDs were on. I don’t see a relationship so that’s one less thing.
- I had code to set the shot lengths and put delays between shots to see if those affected the LED intensities – the effects if any don’t correlate with the AD readings. The code doesn’t make a difference and were removed.
- New protocol is that LED’s are turned on once for each measurement run and don’t blink on and off for each measurement. This should reduce the current fluctuations a bit – maybe not significantly – but blinking is not necessary.
- For both blank and read cycles, loops drives the reads: 100 analogRead() cycles for blank measurement and 50 analogRead()s for green and blue each. The blank and read values are taken as the mean of the measurement run. Averaging effectively dampens the noise.
- Using the previous calibration to simulate pH measurement, the read to read variation is less than .005 pH units and meets the +- 0.01 pH measurement spec.
- Looked at the effect of ambient temperature in the calculation. A program change to set T to 27.7 from 25 makes a difference .03 pH units – significant enough that it needs to be addressed at run time by providing a mechanism to dial in temperature and salinity to compute pH. Perhaps a method can be derived to take a standardized pH and adjust it for S and T of actual live sea-water samples.
- The method is to make an estimate for Rn and compute pH from eq.(4). If the LEDs were exactly 578 and 434 nm, it would be interesting to see how close the calibration approaches the narrow band instrument. The LEDs used here are nominally 574nm and 427nm. Liu’s equations are specific to purified mCP absorption at those specific wavelength.
- ambient values of T are plugged into eq (5) and (6).
- values of salinity are required in eq (6) and (7)
The next step is a third calibration run against the narrow band lab spectrophotometer. I assume the calibration is valid for the the T and S range given above to produce the Rn
#define buildV “2” ( hardcase = v2 – wirewrap. protoboard was v1)
#define makeV “3” ( 100 ml -1 , 3 ml cuvette 2, hp cuvette holder 3 )
#define softV “1” ( day 1 of 2.3 software development)
#define flash “15”