Introduction: WIRELESS AUTOMATED WEATHER STATION USING ARDUINO
In this Instructable we make an automated weather station using Arduino boards and sensors. The main focus of this project is to make the entire thing portable and compact. The circuit boards are designed in such a way as to facilitate easy reuse of all major components in other projects. This is an intermediate level project and needs careful design and accuracy.
The entire project will cost you around $ 35 (in parts) to make and less if you buy smart and /or already have most of the parts with you. You probably have.
Step 1: Starting Facts
Hardware wise, the project is divided into two parts
- Transmitting Station
- Receiving Station
The Transmitter Station mainly consists of the sensor hub as well as a data transmitter. The Receiver Station consists of the LCD display and the display interface as well as the data receiver. They are discussed in details in the following sections.
The following points are to be noted:
- I have kept flexibility in the design of both the transmitter and the receiver boards so that they can work with both 5 volt and 3.3 volt logic and power level.
- As a result, we can use both the Arduino pro mini and the Arduino nano boards. The entire project will be demonstrated using the Arduino nano boards. The images given have the Arduino nano board. If you plan on using the 3.3V logic level Arduino Pro Mini boards, check out the conclusion and Scope of Development Step.
- I have used the 333.92 Mhz ASK based Wireless Transmitter and Receiver modules for transmitting data from the transmitter box to the Receiver box. Make sure these frequencies of operation are legal in your area. In some places these frequencies may be restricted.
All the parts used in this project can be picked up from amazon, banggood.com and hobbyking. If exact parts are not available, replacement parts can also be used. (For example, the DHT 22 module instead of DHT 11.) Make sure to change the code and design accordingly.
I will try to keep this Instructable as clear and concise as possible. If you need any help or have spotted any errors, make sure to tell me in the comments.
Now, without any further ado, lets get started.
Step 2: Parts Required
Here is the list of parts you will require:
- Arduino Nano - 2 units
- Nokia 5110 LCD - 1 unit
- DHT 11 - 1 unit
- BMP180 - 1 unit
- Rain Sensor - 1 unit
- Tx-Rx Module 1 unit
- IC 7805 (9v to 5v converter) - 2 unit
- Capacitor - 4 units (electrolytic, 2x 100 microfarads and 2x 10 microfarads)
- LEDs - 6 units (2 units of Bright Red, Blue and Green Leds)
- Diode 4007 - 2 units
- Heat Sink - 2 units (optional)
- Hex Screws and nuts for mounting LCD display - 4 units
- 9 V Battery - 2 units
- IC CD4050 - 1 unit
- IC Base for 8pin IC - 1 unit
- Perfboard - 2 units (Medium size, non connected. Don't use the row connected veroboards)
- Male Breakaway Headers - 4 units
- Female Breakaway Headers - 4 units
- Battery Holder - 2 units
- 22 gauge insulated Wires - around 6.9 inch x 2 (used to make the antennas)
- Resistors for driving LEDs - 220 ohm 4 units
- Switches (Slider) - 2 units
- Switches (DPDT) - 3 units
- Plastc Containers / Box - 2 units
- Connector Jumper Wires (Female to Female) - 12 units
Here is the list of tools you will require:
- Soldering Iron
- PCB cutter/ dremel/ hacksaw
- Drill or punch.
- Soldering flux, solder, desoldering wick and solder sucker
- Electrical tape
- Cleaning cloth
Also read the notes on each images I attached.
Step 3: The Transmission Station
Before I begin, I urge you to check the notes on all the reference images given in this step.
The transmitter station consists of all three weather monitoring sensors to monitor weather conditions like Temperature, Humidity, Atmospheric Pressure, Altitude and Precipitation Amount.
The Arduino Nano Rev 3.0 board forms the heart of the Transmitter Station. It collects the data captured by the sensors in a compact package and the Arduino also encodes this data for the ASK based RF Transmitter module.
Here in this board, none of the components are hardwired, to facilitate easy upgrade or replacement.
The red transmitter chip transmits the data bytes from the data Output pin 12 of the Arduino. It uses a spiral Antenna made from insulated 22 Gauge single core solid copper wire.
Refer to the Fritzig Sketches for connection details of the 9 volt to 5 volt converter as well as the connection of the arduino. For ease of understanding, the 9v to 5v converter is taken as a single board in the Transmitter module sketch.
The LEDs are attached to data pin 13 (default debug LED pin) and the light up when data transmission occurs.
A 9v Nickel Cadmium battery powers the Transmitter station. Hence we need to implement a 9V to 5V voltage regulator circuit because the Arduino runs best on regulated 5v power supply (yes, that's a fact). The rain sensor module has a sensor plate which has variable resistance depending on its level of contact with water. The container is air tight and has a sliding on off switch on the outside.
Refer to the images. Since embedding images in between texts is not possible here in the editor, I have mentioned important tips in the image notes.
I have intended this instructable to be a learning experience. Hence, I want the viewer to go through the material and do the ground work. Rather than attaching schematics, PCB layouts and gerber files, I have attached fritzig sketches. They require a more careful examination than schematics.
Step 4: Recieving Station
The Receiver station consists of the Arduino Nano, the RF Receiver module, antenna and the Nokia 5110 LCD Display module. A level shifter chip (CD4050) is used to convert the high 5V voltage level to 3.3V voltage level because the Nokia 5110 LCD display is only 3.3 volt tolerant for the logic levels.
Here also, power from a 9v is regulated to stable 5.0 volt. Hence a voltage regulator unit using a 7805 IC is used. The 3.3v output pin of the Arduino is used to power the LCD display. The board is made in such a way that it is compatible with both a 5v Arduino Nano v3 as well as an Arduino Pro Mini 3.3v arduino.
The data lines with the BLUE status LEDs and the Arduino pin 13 and the transmitter and Arduino pin 12 is not hardwired in the board.
The CD4050 Hex Buffer can be disabled easily with a push-button switch. An external slider switch can be used to turn the station ON or OFF.
Step 5: Code
The Code for the receiver and transmitter is attached.
The arduino libraries used in this project are:
- Adafruit graphics library (for any adafruit LCD)
- Adafruit PCD8544 Library (for Nokia 5110 LCD)
- VirtualWire Library (for the 433.92 Mhz Transmitter/Reciever Modules)
- Adafruit DHT Library (For DHT 11 sensor)
- Adafruit BMP085 library (For BMP 180 sensor )
Please use latest versions of the libraries and also if you are using alternate versions or different sensors, please modify the codes accordingly.
Generating the LCD Splash Screen:
I used LCD Assistant software to generate the splash screen. I have attached the Bitmap Image I created to get the splash screen shown in the photo.
Both educ8s.tv and GreatScott! are excellent channels and have good and easy to follow Arduino tutorials on Nokia 5110 LCD and most other sensors used in this project. I learnt a lot from them. So follow their tutorials if you are a beginner.
Step 6: Working Model
The transmitter station captures all the sensor values as floating point variables and packs them into a data structure package to minimize data loss using error detecting and error correcting codes. Using ASK modulation, the data is transmitted at a frequency of 433.92 MHz. A delay of 1 second is purposefully set to prevent data collision.
The receiver station captures the package and decodes it. Then it displays the results on the LCD according to program code. Since these are battery powered and wireless, they can be deployed hassle free in remote locations ans require very little upkeep. The arduino can be tweaked to use low power mode and hence the battery lives can be maximized.
Step 7: IMPORTANT : Useful Tips and Hints
- If you already know how to build intermediate level circuits and projects (e.g. using ESP8266, Arduino or the Raspberry pi) then I urge you to use 2x 1.5 volts AA alkaline batteries. You will get around 3.2 volts which is enough to use in Rawinput PIN of 3.3 volt arduino pro mini. Depending on the quality of batteries, you may or may not need a boosting circuit. Also, you will not be needing any of the 9v to 5v converter components then.
- If you use a bare-bones board, or cheap Chinese clones, you may break off all LEDs etc and use the Low Power library to lengthen the battery life.
- Use breakaway headers for the board and also use ribbon cables for connecting the display to the data pins of the Arduino.
- The antenna of the 433.92 Mhz receivers need to be around 6.9 inches. Take a Straw and wrap the wire around it with 1mm pitch between the spirals. See the image as a reference. Solder a single female breakaway header to one end, and you will get your detachable antenna. make sure to keep a single Male header pin in the Perfboard connected to the antenna pin of the transmitter/receiver. This will facilitate easy attachment/removal.
- The CD4050 is a unidirectional level shifter, used for controlling the logic level. Search online for the schematics. The connection pinout is very easy. As an alternate, 10k resistor for the RST, CS, DC, DIN and CLK pins.
- Make sure to use a 220 ohm resistor for the LED pin of the display.This will limit the current to the four corner LEDs of the Nokia 5110 LCD module.
- Soldering the connections of adjacent male and female headers can be frustrating. make sure to use proper amount of flux and solder. Remember, less is more. If by any chance adjacent tracks get shorted, skip twor tracks and continue soldering. Use desoldering pump/ wick to remove excess solders. Add a little flux and carefully re-solder the pins. Refer to attached image.
- The excess length of the resistor, diode and LEDs can be used to make fantastic fround or VCC interconnections. Refer to the Image. It is better to run lesser amount of wires over the Perfboard.
- If you do not have a drill/Punch you may use a round heated soldering iron tip to make holes on the plastic box for making holes.
Step 8: References
The following references will be very useful for building any arduino based project:
- Arduino.cc forums
- Arduino community forums
- Instructables community reference projects
- “All about circuits” resources
- Fritzing community forums
- Adafruit libraries and repositories
- Sparkfun libraries and repositories
- Educ8s.tv Youtube Channel and website tutorial videos
- Great Scott Youtube channel and tutorial videos
- EEVBLOG Tutorials for soldering and circuit building
Participated in the
Circuits Contest 2016