# iklln6

Member Since: November 15, 2009

Country: United States

• I haven't done it with this sensor, but have for similar: just find a small enclosure to hold it (small box at mouser: 563-PB-1577 and lid: 563-PBC-1575-C ). Drill a small hole in the enclosure to attach a 1/8" brass fitting, which is the standard tube size I use in the wind tunnel (part 10BK1 at www.poweraire.com). The fitting doesn't need to butt up against the pressure sensor's hole -- in fact it's best to put it off to the side out of the way to minimize air flow that could occur directly over the hole. Cut a piece of breathable foam to both hold the sensor snugly and to prevent air from flowing too much over the sensor's hole. Drill another small hole to run the wires or find a panel-mount 6-conductor connector to mount to the box. When it's all rigged up, use hot glue to seal everything -- you only want air going in and out of the nipple (which is connected to your tube to wherever). Test it by blowing into the nipple -- you shouldn't be able to blow ANY air into it. If you want to be 100% on the integrity of the air-seals, attach a 10" tube to the nipple and drop the enclosure into some water. Shake all the bubbles off and then blow into the tube and look to see if bubbles form at your seals. Hope this helps

• This sensor reads accurately for me using a 2.94V Vref and voltage source (instead of 5V). The test environment is pretty consistently ~25C, so I have not been able to test the drift with a lower excitation voltage.

For those wanting to use this with their 3.3V MCU you can just take the zero-offset voltage and mV/RH slope in the datasheet and convert those to their bit values with a 5V ref. and simply make the calculation based on the bits.

Math: Calibration readings from data sheet (note "%RH" is just the units for percent relative humidity, not fancy math): 0%RH reads 0.958V 75.3%RH reads 3.268V so (3.268V-0.958V)/(75.3%RH-0%RH) = Volts/%RH = 0.03068 V/%RH

Conversion: To make it universal just fill in your adc resolution (e.g. 1024 for 10b resolution, 4096 for 12b resolution), I'll use 4096 as an example: (3.268V/5.0V)4096 = 2677 bits at 75.3%RH (0.958V/5.0V)4096 = 784.8 bits at 0%RH (the zero-offset)

(2677bits - 784.8bits) / (75.3%RH - 0%RH) = 25.13 bits/%RH

Final Calculation (what'll be in your program): Let rdg_H = your analog reading of the humidity sensor @ any voltage: (rdg_H - 785bits) / (25 bits per %RH) = RH (in units of Percent Relative Humidity) (I just keep it all as unsigned 16 bit values as % relative humidity to the nearest whole percentage is good enough for me, but feel free to convert everything to floating point for slightly better accuracy)

• Ok, i finally got this thing to work with arduino. to those of you having trouble getting the configurations or connections just right, i put together a schematic with my working connections, eagle board for a breadboardable mount, and gathered the necessary libraries and my working code together in a zip file linked below. i use the jeenode library, and the example .pde sketch is based on the pingpong example. upload to two arduino boards and they'll start up and act as a serial bridge. there's bound to be bugs you'll find for rare events, but it should give anyone else having trouble a good working-config starting point!
https://files.me.com/iklln6/nxcywa

• fwiw,
male: when looking directly at the pins of the male serial cable, the GND pin is far left on the 5-pin row, and CD is far right on the 5-pin row.
female: when looking directly at the holes of the female serial cable, the GND pin is on the far right on the 5-pin row, and CD is far left on the 5-pin row.
breakout board: the square pin is CD, and at the opposite end is GND.
hopefully that'll help to avoid confusion when it's solder time. depending on the situation, it may be more useful for you to solder headers on the board to plug on female serial cable. do that with the pins' long ends on the side with the silkscreen text

• i soldered wires to the pad indents and put the wires in a breadboard -- a good glob of solder held the wires pretty well. i didn't bend the wires around too much, but for a radioshack pcb you could dab some hot glue to the bottom of this module to fix it in the center, then just solder headers to the pcb and use wires to connect the headers and pad indents

• i hate this thing. i spent all night trying to interface with it to simply receive from the 434MHz transmitter (WRL-08946) and still nothing. for a while i was getting arbitrary gibberish, then i bumped a wire and it decided to go back to doing jack crap. the libraries provided on the websites don't work unless you completely tear them apart (to the point where you should have just written your own to begin with) and the documentation is typical orient-english that's missing key words necessary for completion. why the f did sparkfun discontinue the receiver? avoid this stupid thing. at this point i would have rather bought a pair of xbee's to send to their doom. ~\$30 difference is well worth the 8+ hours of jumping through crap documentation and b.s. RFM12B libraries. i'm going to drive over this thing with my truck.

• some devices will send information about itself over that pin. for all practical purposes the ID pin can be left disconnected.

• man why are people not snatching these things up?? \$10 for an ATmega328 mounted to a board with SD slot, cute little LED, regulator, and interrupt pins and analog pins just waiting for something to connect to them? but wait? there's more? there reset pin is ready for the DTR of an FTDI chip so i can flash the arduino bootloader to this thing and program it like an arduino with an FTDI breakout board? people be crazy. this is awesome without the camera crap for which it was intended

• the reading range is 0 to 1023, which is 1024 values

• Yes, they all have a voltage regulator on-board. just keep your finger on the chip when you first connect it so you can feel it heating up if you hooked it up backwards or something

No public wish lists :(