EcoRenovator

EcoRenovator (https://ecorenovator.org/forum/index.php)
-   Tools (https://ecorenovator.org/forum/forumdisplay.php?f=29)
-   -   DIY Data-Logger (https://ecorenovator.org/forum/showthread.php?t=529)

AC_Hacker 05-08-09 11:43 AM

DIY Data-Logger
 
5 Attachment(s)
I've been looking through several threads and have noticed interest in tracking data, also an interest of mine for my heat pump developments.

I've looked to buy data-loggers and they can be expensive. Most that I have looked at start in at $300.

Here's a cute but typical example:

http://ecorenovator.org/forum/attach...2&d=1241808047

TR-72U Temp/Humidity Recorder (USB) Price:$297.00

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



...nice looking product, but I was looking for a lot more functionality for a lot less money..



http://ecorenovator.org/forum/attach...6&d=1241799561

I did find an interesting unit ($60) at Spark Fun called the Logomatic:
SparkFun Electronics - Logomatic v2 Serial SD Datalogger

It's definitely a DIY thing. You get a tiny stuffed board that comes set up for 8 analog-to-digital channels (with micro-soldering 8 more are possible). The channels can also be configured to digital-to-analog and also digital in and out.

So the analog-to-digital channels will each read a variation in voltage from 0 to 3.5 volts and write the data to a micro SD card (user-supplied, 2 gig max), which can be read through a USB cable. The file structure is directly importable to Excel as a tab-delimited text file.

It is set up to be able to re-charge a Lithium-Polymer (AKA: LiPo) through USB and run off of that.

As it comes out of the box, it will not connect to USB and run at the same time. Running happens when only connected to battery and turned on


I bought 10 thermistors (thermally-variable resistors) to hook up to the analog-in lines. As it comes out of the box, it just writes values to the SD card, not temperatures.The ARM chip is capable of being programmed to make conversions on board, but at the present time I'm considering doing that on my PC, in Excel.

There's also a family of sensors called "1 wire" or "one wire" which actually require two or three wires, but a very large number of these can be controlled and read from and only need one I/O port.


I got 4 one wire thermometer units to experiment with. The attraction here is that compared to thermistors, they are more accurate, and do all their work within the chip, so stray voltage have little effect on them.

Another interesting item is a one wire humidity sensor that is capable of calculating dew point. I don't have one yet.

For my purposes, this unit will be ideal.
  • Most of the development work has been done,
  • the duration of most of my logging will be less than the time-to-exhaustion of the battery
  • A 2 Gig SD card will hold the data.

...But for longer logging periods this might not be the best logger. I have heard of another unit called the AVR Data Logger (AKA: Butterfly Data Logger):
Butterfly Data Logger - Google Search

http://ecorenovator.org/forum/attach...9&d=1241800830

This one has less power, a much lower current draw, and is reputed to be able to run for years on a coat-button sized Lithium battery.

Regards,

-AC_Hacker

Daox 05-08-09 12:06 PM

Thanks for posting these options. I know I was looking at loggers a while back and they are are expensive, and I'm not sure why. They aren't that complex.

AC_Hacker 06-29-09 12:57 PM

Data-Logger, Good Progress...
 
5 Attachment(s)
I have been working on my data logger and am happy to report that I now have a working unit and have been using it to do testing of hydronic floor ideas.

The log-o-matic board from Spark Fun had 8 A-to-D inputs and will digitize 8 voltage levels between 0 and 3.4 volts.

The first task was to build an interface board which consisted of a voltage divider with the thermistor being one of the resistors. The value of the fixed resistor was chosen to be about equal to the value of the thermistor, when the thermistor was at a temperature that was half-way between the range of values I expected to be measuring.

Here's the schematic:


I repeated this seven times on the interface board:


I also wanted one of the eight analog inputs to the data logger to measure power if I was testing a newly-built heat pump, for instance. I decided to use a toroid transformer, with the primary coil being the power line that conducted current to the heat pump. The secondary would then have a current induced into it that was proportional to current in the primary. Then I would rectify the AC and use a voltage divider to bring the voltage to a mid range between 1 an 3.4 volts.

It took several tries to do this... here's a photo of the secondary coil being wound on the toroid:


I forgot to photograph the primary winding. I used 14 ga. wire.

But here's a photo of the power-sender box:


Here's a photo of the working data-logger:


The data-logger isn't completely finished yet... it needs a case to protect it from accidents, but I'm using it so much, that may never happen.

So the data-logger writes files to a micro-SD card. When I hook up a USB to the data-logger, I'm able to download the data files and open them directly in Excel. This gives me access to a large set of data analysis and graphing tools.

My cost for the functioning data-logger is under $100. This includes log-o-matic board, thermistors, misc parts, etc. There was a large amount of time involved in putting it all together, but my understanding of data acquisition has increased substantially.

And it is a very useful tool.

Regards,

-AC_Hacker

ldjessee 07-02-09 09:20 AM

That is really neat.

Did you account for how long the wire is? I would want the thermistors all over the house and would worry about the variable resistance of long wire runs. Oh, and those runs acting like a big antenna.

What is the sampling rate you are using?

AC_Hacker 07-02-09 11:24 AM

questions on data-logger...
 
You bring up some interesting questions...

> ...and those runs acting like a big antenna.

The data I'm collecting has a degree of 'noise'. I tried to quiet things down with tiny by-pass caps in parallel with the thermistor, but without success. I tried twisting the wire to see if that would help, not so much. I tried re-locating my setup outside my house, to an electrically quieter area, to see if that helped significantly, no love there either. At this point, I can't tell if the noise is external (stray voltage being picked up by the wires leading to the thermistors) or internal (clock noise and/or processor noise). I'm suspecting that the noise is internal. At any rate, I plan to replace the unshielded wires with 1/8 inch coax. I'd recommend the same to you.

Another approach would be to correct the noise in Excel by averaging the readings over equal intervals that are appropriate to your application. For me at this point, my tests are running about 1.5 hours, with samples every second, and the events I am measuring are temperature changes in concrete, so the change is pretty slow. If I average over every 100 samples it should be pretty good.

But even with noisy samples, the data I'm getting is quite usable.

> I would want the thermistors all over the house and would worry
> about the variable resistance of long wire runs.

You could put the thermistors in place and afterword use some reliable temperature standard, like a lab-grade thermometer or boiling water (212 at sea level) and really slushy ice water (32 at sea level) and correct your logged data to reflect the known values.

> Did you account for how long the wire is?

I used the above method.

A really big lesson for me with this project has been the massive inaccuracy of cheap digital thermometers. They can still be useful, but you need a reliable standard to compare them to.

> What is the sampling rate you are using?

As the log-o-matic ships, it will sample from about 150 samples per second (if you read all 8 inputs) to 1 sample per second. My sample rate is at 1 per second.

It would be much better if the firmware was tweaked to have the ARM processor, which has plenty of power, to average every 100 readings, and to allow much longer sampling periods, like every minute or 10 minute or so...

There are tutorials at Spark Fun that encourage firmware-tweaking. If I was more fluent in the C programming language I would take this on.

I hope this helps...

Best regards,

-AC_Hacker

ldjessee 07-02-09 12:06 PM

Yes, going to shielded wire with the shield grounded to a separate ground would help, but have you thought of just looping the wire around a magnet a few times, one at each end?

Yes, I guess you could average over time, such as taking the 100 to 150 samples a second and then averaging them over a second.

AC_Hacker 07-03-09 02:45 AM

noise solutions...
 
Quote:

Originally Posted by ldjessee (Post 3378)
Yes, going to shielded wire with the shield grounded to a separate ground would help, but have you thought of just looping the wire around a magnet a few times, one at each end?

Yes, I did try looping the data-logger end of the cable several turns through a ferite core. No noticable help.

Regards,

-AC_Hacker

NiHaoMike 07-21-09 01:07 PM

Quote:

Originally Posted by AC_Hacker (Post 3349)
I also wanted one of the eight analog inputs to the data logger to measure power if I was testing a newly-built heat pump, for instance. I decided to use a toroid transformer, with the primary coil being the power line that conducted current to the heat pump. The secondary would then have a current induced into it that was proportional to current in the primary. Then I would rectify the AC and use a voltage divider to bring the voltage to a mid range between 1 an 3.4 volts.

Actually, the voltage output is proportional to the derivative of the current. You'll need to integrate the output in order to get meaningful measurements if the load is not linear. Or use a hall effect current sensor which outputs a proportional signal.

And try adding capacitors to reduce the noise.

AC_Hacker 07-22-09 09:39 AM

Power & Noise
 
Quote:

Originally Posted by NiHaoMike (Post 3446)
Actually, the voltage output is proportional to the derivative of the current. You'll need to integrate the output in order to get meaningful measurements if the load is not linear. Or use a hall effect current sensor which outputs a proportional signal.

And try adding capacitors to reduce the noise.

Can you give me a bit more detail regarding integrating the output? Can you reduce it to an algebraic equation? If so, I can include that in the spreadsheet.

Do you know where I can get Hall effect sensors?

I've also gotten other feedback regarding the voltage/current phase shift encountered when measuring inductive loads. but I'm not sure how to proceed. I also don't know if it yields a minor error in my case or a major error.

There's a local group called "DorkBotPDX" DorkbotPDX | people doing strange things with electricity. I showed them my data logger and they were very interested in my project, especially the power measuring part. Apparently there is much interest in being able to log power in many projects.

I appreciate your response and any additional suggestions you may have.

I have tried caps, the ones I have tried do reduce the noise but only by maybe 10%. That's why I think it may be internal.

Best Regards,

-AC_Hacker

NiHaoMike 07-22-09 10:23 AM

The output must be integrated before rectification. I don't know exactly what circuit or algorithm to use since I have not used inductive current sensors for precise measurement. I prefer hall effect current sensors or shunts.

And yes, you need to integrate power as vectors (not to be confused with the integration used with inductive current sensors). Which basically means to measure the voltage and current at a sampling rate of at least a few kHz, multiply the pairs individually, then take the average of them. (Not exactly the mathematical definition of integral but close enough.)

One way to make a cheap wireless power sensor is to take a cheap stereo wireless audio transmitter and receiver (such as a pair of wireless headphones), then use a voltage divider and current shunt to supply input to the transmitter (use a small power supply to power the transmitter itself and possibly the instrumentation amplifier for the shunt). Then adjust the receiver volume for the optimum precision (should be just under the maximum signal range of your A/Ds in worst case), tape it in place to prevent accidental adjustment, and calibrate it.


All times are GMT -5. The time now is 07:04 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Ad Management by RedTyger