Photon Weather Shield Hookup Guide

This Tutorial is Retired!

This tutorial covers concepts or technologies that are no longer current. It's still here for you to read and enjoy, but may not be as useful as our newest tutorials.

Note: V11 of the Photon Weather Shield utilizes the Si7021 for humidity and temperature sensing as opposed to the HTU21D.

View the updated tutorial: Photon Weather Shield Hookup Guide V11

Contributors: Joel_E_B
Favorited Favorite 7

Hardware Overview & Assembly

The Photon Weather Shield has a lot of functionality packed into one tiny package. Let's go over each section of the shield.

Photon Footprint

Both the Core and the Photon fit right onto the shield. Copper pours underneath the antenna were restricted so as not to interfere with wireless connections. Each pin is also broken out to the sides of the Photon for accessibility. When attaching a Photon, be sure to line up the beveled end of the Photon with the beveled silkscreen on the PCB.

Photon Footprint


The simplest way to power the shield is to attach a Photon, and then power the Photon through the micro USB connector. This will power the Photon as well as all the components on the shield.

normal power scheme

The downside to that power scheme is that micro USB connectors tend to be fragile when put under a lot of mechanical stress, and they can rip right off the PCB if pulled too hard. Thus, we provided a few other options for power connectors. On the underside of the shield, you'll find a footprint for both an SMD Barrel Jack and a 2-pin, 3.5mm screw terminal. Either of these can be soldered to the PCB and used for alternate power inputs. The maximum voltage supplied on these alternate connectors should not exceed 12V. For a detailed explanation, read on.

alt text

Powered through the Barrel Jack.

For the screw terminal, you can solder it to either side of the shield, since it fits underneath the Photon. Be sure to keep track of which pin is (+) and which is (-).

alt text

Powered through the Screw Terminal.

On-Board 3.3V Regulator & Power Solder Jumpers

There is also a 3.3V regulator on the shield. If you are powering the Photon through the micro USB connector, this regulator is bypassed. Powering through one of the alternative power connectors mentioned above routes power through the shield's 3.3V regulator, which is then tied to the 3.3V rail on the Photon, powering it as well.

3.3V Regulator

On-board 3.3V regulator and accompanying circuitry.

The main benefit to using the on-board regulator is that is has a higher maximum voltage rating than the regulator located on the Photon. As stated in the Photon datasheet, if power is supplied directly to the VIN pin on the Photon , the voltage should be regulated between 3.6VDC and 5.5VDC. In contrast, the MIC5205 regulator is rated for 2.5VDC to 11.5VDC, as per its datasheet.

However, if you would rather have the alternative power source route power through the regulator on the Photon (for lower current consumption during sleep perhaps), simply cut the trace on the Power Select jumper (between the VREG and RAW pads), and add a blob of solder between RAW and P_VIN (Photon VIN) pads. Just be sure to not exceed voltages of 5.5-6V once this alteration has been made.

power solder jumpers

Warning! Never power the Photon/Shield through both the micro USB connector and the barrel jack or screw terminal at the same time! If you need both connected for whatever reason (programming in DFU mode over USB while powered via the barrel jack, for example), you'll need to cut the trace on the **3.3V Disable** jumper, pictured below. Only cut this trace is you **have not** altered the Power Select jumper

3.3V Disable jumper

On-Board Sensors

The weather shield comes with two on-board sensors. Together, these two sensors can give you a lot of information about the environmental conditions around you or your project.

HTU21D Humidity & Temperature Sensor

The HTU21D is a low-cost, highly accurate, digital humidity and temperature sensor. This sensor communicates over I2C and comes connected to the Photon's I2C bus by default, making development a breeze. The PCB around this sensor is milled out and copper pour is restricted in that area to reduce the amount of parasitic heat coming from other components on the shield, including the Photon itself, that may affect your temperature readings.


Si7021-A10 Humidity & Temperature Sensor

There are two versions of the Weather Shield, one containing the HTU21D and one containing the Si7021-A10. Shortages of the HTU21D IC resulted in the two versions existing, and it is likely that a future revision of this board will switch to the Si7021 or a similar variant. The Si7021 is functionally identical to the HTU21D, and it in fact shares the same register addresses and command codes as its counterpart. A quick tour of the datasheets makes it clear that one of the senor manufacturers borrowed heavily from the other. To make it easier on you, the end user, we have written a library to automatically detect which sensor you have without the need for you to have to figure it out and pick a corresponding library. More on that later.

MPL3115A2 Barometric Pressure

The MPL3115A2 is a MEMS pressure sensor that provides Altitude data to within 30cm. The sensor outputs are digitized by a high resolution 24-bit ADC and transmitted over I2C. Pressure output can be resolved with output in fractions of a Pascal, and Altitude can be resolved in fractions of a meter. It provides 12-bit temperature measurements in degrees Celsius. This sensor also communicates over I2C and comes connected to the Photon's I2C bus by default.


More information on how to use these sensors can be found in the Libraries and IDE section of this tutorial.

RJ-11 Weather Meter Connectors

If you would like to place your Weather Shield outdoors and create a fully-functional weather station, you can grab a set of Weather Meters and connect them to the RJ-11 connectors located on the Weather Shield. With these meters attached, you can measure wind speed, wind direction and rainfall.

meter connectors

Soil Moisture & Soil/Water Temperature

For those who want to keep track of their houseplant conditions or for those who want to know topsoil conditions in their gardens, the weather shield has an optional port for a Soil Moisture Sensor.

alt text

Leaving the soil moisture sensor powered all the time leads to corrosion of the probes. To account for this, this port breaks out Digital Pin D5 as the power pin for the sensor, allowing the Photon to power the sensor, take a reading, and then disable power, giving the probes a longer lifespan. The moisture level can be read on Analog Pin A1.

Soil Mositure Port

In addition to soil moisture, you can also add a waterproof temperature senor. Whether you have a pond you'd like to monitor near your weather station or you want to know if the ground is still frozen or not, this can be a great addition to any weather station. The waterproof version of the DS18B20 temperature senor is a go-to option for many users looking to sense the temperature of various environments that may not be so kind to electronics. A port for this senors is broken out along with the necessary 4.7K pull-up resistor located between the Vcc and Signal lines. The Signal line is connected to Digital Pin D4. Communicate with this sensor using the OneWire and Dallas Temperature libraries.

Soil Temp


The waterproof temp sensor comes with plenty of cable length and pre-stripped, pre-soldered wires on the end, making assembly straightforward. For the Soil Moisture sensor, you'll have to get a little more creative. You could always just use some hookup wire. We've found that retired cables, such as USB cables, can be sacrificed to make cables for such projects. A black USB cable with the green wire snipped matches the look of the DS18B20 cable quite well.

alt text

The snipped USB cable (right) and the DS18B20 cable (left), both secured to standoffs with zip ties.

I2C Port

I2C is becoming increasingly popular as a means by which to communicate with sensors. Thus, it made sense to add an I2C port to allow users to add other sensors to their project. One great example would be adding an external light sensor. Since most weather stations need to be enclosed in a weather proof housing, having a light sensor on-board didn't make much sense. However, adding the I2C port allows one to connect sensors such as the TSL2561 Luminosity Sensor or the ISL29125 RGB Light Sensor along with a whole slew of other I2C sensors.

I2C Port

I2C Pull-ups

Many SparkFun I2C Breakouts have solder jumpers for disabling the pull-up resistors necessary on most I2C designs. The Photon Weather Shield is no different. If you already have a sensor that has pull-ups, you can disable them on the shield by cutting the traces with a hobby knife. Or, if you would rather leave the shield as is, you can disable the pull-ups on every I2C you add to the bus. The important thing to remember is that only one device on the bus needs to have its pull-ups active. All others should be disabled.

I2C Pullups

Serial 1 Port

Last but not least, there is another port broken out, this time for the USART Serial 1 port on the Photon. Serial ports are great for debugging. They also allow for various other wireless technologies to be attached for mesh networking or for user feedback via an LCD or other display. Let's say you wanted additional sensors around you home, well beyond the range of your WiFi signal. You could attach an Xbee Explorer to the Serial 1 port on the Weather shield and have your other node (consisting of a stand-alone XBee or an XBee Arduino combo, for example) out in the field, feeding data back to the Photon, which then sends the collective data to the web.

Serial Port

Another use case is wanting to have your weather station outside while still receiving data on a display indoors somewhere. This could easily be accomplished by attaching a BlueSMiRF Bluetooth module to the Serial 1 port and having another BlueSMiRF attached to a Serial Graphic LCD display installed in your home. We'll show you how to do exactly that later in this tutorial, amongst many other examples.

alt text

A SparkFun BlueSMiRF Silver connected to the Serial 1 Port using a 6-pin, right angle female header with the outermost pins removed.

The pins on the shield match up with any of our BlueSMiRF modules. For other wireless solutions, you may have to wire each pin manually as they may not match up exactly.