Jump to content
APC Forum

Data acquisition and logging


Swede

Recommended Posts

I tried this over at SMDB and while there was plenty of advice, most of it was along the lines of "Buy a PIC chip and create a datalogging system from scratch. Program the PIC. While you're at it, program your PC to collect and display the data."

 

I simply don't have the time to do this. I'd much rather find an inexpensive, off the shelf solution. I CAN do things like work with op-amps, and there's a monolithic chip I've used in the past (the AD595) to amplify a thermocouple. Even has CJC. I'm getting ahead of myself a bit.

 

There's a company called Dataq that offers very reasonably priced hardware. AND it comes with PC software. So far, so good. The problem is signal conditioning. These cheap data loggers really have none, and there is NO signal isolation.

 

I want to measure:

 

DC voltage, 0 to 10

DC current (using a shunt, 0 to 75 mv)

Temperature

 

Temp can be tricky. A PT100 RTD would be ideal, but it requires excitation current and support hardware. Ditto the thermocouple. The Dataq people want to sell me their signal conditioners at ~ $100 apiece, which isolate, filter, and amplify the low-voltage signals such as from a current shunt, or thermocouple. So a $99 starter package becomes a $500 system REALLY quickly.

 

I know there are guys here who are pretty smart on this sort of thing. Are the signal conditioners a must? Or is it practical to roll my own for the RTD, the shunt, and perhaps the thermocouple? I can read a schematic, build what it shows, and have a basic understanding of the process. Thanks for any and all suggestions.

Link to comment
Share on other sites

RTD's ain't that tough to work with. It's really basically a "wheatstone Bridge" type circuit, and they are pretty darn good with linearity these days. By "signal conditioning" Hmm.. perhaps they mean for a really nasty <nosiy electrically> environment? Not sure what the deal is there.

 

Voltage and current are fairly straightforward I would think. Probably chips out there packaged for that.

Edited by Richtee
Link to comment
Share on other sites

Swede: I think you should look into using thermistors to sense the temperature.. They're more accurate in the temperature range you're looking for, and it's bolt-on. Just send 5V through the thermistor (or 10V) and read it on the acquisition device.. I'm sure you can either program in the curve equation or you can use their pipe-to-excel plugin and do it in excel.

 

I don't think you'll need anything to read the voltage, either, as the device is rated 0-10V @ 10 bits, which comes out to .02v accuracy, more or less (actually 1024 graduations over 20 volts of range).

 

The only thing you'd need to build an amp for is the current shunt, something like a gain of 5 or 10 would be good.

 

Looks like their DI-158U ($100) has programmable gain ranges 1, 2, 4, 8 built in, sounds like your ticket to ride. You could even use a thermocouple with that. AND it's 12 bit, so the native 0-10v range can be read in ~4.88mV increments.. add in a gain of 4 or 8..

 

Basically, for your three inputs, you're looking to measure... voltage... voltage.. and voltage. It's only the range that changes, and the built in gain feature of the "158U" model is ideal for this. Just wire it up, program in the relevant equations or slopes/calibrations, and collect data. At 240Hz with their free software.

Edited by tentacles
Link to comment
Share on other sites

That's what I was thinking, Tentacles. Noisy environments usually come from AC systems, electric motors, and such. It MIGHT be an issue with a switching power supply, vs. a linear supply, for the 0-10V. Obviously this is for a perc cell. Maybe we can sneak pH in there somewhere, although I know pH is an ultra-low powered signal. I need to think on this some more.
Link to comment
Share on other sites

That's what I was thinking, Tentacles. Noisy environments usually come from AC systems, electric motors, and such. It MIGHT be an issue with a switching power supply, vs. a linear supply, for the 0-10V. Obviously this is for a perc cell. Maybe we can sneak pH in there somewhere, although I know pH is an ultra-low powered signal. I need to think on this some more.

 

As you have op-amp experience...this one's a "gimmie". Those things are the electronic god's gift to instrumentation.

Link to comment
Share on other sites

