Overall, it'd be nice - considerate even, to adopt a "Keep It Simple, Stupid" approach.
While KISS is not the optimum
performance approach, surely it is the best approach for:- sharing information with a group of mixed ability, code-reuse and maintainability.
Appreciating the thought, etc, already put in by those with much more relevant experience than mine...
but ...
wouldn't it make sense to think a little more modularly? One step at a time.
And then the modules could be combined, in a pick-and-mix style, to achieve whatever specific tasks individuals might want.
Generally, I'd expect most of the datalogging interest to be of 'slow' data. People might, for example, be interested in how their hot water tank, solar collector, boiler return temperature, or whatever varied over the day, week, month or season.
I don't think there's likely to be as much interest in
recording rapid "transient" behaviour, where the entire episode only lasts minutes or seconds.
Controlling rapidly changing behaviour might be a popular interest, however.
Therefore as far as the "logging module" (software and hardware) goes, it shouldn't matter whether the data is coming from a temperature, voltage, sunshine or water pressure/depth sensor ... The differences there are 'just' a matter of sensors and maybe data filtering/smoothing to suit the sensor. The "back-end" is common, for sure speed is not of the essence but compared to the natural run-time of an Arduino on a 9v PP3 battery, the duration is very, very long!
I'm not sure that I properly understand the value of only accessing one's own data from the 'internet cloud' (which seems to be the pachube approach, if I understand it correctly), and/or having to write
additional Java/Javascript/PHP/Ruby/Python or whatever to analyse one's own measurements does seem like, well...
needing more cleverness than the job ought to require!
While I can readily appreciate the "community value" of sharing stuff like outdoor shade temperatures, sunshine hours, windspeed, etc, that data is only as good as its source. As a comparison, I can post an internet page on brain surgery, but the fact that I can post it shouldn't make it believable. Posting an outdoor temperature (to take one specific example) from an uncalibrated sensor, that is exposed to direct sun, or rain and wind, really doesn't help anyone.
But its the indirectness, the requirement to go through an intermediary (and/or to learn yet more programming languages and environments), and/or the need to run a real computer 24/7 to catch the data somehow, that makes the ethernet route seem unappealing -- at least as a starting place.
And it would also seem that a
static external IP address from one's Internet Service Provider is yet another additional requirement to properly use the pachube approach.
The approach that has appealed to my simple mind is storing data in flash memory, in comma-separated-value (CSV) files (for ease of future handling), with the flash being occasionally physically transferred to a computer where the data can be easily visualised or analysed in
any spreadsheet program. (Though there's no requirement for a spreadsheet -- if anyone wanted to, they could import it into MySQL, or whatever they wanted.)
Additionally, my feeling is that it would actually be simpler to store rather 'raw' data and to do any awkward scaling/linearising/conversion tasks in the spreadsheet.
Certainly, any computation with the data would be
more easily done, debugged and audited on the computer. And wouldn't take up precious memory resources on the Arduino. Or obfuscate the Arduino code with all that data processing!
However, this does mean logging to flash that is formatted in a PC/Mac/Linux readable fashion. Getting the Arduino to handle a PC filesystem seems to be a complex bit of voodoo. And I'm far from convinced that its reliable let alone easy to use ... My suspicion is that this may be the reason that the Arduino ethernet shield's SD socket isn't yet operational. Might it be that the effort and resources required for running both TCP/IP and FAT16 cripples the Arduino for any other task?
The easiest thing for users OUGHT to be to stick close to "official" Arduino developments.
But the ethernet shield's SD socket isn't (yet) supported, and as of last night none of Arduino's own three listed UK sources were even offering the official ethernet shield. (In Switzerland, it seemed to be near double the cost of an official Arduino - which seems pricey.)
Those seem to me like reasons, for now at least, NOT to restrict things to the "official" SD card !
The easiest means of handling FAT16-formatted flash would seem to be using another dedicated controller offering "dos-on-a-chip". There's an american offering claiming just that, but its expensive (compared to Arduino, anyway).
However, there does seem to be an off-the-shelf, British, packaged solution for about £15 that looks like it should be pretty easy to use. It even uses a USB flash 'disk', eliminating various concerns - like future availability of SD (rather than SDHC) cards...
Has anyone any experience of the
Vinculum Vdrive2 ? (Or its bare-board cousins?)
Info:
http://www.vinculum.com/prd_vdrive1.html Code sketch:
http://www.arduino.cc/playground/Main/UsbMemory Shop:
http://apple.clickandbuild.com/cnb/shop/ftdichip?op=catalogue-products-null&prodCategoryID=54&title=VDRIVE2 And I think the trivially simple means of doing a firmware upgrade on the module demonstrates that someone has a talent for creative usability!
One small-ish but practical problem is that I know from camera experience that the most likely way of corrupting data on flash is to write to it as the camera battery is going flat...
So, one aspect of a flash-based logger might therefore be a baby ups. Or some means of monitoring its own power ...