Creating a weather station – MX-FS-03V/MX-05V (Part 2)

Getting temperature readings with a weather station is fine and all. It is however impractical to go outside whenever I want to know it. Since a wire or a cable is out of the option, and quite outdated, I want a wireless transmission of the temperature data and whatever sensors I add later. Enter the MX-FS-03V / MX-05V.

Wireless transmitter / reciever (MX-FS-03V / MX-05V)

Roaming the wast market that is eBay I found the MX-FS-03V / MX-05V set. They are cheap and small wireless transmitters / recievers, perfect for the Arduino. I haven’t tried breaking them apart, so I am not familiar with the technical specifications other than that they work at a frequency of 433Mhz. I also know that there are some good libraries for them for the Arduino. I’m using the VirtualWire library found here.

Sending data

This is the transmitter part, MX-FS-03V. No potato for scale...
This is the transmitter part, MX-FS-03V. No potato for scale…

The VirtualWire library is designed for this kind of stuff. Using some sample code I found, and modifying it to send the temperature reading, the sending part was very easy.

This is a very early version of the code, and probably full of unnecessary stuff. Later versions will hopefully have some optimization, and a cleaner code. Basicly what the code does is reading the temperature as in the previous post. Then it converts the temperature number to a string. I assume the library can send numbers just as well, as it sends bit by bit, but with the sample code I could not figure it out. Converting it to a string was easier. It then send the string, and loops. It also strips the string of any leading or trailing whitespace. This corrected an early bug where only a part of the temperature was sent.

This sends the temperature about once every second. The selected transmission speed is 2KB per second, which is way faster than needed. But hey, if it works!

Receiving data

The receiving part.
The receiving part, MX-05V.

The receiving Arduino is, for now, a much more simple code. The only task of this code is to receive the data and print it to the serial monitor.

Both codes are based partially or fully on code I found here. They are also most likely nothing like the end result. Part of the project is to practice programming, so code will be rewritten to better fit the task.

Range

The internet disagrees strongly about the range of these devices. Some list hundreds of meters, others talk about centimeters. On my test bench they are positioned about 10cm apart, thus I have not really tested the range. Both units have the possibility to solder on an antenna, which probably will add to the range. This will be better tested later on.

Its not transmitting across any oceans, but at least it works on my test bench.
Its not transmitting across any oceans, but at least it works on my test bench.

Other possible shortcomings

The two Arduinos have been running for a couple of days now, on my test bench. One of the problems I have been having is that it suddenly stops recieving. The serial monitor prints message recieved, the message however seems incomplete. Not sure what this is about. A simple reset of the receiving device solves it, so I’m sure there is a simple workaround if this turns out to be a problem.

I have not tested the power consumption. This is mostly a potential problem for the transmitter, as it will be battery powered. I am not sure my cheap china type multimeter is capable of measuring the current draw, but this will be tested later on.

Next up!

The next part is getting the Ardiuno to talk to a Raspberry Pi. Why a RPi? This is where all the number crunching stuff will happen. I can run a web server on it, and it runs Python, which I find a lot easier than C/C++.

I also need to add more sensors, to get a complete weather station. An eBay shopping round is imminent!

My test bench. Currently sporting an Arduino, a fakeDuino, a
My test bench. Currently sporting an Arduino, a fakeDuino, a DS18B20 temperature sensor, a MX-FS-03V transmitter and a MX-05V receiver.

One thought on “Creating a weather station – MX-FS-03V/MX-05V (Part 2)”

Leave a Reply

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