Archive for December, 2008

While waiting for my current and temperature sensors to arrive, I thought it might be a good time to look at a few devices for interfacing a computer to the real world. Basically we need something to convert the signals from our various sensors and transducers to the computer.

This is usually handled by a device called a analog to digital converter or ADC. There are MANY different types of ADCs used for converting all kinds of signals to the digital world. The differences and choices could fill a whole set of books, but for our discussion, I’ll try to keep it short.

There are a lot of choices in the home automation arena that provide this function as well, but I really wanted a more flexible solution that I could build on and that didn’t tie me into a specific solution.

A few things we need to concern ourselves with when choosing the correct ADC are resolution, input levels, and sample frequency, and input voltage range.

Resolution

– Basically the number of levels representing the input signal range (in volts). The number of levels are measured in bits. Since it’s a binary scale, the different input resolutions are 8, 10, 12, 14, 16, 24, etc. An 8 bit ADC, would provide 256 different levels and a 24 bit ADC would provide 2^24 or 16,777,216 levels! Generally the higher the resolution, the more expensive the ADC, so we need to find a ADC that will provide enough discrete levels for our needs.

Number of Inputs

– For each sensor we want to use, we will need one input (for now I’m not going to cover single-ended or differential inputs). Again, prices go up with more inputs, so for now, I’m looking for a cheap low-count input ADC.

Input voltage range

– This is simply the maximum voltage the ADC will accept. A higher number here doesn’t mean a better ADC, you just need to determine what input voltage range suits your purposes and find a ADC that fits that range.

There are a ton of other properties when discussing ADCs, but not here, not now. If your interested in more details about ADC, check this Wikipedia article out.

Okay, so after fully reading the Wikipedia article you probably know more about ADCs than me. But suffice to say, I still need to determine what type of resolution I need. Let’s start with an 8 bit ADC.

For 8 bits and lets say a voltage range of 0-5 volts, that would be 5V divided by 256 levels or  .02 volts per level. Also, let’s say we need to measure a temperature sensor that provides a voltage range between 0 and 5 volts for a temperature range of 256°F (-40 to 216°F to make the math easier). That would give a maximum temperature resolution of 256°/256 levels or 1° per level. This is under perfect conditions and generally I would expect to lose half that resolution for all kinds of reasons I’m not going explain here. That means the smallest temperature change we could detect is 2°F

I think we can do better than that. Let’s see what a 12 bit ADC can give us for a resolution? For 12 bits we get 4,096 levels! From the math (256°F/4,096 levels) we get a maximum resolution of .06°F per bit. Even half of that is around .1°F. That seems more reasonable and I think I’ll stick with that. So now that we’ve chosen 12 bits as guide, lets find a few ADCs that will work for the needs of this project.

12 Bit Analog to Digital Converters:

  • MeasurementComputing – These guys handle all kinds of test and measurement equipment, but for out purposes, I found this little gem (miniLab 1008) that isn’t too expensive ($129.00). It has 8 single-ended or 4 differential analog 12 bit inputs.

  • DataQ Intsturments – Again, another company that carries many types of measurement and testing equipment. They also have a similar 12 bit ADC with 4 differential inputs (DI-158U). Currently it’s listed at $99.00.

DI-158U USB Data Acquisition Starter Kit

 

  • Labjack – Looks like a smaller company that really focuses on AD conversion. Their products even look cool. The one that seems to work for this project is the U3-LV pictured here at $108.00

image 

I’m not sure which one these I’ll be getting to prototype some sensor measurement, but I’ll be making a decision fairly soon. If anyone would like to comment on these or similar ADCs I would really appreciate it.

Comments (2)

I’ve researched what type of cheap current and temperature sensors I would like to prototype for my project and decided upon the following:

1. An NTC Type Thermistor from Cantherm (CWF1B104J3950) that provides relatively high precision, reliability, and response time. This type of sensor also allows for a fairly simple conditioning circuit.

2. An Integrated-circuit precision temperature sensor (LM34) from National Semiconductor. This sensor provides a very linear output (+10mv/°F scale) at a very low cost. The problem with the IC type sensor is that it requires a more complicated power supply if you wish to measure temperatures around or below 0° Fahrenheit. I’m prototyping these since I already have a decent supply of them.

3. The CR Magnetics’ CR8410 current-sensing transformer. This a relatively cheap current transformer that is capable of measuring up to 20 amps. You need to take precautions when using this type of device since there is a potential to create high voltages when reading house current so if you aren’t sure, get someone who is experienced with these.

These parts were ordered from Digikey. I use both Jameco and Digikey when buying electronic components and I’ve always had good results with both companies.

Also, some thanks to the people over at All About Circuits, I wasn’t sure on the transformers and they were there to help me out.

When they arrive, I’ll set these components up to do some initial testing and evaluation. In the meantime, I’ll start some initial work on the Computer measurements I discussed earlier as well as a solution for converting the conditioned signals from the current and temperature sensors to a digital signal a computer can understand.

Comments (3)

I would like to initially take three different types of measurements and prototype the transducer, sensor, conversion from signal output to a computer-friendly signal, and a rough software service to monitor these signals.

The previous post touched on one these properties, namely temperature. The other two properties I would like to address are electrical current and several computer measures such as free memory and disk space. I realize the computer measurements are not common to the others, but I feel I need to test those types of properties as well.

I’d like to examine some possible sensor types for current. The main priorities are price, simple circuitry for a reasonable output signal, and sensitivity.

Next I will be looking into various ways to measure alternating current (AC) in the house.

Leave your Comment