Home › Forums › Mayfly Data Logger › PAR issue with Mayfly › Reply To: PAR issue with Mayfly
I looked at your sketch, it’s based on some really old examples we published many years ago at the beginning of the Mayfly project, but it should still work if you’ve got all the original old libraries. Many of them have been replaced or updated since then, and major changes were made to the Mayfly board design in recent years, making some of your code slightly incompatible with the Mayfly 1.0 and 1.1 boards.
But as for the differential ADS1115 analog readings for a self-powered sensor like the SQ-110, your code looks correct. Have you tried removing the sensor and connecting something with a known voltage (below 3.3v) to see what readings you get? For example, with the sensor removed from the logger, connect a standard AA battery to the two aux analog pins of the Mayfly so that the Mayfly will read the battery voltage (around 1.6v for a new AA battery). Your code line 554 would then measure about 8526 bits. Line 555 would convert that to voltage (in millivolts), which would be 1598.63 mV. Then line 556 would convert that to quantum flux units by multiplying it by 5, resulting in approximately 7993. (this is a number way higher than you’d see in the real world because the unamplified quantum sensor has a max output of 800 mV, but simulating an analog sensor by using a single battery is an easy way to test wiring or code to make sure everything is correct before using a real sensor.)
You could also try connecting a standard voltmeter (like a handheld digital multimeter) to your sensor wires (when not connected to a Mayfly or anything else) on a sunny day and see if it reads close to full scale (500-800 mv).