A weather station/datalogger using ARM Cortex-M4

Hello ARM community!

This one is my very first blog post in here and I want to share a project I have been working on: a weather station/datalogger reading temperature, humidity and light levels from the surroundings and saving it all inside a microSD card. But before I start I would like to thank Mr. Brad Nemire for inviting me to share my experiences in here. I have been writing and sharing my projects in my personal blog here and in my twitter @ClovisDuino; so if you want to stay always up-to-date with my maker adventures, check those out!

The idea of this weather station came from my need to test my recently-acquired Freescale FRDM-K64F (ARM Cortex-M4) development board; I really wanted to put my Arduino aside and start using the all-new and modern ARM processor. The components I had available were 1x DHT11 (serial temperature and humidity sensor), 1x LM35 (linear temperature sensor from Texas Instruments), some LDR's (Light dependent resistor), 1x 8GB microSDHC card and a DS1302 timekeeping chip from Maxim. What really jump-started my coding was that every component I cited above already have a ready-to-use library on the mBed website. So it was easy to start adapting code for my project.

You can have a look at the preliminar schematics in the sketch below, featuring all the components  cited above. Both the LM35 and LDR are connected to analog inputs of my board, while the DS1302 and DHT11 are connected to GPIO (which I defined in the firmware). You can find my code (the preliminary version) in this Github link.

datalogger_schematics.png

Since we are talking about a weather monitor there was no need to "rush" in terms of data acquisition, so I decided to save one complete set of data every 10 seconds only. It is enough to capture beautiful and nice data sets as the one seen below (for temperature inside my room). All that data is saved into a '.CSV' file, which makes it spreadsheet-readable and MATLAB by MathWorks friendly as well.

temperature_inside_my_room_07-01-2014.png

I am already working on a second version of my project, that will feature pressure and rain sensing (to come this August). If you wish to keep updated on this and more projects of mine, just go to Embedded Clovis, of course there is an entire post about this project in there; have fun coding, hacking and designing on an ARM!.

Anonymous
  • Welcome to the community and the ARM Cortex-M micros!

    I read your blog here and on your site with interest. I can see a direct use of the temperature (and see it's warm in Vancouver) to control heating smartly (= don't switch it on early afternoon coz it's going to be warm later), but do you have plans to use the info from the LDR for something particular? I'm thinking like garden lights when it gets dark, or any other use?

    We have Carlos who joined us and has posted a couple of articles in Portuguese, if you get some nostalgia

Related