Shop OBEX P1 Docs P2 Docs Learn Events
Students (and teacher!) need help with humidity sensor program (Tracy Allen, he - Page 3 — Parallax Forums

Students (and teacher!) need help with humidity sensor program (Tracy Allen, he

13»

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-02-02 00:09
    The original program line is in the area where the temperature compensated humidity is calculated:
    ' temperature compensated humidity
      '   rhTrue = (tC - 25) * (soRH * 0.00008 + 0.01) + rhLin
      '
      ' Conversion factors are multiplied by 100 to improve accuracy and then
      ' rounded off.
      '
      rhTrue = ((tC / 10 - 25) * (soRH ** 524 + 1) + (rhLin * 10)) + 5 / 10
    


    The factor involved in Tracy's comment is the first one above.
  • Mark in NHMark in NH Posts: 447
    edited 2008-02-02 00:20
    Mike,

    So to read and write negative degrees Celsius, this command line:

    rhTrue = ((tC / 10 - 25) * (soRH ** 524 + 1) + (rhLin * 10)) + 5 / 10

    would be replaced, and written as

    rhTrue = (ABS tC / 10 ^ -tC.bit15 + tC.bit15 - 25) ???

    or is

    rhTrue = (tC - 25) * (soRH * 0.00008 + 0.01) + rhLin

    replaced and written as

    rhTrue = (ABS tC / 10 ^ -tC.bit15 + tC.bit15 - 25) ???

    or are both rHTrue's written = (ABS tC / 10 ^ -tC.bit15 + tC.bit15 - 25) after them ???

    Do you have any idea how low (or high) the temperature range on the sensor is? It's listed nowhere in our documentation. Our rocket would have to go REALLY high to register negative degrees Celsius (wishful thinking, I know!) But I'd like to consider expanding our work further into the classroom, to other projects that just may involve sub-freezing temperatures.

    Thanks!

    Mark
  • Mike GreenMike Green Posts: 23,101
    edited 2008-02-02 00:40
    Like I (and Tracy) said, the factor "(tC/10 - 25)" should be replaced with the factor "(ABS tC / 10 ^ -tC.bit15 + tC.bit15 - 25)".
    The rest of the line should remain the same.

    The documentation for the sensor (at www.sensirion.com/en/pdf/product_information/Data_Sheet_humidity_sensor_SHT1x_SHT7x_E.pdf) gives the range with a graph of the accuracy over the range -40C to 122C.
  • Mark in NHMark in NH Posts: 447
    edited 2008-02-02 01:46
    Mike,

    I'm downloading the documentation from the link you posted right now. Thanks! I'm not sure how we missed finding it initially.

    -40 Celsius... now that's COLD. Doubtful our rocket will ever get up that high. But we can dream. Thanks for helping me and a bunch of sharp young kids move forward with our dream. Sometimes it's difficult to motivate kids to learn. But not these up-and-coming engineers! Getting them to invest the time and effort they have says mountains about the interest you've helped spark in them. You've opened a new door for all of us (me included), and we're all pretty excited to see 'our' (collective) gizmo work. Thanks again!

    Mark
  • Andrew (ARLISS)Andrew (ARLISS) Posts: 213
    edited 2008-02-02 20:34
    Mr. Green,
    I took your advice and bought a new flash drive. It is a 1GB SanDisk Cruzer. When I tried it right out of the box, it still hung on the "Accessing...". So I went to the format utilty in the Windows Vista control panel, and tested it with the following formats.

    *FAT - Allocation Size of 16
    *FAT32 - Allocation Size of 16
    *FAT - Allocation Size of 32
    *FAT32 - Allocation Size of 32
    *FAT - Allocation Size of 512
    *FAT32 - Allocation Size of 512

    I also tried an option that said, "Drive Default". All of those formats still hung on the "Accessing". When I plug the drive in to the datalogger·using ANY format above, it blinks a few times, and then goes solid. The debug window also just keeps on hanging. The program is working for Mr. Kibler, and one of my other teammates. So, why is it not working for me? I'm running the most recent version of the stamp editor, and I am using the same exact board, set-up, and parts as the rest of our team. Is there something wrong with my drive? Is the program I am using to format it no good? It's driving me crazy!

    Thanks in advance,
    Andrew

    Also, attached is the program that we are using (if I uploaded it correctly tongue.gif )
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2008-02-02 20:57
    Andrew -

    At this juncture I might start looking for a possible wiring problem. I've never seen te Parallax Datalogger, so I don't know how it connects to your Stamp board, but make sure there is a SOLID ground between the two.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    There is no pleasure in having nothing to do;
    the fun is in having lots to do, and not doing it!
  • Andrew (ARLISS)Andrew (ARLISS) Posts: 213
    edited 2008-02-02 21:01
    Bruce,
    I'm pretty sure there isn't a wiring problem. My board is wired exactly the same as the others in our team, and they are able to use it okay. I'll double check the connections though. Thanks for you help,
    Andrew
  • Mike GreenMike Green Posts: 23,101
    edited 2008-02-02 21:17
    One way to sort this out is to bring your board and drive to where the class's system is located, then try your flash drive on the system that works, try the flash drive that works on your system, and any other combination you can think of. Clearly there's something different about your system because it doesn't work and another seemingly identical system works. One can always blame the problem on karma or malevolent spirits, but usually it's a connection or wiring problem or sometimes a power supply that isn't putting out enough current, etc. Occasionally it's a defective part like a Datalogger, but things like that tend to fail completely rather than just behave peculiarly.
  • Mark in NHMark in NH Posts: 447
    edited 2008-02-03 03:02
    Andrew,

    ·· I agree that it seems like a hardware problem rather than a program problem. I just downloaded and ran the version of the program that you posted, and it ran fine. Like Mr. Green and Bruce suggested, we'll have to 'isolate the variable' by switching parts back and forth to found out which parts isn't working (like we did when we figured out that one of the humidity sensors was defective.) You might also re-check how you have·the Parallax board wired (though that shouldn't be the problem if the humdity sensor program works OK independently.) Like Mr.Green said, it may be the Datalogger unit itself. We'll switch parts back and forth to figure it out.

    Check with you Mom and see if she wants to come over tomorrow (Sunday) afternoon for a few hours and we can troubleshoot the problem. Tell her she's welcome to stay and chat with Mrs. Kibler or they can take the dog for another long walk. Christopher is home from school through Monday and the two of you can figure it out. Any time between 12:30 and 4:00 PM is fine. Just let me know ahead of time. Keep up the·excellent work, young engineer!·yeah.gif·

    PS -·If you'd like I can give you parts so you can build another robot like Tim's as a back-up, or as·our primary robot·if his malfunctions. We have a chassis already started from last year's project. Did you get the RockSim software 'unlocked'? E-mail me back at mkibler@unity.edu if you do.


    Mr. Kibler - 774-7595
    10 PM Saturday
Sign In or Register to comment.