I created a PH and Temperature sensor to use for my hydroponics system. This is right now streaming back to io.adafruit.com.
Right now, the platform handles PH, air temperature, and water temperature. The goal is to add O2 absorption and conductivity. As well as stream the data to an Azure IoT Hub. That hub will then be able to store certain data in data storage, trigger events, etc.
Components
1×
NodeMcu ESP8266 ESP-12E WIFI Development Board
1×
DS18B20 Temperature Sensor (water proof for H2O temperature readings)
1×
DS18B20 temperature sensor that is going to be soldered to the project board for airtemp
1×
ADS1115 16bit ADC to convert the analog signal from the PH sensor to digital
1×
DC to DC voltage converter to handle the required 5v for the PH sensor (the ESP8266 is 3.3v)
Here it is hooked up to the hydroponics tower structure. I am not happy with the organization. I think I will want to mount it to the tower structure. but right now, it works.
I was getting an invalid voltage reading on the ADC converter. and after tracing all my soldering, I realized that I connected to the wrong Analog pin. Dolt!!! Anyway, now everything working great.
Next steps, adding Dissolved O2 sensor and switch out to post data to Azure IoT hub.
Cleaned up my prototype a bit by moving it off the breadboard and soldered to a smaller perf board. Also added some screw down terminals to connect the external sensors.
One problem is that now the PH sensor is always reading a PH of about 2.5. Either I have something wrong in the wiring (I dont think so), or the probe went bad. I heard that these probes can be a bit weird. I am going to try to attach to a Leonardo Arduino and see if I get different results there. (ie. bypass my ADC converter and just read the analog directly on a real arduino).
The results of the build are below. More to come later.
I haven't been using it for long. I have tried in 2 different environments (freshwater hydroponics tank and a saltwater fish holding pen in a marina), and tested against a stand-alone PH meter, and it is working pretty well. What I did is an initial test with a PH calibration solution and then did an offset based on what my readings were. the meter was slightly off, so I did an offset to handle it (see below)
#define Offset -0.03 //deviation compensate
then in my loop(){}, I did this (where I added the Offset value to my final pHValue).
What I am going to end up doing is being able to have a calibration mode that I can put the device into (pressing a button), and then place the device into the calibration solution, which will then update the Offset and store in non-volatile memory. I figure that I would do this every week or so to keep it in calibration.
sounds good. pH sensors should be kept wet, either in the solution you're measuring or in 3M KCl. they also gradually age and lose sensitivity, so keep an eye on the slope in addition to the offset value; once the slope drops to 90% or so of its original value the probe is probably no longer reliable. Best way to get a good idea of slope is to do _two_ calibrations at different pH levels that bound your expected measurement range, such as 4.0 and 7.0.
Good advice on the continuing of testing. I keep my standalone PH sensor always in solution when I am not using it and recalibrate every few months.
On this particular sensor, it is going to be submerged 100% of its lifespan. Others have noted that this PH sensor is good for about 6 months. I am going to be using it in two different environments (freshwater for hydroponics and saltwater for Aquaculture). The saltwater is going to be a bit more harsh, so I figure that I am going to give it about 4 months of lifespan before replacing. That isn't terrible since having 1,000 fish floating on the surface, because the PH became toxic for them, is much worse than replacing a $40 sensor every few months.
Hi, is it possible to have the code please?Thank you