Right. So this is one set of plan, with mcp3008, a ph breakout board. Can you share a link for the ph breakout board. Few other questions:Understood, I wasn't sure if the MCP3008 support was still in here or not and no sense in reinventing the wheel if already have a good one. I can answer some of the questions:
Price:
MCP3008 ADC chip - $4
eBay PH interface board - $8
PH Probe - BRS Single Junction PH probe $35 ( you could even go for a better one, just don't get a cheap one)
Analog Isolation Board - $20 (you can skip this, but you can expect unreliable results)
Atlas Scientific PH calibration Solution (4.0, 7.0, 10.0) - $15
So you are looking at about $82 plus cost of solder, wire, connecters, etc...
Construction:
This is no more difficult than anything else we have wired up. I have a schematic drawn up already.
Performance:
negligible, one call to the MCP3008 to get the digital value
one more line of code to convert that to a PH number; everything else is done in hardware, the Pi won't even know its there when its not asking for data.
Coding Effort:
I have a sample Python script I've written that handles getting the data and doing the necessary calibration for an accurate PH. I use a 3-point calibration at 4.0, 7.0, and 10.0 PH. Honestly, we could probably get away with 2-points and just use the high end, but this is how it is now. We would need to port this to GO of course. To ensure the best quality data I included some statistical analysis in my script so we can record n number of points, calculate the standard deviation and throw out any outliers more than 1-sigma away from standard deviation, this will eliminate any random noise that might pop up (This is configurable, you can set it however you like). It also plots a histogram so you can get a visual of the data dispersion.
I don't know anything about GO, so I don't know how much effort this will be to port it over.
Scalability
The MCP3008 has 8 channels, I am only using 2 (tank ph and a second ph for future calcium reactor). I image l can integrate Salinity and ORP in much the same way, and that still leaves 4 more channels open for suggestions.
If it sounds like something you are interested in let me know and I can send you some files. After that if you think it looks good you then already have most of what you need to test it out, you probably just need the $8 eBay PH board to see it work.
- What about other ADCs, I was looking at ads1115 as well, its little bit costly, but 16 bits?
- We'll need voltage isolators as well if we are considering multiple probes. With atlasscientific, this is very straight forward, but something we have to remember (and ancillary circuits) when rolling our own
Calibration code (1 point, 2 point or 3 points) will be added as a generic library in reef-pi (post 2.0,) and available for all sensors , I am not too worried about that.
If you are serious about this (natively support an ADC in reef-pi and use it atleast in a ph probe), lets settle on these details, and get started. I am more than happy to chip in for coding parts, but I want to ensure that we have a reliable design (since we are going our own) and reliable supply chain. i.e. if we are relying on any ancillary boards it has to be a reputed openhardware vendor (adafruit, sparkfun, dfrobot all are kosher... random dudes in ebay is not kosher :-) ).
This is exciting, thanks for starting this discussion
