Author Topic: Data Logging  (Read 1385 times)

0 Members and 1 Guest are viewing this topic.

TomW

  • Super Hero Member Plus
  • *******
  • Posts: 5130
  • Country: us
Data Logging
« on: January 16, 2009, 06:02:43 PM »
Fooling with Data Logging:


Through the years I have tried a few methods for getting my System data into a computer so I could track system performance.


I have tried RS232 meters to a serial port on Linux laptops. This works but is a real kludge. I used it for years. I have also used the serial interface on my Outback Mate to interface to my Outback inverters system data. A lot of this required much help from many folks, mostly on IRC. I hesitate to name them because I don't want to leave anyone out. Without the patient help of both IbedonC and RossW  over the years none of this would have progressed as far or as fast as it has. Many others helped, also but Don and Ross had the patience of Job while working on these projects. \

\

Recently, RonB mentioned the DataQ line of loggers as a possible solution for a Linux user. DataQ does have an SDK for their "starter kit" logger. Not real "support" but enough info to get it working


So, being the curious sort and a logging nut, I snagged one of their DI-194RS 4 channel logging Starter Kit for $25 plus shipping for $32 total I think.


I got it quickly and tried the manufacturer supplied examples but had no luck with getting it to run on my Debian Etch system. I Googled until I found a few programs that claimed to work with it but finally settled on a simple example that only logged one channel and required another channel to be switched off and on to initiate logging. I coerced RossW to help enable all 4 ports and eliminate the switch requirement of the example. Ross kicked out a customized code that grabs all 4 inputs and puts them in a file. He also helped me tweak the math in my scripts to overcome the zero offset of the logger and allow me to chart my system performance.


There are a couple "gotchas" with this logger. All inputs are referenced to the same ground rail so you may not be able to monitor separate systems that don't share a ground rail.  It will require a buffer / amplification stage to read shunts. This is one of the next projects.


I use a USB to serial adapter and have compiled the software for a laptop with Debian Etch and for a Linksys "Slug" running Debian Etch, also. Works well on both.


I have some resulting graphs and a photo of the logger and its input divider over here:


http://www.anotherpower.com/gallery/DataQ


I generated this graph which shows the Solar, Turbine, Battery and Mates idea of battery volts.


The little bumps in the solar line at about the 140 data point spot is from yard lights after dark. Just interesting stuff. The Solar and Turbine volts are read on the far side of a blocking bridge from the batteries thus the higher than battery voltage.



Graph is generated from a datafile like this:

 Seconds since the epoch ch1 ch2 ch3 ch4 :


 1232128294  8.0306  8.31706  8.30078  -0.016276

 1232128356  7.82227  8.18685  7.64648  -0.016276

 1232128486  7.94922  8.23893  8.18685  -0.016276

 1232128547  7.95247  8.25195  8.16406  -0.016276

 1232128678  7.99154  8.31706  8.25195  -0.016276

 1232128739  7.97526  8.31706  8.2194  -0.016276

 1232128800  8.02409  8.25195  3.71094  -0.016276


Channel 4 is floating in this example.


Here is the Starter Kit from DataQ:


http://www.dataq.com/194.htm


If you run Windows it comes with free software which I didn't try.


More info as I sort it out.


Not a bad solution for the Linux user wanting basic system logging. Pretty good deal for $25 and shipping.


Just tossing it out there.


Tom

« Last Edit: January 16, 2009, 06:02:43 PM by (unknown) »

valterra

  • Sr. Member
  • ****
  • Posts: 399
Re: Data Logging
« Reply #1 on: January 16, 2009, 07:23:52 PM »
Greetings, Tom.


I saw on their website that it measures +/- 10v.  So you must have some kind of divider circuit in there to measure your raw voltage?  Your numbers are all in the 8 range.  Could you provide more detail on that?


As for measuring current, you would measure voltage across a shunt, and then the software could translate the milivolts into Amps, right?


I have been playing around with the PicAxe, which has an easy to build circuit (I say easy because the idiot typing this post was able to do figure it out).  But what you've shown represents a great off-the-shelf logger!


