Introduction: Arduino GPRS Weather Station - Part 2: Upgraded Wind Sensors and Improved Energy Efficiency

Picture of Arduino GPRS Weather Station - Part 2: Upgraded Wind Sensors and Improved Energy Efficiency

In my continuing efforts to control my island's weather I have rebuilt my GPRS weather station with upgraded 'industry standard' calibrated wind sensors and made several significant improvements for better energy efficiency.

This weather station is now a lot more accurate and uses three Arduinos working together to reduce power consumption, which is important as the whole system runs off a small solar panel. But surely using more microprocessors would use more electricity, not less?

"Not so", replies Tecwyn Twmffat, since we have one small Arduino switching all the unnecessary sensors and other modules off until they are needed. What's the point of taking temperature and pressure readings every five seconds? There is none! ........ So turn them all off! ........ Actually, the only sensors that do need to be working 24/7 are the anemometer and the rain gauge, which will quite happily run on one tiny, miniscule, ultra low power Arduino Nano.

This instructable is the latest stage in on going project that has it's development history in five other previous projects:

Step 1: Features

Picture of Features
  • Anemometer (calibrated)
  • Wind vane (low torque, low energy, high accuracy)
  • GPRS 2G data transmission
  • Power saving 'sleeping Arduinos'
  • Power saving buck convertor 12v to 5v supply
  • Soil moisture
  • Soil temperature
  • Air humidity
  • Pressure
  • Rain
  • Outside temperature
  • Battery voltage
  • Forecasting by calculating pressure swing
  • Webpage data display
  • Autonomous solar powered - no wifi or grid power required
  • Removable TFT display for debugging

Step 2: Parts

Picture of Parts
  • 3/4" overflow pipe stainless steel filter
  • ANT1 Antenna
  • Arduino Nano Rev3.1
  • Adafruit Atmega32u4 Breakout Board variant variant 6; part # Operates
  • 1.8" TFT screen
  • BATT1 LiPoly Battery (1300mAh)
  • C1 Electrolytic Capacitor voltage 16V; package 100 mil [THT, electrolytic]; capacitance 470µF
  • C2 Ceramic Capacitor voltage 6.3V; package 100 mil [THT, multilayer]; capacitance 100nF
  • C3 Electrolytic Capacitor voltage 16V; package 100 mil [THT, electrolytic]; capacitance 100µF
  • C4 Ceramic Capacitor voltage 6.3V; package 100 mil [THT, multilayer]; capacitance 100nF
  • C5 Electrolytic Capacitor voltage 16V; package 100 mil [THT, electrolytic]; capacitance 1µF
  • C6 Ceramic Capacitor voltage 6.3V; package 100 mil [THT, multilayer]; capacitance 100nF
  • D1 Rectifier Diode package 300 mil [THT]; type Rectifier; part # 1N4001
  • DS1 DS18B20 1-Wire Temperature Sensor Probe Cable
  • J1 Screw terminal - 3 pins package THT; pins 3; hole size 1.0mm,0.508mm; pin spacing 0.137in (3.5mm)
  • J2 Piezo Speaker
  • J3 Screw terminal - 3 pins package THT; pins 3; hole size 1.0mm,0.508mm; pin spacing 0.137in (3.5mm)
  • J4 RJ11 Jack package rj11-6; variant pth; target
  • RJ-11; part # RJ11 Rain Gauge
  • J5 Screw terminal - 2 pins package THT; pins 2; hole size 1.0mm,0.508mm; pin spacing 0.137in (3.5mm); part # Soil Probe Part1
  • Adafruit FONA - Mini Cellular GSM Breakout variant UFL Part2
  • Arduino Mega 2560 (Rev3) type Arduino MEGA 2560 (Rev3) Part3
  • Arduino Nano (Rev3.0) type Arduino Nano (3.0); part # MASTER Part4
  • BME280 Breakout variant BME280; power 3.3V Part5
  • VERTER 5V USB Buck-Boost variant screw Power plug1 Power plug
  • Q1 NPN-Transistor package TO92 [THT]; type NPN (ECB)
  • R2 100Ω Resistor package THT; tolerance ±5%; bands 4; resistance 100Ω; pin spacing 400 mil
  • R3 200Ω Resistor package THT; tolerance ±5%; bands 4; resistance 200Ω; pin spacing 400 mil
  • R4 10kΩ Resistor package THT; tolerance ±5%; bands 4; resistance 10kΩ; pin spacing 400 mil
  • R5 10kΩ Resistor package THT; tolerance ±5%; bands 4; resistance 10kΩ; pin spacing 400 mil
  • R6 Rotary Potentiometer (Small) package THT; track Linear; size Rotary - 9mm; type Rotary Shaft Potentiometer; maximum resistance 1kΩ
  • R7 4.7kΩ Resistor package THT; tolerance ±5%; bands 4; resistance 4.7kΩ; pin spacing 400 mil
  • R8 1kΩ Resistor package THT; tolerance ±5%; bands 4; resistance 1kΩ; pin spacing 400 mil
  • R9 100kΩ Resistor package THT; tolerance ±5%; bands 4; resistance 100kΩ; pin spacing 400 mil
  • R10 10kΩ Resistor package THT; tolerance ±5%; bands 4; resistance 10kΩ; pin spacing 400 mil
  • R11 10kΩ Resistor package THT; tolerance ±5%; bands 4; resistance 10kΩ; pin spacing 400 mil
  • S1 SWITCH-MOMENTARY-2 package reed_switch_plastic; variant pth_reed2; part # Rain guage
  • TFT2 1.8" TFT Display with uSD
  • U3 RELAY package relay-jzc; variant pth4
  • U7 RELAY package relay-jzc; variant pth4
  • U8 RELAY package relay-jzc; variant pth4; part # Finder 30.22.7.005.0010

Step 3: How It Works

Picture of How It Works

Improved energy efficiency is achieved by using more energy efficient sensors, especially the wind vane, and swapping out the old power regulator with a 'buck convertor' switching type. The old regulator used to get fairly hot and heat = energy loss ....... The buck convertor does not get hot!.......... Improved coding has allowed complex float numbers to be communicated between the Arduinos via the I2C bus, which gives accuracy to 2 decimal places.

Of the three Arduinos in this design, one just operates the TFT screen and can be removed after all debugging has been done. The small, second, 'Master' Nano takes readings of wind speed via the Arduino 'pulse in' command and rainfall is monitored on an 'interrupt' so that not a single drop of rain is ever missed. The other interrupt on the master monitors a call back from the Arduino Mega slave, which tells it when data has successfully been transmitted to the Interweb. On successful transmission, the values for wind speed, wind direction, volts and rainfall are reset to zero. If transmission fails for any reason, wind speed and rain are kept in the memory for the next transmission attempt so no important data is ever lost. The third Arduino, a Mega 2560, controls the FONA GPRS module and other sensors such as humidity, pressure and temperatures.

Eventually, the data ends up being displayed on a web page HERE .

Details about setting up the database, creating PHP files and using AmCharts are explained in this instructable HERE .

Step 4: Schematic

Picture of Schematic

I made a conscious effort to update the schematic every time I added a new component or connection to the prototyping board so, in theory, a custom PCB could be produced if there was any interest from other people. At the least, this whole project could be easily replicated by using the parts list, schematic and the code files attached.

Step 5: Code

Picture of Code

There are 3 sets of code for this project, one of the TFT screen Nano, another for the master Nano and the last for the slave Mega.

The following code snippet shows how the energy hungry Mega and Fona modules are turned off after the data has been transmitted via GPRS. The schematic snippet shows the actual connection between D5 and D2 - coloured orange.

void callbackSuccessful()
   {
   while (degree<362)           // Set all 362 values to zero.
     {
     addingDirection[degree] = 0;
     degree++;
     }
   if (z>(cycleTimeSet +3))   // This stops the callback from coming on at start of program or when mega is turned on.
   {
   Serial.println("");       
   Serial.println("GPRS transmission was successful");
   Serial.println("");
   delay(1000);
   digitalWrite(7,LOW);  // Turn off Mega and Fona.
   alcoholX=1;
   delay(1000);
   z=0;
   knotsMax =0;
   knotsAv =0;
   runningTotal =0;
   rainResult=0;
   result107=0.00;
   finalDirection =0.00;
   modeSize=0;
   degree=0;
   small=0;
   big=0;
   previousCycleTime = cycleTime;
   totalVolts = 0;
   avVolts = 0;
   }
   }

Step 6: Metal Work

Picture of Metal Work

A heavy steel frame was made for the wind sensors so that the whole system can be bench tested outside over a period of several months to make sure that there are no long term errors lurking in dark corners.

Eventually the sensors will be mounted on a tall pole to get maximum exposure to the elements. Watch out for part 3!

Step 7: Final

Picture of Final

Since most of this project was already achieved in previous incarnations, it was relatively easy to put together and very satisfying to see the schematic become more succinct and the code become more developed and functional.

I thought it would be a good idea to analyse the overall power consumption as the Fona lithium polymer battery discharges and charges cyclically. I visualised a nice graph being produced form current and voltage data to give energy used over a ten or fifteen minute cycle, just to see how well my energy efficiency improvements have worked (or not) compared to the previous version.

The first rather chaotic graph was produced whilst trying to work through a few bugs, one of which was that I could not understand why the weather station was using so much power - it should be about 30mA with everything in a steady state condition. Eventually I diagnosed that the power supply itself was faulty and replaced it with a slightly different type. The green graph shows it working perfectly with nice peaks and plateaux and plenty of noise! The average current over a 10 minute cycle came out at 46.74mA at 11.98 volts which gives 0.560 watts, which is a big improvement on the old system (78.46mA). There's probably a whole load of things that I can tweak to get this value down a bit more - mostly, I suspect, by tweaking the code.

Bench testing is now over and the weather station now lives in a field, fully exposed to the elements, eagerly awaiting the next storm, flood or heat wave. Details about the pole and supporting cables are here:

https://www.instructables.com/id/Arduino-GPRS-Weather-Station-Part-3-Hardware-Upgra/

Comments

kd7eir (author)2017-04-15

Interesting project, but I have a concern with Vector that they refuse to provide prices until they have an opportunity to probe how much they think you are willing to pay. That is incredibly maker unfriendly. Reputable companies are more than willing to put their prices on public display. Nonetheless, your work is exemplary and I thank you for it

Tecwyn Twmffat (author)kd7eir2017-04-16

Thanks you kd7eir. Sorry to hear you can't get a price out of vector instruments - it's common business practise and yes extremely frustrating for the maker community. However, I have seen them on ebay new/second hand for £50 GBP. (About $75).

Something Special For Those Weather´s Lover Watchers!!!

GREAT JOB!!!!

But We Can MINIMIZE COSTS Of The Building Developing Other Types Of Circuits And Meteorological Devices... THANKS!!!

Stephen LEE (author)2017-01-18

Wow! That's cool!

Thank you!

Durham2010 (author)2016-12-18

Sorry to be the bearer of bad news, but Vector Instruments devices are _very_ expensive. I would doubt you could find the anemometer for under £250 - probably more like £350-400 nowadays, and similar for the wind vane sensor. You might find them second hand, but would probably have to replace the bearings, which needs to be done regularly in any case. Their big advantage is that they have been in production for ~40 years, so all the failure modes and quirks are known.

One of the items currently on ebay is almost certainly brand new! (99% sure).

There's a Vector Instruments anemometer on ebay for £55:

http://www.ebay.co.uk/itm/WIND-SPEED-VECTOR-INSTRUMENTS-A100K-HE4-PULSE-OUTPUT-ANEMOMETER-/282293262755?hash=item41b9fd59a3:g:0wAAAOSwMtxXrwE9

DIY Electronic (author)2016-12-16

Great project! Thanks for sharing!

You're very welcome.

barkman1 (author)2016-12-14

cool project, what was the cost to build?

Tecwyn Twmffat (author)barkman12016-12-14

Not exactly sure ..... Maybe £200? Vector instruments kindly donated the wind vane and anemometer for free.

sumondigi (author)2016-12-13

cool & perfect,.

Tecwyn Twmffat (author)sumondigi2016-12-13

Thanks!

About This Instructable

25,808views

346favorites

License:

Bio: Ugly pirate roaming the seas in search of Treasure.
More by Tecwyn Twmffat:☠Weedinator Part 1: Drive Mechanism☠Arduino Cell Phone 4G Signal Booster / Repeater Part 1Simple Manual Arduino 4 Axis Stepper Motor / 16 Channel LED Power Controller
Add instructable to: