Greetings,
I'm working on a project with half a dozen sensors. The pressure and temp sensors only require one time calibration , 0 and slope, so in theory I could just hard code those two values into the sketch. Others, like conductivity and pH need to be calibrated on a regular basis (2 or 3 values per sensor) and as a result the process needs to be done in situ... The project has a webserver and a TFT touchscreen.
First question: Should I save the calibration values on the SD card or the EEPROM?
Second: what's easier/less tedious: writing code for a bidirectional web page, or writing code for calibration on the touchscreen?
I'm a relative novice at coding, with less HTML/Java script experience than C++...
Cheers.
What controller are You using?
How often do You power up/down the measuring station?
Railroader:
What controller are You using?
How often do You power up/down the measuring station?
Hello Railroader;
I'm using an Arduino Mega 2560, Ethernet shield, RTC, a WhiteBox tentacle for some of the sensors and a Kuman 3.5"TFT with touchscreen.
Ideally, this station will be up 24/7. It is monitoring my pool and my rainwater collection system.
The problem is, we live in the mountains of Colombia and power outages and brownouts are frequent.
Upon power-up, the sensors don't really need to be recalibrated, i just need to wait for about 5 mins to let them all come to temperature before getting and storing reliable readings.
Pressure sensors don't need recalibration, however the pH sensor needs to be recalibrated about every 60 days or so (3 point calibration with know acids/bases)...
Cheers
Okey, I see a problem from those spontanious loss of power. The things You're monitoring arre not exatly any nuclear powerstations. However…. One idea could be to arrange for a none interrupted supply of power, a backup pwr supply.
If You can keep some calibration data within the code, that's good. Does Your controller have EEPROM? That will be easier to use than adding an SD card as I think. EEPROM has a limited number of reprogrammings, is it 10 000? In Your situation I would go for that.
The unit has EEPROM and I have an SD card to log data. 10,000 Writes is more than enough for what I have to do, although I thought it was 300,000. Either way, 6 calibrations a year gives me a lifetime.
So, the question is more one of system design: EEPROM or SD.
And for me the more important (since I'm the one doing the programming) do I deal with the hassle of X-Y coordinates for displaying and reading TFT data, or do I learn HTML to input the calibration data from a web interface?
Cheers.
Keeping calibration constants in the EEPROM makes the SD "clear", only containing saved data.
I thought that calibration is done on site. Make that a piece of the code, to run calibration on demand, a calib-button pressed or something.
TFT, X-Y-coordinates, HTML is not my territory……..
Hopefully some other helper will finish his/her sleep and stepp in.
Railroader:
Keeping calibration constants in the EEPROM makes the SD "clear", only containing saved data.
I thought that calibration is done on site. Make that a piece of the code, to run calibration on demand, a calib-button pressed or something.
TFT, X-Y-coordinates, HTML is not my territory……..
Hopefully some other helper will finish his/her sleep and stepp in.
Thanks RailRoader. Will follow the your advice on call data on Eeprom.
I'm also tending towards TFT, that keeps the network out of the critical path as well.
Let me ask a follow up, since you're still/already up:
I have a sample code for a keypad operating in portrait mode. When I change orientation to landscape, the screen switches, but the touchscreen doesn't. Do I need to swap all the Xs and Ys in that routine?
Cheers and thanks again
For me TFT is just a display like an LCD. I guess You talk about a touchscreen.
Sorry, that's not my field.
Wait a little for other helpers getting online.