background image

13

revolution

Revolution Education Ltd.     Web: www.picaxe.co.uk

Version 2.0 12/10

AXE110.PMD

PICAXE DATALOGGER

11)  Using the SEN008 Humidity Sensor ( Honeywell HIH4000-001) .

There are various humidity sensors on the market, but the

recommended device for use with the PICAXE datalogger is

the Honeywell HIH4000-001. This sensor is a direct humidity

to voltage device (with linear output), and it even has three

pins which can plug straight into the datalogger terminal

block connector CT4 (input1).

As with all humidity sensors, take care not to physically touch

the sensing area of the device, as moisture/oils from the hand

could damage the sensitive sensor element. When inserted

into CT4 the small silver sensing area should be facing up.

A sample graph of the response of the humidity sensor is

shown in the figure. When used with the PICAXE, the voltage

output of the sensor is measured by the internal analogue-to-

digital converter and stored in a variable (e.g. b1) as a number

between 0 and 255. Each ADC step is 5V/256 = 0.0195V

(assuming use of a regulated 5V supply).

The manufacturers calibration graph shows an offset of approximately 0.8V, which

equate to a ADC value of 41 (0.8 / 0.0195). The RH slope is set at about 0.0306V

per %RH, or 1.57 ADC step per %RH

Therefore the actual RH% can be calculated by the following calculation.

RH = adc value – offset / (slope of graph)

RH = adc value – 41 / (1.57)

However as PICAXE cannot handle fractions, divide by 1.57 is actually calculated as

a mathematical equivalent - multiply by 100 then divide by 157.

RH = adc value – 41 * 100 / 157

Checking these test values against a calibrated test probe using the test program

shown below showed the resulting PICAXE system to be very accurate. However you

may need to ’tweak’ the offset and slope figures depending on sensor calibration,

power supply voltage etc.

main:

readadc 1,b1

‘ read humidity value

let b1 = b1 - 41 * 100 / 157

‘ change to %RH

debug b1

‘ display on computer screen

pause 500

‘ wait 0.5 second

goto main

‘ loop

.

Summary of Contents for AXE110P

Page 1: ...mory chip If desired this memory chip can be upgraded for increased memory capacity An optional memory expansion board can also be used to greatly increase memory capacity Once the mission is complete data can be uploaded for analysis on a computer Data can also be displayed at the time of logging on an optional liquid crystal display if desired Programming of the mission is simplified by use of a...

Page 2: ...city can be increased by replaced this EEPROM with a 24LC256 EEPROM part MIC050 This can store 32768 bytes of data 128 blocks of 256 bytes For additional data storage capacity the optional AXE111 memory expansion board can be used This allows an additional seven 24LC256 to be connected giving a total of 2MBof memory 1024 blocks of 256 bytes Power Supply The datalogger is designed to run from a 3xA...

Page 3: ...he DS1307 chip is inserted and initialised by the time date wizard This LED cannot be controlled directly by the PICAXEchip An optional piezo sounder part SPE002 can be connected to output 0 via the holes marked PZ on the left hand side of the board A sound command can then be used to generate information and or warning signals An optional serial LCD module part AXE033 can be connected to output 6...

Page 4: ...nge gold R6 7 8 9 4 4k7 resistor yellow violet red gold R10 11 2 470 resistor yellow violet brown gold C1 2 2 100nF 104 polyester capacitor C3 1 100uFelectrolytic capacitor marked on PCB LED1 1 green LED flat marked on PCB LED2 1 bicolour LED flat marked on PCB S1 1 miniature push switch X1 1 miniature watch crystal CT1 2 2 3 5mm stereo socket CT3 4 5 3 3 pin screw terminal block may be supplied c...

Page 5: ...t on the PCBprior to soldering 5 Solder the capacitors and LEDs in position 6 Solder the remaining connectors in position Note that where the screw terminals are fitted side by side they should be clipped together before soldering 7 Solder the BAT1 battery conector in position 8 Insert the PICAXE IC1 and 24LC16B IC3 into their sockets Optional Upgrades 9 If using the optional RTC upgrade AXE034 in...

Page 6: ...307 4 5V X1 X2 Vbat GND BAT1 4k7 Vcc SQW SCL SDA Reset In0 In7 In1 In2 Out3 Out2 Out0 0V 24LCxx A0 A1 A2 GND Vcc WP SCL SDA 4k7 CLOCK EEPROM 470 470 4k7 4k7 10k 22k 22k 10k 10k X1 CT1 Run CT2 Datalink PZ LED2 C2 C3 CT6 LDR CT5 Temp CT3 In1 CT4 In2 CT7 Bat LED1 LK1 CT8 I2C CT9 LCD C1 V Out6 Out4 Out1 Out5 In6 Out7 Rcv Txd PICAXE 0V 4 17 16 18 1 9 8 6 12 10 7 11 15 13 3 2 5 14 ...

Page 7: ...pplied with two sensors and has capacity for an additional 2 sensors not supplied Note the power connections and inputs are labelled on the solder side of the PCB LDR A miniature LDR light dependant resistor can be connected into terminal block CT6 so that it is connected to input0 of the PICAXEmicrocontroller The light level can then be measured by use of the readadc command DS18B20 Digital tempe...

Page 8: ...download a new program The New Datalogging Mission wizard screen looks like this The Sensors box allows up to four sensors to be selected Each sensor can also be named with a text string up to 16 characters which is saved in the PICAXE memory The Memory box allows the type of memory used to be selected Note that the 4 and 8 x 24LC256 options require use of the optional memory expansion board part ...

Page 9: ...Use piezo sounder If selected the optional piezo sounder SPE002 will beep every time a reading is taken Use speech If selected the optional speech module SPE020 will speak the readings as they are taken Note that the SPE020 module is discontinued and no longer available Use serial LCD If selected the optional serial LCD module AXE033 will display the readings as they are taken Use EE WP on AXE111 ...

Page 10: ... Run socket for the Datalink utility to function correctly Note If you are unsure whether the datalogger has the correct BASIC program already running a suitable program can be downloaded by using a program wizard use menu option PICAXE Wizard AXE110 Datalogger Retrieve Unknown Data However this wizard should only be used if a normal datalogging program is not already running see the AXE110 datalo...

Page 11: ... cable to the Run socket on the AXE110 Datalogger 3 Connect the power supply to the AXE110 Datalogger 4 Click OK on screen A BASIC program to program the RTC will be generated and downloaded to the datalogger module Once programming is complete the values are checked by the PICAXEmicrocontroller and then the status LED will be lit green for pass red for fail If the Flash LED option has been select...

Page 12: ...000 is fitted on the AXE110 dataloggerboard IC1 10100010 IC2 10100100 IC3 10100110 IC4 10101000 IC5 10101010 IC6 10101100 IC7 10101110 Write Enable The Write Enable pin of each EEPROM is tied low by the 10k resistor and so by default is permanently enabled However if desired this can be controlled by output6 of the PICAXEmicrocontroller on the datalogger module To use this option a wire link must ...

Page 13: ...ured by the internal analogue to digital converter and stored in a variable e g b1 as a number between 0 and 255 Each ADC step is 5V 256 0 0195V assuming use of a regulated 5Vsupply The manufacturers calibration graph shows an offset of approximately 0 8V which equate to a ADC value of 41 0 8 0 0195 The RH slope is set at about 0 0306V per RH or 1 57 ADC step per RH Therefore the actual RH can be ...

Reviews: