BLOG > MSP430 Wireless Weather Station

Weather Station Display

Contrary to popular belief, Arduino is not the only microcontroller I use for projects.  I often program Atmega 8-bit CPUs in C for my research, I’ve played with PICs at various jobs, and I’ve also worked with Parallax Basic Stamp and Propeller chips.  This semester, I added the TI MSP430 to my CPU repertoire, thanks to Cornell’s Embedded Systems course.  I really enjoyed working with the MSP430, and got to implement some interesting, though very difficult, things on it, including parallel process execution and real time process schedulers.  For our final project, my lab partner and I put together a wireless weather station using the MSP430 EZ430-RF2500 Demo Kit.  I also developed a Processing application to gather the data via USB and display it graphically on a computer.  The station gathers light, temperature, and humidity info and sends it wirelessly to a USB receiver where the data is displayed on a computer.  Check out the video below and download the source code and schematics as well.  Enjoy!

Creative Commons License Licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

Download the MSP430 Weather Station Code and Schematics

The folders contain all the driver files in the root.  “receive_data.c” and “send_data.c” contain the main functionality.  The code is intended to be compiled in Code Composer studio.  To be sure it compiles, right-click on the project and go to “build properties”.  On the “Tools Settings” page under “MSP430 Compiler > Include Options”, change “CCE_INSTALL_ROOT” to “CCS_INSTALL_ROOT”.  Under “MSP430 Linker > File Search Path” change “CCE_INSTALL_ROOT” to “CCS_INSTALL_ROOT”.  On the “Build Settings” page uncheck “Use Default Command” and change “CCE_INSTALL_ROOT” to “CCS_INSTALL_ROOT”.


  1. Hey Jeremy !

    Awesome work on the weather station. Can you tell me what humidity sensor did you use for your project ? Will really appreciate if you can send me the schematic of your project. Also how did you transfer data between the 2 target boards ?

      1. hey,.

        sir,. can you give me the complete schematic of your wireless weather station?
        please sir..

  2. Hey Jeremy !

    I went through your code. I had a doubt in lines 39 and 40 of send_data.c

    P2SEL = 0x04; // Pin Select

    ADC10AE0 = 0x04; // ADC Low Bit (A2)

    Is the first statement necessary ? Would just enabling pin A2 of the ADC suffice in taking the data from P2.2 ( to which it is connected, as per the datasheet ) ?

    1. You might be right – I’m not certain. If you try it, let me know. It’s certainly not hurting anything, but it could be extraneous.

  3. Hi,
    I downloaded your code and schematics and was testing it. I could not find the MRFI and BSP header files . I am getting the error “could not find mrfi.h” during debugging. Can you please guide me out.

    1. Aman,

      Sorry about the problem. Please re-download the zip above, and follow the instructions that I’ve added below the download link. That should hopefully fix your problem.

  4. Hey Jeremy !

    Sorry to disturb you in you holidays. Can you just briefly explain how you decided the value of the resistors used as voltage dividers.

    Cheers !

    1. Hi Aman

      Do u have the send_data.c file please? because in the zip file, this file seems to be missing

    2. actually I can’t build the file, even though I had done the what’s told to change, the errors I got are all the same type, but with different files, e.g:

      “C:/Program Files/Texas Instruments/ccsv4/msp430/include/msp430.h”, line 1019: fatal error: #error “Failed to match a default include file”
      1 fatal error detected in the compilation of “../receive_data.c”.
      Compilation terminated.

    3. I wanted an output range around 0-2.5V since that’s what the MSP ADC works at. So I chose values that would give me that based on the full scale values of the sensors.

  5. Hi

    what is your percentage of packet loss?? because I don;t think I can receive 100% of the packet sent.

    Is there a mechanism to increase the minimize the loss of packet? How to do this please?

    1. With wireless communication, some packet loss is pretty common. You can add a checksum to identify packet drops, but it’s not really necessary in this implementation, since one missed value update won’t even be noticeable on the interface.

  6. but I dont think I receive anything in fact, I put a statement to flash the LED, e.g. P1OUT ^=0x01; and it just went blink once……

    here is my receiver side code

    void MRFI_RxCompleteISR()
    mrfiPacket_t packet;
    P1OUT ^= 0x01;

  7. Can you confirm that the remote station is transmitting? It should blink on each transmission. If it is, but you aren’t receiving anything, it seems like your interrupt might be incorrectly configured.

    1. Hi,
      Can you pls send me which temperature sensor and light sensor you used in this project

  8. hi,
    can you tell me how packet transmission takes place?what is the role of msp430 here?what is the advantage of using msp430 other than low power application?

  9. does every msp430 have in built temp sensor?if so which family of msp430 you have used?

  10. Thanks for posting this project! I’ve been working on an incubator monitoring system and your processing code will help my get my computer’s display going quickly.

  11. You do Awesome stuff! And thanks for introducing me to element 14.
    This project is exactly what I been wanting to do as a milestone in my beginning in elementary electronics journey. I like how you have full integration into processing with the charting. Would you be willing to do one of your awesome full demo tutorials repeating this project but with arduino’s and zigbee’s (or other cheap transmitter, or both). I would also like to see the processing charting expanded, such as the ability to export data, which I suppose could be done by the output of the serial log instead. Or maybe take a step into python to do some really cool data capture and processing.

    Eventually I would like to build multiple weather stations from different points in my house, yard, and garage, all sending back to a central display (added bonus as a weather ad-on for XBMC.)

    Any case, just some thoughts. If you have a donate button anywhere, I would certainly donate for even a transfer of this project into arduio and some sort of inexpensive wireless.

    Thanks again for all you do. You are a great instructor, even for us mid-career hobby tinkerers just starting to look into electronics on the weekends. Good luck!

    1. Actually, the MSP430 is a lot cheaper than an Arduino and XBees – just something to consider…

      I don’t have the time to translate this project to arduino, but you should be able to do it pretty easily if you watch my XBee Tutorial. If you want to expand on this project, please do, and send me details on how it turns out!

  12. Good work Jeremy and Matt!

    I never knew that processing could be so useful!

    Thanks for posting your project report and your work.

  13. Hi
    I am doing a project similar to yours. To first understand the rx tx piece, I wrote a program to press the button in one of the devices RF2500 boards and toggle an LED in the second RF2500 board.

    The problem I am having is that the code never enters MRFI_RxComplete(). Where in the code is the interrupt for RxComplete getting enabled ? I know that the receiver has received some data because it enters the following ISR

    and I just toggle the LED inside that ISR. But now when I want to look at the packet in that ISR, it is empty. Any help you provide is much appreciated.

    Also what kind of debugging tools do you use ? i.e do you use any packet sniffer ?

    Thank You

  14. i want a c-program for wireless weather station using rf signal.. . . . . with two sensors ic IM-35,two converters adc.this is a fine combination of analog and digital electronics..
    Hardware used for the project:
    • Microcontrollers
    • HT648l
    • HT640
    • STR 433
    • STT 433
    plzzzz send me. . .

  15. i compiled your project. After compiling it shows an Error that “source code could not find msp_spi.h”
    please tell me that how to overcome it.

  16. I appreciate that you’ve shared this project. I’m working on research to determine the footprint created by projects like this. I’m trying to compile this with CCS, and I’m getting a build error – Exec error: Launching Failed. Has anybody ran into this problem before?

    1. Unfortunately, CCS is a bit of a crapshoot, hence why my embedded processor of choice is the ATMega, not the MSP430. I’m not familiar with that particular error, though I do know that all the code I uploaded is sufficient for getting this project compiled.

  17. Thanks.

    Please Tell me verity of sensors can be used for humidity and moisture measurement compatible with ez430rf2500 kit

  18. Hey jeremy
    I want to sense temperature and humidity and to communicate sensed data using ez430RF2500 for large distance i try to multihop the node.. But I found some problem.It is not working properly
    I will be happy if you suggest code for multihop and also suggest low cost sensors i have mentioned earlier…

  19. Jeremy I’m getting this error in CCS when trying to run the code:

    “MSP430: GEL: Encountered a problem loading file: C:Documents and Settingsservolabworkspace_v5_3TransceiverDebugTransceiver.out Could not open file”

    How can I fix this?



    1. Hi Jared,

      Did you solve your problem? Still I’m not able to compile with CCS.


  20. Jeremy,

    Thanks for your posting, but I’m in trouble with compiling your code. Definitely it’s because CCS environment issue.

    In your source, you don’t have the sub-folder even your source have them.

    #include “bsp_external/mrfi_board_defs.h”
    #include “../common/mrfi_f1f2.h”

    Can you share how you did set up the environment of CCS?

    Thanks in advance,

  21. What I meant is that your source does not have any files that should be in the folder of “simpliciti” from original TI source such as nwk files, so I have not been able to compile successfully.

    Is there anybody here have this issue?

  22. Anyone who visits this blog,

    Is there anybody who can compile Jeremy’s codes successfully with CCS v5.3.0 that has c/c++ compiler version 4.1.2?

  23. HI,
    I am working on a similar project wherein i have to gather sensor data from the end device,process it in labview and send control signals to the end device which has to display data according to the user’s needs.Is it possible to send data from pc to the debugger which in turn will send it to the access point,again which in turn will send it to the end device??Can data be sent both ways or is it unidirectional i.e from access point to pc???

  24. hi jeremy,
    im on the same project ! Can you send me the receiver code and the sender please. I can’t read it in the download link. I love your blog!!

  25. Hey I downloaded the zip and tried debugging the station folder and during the debugging it comes up with an error that the send.out file is missing. Has anyone else encountered this issue ?

    Thanks in advance,


  26. hai,

    we tried executing the programs in ccs v5.we got the following errors:

    C:\Documents and Settings\Administrator\workspace_v5_8\Transceiver\Debug\Transceiver.out Could not open file

    C:\Documents and Settings\Administrator\workspace_v5_8\Station\Debug\Station.out Could not open file

    Please help us fix these issues,it’s very urgent.

    Instead of the humidity sensor you have used, can we use ubi sense humidity sensor???
    will it work properly?

    Thanks in advance

    1. I got the same error, I made a thread on TI forums so if I get a solution from there I will post it back here, same if you find a solution to the problem post it back here.

  27. Sir, Can you please tell me the graph units. As i need the units to my final year project.

  28. hi jb
    firstly; i wanna thank you for sharing your job. i have a project only temperature and humidity not light sensor. which part of codes i have to cut? can you help? one more thing whats the difference internal and external temprerature? if ı gonna internal temperature like you do is it enough? is there need external temperature measurement??

  29. I am getting the same error ” Encountered a problem loading file: C:\Users\Student Login\workspace_v6_1\Transceiver\Debug\Transceiver.out Could not open file”!! Please if anyone has a solution post it here

Leave a Reply to pankaj Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: