measure ohm of HS15P
Fork of Frequency_counter by
This test program measures ohm of HS15P, humidity sensor.
C(micro F) with LMC555 | 0.1 | 0.15 | 0.22 | 0.33 | 0.47 | 0.68 | 1 |
CONV_KILO_OHM | 0.0072 | 0.0048 | 0.0033 | 0.0022 | 0.0015 | 0.0011 | 0.00072 |
If you get 2500 microseconds as interrupt time interval , it means 18 kilo ohm when 0.1 micro F. ( = 2500 * 0.0072 )
- ohm of HS15P is calculated from pulse interval of LMC555.
- CONV_KILO_OHM will be used.
- this program reads interval time.between interrupt in the P8.
- takes ON the P9 to oscillate LMC555 as short as enough to measure interval time
- last several interval times will be used for calculation.
- the time is defined as READ_TIMER .
- In current circit, VDD of LMC555 is about 1.55V, AC 0.4V between pins of HS15P.
- LMC555 consumes 120 micro A while oscillation, 90 micro A when level of P9 is OFF. (reset is ON)
- Total 1-2mA is consumed in the circit.
Related nootbook : https://mbed.org/users/strysd/notebook/measure_humidity_with_hs15p_and_lmc555/
main.h@8:6d956be23ed8, 2014-05-11 (annotated)
- Committer:
- strysd
- Date:
- Sun May 11 05:08:29 2014 +0000
- Revision:
- 8:6d956be23ed8
- Parent:
- 6:7f90a61e1a69
sync libraries
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
strysd | 6:7f90a61e1a69 | 1 | //see mbed.org/users/strysd/notebook/measure_humidity_with_hs15p_and_lmc555/ |
strysd | 6:7f90a61e1a69 | 2 | |
strysd | 6:7f90a61e1a69 | 3 | #define CONV_KILO_OHM 0.0072 //if use 0.1 micro F |
strysd | 6:7f90a61e1a69 | 4 | #define IN_TIMES 20 //interrupt times |
strysd | 6:7f90a61e1a69 | 5 | #define READ_TIMER 3 //rest times when reads timer |
strysd | 6:7f90a61e1a69 | 6 | #define WAIT_IN 1000 //wait interrupts in msec |
strysd | 6:7f90a61e1a69 | 7 | #define WAIT_NEXT 9000 //wait next measurement in msec |
strysd | 6:7f90a61e1a69 | 8 | #define MAX_INTERVAL 50000 // > 50 msec ( < 20 Hz) in microseconds |
strysd | 6:7f90a61e1a69 | 9 | #define MIN_INTERVAL 50 // < 50 micro sec ( > 20 kHz) in microseconds |
strysd | 6:7f90a61e1a69 | 10 | #define ONESEC_BY_MICRO 1000000// 1 sec in microseconds |