Okay, I had a beefy edit, then you guys posted, so I'm moving the edit down here so noone misses it.. not that it's super great.

 

Was just looking at some of the features of this thing, and it has digital/analog I/O ports, combine this with a small op amp.. I'm thinking you could hook a pH probe up to it as well. AND have the ability to control a device that can adjust the pH. Look here for a very simple pH probe amplifier.. There are other options for that as well, some of which probably don't require +-9V. A similar circuit would work for boosting up the thermocouple as well.. But I still think a thermistor is the way to go.

 

Also checked out the datasheet, at a gain of 8, the sensitivity is .61mV, that's definitely good enough to measure your 0-75mV from the current shunt. The 158UP model can do a gain of 512, resulting in a 61uV sensitivity, which is plenty good for measuring a type K thermocouple.. But why spend more, when a (very) cheap thermistor will do?

 

The digital outputs can supply 3V @ 2.5mA or the analog 1.25V @ 15mA (short circuit current). You'd have to use an SCR to drive a relay (or the load itself, if it's just a solenoid or something).

 

Another profound edit: You could use an op amp and a load cell with one of these to make a swank rocket test stand!

Edited by tentacles
Link to comment
Share on other sites

The more I think about it, the more I really want to give this a try. As Tentacles suggested, these things not only take inputs, they do outputs too, and the flexibility, what you can do with them, is amazing. Computers control damned near everything now, and they have a respected place in Pyro to choreograph, and in professional chemistry labs, they do all sorts of amazing work. But in a hobby lab? Hardly anyone uses a computer, it seems, and given the sampling rate of these modern instruments, the amount of data you can collect is incredible. Even something as simple as temperature... just about every decent experiment uses temperature. Now you can not only log it at a high sample rate, you can use it to monitor temp real time, and you could EVEN have it set up to halt or crash the experiment with the outputs if something goes wrong.

 

More research, not enough time!

Link to comment
Share on other sites

The more I think about it, the more I really want to give this a try.

<SNIP>

 

More research, not enough time!

 

And, therein lies insanity ;{)

 

Been kinda there, went kinda nuts LOL!

Link to comment
Share on other sites

I'm on my way. The unit I ordered was the better Dataq unit with the 1 to 512 gain feature which will be invaluable. Using old parts, I created a good TC amplifier that will do 10 mV per degree C. The next project will be the current shunt. Ideally I'd like to isolate it and amplify, with the isolation being the important part, as the Dataq does NOT isolate, and their warranty specifically states that it won't support units fried by signals gone wild. I picked up a couple of good shunts off eBay in varying current/mV ratings as well.

 

I need to come up with a use, too, for the outputs. The digital outputs could easily drive a heavy MOSFET, close a relay, whatever, with a bit of TTL work. My problem, I am more comfortable on the digital side rather than the analog stuff. It's going to be interesting!

 

http://www.5bears.com/chem1/tcamp02.jpg

 

The amp is based upon a monolithic chip, the AD595, which has pretty much everything you need built in, including the ability to alter the gain using external resistors. The board is only partially populated because I only needed that small section. Filtering capacitors were added where needed.

 

http://www.5bears.com/chem1/tcamp04.jpg

 

Packaged and ready - the white output wire is shielded, high-quality stuff, aircraft surplus.

Edited by Swede
Link to comment
Share on other sites

I need to come up with a use, too, for the outputs. The digital outputs could easily drive a heavy MOSFET, close a relay, whatever, with a bit of TTL work. My problem, I am more comfortable on the digital side rather than the analog stuff. It's going to be interesting!

 

Nice! As far as the outputs, to a second approximation, perhaps even a first... if you are driving a MOSFET or coil or whatever it IS still digital. Now..if you need proportional output...yes...it's a sticky wicket. But even then you can approximate linear control with fast digital...flow on a valve, heat to a process...etc.

 

Man I love playing with this stuff. Or used to heh!

Link to comment
Share on other sites

Nice! As far as the outputs, to a second approximation, perhaps even a first... if you are driving a MOSFET or coil or whatever it IS still digital. Now..if you need proportional output...yes...it's a sticky wicket. But even then you can approximate linear control with fast digital...flow on a valve, heat to a process...etc.

 

