Urban heat island street survey
Build it step by step
0 of 7 doneTest the sensor
Print temperature and humidity.
Test the GPS
Wait for a fix outdoors.
Log both
Write a line every 2 seconds.
Build the shield
White, ventilated, away from the engine.
Plan the route
Parks, markets, flyovers.
Ride after sunset
Steady speed, same route twice.
Make the map
Colour the points by temperature.
How do you build an urban heat island street survey?
A shaded temperature sensor with GPS on a scooter maps how much hotter concrete streets are than tree-lined ones at night. You need Arduino Nano, SHT31 temperature and humidity sensor, GPS module NEO-6M, MicroSD Card Module, ABS project box (100 × 60 × 25 mm), Resistor 1 kΩ and Resistor 4.7 kΩ. It takes 7 steps and about 150 minutes.
- Level
- Intermediate
- Time
- About 150 min
- Parts
- 7
Parts list
- Development BoardsBuyArduino Nano × 1
- SensorsBuy
- SensorsBuy
- InterfacesBuy
- Mechanical & HardwareBuy
- PassivesBuyResistor 1 kΩ × 1
- PassivesBuyResistor 4.7 kΩ × 1
Tick what you already own. It saves to My Garage, so “Build with what I have” knows.
Wiring
| From | To | Why |
|---|---|---|
| SHT31 VCC and GND | Nano 3V3 and GND | Power |
| SHT31 SDA and SCL | Nano A4 and A5 | I2C |
| GPS VCC and GND | Nano 5V and GND | Power |
| GPS TX | Nano D4 | Position data to the Nano |
| GPS RX | Nano D3 | Not needed for reading |
| SD module CS | Nano D10 | Chip select |
| SD module MOSI, MISO, SCK | Nano D11, D12, D13 | SPI |
| SD module VCC and GND | Nano 5V and GND | Power (use a module with a level shifter) |
| Power | USB power bank in a pocket | Supply |
Code
A temperature sensor on a moving vehicle is easy to fool: sun, engine heat and exhaust will all change the reading. Put the SHT31 in a white, ventilated radiation shield made from stacked plates or a box with louvres, mounted well away from the engine and the rider's body, in free air, and survey at night or after sunset so that the sun cannot heat it. Ride a planned route at a steady speed and note each place; the sensor needs a minute to settle at the start. The sketch logs a line every 2 seconds only when the GPS has a valid fix. The file gives time, latitude, longitude, temperature and humidity, and can be coloured on a map with a free tool. Ride safely and legally: set everything up before you start, mount the box securely, do not look at a phone while riding, and avoid busy roads at night. GPS tracks reveal where you live, so remove the start and end of the log before sharing a map. Arduino IDE, board "Arduino Nano" (try the Old Bootloader option if the upload fails).
Runs on a virtual Arduino Nano in your browser, with sliders for the sensors. Happy with it? Verify and upload to your real board from the same page (Chrome or Edge on a computer).
// Heat island logger: GPS position plus temperature and humidity to SD. Libraries: TinyGPSPlus, Adafruit SHT31, SD. Board: Arduino Nano.
#include <SoftwareSerial.h>
#include <TinyGPSPlus.h>
#include <Wire.h>
#include <Adafruit_SHT31.h>
#include <SPI.h>
#include <SD.h>
SoftwareSerial gpsSerial(4, 3); // RX, TX
TinyGPSPlus gps;
Adafruit_SHT31 sht;
const int SD_CS = 10;
unsigned long last = 0;
void setup() {
gpsSerial.begin(9600);
sht.begin(0x44);
SD.begin(SD_CS);
File f = SD.open("HEAT.CSV", FILE_WRITE);
if (f && f.size() == 0) f.println("utc,lat,lon,temp_c,rh");
if (f) f.close();
}
void loop() {
while (gpsSerial.available()) gps.encode(gpsSerial.read());
if (millis() - last >= 2000 && gps.location.isValid() && gps.time.isValid()) { // log only with a valid fix, every 2 seconds
last = millis();
float t = sht.readTemperature(), h = sht.readHumidity();
File f = SD.open("HEAT.CSV", FILE_WRITE);
if (f) {
char tm[12]; snprintf(tm, sizeof(tm), "%02d:%02d:%02d", gps.time.hour(), gps.time.minute(), gps.time.second());
f.print(tm); f.print(",");
f.print(gps.location.lat(), 6); f.print(","); f.print(gps.location.lng(), 6); f.print(",");
f.print(t, 2); f.print(","); f.println(h, 1);
f.close();
}
}
}Test checklist
What you should see at each check. If a reading is far off, stop and use the troubleshooting list.
| Check | Expected |
|---|---|
| Standing outside | GPS fix within a few minutes |
| Logging | One line every 2 seconds |
| Park versus flyover | Visible difference in the data |
| After the ride | File opens in a spreadsheet |
If it does not work
Nothing logged
Wait for a GPS fix and check the SD card format.
Readings look warm
Move the sensor away from heat and use the shield.
GPS stops in a tunnel
It resumes after leaving the tunnel.
SD errors
Use a card of 32 GB or less, formatted FAT32.
Still stuck? Find the fault step by step with your multimeter →
Common questions
What parts do I need for the urban heat island street survey?
Arduino Nano, SHT31 temperature and humidity sensor, GPS module NEO-6M, MicroSD Card Module, ABS project box (100 × 60 × 25 mm), Resistor 1 kΩ and Resistor 4.7 kΩ.
How long does the urban heat island street survey take to build?
About 150 minutes for a intermediate maker, in 7 steps.
How do I know the urban heat island street survey works?
Standing outside: GPS fix within a few minutes. Logging: One line every 2 seconds. Park versus flyover: Visible difference in the data.
Nothing logged: what should I check?
Wait for a GPS fix and check the SD card format.
Readings look warm: what should I check?
Move the sensor away from heat and use the shield.
GPS stops in a tunnel: what should I check?
It resumes after leaving the tunnel.
SD errors: what should I check?
Use a card of 32 GB or less, formatted FAT32.
