1

I tried to build a weather station with anemometer and My setup is, SwitchDoc Labs' anemometer kit (which is equivalent to sparkfun anemometer kit) connected to the grove weather-pi board with rtc clock DS3231 installed on which is connected to arduino UNO.

According to http://www.switchdoc.com/wp-content/uploads/2016/07/WeatherBoard_CurrentSpecification.pdf and their official tutorial https://www.switchdoc.com/2015/01/weather-arduino-weatherpiarduino/, if I use grove weather-pi board's JP2 connections to connect to the UNO/Mega2560 board then it suggests as following (in my case its UNO)

diagram 1 1 diagram 2 2

GroveWeatherPi_board    Mega        Uno     Units
    JP2/1 ->            A0          A0      WindVane
    JP2/2 ->            D2          D3      RainBucket
    JP2/3 ->            D5          D2      Anemometer  
    JP2/4 ->            GND         GND     GND

And the supposedly working sketch/library is https://github.com/switchdoclabs/SDL_Weather_80422 which only compiles on arduino-IDE without issue if I use the fork https://github.com/soligen2010/Adafruit_ADS1X15 instead of the original https://github.com/adafruit/Adafruit_ADS1X15 with it but even then the wind-speed and wind-direction unit or to say the whole anemometer part just do not work or in other words, do not give any reading. I have tested the units individually up to the arduino pins with LED light on breadboard, they are sending signals/responding and also mounted the whole project on a Mega2560 as well but results remained unchanged.

I am assuming the pin-outs defined in the https://github.com/switchdoclabs/SDL_Weather_80422 are messed up then but how to redefine it in the sketch/library because in the ino sketch file, these are the pin-out definitions for primarily Mega2560

#define pinLED     13  // LED connected to digital pin 13
#define pinAnem    18  // Anenometer connected to pin 18 (not used in the diagram!) - Int 5 - Mega   / Uno pin 2
#define pinRain    2   // Anenometer connected to pin 2 - Int 0 - Mega   / Uno Pin 3 
#define intAnem    5   // int 0 (check for Uno), according to the above two diagrams' comparison, for UNO this pin also goes to the pin 2
#define intRain    1   // int 1 (not used in the diagram! Then why? Its a TX pin)

Where the pinAnem and intAnem both indicates pin 2 for UNO according to the above two diagrams.

When I connect the I2C vcc pin from grove-weather-board to UNO's 5 volts instead of 3.3 volts as shown, the wind direction gets fixed but still no wind-speed reading.

So what are the corrections I need to do in the SDL_Weather_80422 library or in the connection diagram in this case?

  • This sketch successfully computes only the wind direction though github.com/sparkfun/Weather_Shield/blob/master/Firmware/… after disabling the extra headers. – Pavel Sayekat Mar 4 at 20:23
  • why do you feel that you need to modify the library?? – jsotola Mar 4 at 21:20
  • @jsotola according to any of the diagrams above, have you noticed any A0 definition in the library? I don't, that's why. – Pavel Sayekat Mar 4 at 22:00
  • 1
    this library github.com/switchdoclabs/SDL_Weather_80422 (last link in your question) has this command line in the example sketch SDL_Weather_80422 weatherStation(pinAnem, pinRain, intAnem, intRain, A0, SDL_MODE_INTERNAL_AD); .......... A0 is the analog pin for the direction data ..... the other two data pins are also represented – jsotola Mar 5 at 2:43
  • 1
    both the anemometer and the rain bucket sensors are simple switches ..... write a simple sketch that reads the switch state and light LED (pin13) if the switch is activated and turns off LED if switch is not activated...... do that for each of the switches separately – jsotola Mar 5 at 2:48
0

According to the above setup only rain bucket unit works.

And as jsotola mentioned both the anemometer and the rain bucket sensors are simple switches, so a simple sketch can be written that reads the switch state and light LED (pin13) if the switch is activated and turns off LED if switch is not activated and that can be done for each of the switches separately.

But instead I took a shortcut.

Fixes:

  1. The wind vane part (on analog pin A0) starts working only when I connect the I2C vcc pin to 5 volts pin instead of 3.3 volts pin of UNO.

  2. Had to ditch the https://github.com/switchdoclabs/SDL_Weather_80422 library's wind_speed reading method and adopting and merging into the http://cactus.io/hookups/weather/anemometer/davis/hookup-arduino-to-davis-anemometer-wind-speed code and adding up the wind_gust function from https://github.com/sparkfun/Weather_Shield/blob/master/Firmware/Weather_Shield_Weather_Station_V12/Weather_Shield_Weather_Station_V12.ino makes the anemometer with rain-bucket with the exact same setup fully functional.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.