Folks want a cheeep way to get temperature wirelessly. Ladyada points out that an Xbee node can digitize and report an analog input with no additional processor at the sensor. However theres a technique MUCH cheeeper than that which I share with you here. It can be extended to three parameters per transmitter, like temperature, humidity and light; or even more.
Dirt cheepest wireless links are SAW oscillator TX ($4) and PLL RX ($6) from sparkfun and others. They use On-Off-Keying (OOK) so you just get 1 or 0. You dont need a UART for these, they will pass a wide range of pulse width and frequency. Most sensors can be converted to a pulse train with just a few cents of parts, no need to waste a processor.
Turning pulses back into sensor readings is done at the main processor. Tasks formerly done at the sensor node such as calibration and linearization using software and/or hardware are now done at the main node entirely in software. Hardware costs $$$ but software costs only time, and you got plenty o' that, right?
This is an oscillator controlled by a thermistor. The gate is a CD4093 CMOS quad NAND with Schmitt Trigger inputs. Any inverting gate works here, the important thing is the Schmitt Trigger or hysteresis inputs to give a "snap action" transitions. The choice of NAND gate will help us later.
More on CMOS oscillators at Fairchild app note AN-118http://www.fairchildsemi.com/an/AN/AN-118.pdf
The type 103AT thermistor has a 10k resistance at room temperature, rising to 330k at -50 deg and dropping to 974 ohms in boiling water. DigiKey carries these or just get RadioShack 271-0110. Same same. Temperature-resistance curve is in datasheet http://www.semitec.co.jp/english/products/pdf/AT_Thermistor.pdf
. Capacitor is 0.1 uF for weather and habitable spaces, running around 1 kHz. To keep the pulse frequency in a convenient range, use a smaller capacitor to raise the frequency if monitoring a dry ice bath that never exceeds room temperature; or a larger capacitor to decrease the frequency to accurately monitor a steam boiler that never freezes.
The sensor works quite satisfactorily off a 9v battery. But when the battery sags the frequency may drift a few percent before dying, Fairchild cites a change of 4% when supply varies from 15V to 5V, so add a voltage regulator if this is not good enough for you.
On the main node the receiver is hooked up as normal and data connects to any digital input.
Code measures the frequency or period, using pulseIn(pin, value) is the easiest way. Pulse period is proportional to thermistor resistance, and temperature comes from the thermistor curve by interpolating off a lookup table or by fitting a polynomial.
Calibration is not taken care of by the dumb transmitter so the smart receiver must take on this duty. A quick two point cal in ice water then boiling water is sufficient for most needs.
Notice either R or C could be varied to sense a parameter. Taking advantage of this fact, and our choice of NAND gate, we kick it up a notch by "multiplexing" two sensors onto one transmitter.
U1A and U1B are "gated oscillators" see Fairchild data sheet for the CD4093 http://www.datasheetcatalog.org/datasheets/90/109357_DS.pdf
they are enabled one at as time by the 555 and U1C and are combined at U1D. Here the capacitance of a Humirel humidity sensor and a fixed resistor determine the frequency of U1A.
The pulse train now alternates between two frequencies. Note that the gated oscillator has one stretched pulse when its first enabled, so the only pulses of interest are the 2nd onward up to last one before the next alternation, which might be cut short.
One simple way to handle this is make sure the freqs do not overlap, so the "A" tone and the "B" tone are in different ranges. The receiver software waits for tone A to change to tone B, takes a measurement of B well before the next change, then waits for tone A to come around and be measured.
A radio scanner works great to monitor and verify tones during test and development, use AM modulation and tune to the RF frequency of your link.
In the circuit above tone A will be around 6 to 7 kHz and tone B will stay well below that until near boiling point. The Humirel sensor needs temperature correction which can be done by the software, see data sheet;http://www.meas-spec.com/downloads/HS1101LF.pdf
Another multiplexing scheme is change the 100k resistor on the 555 to 1 Meg, which makes one tone last about twice as long as the other. This way two identical sensors could be used covering the same range of tones, like two temperatures using identical oscillators and thermistors. The receiver tells sensors apart by duration when the tones are different. When the tones the same then so are the readings.
Our last example for three sensors uses few components.
In this case tone A is ambient light, tone B is temperature, and the rate they alternate is the humidity.
The 555 oscillator circuit uses special component values to hardware-compensate the humidity sensor for temperature, and runs from 7155 Hz @ 10%RH to 6210 Hz @ 95%RH. The CD4060 divide-by-14 brings this down to 0.4367 Hz to 0.3790 Hz. Humidity sensor response is slow, so we allow this parameter to take the longest to measure, the time it takes for one complete cycle from tone A to tone B and back.
Tone B is set by the thermistor and stays between 0.3 and 3 kHz unless boiling or cryogenic temperatures are encountered.
Tone A is set by a CdS photoresistor, from DigiKey or pack of 5 for $3 as RadioShack 276-1657. The very wide range of CdS resistance presents a challenge. In full sunlight this resistance may be under 200 ohms, in total darkness it may go to few Meg, a ratio of 10,000 to one. Even a simple single-tone data link might not follow the highest and lowest tones. Check the data sheet, or else use a 555 or something to make a square wave and test the highest and lowest pulse frequencies your data link can pass. Gotta stay within these limits, narrower than the range of illumination you may encounter. Adding fixed resistors makes this possible.
To tell the difference between full sun and cloud cover, we can discard resolution on the "dark end" by adding a 2k resistor in parallel. The tone is now compressed into a 10:1 range near full sun, with good resolution, but the difference between moonlight and no moon might be only an LSB or two.
Conversely, 100k in series gives best resolution in candle light or star light, but only an LSB or two below max scale when clouds cover the sun.
NOTE this is not a limitation of the dumb wireless sensor, the "dynamic range" is also just too darn wide for a 10 bit analogRead or Xbee input. Either Smart or dumb sensors must discard ranges not of interest, or use a log amp to cover the full range while sacrificing resolution equally everywhere.
The techniques for compressing the CdS photoresistor dynamic range show how the dumb sensor circuit can easily accommodate such sensors. Furthermore your dumb sensor can actually exceed the precision of a smart one. Measuring one cycle of a 1kHz tone with microsecond resolution gives about 10 bits of resolution, like an analogRead(). By measuring the period of 1000 cycles (1 second) of the same dumb sensor tone you could approach 20 bits of precision!
Remember that 20 bits of "precision" is a function of resolution and linearity. it allows you to see small changes in large parameters. To get 20 bits of "accuracy" your dumb sensor, same as a smart one, must have that precision PLUS ALSO be absolutely calibrated and be stable over the long term, requiring a voltage regulator, and maybe precision low temperature-coefficient components and such.
Many independent oscillator channels may be multiplexed by clocking a binary counter (CD4029, etc) and multiplexer (CD4051, CD4067, etc), just as long as one tone (or gap) in the sequence is unique from all the others to mark the start of the sequence. The receiver software looks for the unique tone, then increments through the readings. No "tone change detect" is needed for each sample, just wait for the "index tone" to end plus a short delay, then measure once every tone period to get a "pure" sample from the middle of each period, no "startup" or "cutoff" pulses. After the last sample period, wait for the index tone to resync and start over.
Low power is achieved by using CMOS, low speeds and high resistances. Type 104AT thermistor and a 0.01 uF will cut that oscillator power by 10x. Transmitting a narrow "ON" and wide "OFF" cuts power in the RF link. Also leaving gaps between transmissions; eg count thru 16 channels at 2 per second then sleep for one minute to extend battery life by ~7x.
Dumb Dirt Cheep Wireless Sensors may not be everyones cup o' tea, but I hope you can see how a $10 wireless node can radio home a few parameters with comparable accuracy and precision while requiring no processor and no A/D converter.
Length limit for a post, STFU!