Man I love playing with this stuff. Or used to heh!

 

YES! If you turn a MOSFET on and off quickly enough using digital logic at a high speed, you have a crude PWM. Vary the frequency, and there's your pseudo-analog output. But for chemistry, there's an awful lot that is simply ON/OFF. Got a PTFE float switch and a solenoid that is dying to become a topoff rig... Two binary bits in and out, a handful of resistors, a MOSFET and there's your setup. I love modern MOSFETS. The impedance at the gate is so high, just the slightest tickle of juice and that sucker is slammed ON, hard. Pull the gate low when not ON with a 100K resistor. They are so easy to use when all you want to do is turn them on and off. Electronics is a cool hobby and is so extensive, you could never learn it all.

 

The little hobby kits that are so common can be hacked into some useful gear, too.

Link to comment
Share on other sites

Today I received the datalogger, installed the software, and am totally impressed with this package. Not only is the logger itself 1/3 the price of similar, the software appears to be quite powerful, and user friendly. Most dataloggers come WITHOUT software, and expect you to cobble some up, or the software is hundreds of $$.

 

I learned something yesterday... there are relatively inexpensive current-measuring devices based upon the hall-effect. I always thought clamp-on ammeters were for AC only, and not that accurate, but they have small PCB-based hall-effect systems that can take a 1/2" Cu cable and measure 100's of amps with total isolation... output is typically 0 to 5VDC, just perfect! I've got a pair of these coming from Digikey, as well as an assortment of instrument-grade op-amps, and optoisolators as well.

 

On Linear Technology's site, there are sample circuits for just about everything, including pH. The modern instrument op-amps are rail to tail, super-high impedance, and with just a handful of supporting components, can take a microvolt signal and amplify it with ease for good resolution, and rejection of noise, which is the big problem with uV devices.

 

A plain old shunt will still work fine for current, but I am going to use an instrument op-amp to amplify, and a 1:1 optoisolator for the voltage signal. That is, assuming the hall-effect devices suck. Same deal with pH... no problems amplifying and isolating a signal measured in microvolts. For the main cell voltage, that too needs isolation, and probably filtering, as a switching supply, which is what I have, has a fairly dirty DC waveform compared to a linear power supply. This is going to be fun!

Link to comment
Share on other sites

Swede: I'd always wondered how my dad's old amp clamp could do DCA through the clamp; now I know.. It was quite accurate, could read from an amp or two to 200 or 300A. I'd be interested in your schematics or (better yet) PCB layouts if you're doing em digitally.

 

I've had very very good success making PCBs using reynolds "release" aluminum foil for the transfers. Just iron and peel.

Link to comment
Share on other sites

Swede: I'd always wondered how my dad's old amp clamp could do DCA through the clamp; now I know.. It was quite accurate, could read from an amp or two to 200 or 300A. I'd be interested in your schematics or (better yet) PCB layouts if you're doing em digitally.

 

I've had very very good success making PCBs using reynolds "release" aluminum foil for the transfers. Just iron and peel.

Woah. Cool. Last one I did...double sided mind ya... was photoetching board... transferred on with tape. Ouch! Gads I'm old.

Link to comment
Share on other sites

Man...I had to dig out a spare board just to relive the pain.

 

4 channel differential input mic preamp board. I build a 12 channel mixer with 4 seperate line out busses and 6 independent headphone mixes for monitoring. What a project... Yes, the date on there is 3/92!

 

http://i471.photobucket.com/albums/rr72/esalink/0217091359.jpg

 

http://i471.photobucket.com/albums/rr72/esalink/0217091359a.jpg

Link to comment
Share on other sites

I learned something yesterday... there are relatively inexpensive current-measuring devices based upon the hall-effect. I always thought clamp-on ammeters were for AC only, and not that accurate, but they have small PCB-based hall-effect systems that can take a 1/2" Cu cable and measure 100's of amps with total isolation... output is typically 0 to 5VDC, just perfect! I've got a pair of these coming from Digikey, as well as an assortment of instrument-grade op-amps, and optoisolators as well.

 

Those clamp meters are extremely cool. We had a technician out on site a few weeks ago replacing the lead-acid battery bank in our UPS system, and he was using one to measure the load on some bus cables. He said his Fluke was quite spendy (duh..), but you can find good ones for ~$200. The cheaper ones apparently aren't accurate.

Link to comment
Share on other sites

Nice Richtee! Did you etch that board yourself? It looks well-made. I have tried the toner-transfer PCB system, and it really does work... I wrote a summary of the process a while back, but for these signal conditioning modules, I'm probably just going to use those simple "universal" PCB's from Radio Shack and the like. Right now, I'm digging through a really dry instrument-amp manual available at the Analog Devices (AD) site... I'm also trying to make sense of the software, which is one of those packages that seems to have an infinite number of options.

 

I'll try to get a blog post up... should be fairly interesting.

Link to comment
Share on other sites

Nice Richtee! Did you etch that board yourself? It looks well-made. I have tried the toner-transfer PCB system, and it really does work... I wrote a summary of the process a while back, but for these signal conditioning modules, I'm probably just going to use those simple "universal" PCB's from Radio Shack and the like. Right now, I'm digging through a really dry instrument-amp manual available at the Analog Devices (AD) site... I'm also trying to make sense of the software, which is one of those packages that seems to have an infinite number of options.

 

I'll try to get a blog post up... should be fairly interesting.

Yep, did the whole shooting match. Good way to go temp blind is drilling IC pad thu boards LOL!

 

Yeah, the "perf" boards would probably work, as your aq. speeds should not be too astronomical, which could lead to grounding problems without a ground plane. A couple decoupling caps might be all you'd need if you do run into weirdness. A/D makes some good stuff. Used a few of those in audio applications over the years.

Edited by Richtee
Link to comment
Share on other sites

Yep, did the whole shooting match. Good way to go temp blind is drilling IC pad thu boards LOL!

 

Yeah, the "perf" boards would probably work, as your aq. speeds should not be too astronomical, which could lead to grounding problems without a ground plane. A couple decoupling caps might be all you'd need if you do run into weirdness. A/D makes some good stuff. Used a few of those in audio applications over the years.

You did a really nice job on it. It's weird, I've got several complex hobbies I love, and there was a time when I was reasonably sharp with electronics, but as I shift from hobby to hobby, I find there is only X terabytes in my brain, and I have to dump knowledge to make rom for more. So now I have to gather my electronics knowledge off the floor and reinstall it. :P

 

AD DOES make killer stuff. I found these on eBay:

Isolated RTD module

 

and

isolated voltage input module

 

These are meant to be used with a backbone, but I'll cobble something together and get by without one. These are $100's new... I hope they work. So I've now get several options, starting with these signal conditioners, then the hall-effect units, then shunts, and if all these fail I'll use instrument amps for voltage and current.

 

There is no frequency to speak of... one sample every two seconds. I plan on simple decoupling caps on the Vcc lines, and filtering in other places where appropriate.

 

The beauty is in the software, which allows just about any imaginable gain or configuration for the signal. But I DO want to isolate the signals... I'd rather smoke a $20 eBay item rather than a $200 brand-new instrument.

 

I meant to ask you, what method did you use to make the PCB?

Edited by Swede
Link to comment
Share on other sites

I meant to ask you, what method did you use to make the PCB?

 

Tht particular one... was printed out on acetate with a laser printer and used as a mask for a photosensitized PCB blank. Exposed under a sunlamp. Etched with Ferric Chloride.

 

The software was....wait for it... MacDraw....LOL! <Been a Mac guy for ever>.

Link to comment
Share on other sites

The stuff ordered from DigiKey and eBay is beginning to trickle in...

http://www.5bears.com/chem1/data010.jpg

 

