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.

Xringer 10-12-09 08:08 PM

Wow, I read this and felt guilty for letting my little Armite micro project sit dormant all summer..


http://i46.photobucket.com/albums/f1...L/heathing.jpg

Check out my heat sensors up top. I epoxied the heat sensors inside of metal tubes and made them look like blasting caps!! :eek:

Anyways, the built-in basic does not have floating point, so it's a PITA for a non-programmer like me.
Maybe I'll get back on it after the snow comes.. :D

ldjessee 10-12-09 09:33 PM

Thanks for posting this picture!

Ron22 10-12-09 09:54 PM

Question about the SparkFun Electronics logger.
How hard is it to setup how often it logs data? Can I set it up to log every half hour? With this rate how long before it filled up the data card?

Xringer 10-13-09 07:25 AM

Quote:

Originally Posted by ldjessee (Post 4387)
Thanks for posting this picture!

Are you thinking about getting an ARMite unit?

Dealer:
Coridium Corporation - Programming


Example program info:
EE20N: Hacking Stuff (Wtr'08) — SOEL

ldjessee 10-13-09 09:19 AM

I have a question Xringer, did you have a particular reason you mounted it to a sheet of metal? Didnt know if you trying to shield it or some other reason other than you had a piece of sheetmetal and it seemed the thing to mount it to. :)
I have a finished basement and the temperature range from downstairs to upstairs can be significant. I would like to gather some data and see if it is as much as I think it is, or if it would be worth it to rig some kind of switch to run the fan to circulate air.

Xringer 10-13-09 09:51 AM

The metal sheet was used to give the parts a solid platform.

I wanted to install this down in the basement, so I used a plastic storage box
(like Tupperware) as a dust cover.

Mounted the PCBs on aluminum and bolted the sheet and connection
strips on the inside of the storage box cover.

I will screw the cover onto the wall, and the 'bottom' of the storage bin
will just clip onto the cover. I'll cut some notches for the I/O wires.

I also got one of these.. SparkFun Electronics - Serial Enabled 16x2 LCD - Red on Black 3.3V

http://www.sparkfun.com/commerce/ima...black_i_ma.JPG

Want to display temperatures upstairs. :)

AC_Hacker 10-13-09 06:49 PM

Quote:

Originally Posted by Ron22 (Post 4388)
Question about the SparkFun Electronics logger.
How hard is it to setup how often it logs data? Can I set it up to log every half hour? With this rate how long before it filled up the data card?

Ron22,

You can change the logging interval to log around 250 tumes per second (more if you log fewer inpits) to 1 log per second by changing a text file which is read at boot up.

You'd have to modify the firmware to include some wait state loops, which is not a huge deal, but with all my projects was just too much resistance.

As microprocessors go, the arm is a good one and pretty powerful, but overkill if you want to read data at 30 minute intervals. This is actually what I wanted to do.

There's the AVR butterfly, which I think would be better.

You should check out this link.

And then this link.

Runs seven years on a tiny battery.

I think this is the answer to your prayers.

Regards,

-AC_Hacker

AC_Hacker 10-13-09 07:45 PM

Quote:

Originally Posted by Ron22 (Post 4388)
Question about the SparkFun Electronics logger.
How hard is it to setup how often it logs data? Can I set it up to log every half hour? With this rate how long before it filled up the data card?

Ron22,

You can change the logging interval to log around 250 tumes per second (more if you log fewer inpits) to 1 log per second by changing a text file which is read at boot up.

You'd have to modify the firmware to include some wait state loops, which is not a huge deal, but with all my projects was just too much resistance.

As microprocessors go, the arm is a good one and pretty powerful, but overkill if you want to read data at 30 minute intervals. This is actually what I wanted to do.

There's the AVR butterfly, which I think would be better.

You should check out this link.

And then this link.

Runs seven years on a tiny battery.

I think this is the answer to your prayers.

Regards,

-AC_Hacker

cmroseberry 05-22-10 11:29 AM

The least expensive datalogger I have found is an OM-44 from Omega Engineering for $104. Temperature sensors for this logger are $33 (OM-40-C-HT-B). Omega also has a wealth of free tech literature about measurements and data acquisition. The OM-44 does not yet have a Windows 7 driver. I have several OM-44 set aside for field testing my WarmSpring pool heaters. A small cheap data acquisiton system worth considering is a DATAQ DI-194RS. DATAQ offers these as very inexpensive start-up kits. Unlike the dataloggers, this data unit cannot stand alone; it has to be connected to a computer. For small signals, like thermocouples, the signal will have to be amplified to give good resolution for the data aquisition system's 0-10 V measurement range.

After pulling my hair out for years trying to get rid of noise on thermocouple signals, I now favor RTD's and temperature sensing integrated circuits such the Analog Devices AD-592. These transducers are inherently less susceptible to noise.

AC_Hacker 05-23-10 11:07 PM

Thermocouple noise, 1-wire + Arduino
 
cmroseberry,

Quote:

Originally Posted by cmroseberry (Post 6846)
After pulling my hair out for years trying to get rid of noise on thermocouple signals, I now favor RTD's and temperature sensing integrated circuits such the Analog Devices AD-592. These transducers are inherently less susceptible to noise.

You are quite right about the noise in the thermocouples. I was able to deal with this in post-processing. I wrote a macro in Excel that would average over several readings. This smoothed things out quite a bit.

Also available is 1-wire sensors. They are accurate, and can be easily interfaced to an Arduino. In fact, 1-wire interface code is included in the Arduino development system.

-AC_Hacker


All times are GMT -5. The time now is 04:21 PM.

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