I may buy one simply from reading your story.


Thanks.

« Last Edit: January 16, 2009, 07:23:52 PM by valterra »

TomW

  • Super Hero Member Plus
  • *******
  • Posts: 5130
  • Country: us
Re: Data Logging
« Reply #2 on: January 17, 2009, 04:43:57 AM »
valterra;


Yes, each input has a 1/3 divider channels 1 & 2 is 3]1.0 K resistors. Channels 3&4 is 3] 1.5 K resistors. That gives me 1/3 of the input voltage to the ADC in on the DataQ.


No great designing went into the values mostly just what I had on hand. All resistors are gold band carbon so relatively precise divider. I tried higher resistance dividers but they were much more jittery and less accurate. the 1.5 and 1.0 K should be good enough to handle the power dissipated in the divider.


The pictures of the logger show the divider between the terminal strip and the DataQ. The tape keeps the leads apart to avoid shorts. Nothing fancy but an input stage on a PCB would be more pro looking.


It is a 24 volt system and yes, the logger is rated +- 10 volts.


Tom

« Last Edit: January 17, 2009, 04:43:57 AM by TomW »

TomW

  • Super Hero Member Plus
  • *******
  • Posts: 5130
  • Country: us
Re: Data Logging
« Reply #3 on: January 17, 2009, 06:07:04 AM »
Vaterra;


WRT shunts. This device cannot really read them directly with any chance of sane readings. You would need a buffer / booster stage of some sort to boost the shunt voltage into the range of the ADC on the logger. Plus there is that "common ground rail" bit so shunts all need to be in the negative line. Just another piece of the puzzle we are pondering.


Tom

« Last Edit: January 17, 2009, 06:07:04 AM by TomW »

pvale

  • Newbie
  • *
  • Posts: 42
Re: Data Logging
« Reply #4 on: January 17, 2009, 07:45:27 PM »
The problem w/shunts is, by the time you get them to output something meaningful, say 1/2 volt at full scale, they drop that 1/2volt to the load. Yep, you would need a stable op-amp stage with a known gain. I use the RS-232 output from my old E-meter with a data gathering program (compiled Quickbasic written by Nolan to save the daily data. Then I can import it to Excel to create pretty graphs. I also capture data from my SS-MPPT via a program written by Solar-Guppy to save charge data, also imported into Excel for pretty graphs. I have a couple of small circuit cards made several years ago by DataQ and given away for free. They are 4 channel cards, but only one channel of them works without paying DataQ for the full program. They've been kicking around in one of my junk drawers for years. I've drug them out and could use the one channel that each of them will do without the non-crippled version of the program. TomW, does the full DataQ program log output in any format Excel can understand? Without reading some of the documentation for these cards, I'm not sure what the input range is, but I think they are single-ended, maybe 0-10V. Really don't know why I've never used them, just never had time to play around with them when I got them.
« Last Edit: January 17, 2009, 07:45:27 PM by pvale »

pvale

  • Newbie
  • *
  • Posts: 42
Re: Data Logging
« Reply #5 on: January 17, 2009, 08:00:17 PM »
I took a cell phone picture of these cards;


http://www.otherpower.com/images/scimages/9602/2.jpg


I think they are the granddaddy of your DI194 kit.

« Last Edit: January 17, 2009, 08:00:17 PM by pvale »

pvale

  • Newbie
  • *
  • Posts: 42
Re: Data Logging
« Reply #6 on: January 17, 2009, 08:09:50 PM »
I just looked closely at one of them, and they call themselves DI-194 Rev G. So, if I bought one of the newest DI-194's from them, I'd get the full program and could use these also.
« Last Edit: January 17, 2009, 08:09:50 PM by pvale »

commanda

  • Hero Member
  • *****
  • Posts: 731
Re: Data Logging
« Reply #7 on: January 28, 2009, 05:50:08 AM »
Tom,


Any chance of testing whether the supplied windoze software will run under wine?


Amanda

« Last Edit: January 28, 2009, 05:50:08 AM by commanda »