background image

ESP32 Environment Sensor Shield Hookup 

Guide 

Introduction

The ESP32 Environment Sensor Shield provides sensors and hookups for 
monitoring environmental conditions. This tutorial will show you how to 
connect your sensor suite to the Internet and post weather data online.

Required Materials

You’ll need the ESP32 Thing board to interface with this shield. Other 
microcontroller boards will work, but since the shield is designed to stack on 
the ESP32 Thing, interfacing with them will be difficult.

You’ll also need some means of connecting the two boards together. While 
it’s possible to solder them together using snappable male header pins, it 
makes good sense to use female headers on one of the boards board so 
the boards can be separated again later if needed.

SparkFun ESP32 Thing Environment Sensor 

Shield

DEV-1415 3 

Page 1 of 20

Содержание DEV-14153

Страница 1: ...ng board to interface with this shield Other microcontroller boards will work but since the shield is designed to stack on the ESP32 Thing interfacing with them will be difficult You ll also need some...

Страница 2: ...or which you ll need two three position 3 5mm screw terminals and enough wire to connect the sensor to the board SparkFun ESP32 Thing DEV 13907 Break Away Headers Straight PRT 00116 Female Headers PRT...

Страница 3: ...y to keep around Suggested Reading If you have not yet used the ESP32 Thing Development Board check out this guide first If you aren t familiar with the following concepts we recommend checking Solder...

Страница 4: ...h BME280 This sensor measures relative humidity temperature and barometric pressure On the back side of the board is a solder jumper labeled JP1 which can be closed to change the I C address of the ch...

Страница 5: ...A and by default it will be 0x5B Luminosity The last onboard sensor is the Broadcom APDS 9301 It s capable of detecting and reading light levels from nighttime through broad daylight Keep in mind that...

Страница 6: ...t add an external NTC thermistor for the CCS811 to work properly JP5 Cut the traces on this jumper to disable the pull up resistors for the I2C bus Optional off board Sensors There are connections for...

Страница 7: ...ch like the wind speed gauge the rainfall gauge generates ticks to tally the amount of rain that has fallen Count ticks to determine how much rain has fallen recently Each tick represents 0 011 0 28mm...

Страница 8: ...boards Here we ll show you a bomb proof method to solder down the headers and making sure that they re true and square so it s easier to connect and disconnect the two boards Trim the Headers When yo...

Страница 9: ...ly you may take a file piece of sandpaper or some other sanding grinding tool to sand down the end of the header so that it s smoother You can do both pieces at the same time by holding them together...

Страница 10: ...here If you re new to soldering you may want to solder just the first and last position on each side then pull the board free of the breadboard to avoid heat damage to your breadboard You may find it...

Страница 11: ...side of the shield should be facing the non component side of the ESP32 Thing Double check that the pin labels on the shield match those on the ESP32 Thing Failure to observe these facing rules will m...

Страница 12: ...lation guide If you have not already make sure to setup your own weather station with Wunderground You will need to fill out a form and pick a username password in order to receive a station ID Sensor...

Страница 13: ...efine NO_RAIN_SAMPLES 2000 volatile long rainTickList NO_RAIN_SAMPLES volatile int rainTickIndex 0 volatile int rainTicks 0 int rainLastDay 0 int rainLastHour 0 int rainLastHourStart 0 int rainLastDay...

Страница 14: ...CAddress 0x77 bme settings runMode 3 bme settings tStandby 0 bme settings filter 0 bme settings tempOverSample 1 bme settings pressOverSample 1 bme settings humidOverSample 1 bme begin CCS811 sensor s...

Страница 15: ...Serial print nTimestamp Serial println secsClock Windspeed calculation in mph timeSinceLastTick gets u pdated by an interrupt when ticks come in from the wind speed senso r if timeSinceLastTick 0 wind...

Страница 16: ...any captured rain sensor ticks if rainTicks 0 Start at the end of the list rainTickIndex will alwa ys be one greater than the number of captured samples int i rainTickIndex 1 Iterate over the list an...

Страница 17: ...Underground If the connection fail s return from loop and start over again if client connect host httpPort Serial println Connection failed return else Serial println Connection succeeded Issue the G...

Страница 18: ...r 202 5 else if vin 300 windDir 180 else if vin 400 windDir 247 5 else if vin 600 windDir 225 else if vin 900 windDir 292 5 else if vin 1100 windDir 270 else if vin 1500 windDir 112 5 else if vin 1700...

Страница 19: ...on succeeded shows that a successful connection has been made to the Weather Underground server If your internet connection is down this will fail The second is the one lone line that says success Thi...

Страница 20: ...TMP006 sensor HTU21D Humidity Sensor Hookup Guide The HTU21D humidity sensor is an easy to use digital low cost humidity sensor TMP102 Digital Temperature Sensor Hookup Guide How to connect and use t...

Отзывы: