Build a Weather Station Part 1: PCB and First Firmware
A small Arduino station that logs air temperature and humidity in the field. It started as a separate device and was later connected over Bluetooth to the iPhone sensing app, so each capture records the weather at that moment. This series covers the build in four parts.
Hardware
- Arduino Uno
- Deek-Robot data-logging shield (SD card)
- DHT22 (air temperature and humidity)
- RTC module (coin cell)
- HM-10 BLE module
- Clear enclosure
Soldering
- Sensor wires land on the prototyping area of the shield.
- The RTC runs on a coin cell. The SD card holds the CSV.
- Battery through a two-pin connector.
First power-up
The station streamed sensor data to the iPhone app over BLE.
BLE link
- The link kept dropping after assembly.
- The module was fine. One jumper to the HM-10 was loose.
- Replaced the wire. The link stayed up.
Memory
- The SD library plus BLE parsing left 695 bytes of SRAM.
Sketch uses 23,748 bytes (73%) of program storage space. Maximum is 32,256 bytes.
Global variables use 1,353 bytes (66%) of dynamic memory, leaving 695 bytes for local variables. Maximum is 2,048 bytes.
- The
F()macro keeps string literals in flash instead of copying them into SRAM:
Serial.println(F("Waiting for bluetooth connection..."));