Raspberry Pi Python Software Released: WeatherRack / WeatherPiArduino

Raspberry Pi Python Software Released: WeatherRack Sensors / WeatherPiArduino

Want to build your own Weather Station?

We have been working on the release of the Python Raspberry drivers for the WeatherPiArduino WPA-RaspberryPiB+_bbLogoand the WeatherRack Weather Sensors from SwitchDoc Labs.  The drivers and demo software are now on github.com/switchdoclabs/RaspberryPi-WeatherPiArduino .  Below are some results of the WeatherRack running the WeatherPiArduino software on a Raspberry Pi.  Arduino drivers are also available.

How To Buy

SwitchDoc Labs is now shipping the WeatherRack Weather Sensors and the  WeatherPiArduino Weather board. They are now available on the SwitchDoc Labs Store, Amazon and Tindie.com.

The Drivers and Demo Software

Weather
WeatherPiArduino Block Diagram

These drivers support:

BMP180 (Barometer / Temperature)- Included

DS3231 (Real Time Clock) – Included

AT24C32 (EEPROM) – Included

ADS1015 (12 bit ADC)

AS3935 (MOD-1016 – Lightning Detector)

HTU21D-F (Humidity)

FRAM (32KB Fast Non-Volatile Storage

 

WeatherRack Weather Sensors

The inexpensive WeatherRack Weather Sensors are a set of sensors designed to measure your local

WeatherRack Weather Sensors
WeatherRack Weather Sensors

weather conditions. It is designed to interface with either your own board, or combine it with the  SwitchDoc Labs WeatherPiArduino board (available on SwitchDoc.com) to add a Barometer, Temperature Sensors, Real Time Clock, and optionally:  Lightning Sensor / Humidity / ADC.  You can also use the WeatherPiArduino with Argent Data Systems and Sparkfun Weather Meters

 

Software Output From WeatherPiArduino Test Program

You can see the wind speed, gust and wind direction from the WeatherRack. You can also

Weather
WeatherPiArduino and Raspberry Pi B+

see the WeatherPiArduino DS3231 clock, BMP180 Barometer, the HTU21D-F, the Lightning Detector, the AT24C32 EEPROM and the FRAM.  Note the following interesting things:

1) Three Thermometers, three  temperatures – We trust the BMP180

  • BMP180 – 21.4 C
  • DS3231 – 21.5 C
  • HTU21D – 22.4 C

2) The AS3953 Lightning Detector detected Lightning!  That’s because we have a lightning simulator that we can do close, medium and far away lightning.

WeatherPiArduino Demo Software Version 1.0
Program Started at:2015-02-16 03:50:09

---------------------------------------- 
----------------- 
 WeatherRack Weather Sensors
----------------- 
Rain Total= 0.01 in
Wind Speed= 2.09 MPH
MPH wind_gust= 2.54 MPH
Wind Direction= 180.00 Degrees
Wind Direction Voltage= 0.933 V
----------------- 
----------------- 
 DS3231 Real Time Clock
----------------- 
Raspberry Pi= 2015-02-16 03:50:09
DS3231= 2015-02-16 03:50:09
DS3231 Temperature= 21.50 C
----------------- 
----------------- 
 AT24C32 EEPROM
----------------- 
writing first 4 addresses with random data
address = 0 writing value=192
address = 1 writing value=237
address = 2 writing value=36
address = 3 writing value=29
----------------- 
reading first 4 addresses
address = 0 value = 192
address = 1 value = 237
address = 2 value = 36
address = 3 value = 29
----------------- 
----------------- 
 BMP180 Barometer/Temp/Altitude
----------------- 
Temperature = 21.40 C
Pressure = 95.00 KPa
Altitude = 522.71 m
Sealevel Pressure = 95.20 KPa
----------------- 
----------------- 
 HTU21DF Humidity and Temperature
----------------- 
Temperature = 22.40 C
Humidity = 40.30 %
----------------- 
----------------- 
 AS3953 Lightning Detector 
----------------- 
Last result from AS3953:
Lightning: Lightning Detected 1km away. (03:50:10 - 2015/02/16)
Lightning Count = 1
----------------- 
----------------- 
 FRAM Byte Read Test 
----------------- 
writing first 3 addresses with random data
address = 0 writing value=87
address = 1 writing value=116
address = 2 writing value=86
----------------- 
reading first 3 addresses
address = 0 value = 87
address = 1 value = 116
address = 2 value = 86
----------------- 
----------------- 

23 Comments

  1. Please create a detailed construction document for this weather station project (including lots of pics)! 🙂

  2. Dear John,

    How can I run on Raspberry Pi? Do you have a Python code ?

    Thanks

    • Yes, you can use WeatherRack on the Raspberry Pi using Python. Look at the Python library mentioned in this article.

      John

  3. I just purchased the weatherpiaudrino and the weatherrack sensors. I am trying to get those two things working with my pi without anything else and then I will start to add things as I go along.

    Do I need to solder the DS3231 to the board? Do I need to add anything else to the board for this to work?

    I was going to start with the software you have graciously provided here: https://github.com/switchdoclabs/WeatherPi

    Thanks in advance
    Hans

    • Hans,

      You can put in a socket and plug the DS3231 into the board. If you solder it make sure that you have it oriented correctly!

      There is nothing else REQUIRED to make it work. If you are using a Pi, you will get much better wind vane accuracy by adding an ADS1015 (from Adafruit) onto the board.

      Best regards,

      SDL

  4. I may have answered my question above, I was able to get the BMP180 barometer temp and altitude readings, but not the wind speed/direction or rain information. When I run SDL_Pi_Weather_80422Test.py I get all zero’s. I saw that there were gpio pin numbers in there anenometerPin = 23 and rainPin = 24, but I don’t see those gpio’s in the wiring diagram you have above for the pi. They seem to be connected to GPIO 15 and 18? Can you help me out here? Thanks!

  5. Hi SDL,

    I have all the devices connected but when i run the test script i get this:

    WeatherPiArduino Demo / Test Version 1.0 – SwitchDoc Labs

    Program Started at:2016-02-02 12:36:54

    —————————————-
    —————–
    WeatherRack Weather Sensors
    —————–
    Rain Total= 0.00 in
    Wind Speed= 0.00 MPH
    MPH wind_gust= 0.00 MPH
    Wind Direction= 0.00 Degrees
    Wind Direction Voltage= 3.294 V
    —————–
    —————–
    DS3231 Real Time Clock
    —————–
    Raspberry Pi= 2016-02-02 12:36:54
    DS3231= 2016-02-02 12:36:54
    DS3231 Temperature= 28.00 C
    —————–
    —————–
    AT24C32 EEPROM
    —————–
    writing first 4 addresses with random data
    address = 0 writing value=240
    Traceback (most recent call last):
    File “./WeatherPiArduino.py”, line 182, in
    ds3231.write_AT24C32_byte(x, value)
    File “./RTC_SDL_DS3231/SDL_DS3231.py”, line 242, in write_AT24C32_byte
    self._bus.write_i2c_block_data(self._at24c32_addr,a1,[a0, value])
    IOError: [Errno 5] Input/output error

    Help appreciated.

    Thanks

    Luke

    • Hi Luke,

      We suspect that you have a board that has a different I2C address for the AT24C32 EEPROM.

      run ‘sudo i2cdetect -y 1’

      0x68 is the DS3231 and 0x56 is the AT24C32. Note that on some of the new revision boards the AT24C32 address is 0x57. Change the address of the AT24C32 to 0x57 if this is the case.

      SDL

      • Hi SDL,

        Thanks for the reply.

        Not sure i follow. My AT24C32 looks to be at 0x57. Do you mean to change it to 0x56?

        0 1 2 3 4 5 6 7 8 9 a b c d e f
        00: 03 — — — — — — — — — — — —
        10: — — — — — — — — — — — — — — — —
        20: — — — — — — — — — — — — — — — —
        30: — — — — — — — — — — — — — — — —
        40: 40 — — — — — — — 48 — — — — — — —
        50: — — — — — — — 57 — — — — — — — —
        60: — — — — — — — — 68 — — — — — — —
        70: — — — — — — — 77

  6. Oh sorry no – i changed it from 0x56 to 0x57 and it now works. It’s not picking up wind speed but i haven’t looked into that yet. Cheers

  7. Hmmm so i have looked into it and can’t find anything wrong with the Anemometer. I have the Spark Fun weather sensors. The Anemometer is patched via the Wind Vane which is connected to JP2. Readings are always 0 even with movement.

    Any ideas?

    Thanks

    Luke

    • Verify that the anemometer is closing. If it is, then you probably have a wiring error. Check which gpio you have connected to the anemometer and that it matches the code.

      SDL

  8. hi, i have a problem, i have the WeatherRack Weather Sensors and the WeatherPiArduino Weather board. I try to run SDL_Pi_Weather_80422Test.py. I downloaded these drivers https://github.com/switchdoclabs/SDL_Pi_Weather_80422 but when I try to run this error message

    pi@raspberrypi ~/SDL_Pi_Weather_80422-master $ sudo python SDL_Pi_Weather_80422Test.py
    Traceback (most recent call last):
    File “SDL_Pi_Weather_80422Test.py”, line 20, in
    import SDL_Pi_Weather_80422 as SDL_Pi_Weather_80422
    File “/home/pi/SDL_Pi_Weather_80422-master/SDL_Pi_Weather_80422.py”, line 20, in
    from Adafruit_ADS1x15 import ADS1x15
    File “./Adafruit_ADS1x15/Adafruit_ADS1x15.py”, line 5, in
    from Adafruit_I2C import Adafruit_I2C
    File “./Adafruit_ADS1x15/Adafruit_I2C.py”, line 1
    ../Adafruit_I2C/Adafruit_I2C.py
    ^
    SyntaxError: invalid syntax

    There are some tutorial to make the whole process ? or am I doing wrong ?

    Thanks. Gracias

Comments are closed.