Silicon ChipWeatherDuino Pro2 Wireless Weather Station, Pt.3 - May 2015 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Solar panel installations could have future costly implications
  4. Feature: The Australian International Airshow 2015 by Dr David Maddison
  5. Review: The Navman MiVue Drive GPS Unit by Leo Simpson
  6. Project: Appliance Earth Leakage Tester by John Clarke
  7. PartShop
  8. Feature: Home Solar Panel Electricity: Is It Worth It? by Alan Wilson
  9. Project: WeatherDuino Pro2 Wireless Weather Station, Pt.3 by Armindo Caneira & Trevor Robinson
  10. Product Showcase
  11. Project: Balanced Input Attenuator For Audio Analysers & Scopes by Jim Rowe
  12. Subscriptions
  13. Project: 4-Output Universal Voltage Regulator by Jim Rowe & Nicholas Vinen
  14. Vintage Radio: The Radiola 523-M: the last vibrator-powered radio by Rodney Champness
  15. Market Centre
  16. Notes & Errata
  17. Advertising Index
  18. Outer Back Cover

This is only a preview of the May 2015 issue of Silicon Chip.

You can view 29 of the 104 pages in the full issue, including the advertisments.

For full access, purchase the issue for $10.00 or subscribe for access to the latest issues.

Articles in this series:
  • The Avalon 2013 Air Show (May 2013)
  • The Avalon 2013 Air Show (May 2013)
  • The Australian International Airshow 2015 (May 2015)
  • The Australian International Airshow 2015 (May 2015)
  • Avalon Airshow: from killer drones to spacecraft! (May 2019)
  • Avalon Airshow: from killer drones to spacecraft! (May 2019)
  • Avalon Airshow 2023 (May 2023)
  • Avalon Airshow 2023 (May 2023)
Items relevant to "Appliance Earth Leakage Tester":
  • Appliance Earth Leakage Tester PCBs [04203151/2] (AUD $15.00)
  • Talema AC1015 Current Transformer (Component, AUD $20.00)
  • Appliance Earth Leakage Tester front panel [04203153] (PCB, AUD $15.00)
  • Appliance Earth Leakage Tester PCB pattern (PDF download) [04203151/2] (Free)
  • Appliance Earth Leakage Tester panel artwork (PDF download) (Free)
Articles in this series:
  • Home Solar Panel Electricity: Is It Worth It? (May 2015)
  • Home Solar Panel Electricity: Is It Worth It? (May 2015)
  • Solar Power with Batteries (January 2022)
  • Solar Power with Batteries (January 2022)
Articles in this series:
  • WeatherDuino Pro2 Wireless Weather Station, Pt.1 (March 2015)
  • WeatherDuino Pro2 Wireless Weather Station, Pt.1 (March 2015)
  • WeatherDuino Pro2 Wireless Weather Station, Pt.2 (April 2015)
  • WeatherDuino Pro2 Wireless Weather Station, Pt.2 (April 2015)
  • WeatherDuino Pro2 Wireless Weather Station, Pt.3 (May 2015)
  • WeatherDuino Pro2 Wireless Weather Station, Pt.3 (May 2015)
  • WeatherDuino Pro2 Wireless Weather Station, Pt.4 (June 2015)
  • WeatherDuino Pro2 Wireless Weather Station, Pt.4 (June 2015)
Items relevant to "Balanced Input Attenuator For Audio Analysers & Scopes":
  • Balanced Attenuator PCB [04105151] (AUD $15.00)
  • 4-Output Universal Regulator PCB [18105151] (AUD $5.00)
  • Hard-to-get parts for the Balanced Input Attenuator (Component, AUD $80.00)
  • Balanced Input Attenuator front and rear panels [04105152/3] (PCB, AUD $20.00)
  • Balanced Attenuator PCB pattern (PDF download) [04105151] (Free)
  • 4-Output Universal Regulator PCB pattern (PDF download) [18105151] (Free)
  • Balanced Attenuator front and rear panel artwork (PDF download) (Free)
