Shop OBEX P1 Docs P2 Docs Learn Events
A room temp/humidity logging project report — Parallax Forums

A room temp/humidity logging project report

Timothy D. SwieterTimothy D. Swieter Posts: 1,613
edited 2010-03-24 17:11 in Accessories
A couple months ago I wanted an application to try out the PropNET board I created for the Gadget Gangster Propeller Platform. www.brilldea.com/product_PropNET.html Of course the main purpose of the PropNET is Ethernet capability, but the project I wanted to create had a different focus. The focus was on data logging and SD card control. I hadn't work with any of the SD objects yet so I wanted a project to explore the use of that software (and to verify the SD circuit worked on the PropNET). So, I created a temperature and humidity logging device.

I currently live in Singapore. In Singapore, as well as the many Asian countries I have visited, the individual rooms each have their own aircon such as a single wall-mount type of AirCon instead of central AirCon like in the USA. I like this idea because then my wife and I only turn on the aircon for the room we are in. I was curious how well the aircon in our bedroom worked. There would be nights when my wife and I both comment that the room felt warmer than normal. So my little project was born to track the temp and humidity in the room over a couple days to see how well the aircon performed.

On the PropNET board is a one-wire DS1822 temp sensor. In addition to this sensor I used some prototyping wire and attached a Sensirion temp/humidity sensor - the sensor that Parallax sells. I used the uSD card slot on the PropNET to log the raw data recorded from the sensors. In addition to the raw sensor values there was a "seconds since start" value recorded as well as a sample number. Once my data logging was done I imported the data into Excel and created graphs and did the calculations to get the actual temperatures.

The PropNET software uses a state machine of sorts. The software mostly hangs out in the "StateWaiting", then every 10 seconds the "StateTemp" and "StateLogging" states occur. The software could be simpler, but for me setting up the software in the state machine manner as I did allows for easy adding or subtracting of states and behavior. Another element I used in the beginning of the design was a Propeller Serial Terminal to review data and variables while working through the initialization. The uSD card, the one-wire and the Sensirion object was all from code in the OBEX.

I attached the software for the project. I also attached the raw data as well as an image of a graph of the data. It is interesting to see how the temp varies in the room - you can certainly tell when we turned on the aircon each evening. I also think it is interesting how the humidity oscillated throughout each night, probably with the aircon turning on/off, but that overall the general trend was up.

I hope this little project inspires others in their sensor projects.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
www.tdswieter.com

Comments

  • WBA ConsultingWBA Consulting Posts: 2,934
    edited 2010-03-21 19:13
    Really nice project. I am doing the same type of logging with the SHT11 to SD cards. I'll be looking at your timekeeping because that's my next add-on for my loggers. Right now it's just a stream of logs without timing. Can you post a screen shot of the PST screen? I think I understand what's going on from your code and what it would look like, but I would like to see it to confirm my understanding.

    I really hope you move this to the next step with a web page using your propNET board. I have a WIZNET module that needs a home and I would like to have exactly what you have here displayed on a web page. That's way above my head right now, but if you do go that way, I will get a propNET and utilize your code to get me started.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Andrew Williams
    WBA Consulting
    WBA-TH1M Sensirion SHT11 Module
    Special Olympics Polar Bear Plunge, Mar 20, 2010
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2010-03-21 23:02
    Eventually I would like for the PropNET to send data via ETHERNET to some server that logs the data, but at the moment I first then to write a lot of PropNET/Propeller Web Server software.

    The PropNET contains a timing IC, however for my first logging project I didn't use that feature. The software was simple in that it was a 10 second loop, roughly, and therefore logging samples were taken every 10 seconds. I recorded the start time and from there the system logged seconds since turn on and sample number. No reason why the time IC can't be used, one would need to setup a time entry screen over PST to enter the correct time.

    I'll try and post a screen shot of the PST later today.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter, E.I.
    www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
    www.tdswieter.com
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2010-03-22 11:10
    Attached is a screenshot of the PST showing the debug data.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter, E.I.
    www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
    www.tdswieter.com
    482 x 785 - 43K
  • WBA ConsultingWBA Consulting Posts: 2,934
    edited 2010-03-24 07:20
    Thanks for the screenshot. Not exactly what I was expecting, but I will review the code again. I think I know why it's different that what I had in mind.......

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Andrew Williams
    WBA Consulting
    WBA-TH1M Sensirion SHT11 Module
    Special Olympics Polar Bear Plunge, Mar 20, 2010
  • ChetChet Posts: 150
    edited 2010-03-24 17:11
    When I lived in Aruba, I had small and large wallmounted AC units in the house. I used the temperature and humidity to control the AC units to get the room on the comfort curve. What I found that running the small AC units to drop the RH, instead of the large units which mainly dropped the temperature, I saved a lot of energy. The small units ran slightly longer and removed the moister, which made it feel like it was freezing when you came inside and you were "wet" with persperation.
    I did this many years ago with rather crude equipment and an 1802 micro processer.

    Thanks for your posting
Sign In or Register to comment.