The very first version of reef-pi had support for mcp3008, I intended to use it for reading various probes that emit analog signals (ph, temperature etc). Later I realized ds18b20 as a temperature sensor dont need it, since everything is implemented in the kernel (not sure if it does ADC), and with ph probe I went with atlas scientific since this was the first attempt, and I didnt want to tackle everything in one shot (reading analog signal, doing the scale conversion, implementing calibration logic etc). Atlas scintific is certainly more costly, but it took care of all those things, as well as saves cpu cycles for Pi. This is a very good setup for reef-pi. But this does not mean we cant improve.
I am more than happy to add mcp3008 or a beefier ADC support, but we need a full plan around it. i.e. we have to think about what sensors we'll use (ph, what about pt-100? ), how much processing power it will use (does it make sense to use a slave MCU - this is what
@theatrus had suggested), what all sofware thing we have to do (scaling, calibration etc) and finally what this entail for the DIY makers (build time, complexity, guides etc). Because we have the atlas scientific probe support I am more bullish about adding an ADC support (since we have a plan B in place). But at the end, this has to be more affordable than the atlas scientific option.
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.