1. You can now buy finished microcontroller project from us, Check out the Store for the complete list of projects.
  2. Need a custom project, Send us some details about your project. So that we can quote the price for it.

Need help for CODING 8052 (GreenBee Humidity SENSOR)

Discussion in 'Project Doubts' started by firoz3321, Feb 3, 2010.

  1. firoz3321

    firoz3321 New Member

    Likes Received:
    0
    Trophy Points:
    0
    I'm doing the GREENBEE project for the final year project.
    The priginal CKT uses HIH-4000-001 Humidity Sensor which doesn't seem to be available here and costs 2000 Ruppes online.
    I want go for the HHD10 Humidity Sensor.

    I have the Code for the project which uses the " HIH-4000-001 Humidity Sensor " which gives the output in volts.

    But i want the code for HHD10 Humidity Sensor which gives the output in FREQUENCY (ranging from 5KHz to 10KHz).


    Please Help me as i donot have much time.

    Code Attached


    Thank You,

    Regards,
    Feroze

    Attached Files:

  2. Binu

    Binu Administrator

    Likes Received:
    147
    Trophy Points:
    63
    Use the counter to count the frequency and use a Lookup table to digital value. Check the datasheet for more details.
    Post the code and circuit diagram for more help.
  3. firoz3321

    firoz3321 New Member

    Likes Received:
    0
    Trophy Points:
    0
    Attached CODE and CIRCUIT Diagram

    Thank you for the Quick response.

    I recently planned to use the same code by CONVERTING THE FREQUENCY TO VOLTAGE. tried some circuits from net using 555 timers and also the LM2917 IC. I tried these circuits on PROTEUS simulation tool but couldnt get any outputs.

    So i was planning to go with modifying the code.

    Thank you
  4. firoz3321

    firoz3321 New Member

    Likes Received:
    0
    Trophy Points:
    0
    Any ideas ?
  5. firoz3321

    firoz3321 New Member

    Likes Received:
    0
    Trophy Points:
    0
    Anybody there ?
  6. Binu

    Binu Administrator

    Likes Received:
    147
    Trophy Points:
    63
    Connect the humidity sensor output to the T1(P3.5) and use the following code.
    Code (Text):
    1. MOV TMOD,#60H       ;make T1 as counter
    2. MOV TH1,#00H        ;reset the counter values
    3. MOV TL1,#00H
    4. SETB P3.5       ;Make P3.5 as input
    5. SETB TR1        ;start the counter 
    6. CALL DELAY      ;1 SEC DELAY
    7. MOV A,TL1       ;get the count value
    8. CLR TR1         ;clear timer and counter flag
    9. CLR TF1
    Now use the counter value with some lookup table to get the humidity.
  7. firoz3321

    firoz3321 New Member

    Likes Received:
    0
    Trophy Points:
    0
    WOW Thank you very much for the REPLY !


    I think you must be aware of the GREEN BEE project .


    As i mentioned before, the original Project uses HIH-4000 sensor and i plan to use the HH10D sensor.

    The data sheet of HH10D sensor is very minimal. I'm not sure if the sensor is giving Analog Frquency output or DIGITAL output.

    I cant find any code on the net regarding to this sensor except just one page which uses dome PIC controller.


    Can you please help me understanding the sensor ?
  8. Binu

    Binu Administrator

    Likes Received:
    147
    Trophy Points:
    63
    Sure it will give out digital square pulses at its output.
    Post the link of the project with the PIC microcontroller. Let me see that.
  9. firoz3321

    firoz3321 New Member

    Likes Received:
    0
    Trophy Points:
    0
  10. Binu

    Binu Administrator

    Likes Received:
    147
    Trophy Points:
    63
    Use some other pin for ADD B

    Get the frequency count for 1 second and with that count you can get the Humidity.

    The Basic code is given here, change it for asm

    Code (Text):
    1. SYMBOL Offset   = 7709           ; HH10D module 1 calibration constant 
    2. SYMBOL Sens     = 341            ; HH10D module 1 calibration constant
    3.  
    4.  
    5. COUNT humid, 1000, Soh      ; read the frequency (ie cycles in 1 second)
    6.  
    7.  
    8. diff = Offset - Soh
    9. axefactr = diff / 19 + 1   ; a factor to prevent number roll over error (ie >65535)
    10. RH = 10 * Diff / axefactr * Sens ; intermediate result (multiply by 10 is to enable 0,1 resolution later if required)
    11. axefactr = 4096 / axefactr ; a factor to prevent number roll over error
    12. RH = RH / axefactr         ; final value for RH%
    13. RH = RH / 10               ; divide by 10 (for now) as not transmitting fractional part only whole RH
Loading...

Share This Page