The thing on the left goes for >$100 new... it is (as the label says!) an isolated RTD signal conditioner, with a 0 to +5V output. I think I dropped $20 on it. It looks new, and I'm guessing it works. We'll see. To create a similar device from scratch, with true isolation, a good instrument amplifier, support parts, filtering, etc, would cost far more than $20, ignoring the time element as well. AD makes backbones for these modules, but they are really expensive and not common on eBay. It should not be too hard to use perf board, and to epoxy or otherwise mount an appropriate nut for the hold down bolt. Any time you deal with signals, a good printed circuit would be better than something cobbled (or especially point to point wiring) and produce less noise, but I don't think this is going to be an electrically noisy system.

 

The cool gadget on the right is a hall-effect current transducer, which by its very nature is already isolated. It provides a voltage signal that is linear with the current passing through the cable, which is obviously threaded through the hole. To make use of this thing, I'm going to need some support hardware, including adell clamps, and some sort of heavy base; otherwise; it's going to get tossed around and beat up as the heavy cables are manipulated.

 

I'm going to start on a blog entry regarding this stuff and I hope to have it finished today. It's tempting to slap that transducer on a board and power it up, but I want to study the data sheet in detail and do it right. ^_^

 

The Dataq module is up and running on my notebook, and it works great!

Link to comment
Share on other sites

I've run into a snag. I know there are guys here who are professional electronics engineers, whereas I am a hack. I posted this on another web site, and figured "What the heck, I'll repeat it here, maybe someone will have the answer." So here it is:

 

...I decided to tackle current first. I have a variety of shunts but decided first to try one of the hall-effect modules that can measure DC. I bought two... A Tamura L08P100D15, and a Honeywell CSLA2CD. I started with the Tamura first. Data Sheet This has to be the worst data sheet I've ever seen. Anyway, the unit uses +/-15VDC, and despite my best efforts at hacking around a bit with a unipolar supply, I could not get it to work.

 

I then tried the Honeywell (Datasheet, even less info!) And it worked fine, but the basic Vout is Vcc/2, meaning 4V with zero amps, and increasing linearly from there.

 

What I'd really like is an output that starts at zero, not Vcc/2. The latter means I'd need a very accurate, stable voltage (8V) to power it, no drifting allowed. Any thoughts? How do I "shift" the output of the Honeywell, or can I make the Tamura work with a unipolar supply, as its output does start at zero. Thank you all!

 

 

 

That's the end of the post. If I can't make these hall effect modules work, I'll just use a regular current shunt and a good differential amplifier.

Link to comment
Share on other sites

Swede,

 

What's your design intent? In other words, would would your ideal output voltage range be?

 

For the Honeywell, you'll need a supply capable of generating at least ~35V, and both a positive and negative 15V regulator for a really simple design. I'm partial to National Semiconductor brand stuff (mostly because that's what in the supply cabinet), so that would be a LM340 (+15V) and LM7915 (-15V). You can also use National's DC-DC converter chips if you don't mind a bit more complicated circuit.

Edited by FrankRizzo
Link to comment
Share on other sites

Thanks Frank. This system can handle up to +/-64V, and has programmable gains up to 512, but for decent resolution, I'm going to shoot for 0 to 10V on these channels. The software that runs it is easily configured, and after a bit of digging, I found I could offset that 4.00V with ease, so the Honeywell could be used for current, no problem. All I need is a stable 8VDC regulator, measure the output, and I can set that output (say 3.96V) as "Zero" within the system.

 

For raw cell voltage, I'll either use one of those AD isolated modules, or an instrument amp and supporting hardware. Temperature - I've got this type K rig doing well, or I can use the AD RTD module once the "backplanes" I ordered make it in from the freaking Phillipines. Nothing like a company that doesn't stock its own products well.

 

Bipolar supplies and components are not something that I am really up on very much. Browsing my 4,000 page Digikey catalog, and trying to use their search engine, I did in fact find plenty of negative regulators, and as you mentioned, they require 35V+ to function. Since I don't feel like making or buying a power supply just to get the Tamura unit to work, I'm going to reject it as a candidate for current measurement.

Link to comment
Share on other sites

×
×
  • Create New...