Items relevant to "4-Output Universal Voltage Regulator":
  • 4-Output Universal Regulator PCB [18105151] (AUD $5.00)
  • MCP1700 3.3V LDO (TO-92) (Component, AUD $2.00)
  • 4-Output Universal Regulator PCB pattern (PDF download) [18105151] (Free)

Purchase a printed copy of this issue for $10.00.

Part 3 of our quality Weather Station based on System designed by Armindo Caneira* Built and written by Trevor Robinson *www.meteocercal.info Constructing the ‘RX’ (receiver) PCB In the last article (May) we built and programmed the TX unit, built the temperature/ humidity sensor and discussed suitable wind and rain instruments. This time we’re building the receiver (RX) unit – and getting it to send data to the Cumulus software on a PC. B asically, the RX unit’s job is to receive weather data from one or more TX units, processes it and passes it onto the Cumulus software which in turn displays it using one or more Wireless Display units. It emulates either the popular “Davis Vue Pro2” or the “Easyweather. dat” protocols; we are using the Davis Vue Pro2 protocol. It also gets the computer time sent from the Cumulus software and in turn passes it on to the Wireless Display unit(s) to update their clocks. The RX unit has its own DHT22 temperature/humidity sensor so it will display this data on its screen as well as pass on this data to Cumulus which can display/upload it as “Inside temp”. The RX unit can run one of a few different displays, which are selectable via the software. The options are: • 1.8” TFT based on the ST7735 module or • either a 20x4 or 16x2 alphanumeric LCD with an I2C module. Having more than one TX unit is handy if you have sen42  Silicon Chip sors in different locations. The reverse also applies, where you can use multiple RX units to receive data from one TX and it send it to different computers/software concurrently. User controls It doesn’t have many – two to be precise! VP1: one SPST toggle switch sets the run or program mode by switching in/out a pullup capacitor or resistor. Which one you have depends on the version of the serial adaptor chipset – CH340G (capacitor) or FTDI (resistor). The reason for this is the two chipsets have different reset line pullup requirements. Having the pullup set to on (Run) stops the RX unit restarting when the USB is connected. Having it off (Program mode) allows the WeatherDuino Pro2 RX firmware to be uploaded to the unit. PB1: This SPST momentary-action pushbutton switch is the display mode switch. It works in different ways depending on whether the display is an LCD or a TFT type. siliconchip.com.au Want a job as a weather forecaster? Everything you ever wanted to know about the weather is available from the WeatherDuino Pro2 and the “Cumulus” software package. The table below shows its functions. The information screen shows the firmware version, TX unit voltage and case temperature from the TMP36 sensor. The LED blinks each time the RX unit sends data to Cumulus. Construction Refer to the general construction tips in Part II (last month) if you have any queries. As usual, start with the lowest profile components first. Where you see the “(s)”, this is for the optional components required for the data relay function for the Wireless Display units. Install all the resistors but note that if you are using the recommended Nano with the CH304G chipset, you need to substitute a 100nF ceramic capacitor for R3 (the location is actually labelled R3/C3). Next, install the capacitor(s), followed by the LEDs. When installing the Nano, we suggest using a socket. The USB port faces the side of the PCB. However, if you PB1 Operation Button Action LCD TFT Short press Nothing Toggles the Display off/on Long press Nothing Toggles the big font size screen Double press     Toggles the information screen siliconchip.com.au want to solder direct to the PCB, stagger the soldering the pins to avoid heat build up in one area. Next to go in are all the headers, PCB pins, jumpers, sockets and RF connector(s), followed by the transistors. The RTC module, soldered next, should be flat to the board with the battery coin cell holder facing up. If your RTC came with right-angled pins, carefully unsolder them and put them aside (you may need them for the BMP pressure sensor) and solder it in using straight pins. Next up is the KXD - 10036 RF Transmitter Module (if fitting), then the BMP pressure sensor. Different mounting holes! Hopefully you purchased the suggested BMP180 instead of the older BMP085. They both work much the same way but the BMP180 now replaces the older BMP085. However, they have different pinouts so you MUST solder them onto the PCB in the right positions – with the SLC, SDA, VCC and GND pins aligning with the same points on the PCB (see photos below for the difference). Both will need right-angled pins (Aha! Now you know Mounting positions for the two types of pressure sensors: BMP180 on left, BMP085 on right. May 2015  43 RF_TX TX 3 10mF l LED1 4 ANT OUT A 2 A0/ DAT 0V REG1 7809 +9V 1 +9V 3 IN GND 16V POWER 2 1 J1 K 1.5k ANT TFT 1 2 RTC SCL 3 4 4 3 SDA 2x 4.7k 2 +5V 1 GND LCD SCL SDA 7 4 9 3 10 11 +5V 1 GND 6 8 2 +5V 5 12 13 SUP Vin 14 15 4 3 +9V SCLK MISO 3.3V MOSI CS A0/DAT D9 A1/PTT DAT A2 RST A3 SDA SCL DC GRAVITECH ARDUINO NANO D5 A6 D3 A7 D2 5V GND GND 1 29 2 28 3 27 4 26 5 25 6 24 7 23 8 22 D4 RESET 30 20 18 G 390W 17 10k A 120W 3 2 3 D Q2 2N7000 5 2 S 1 GND VP1 G 10k RST Vcc WP SO SI GND 1 +5V 2 4 CS SCK DHT22 10k 6 4 Vcc 2 +5V IC1 AT45DB011D 5 GND 100nF +3.3V 7 SCL PB1 l LED2 6 SDA 1 1 BMP180/ 085 Vcc LED+ LED– 2 K +5V GND +5V GND 10 S 1 +5V RST DC D 2 GND CS 19 16 Vin MOSI MISO 9 Q1 2N7000 21 SCLK D9 3 8 GND 4 1 7 4 GND RF1 +5V 3 2 JP1 +5V Vcc +3.3V SC Ó2015 3 +3.3V WEATHERDUINO PRO 2.0 RECEIVER K A D G S GND 7809 2N7000 LEDS 2 1 DAT 1 +5V GND IN GND 1 2 OUT 3 4 100nF Fig.1: here’s the circuit diagram for the RX unit. It’s very much the Ardunio Nano, some switching . . . and not much else. Once built, there’s some programming and setup to be done but nothing that is too difficult . RF2 +5V GND GND ANT ANT why you saved them earlier!). Solder on the right-angled pins and snip off any excess on the opposite side of the PCB. Double check they fit in the board and the correct pin assignment before soldering them in. The BMP module should be closer to the BX-RM06 module than the RTC module. Next install the BX-RM06 ASK OOF receiver module, paying attention it is the right way round by double checking the “DAT” pin goes into the “DAT” hole on the PCB. Next install the 7809 voltage regulator on its heatsink. Finally, connect you screen of choice (see below), switches. antenna(s) and temperature sensor. Connections to the remote PCBs are via headers and appropriate header connectors. TFT display: Use nine Dupont femaleto-female connectors to link the PCB pin headers to TFT pin headers. Currently the SD card and touch overlay are unused. Alphanumeric LCD: This is simpler as it only uses four wires. You can also use 44  Silicon Chip Voltage setting JP1 (beside the BMP module in the photos) needs to be set for the correct voltage for the BMP module - 5V in our case. The jumper header needs to short out pins 2 and 3, not pins 1 and 2). Screen connection information LCD Pinouts PCB LCD GND 5V SDA GND 5V SDA SCL SCL siliconchip.com.au VP1 10mF + Q2 10k 1.5k LED1 4 3 2 1 A 16V J1 TX ANT GRAVITECH ARDUINO NANO IC1 1 3 2 1 2N7000 WeatherDuino Pro2 RX+ v4.03 120W//100nF DHT22 LCD 10k 1 2 3 JP1 BMP180/085 PB1 390W 4.7k 4.7k SUP 100nF 1 2 3 4 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 2 10k 9 8 7 6 5 4 REG1 7809 1 2 A 10 4 3 2 1 1 2 3 4 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 2N7000 TFT Q1 LED2 7 6 RF1 5 4 3 2 1 RTC 4 3 2 1 1 2 3 4 ANT 1 2 3 4 RF2 Fig.2: full-sized RX PCB component layout. The blank PCB is shown at right for easy cross-referencing. four of the Dupont female to female wires to make life easy.   The backlight jumper needs to remain in place, but you may need to tweak the contrast potentiometer. Connecting the DHT22 temperature sensor Solder a w-way pin header set to one end of whatever length of cable (up to 5m) you require. Solder and heatshrink the other end to the four legs of the DHT22 sensor. Ensure the pin assignment matches the following table. You should now have a completed RX unit PCB that looks a lot like the DHT22 Temp. Sensor photo below. You may have noPCB Schematic Pin DHT 22 pins ticed in this photo GND 1 (GND) 3 OR 4 the RX unit being powered only by the DAT 2 (D6) 2 USB connection. You 5V 3 (5V) 1 may ask why a 12VDC supply was specified – why not simply run it form the USB (5V) line? The answer is that basically, the more voltage you supply (within reason!), the higher the signal strength radiated. So, if you want to use the data relay function, you must pow- er the RX unit from 12VDC, to achieve 9V (via the 7809 regulator). This in turn powers both the TX (transmitter) module as well as the Arduino, meaning it takes less power from your PC USB port. TFT pin assignment PCB TFT Display 2.4” TFT - ILI9341 320x240 SCK SCLK SCLK MOSI SDA SDI(MOSI) CS CS CS RST RESET RESET DC A0 D/C 5V VCC VCC GND GND GND LED+ LED+ LED LED- LED- No connection needed Configuring and programming the Arduino Nano It’s time to do some code hacking. Only this time you won’t get in any trouble for doing so (!). The completed RX unit, shown here with a wireless link and displaying the received data on a TFT screen. siliconchip.com.au May 2015  45 In Part 2 last month, when you programmed the TX unit, you installed everything you need to do this programming. If you have any trouble with the next steps, please re-read the part 2 instructions on programming the Nano. Plug the Nano into the same USB port you used to program the TX unit. If all is good the backlight will come on and the Nano’s LED will light but not much else will happen. If you use another USB port the host computer will probably create another COM port. You can check this in the Device Manager if necessary. Locate the WeatherDuino_Pro2_vXXX_XXXXXXXX folder in your arduino sketch folder. (The “Xs” will change depending on version). If you followed the instructions in part 2, it should be in the \users\your_username\documents\Arduino folder. Inside that folder there should be three folders. Open the WeatherDuino_RX_vXXX_bXXX and inside that folder should be WeatherDuino_RX_vXXX_bXXX.ino – double click that and it should open in the Arduino IDE. Make sure it is the file with RX in the filename. You should now see the Arduino IDE with the WeatherDuino Pro2 software open and ready for editing. will be called up, while the green entries are examples of what the variables can be (and in our case are) set to. // --- Define your Display type #define DisplayType   0   // Type 0= TFT, Type 1= LCD If you are using an alphanumeric LCD Screen change it to 1, (otherwise leave it as 0 [zero]): #define DisplayType   1   // Type 0= TFT, Type 1= LCD // --- Define TFT Blank timeOut byte   TFT_BL_Timeout  = 30; // Timeout for TFT backlight in minutes (1 to 255). 0 = Always ON This line sets the timer for the screen backlight (which is switched by transistor T1). If you want to manually switch it on and off using the short press of the screen mode button, change the timer to “0”. For example; byte   TFT_BL_Timeout  = 0; // Timeout for TFT backlight in minutes (1 to 255). 0 = Always ON // --- Some Data from your Weather Station location #define LATITUDE     0 // Put here your Station latitude in tenths of degrees north* #define LONGITUDE    0 // Put here your Station longitude in tenths of degrees east #define ELEVATION    0 // Put here your Station height above sea level in metres * As we are in the southern hemisphere, place a “–” (minus) sign before your latitude. If your longitude was west of Greenwich, you would similarly use a – sign. The Weather Station uses this location data to tell Cumulus where you are, so set it close to your actual location, within reason, but ensure you elevation is correct as it sets the Mean Sea Level pressure correctly. For the following example, we’ll use the location of the Sydney Opera House but set it to yours (unless, of course you are the Phantom of the Opera): You can get this information from Google Earth. #define LATITUDE -339 // Put here your Station latitude in tenths of degrees North #define LONGITUDE 1512 // Put here your Station longitude in tenths of degrees East #define ELEVATION 7 // Put here your Station height above sea level in Meters // --- Define Starting Hour of your Meteorological Day #define MeteoDay_HStart 0 // Use values from 0 to 23 You can drag the sides of the window to make it bigger and see the whole width of the text. Scroll down to around line 44 to see the section where it says // User configurable options start here. The “//” (comments) in the lines of code give a good clue to what each setting does. You may need to tweak some (like pressure), but see how it looks after the programming procedure first. Now we need to configure the following lines to suit your custom configuration. The blue entries below show the variable to be set as it 46  Silicon Chip The Australian Bureau of Meterology (BOM) uses a day start of 9am, so for consistency we should too. #define MeteoDay_HStart 9 // Use values from 0 to 23 // --- Define Wind Speed and Wind Gust resolution #define VP2_WindRes 2 // If set to 2, set Cumulus Wind Speed and Wind Gust multipliers to 0.448. Wind Resolution 0.72km/h // If set to 1, set Cumulus Wind Speed and Wind Gust multipliers to 0.224. Wind Resolution 0.36km/h siliconchip.com.au     // WARNING !!! Setting this variable to 1 allows a better wind speed and gust resolution, // but also limits both of them, to a maximum reading of just 91.8km/h // This setting only has effect when the software is used in Davis VP2 emulation mode This one is bit of a trade-off, due to the Davis protocol measuring wind speed resolution to 1 mile per hour. If you don’t expect winds higher than 91.8km/h and want better resolution set to 1 otherwise leave it at 2. Note that a wind speed of 91.8km/h is very high – it corresponds to a “storm” rating (stronger than a gale but less than a hurricane) or a “10” on the Beaufort scale. Such windspeeds on land in Australia are relatively rare. #define VP2_WindRes 2 // --- Define type of your outside temperature / humidity sensor #define TH_OutSensor 1 // 0 for SHT21 sensor, 1 for SHT1x or DHT22 sensor, Only change this if you splashed out and purchased the expensive SHT21 sensor. So leave it as : #define TH_OutSensor 1 // ---- Defines the source and sensors we want to receive // ---- If you have all the sensors connect to only one TX board, always select Unit 0 #define TH_OutUnit    0 // 0 for Temp/Hum sensor connected to TX_Unit 0, 1 for Temp/Hum sensor connected to TX_Unit 1 #define WIND_OutUnit 0 // 0 for Wind instruments connected to TX_Unit 0, 1 for TX_Unit 1, 2 for Auriol RF Odometer #define RAIN_OutUnit 0 // 0 for Rain Gauge connected to TX_Unit 0, 1 for TX_Unit 1, 2 for Auriol RF Rain Gauge #define SRUV_OutUnit 0 // 0 for Solar Radiation / UV sensors connected to TX_Unit 0, 1 for TX_Unit1 You would only change these if you had more than one TX unit, so leave them as they are. So that’s the configuration done. Do a “save as” from the File menu, give it a sensible (and memorable) filename so you know it’s your custom configuration. Check you have VP1 set to off (program mode) to disable the reset pull up and click the right arrow button to upload it to the RX unit. After a minute or so you should see some life. After another little while you should see your inside data, followed briefly after, by the outside data (if your TX unit is operating). Configuring Cumulus to work with WeatherDuino Pro2 WeatherDuino Pro2 supports the excellent Cumulus software from Sanday Software. However only version 1 is supported at the moment. Sanday Software have a multi-platform version in beta testing (Cumulus MX) and the WeatherDuino does work in this beta release but it is not yet released for public use, so we won’t be covering that version here. Cumulus can upload to Weatherunderground, your own weather website and a range of other internet services, including Twitter. It also has its own built-in website ready siliconchip.com.au for you to upload to your own web hosting service. We are only going to cover getting our weather data into Cumulus and displaying it on a Windows PC here - if we tried to write up the Cumulus web info this article would end up bigger than Ben-Hur! But if you are interested in the Internet-related features, the built in help files have all the information necessary to do it and failing that, the Sanday Software website has a wealth of information and a good FAQ area. Download Cumulus from here: http://sandaysoft.com/ downloads Grab the latest stable build (currently Cumulus 1.9.4 build 1099 at the time of writing). Incidentally, while Cumulus is a free download, we encourage you to donate to the author Steve, in order to keep the software licence-fee free and encourage ongoing development! You will need the correct Nano serial adaptor driver installed; the same you used in the Arduino IDE. Right click the CumulusSetup.exe downloaded in the above step, and select “Run as Administrator“ It is recommended you install it in a folder of the root of a drive – eg, C:\Cumulus. That way, system file permissions don’t cause problems on modern Windows Operating Systems. Tick the HTML templates if you want the website template files in the future. Click next a few times, then the install button. When it says “finished” and “Launch Cumulus”, do so. The first time it is run, it will take you to the Station Settings page to setup your weather station. Station settings and settings We’ve shown the settings screen grab overleaf. It is important to use the exact Station Settings and Settings shown, as these are what the WeatherDuino Pro2 requires. It is also important to get the “Units” section correct at first use. If you change the Units later the data will be wrong. The COM port needs to be set to what the Nano uses (as shown in the Device Manager). Set “roll the logs over” at 9am. The other stuff isn’t necessary for WeatherDuino to talk to Cumulus but it is for a fully functional weather station. So at least change your location and altitude to suit, as this sets the local daytime Almanac correctly. In the example picture, it is set to the Sydney Opera House. Your will need to find your yearly rain by yourself. It can be found at the BOM site (choose the location nearest you) or by looking at other weather stations online. The Cumulus Forecaster This uses the Zambretti Forecaster method and pressure extremes. From experience, it isn’t very accurate and should not be relied upon. If you can “dial in” the pressure extremes you can get reasonably good results but there are better tools for websites, such as BT’s Global Sager Weathercaster PHP Scripts For Cumulus. When your Station Settings agree with the screen grab below (obviously with your local data), click OK. The Software should now start initialising communications with the RX unit. Calibration settings Now we need to set the Calibration Settings to match the config in the RX config. Click Configuration at the top May 2015  47 The above screen grab shows our “Station Settings” – yours should look very similar apart from your specific location details. The calibration settings (below) should be identical unless you have specific reason for changing them. of the window, then Calibration. When we did the config steps before uploading it to the RX unit, we suggested sticking with the default for the wind multipliers which were: Default resolution (0.72km/h): Set Wind Speed and Wind Gust Cumulus multipliers to 0.448. Set the calibration multipliers to this as well. Also set the Rainfall multiplier to 1.5. All the other multipliers should be left at 1. Your Calibration Setting page should look like the screen grab opposite. Click OK – and you’re finished! The WeatherDuino Pro2 RX should be reporting data to Cumulus. If you want to see your weather station on the internet, as a minimum you should look at setting up a Weatherunderground station ID and upload data to that. it is easy to do, free and might even kick off the amatuer meteorologist in you. Notes: Cumulus should always be run as an Administrator so right click the icon on the desktop or cumulus.exe and select “Run as Administrator” when opening the software. The RX unit has a USB communication start-up delay built in, to allow the 433MHz link to link up, get data from all sensors and also do some background computations that require some time. After each reset or power on, it may take up to three minutes before you can start Cumulus (if you launch Cumulus before waiting that time, connection will fail). SC 48  Silicon Chip siliconchip.com.au