Projects / Urban heat island street survey

Urban heat island street survey

Intermediate2.5 hGuided buildReviewed

Build it step by step

0 of 7 done
  1. NANOSHT3126.5°C

    Test the sensor

    Print temperature and humidity.

  2. NANOGPS12.97N

    Test the GPS

    Wait for a fix outdoors.

  3. NANO

    Log both

    Write a line every 2 seconds.

  4. NANO

    Build the shield

    White, ventilated, away from the engine.

  5. NANO

    Plan the route

    Parks, markets, flyovers.

  6. NANO

    Ride after sunset

    Steady speed, same route twice.

  7. NANOSHT3126.6°C

    Make the map

    Colour the points by temperature.

In short

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

Tick what you already own. It saves to My Garage, so “Build with what I have” knows.

Wiring

FromToWhy
SHT31 VCC and GNDNano 3V3 and GNDPower
SHT31 SDA and SCLNano A4 and A5I2C
GPS VCC and GNDNano 5V and GNDPower
GPS TXNano D4Position data to the Nano
GPS RXNano D3Not needed for reading
SD module CSNano D10Chip select
SD module MOSI, MISO, SCKNano D11, D12, D13SPI
SD module VCC and GNDNano 5V and GNDPower (use a module with a level shifter)
PowerUSB power bank in a pocketSupply

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.

CheckExpected
Standing outsideGPS fix within a few minutes
LoggingOne line every 2 seconds
Park versus flyoverVisible difference in the data
After the rideFile 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 →

Ask Lark AI

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.