Tutorial: Part 7 -Building a Solar Powered Raspberry Pi Weather Station – GroveWeatherPi

GroveWeatherPi

Tutorial: Part 7 -Building a Solar Powered Raspberry Pi Weather Station – GroveWeatherPi

The Raspberry Pi is a fabulous device to on which to build your projects.    The GroveWeatherPi project is designed to show the capabilities of this computer while remaining accessible to a diverse Maker community.

GroveWeatherPi is a Solar Powered Raspberry Pi WiFi connected weather station designed for Makers by SwitchDoc Labs ( www.switchdoc.com). This is a great system to build and tinker with. All of it is modifiable and all source code is included.

This tutorial for building your own Solar Powered Weather Station based on the Raspberry Pi consists of 14 parts.

[include-page id=”gdplinks”]

Building the Box

As with most projects, we tend to “breadboard” the circuitry before we put it into the GroveWeatherPienclosure. With GroveWeatherPi, we spread out the parts, wired them up, made sure each of the major paths worked (and of course, took the obligatory nighttime geek shot) and then started placing them in the box, attaching them velcro to the sides, bottom and top of the box.

 

Once you have it breadboarded you can run the following test.

On your Raspberry Pi install the github archive github.com/switchdoclabs/SDL_Pi_GroveWeatherPi .

Do the following:

cd SDL_Pi_GroveWeatherPi

cd SDL_Pi_TCA9545

sudo python testSDL_Pi_TCA9545.py

Test SDL_Pi_TCA9545 Version 1.0 - SwitchDoc Labs

Sample uses 0x73
Program Started at:2016-08-13 18:52:00

-----------BUS 0-------------------
tca9545 control register B3-B0 = 0x1
ignore Interrupts if INT3' - INT0' not connected
tca9545 control register Interrupts = 0x0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- 3c -- -- -- 
40: 40 -- -- -- -- -- -- -- 48 -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- 57 -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- -- 
70: -- -- -- 73 -- -- -- 77                         

-----------------------------------

-----------BUS 1-------------------
tca9545 control register B3-B0 = 0x2
ignore Interrupts if INT3' - INT0' not connected
tca9545 control register Interrupts = 0x0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          03 -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- 73 -- -- -- --                         

-----------------------------------

-----------BUS 2-------------------
tca9545 control register B3-B0 = 0x4
ignore Interrupts if INT3' - INT0' not connected
tca9545 control register Interrupts = 0x0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: 40 -- -- -- -- -- -- -- 48 -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- 73 -- -- -- --                         

-----------------------------------

-----------BUS 3-------------------
tca9545 control register B3-B0 = 0x8
ignore Interrupts if INT3' - INT0' not connected
tca9545 control register Interrupts = 0x0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- 73 -- -- -- --                         

-----------------------------------

If your display matches the above, you have correctly wired your GroveWeatherPi.  If some devices are missing, look up the devices above in the I2C Address chart and check their wiring.  Always shut down and turn your Raspberry Pi off before changing wiring.

Putting the GroveWeatherPi into the BUD Industries box is pretty straight forward. We chose to put the solar power part of the circuit on top and the Raspberry Pi and the WeatherPiArduino Sensor array in the box bottom. The parts were all placed and then all the screw holes and outside screws were sealed with silicon caulking.

5 Comments

  1. When I attempt to test the wiring, I continue to get the following error with the test software. I’ve double checked the wiring and tested the software installations. I must be missing something obvious.

    pi@raspberrypi:~/SDL_Pi_GroveWeatherPi/SDL_Pi_TCA9545 $ sudo python testSDL_Pi_TCA9545.py

    Test SDL_Pi_TCA9545 Version 1.0 – SwitchDoc Labs

    Sample uses 0x73
    Program Started at:2016-11-05 17:55:55

    Traceback (most recent call last):
    File “testSDL_Pi_TCA9545.py”, line 51, in
    tca9545 = SDL_Pi_TCA9545.SDL_Pi_TCA9545(addr=TCA9545_ADDRESS, bus_enable = TCA9545_CONFIG_BUS0)
    File “/home/pi/SDL_Pi_GroveWeatherPi/SDL_Pi_TCA9545/SDL_Pi_TCA9545.py”, line 44, in __init__
    self._bus = smbus.SMBus(twi)
    IOError: [Errno 2] No such file or directory
    pi@raspberrypi:~/SDL_Pi_GroveWeatherPi/SDL_Pi_TCA9545 $

    • Kevin,

      From the directory where you are executing this program, do a “pwd” and give us the results. Looks like you are some where else

      SDL

      • Also make sure you have your I2C bus set up right (do “sudo i2cdetect -y 1” and include the results in your reply).

        SDL

  2. Apparently it is I2C that is missing:
    “pi@raspberrypi:~/SDL_Pi_GroveWeatherPi/SDL_Pi_TCA9545 $ pwd
    /home/pi/SDL_Pi_GroveWeatherPi/SDL_Pi_TCA9545
    pi@raspberrypi:~/SDL_Pi_GroveWeatherPi/SDL_Pi_TCA9545 $ sudo i2cdetect -y 1
    Error: Could not open file `/dev/i2c-1′ or `/dev/i2c/1′: No such file or directory
    pi@raspberrypi:~/SDL_Pi_GroveWeatherPi/SDL_Pi_TCA9545 $ ls /dev/i*
    /dev/initctl

    /dev/input:
    by-id by-path event0 event1 mice mouse0
    pi@raspberrypi:~/SDL_Pi_GroveWeatherPi/SDL_Pi_TCA9545 $

8 Trackbacks / Pingbacks

  1. Tutorial: Part 3 -Building a Solar Powered Raspberry Pi Weather Station - GroveWeatherPi - SwitchDoc Labs
  2. Tutorial: Part 4 -Building a Solar Powered Raspberry Pi Weather Station - GroveWeatherPi - SwitchDoc Labs
  3. Tutorial: Part 6 -Building a Solar Powered Raspberry Pi Weather Station - GroveWeatherPi - SwitchDoc Labs
  4. Tutorial: Part 1 -Building a Solar Powered Raspberry Pi Weather Station - GroveWeatherPi - SwitchDoc Labs
  5. Tutorial: Part 2 -Building a Solar Powered Raspberry Pi Weather Station - GroveWeatherPi - SwitchDoc Labs
  6. Tutorial: Part 5 -Building a Solar Powered Raspberry Pi Weather Station - GroveWeatherPi - SwitchDoc Labs
  7. Tutorial: Part 8 -Building a Solar Powered Raspberry Pi Weather Station - GroveWeatherPi - SwitchDoc Labs
  8. Tutorial: Part 9 -Building a Solar Powered Raspberry Pi Weather Station - GroveWeatherPi - SwitchDoc Labs

Comments are closed.