# ReddWatch community mini-node — build guide The ~$120–200 WiFi path. No LoRa gateway, no subscription — an ESP32 that reads temperature + turbidity (+optional level) and posts straight to the network over your WiFi every 15 minutes. If you want the full off-grid solar/LoRa station instead, see `firmware/BOM.md` and `firmware/stolonode/stolonode.ino` — same program, bigger hardware. ## 0. Before you buy anything 1. Create an account at `/login`. 2. Propose your site at `/stations` — you need the landowner's permission and it must pass review. Read `/terms` first. 3. Wait for approval — you'll get a **node ID** (`com-XXXXXX`) and an **access key** on the My stations page. Those two values go in the firmware. Keep the key private. ## 1. Parts (~$150 CAD typical) | Part | ~CAD | Notes | |---|---|---| | ESP32 dev board (ESP32-WROOM or S3) | $15–25 | any reputable board | | DS18B20 waterproof temp probe, 3 m | $10 | stainless probe, OneWire | | 4.7 kΩ resistor | $1 | OneWire pull-up | | DFRobot SEN0189 turbidity sensor | $13 | analog, easy starter turbidity | | 0.5–4.5 V pressure transducer 0–5 m (optional) | $60–90 | adds water level | | IP65+ junction box + cable glands | $25–40 | probe cables exit the bottom | | USB wall adapter + cable, or small solar + 18650 + TP4056 | $15–50 | see power section | | T-post / stake / dock mount + hose clamps | $15–30 | site-dependent | | Misc: wire, heat shrink, dielectric grease, desiccant | $15 | | Cheaper path: temp + turbidity only, USB power from a nearby building → ~$90–110. Level and solar push toward $200. ## 2. Wiring ``` DS18B20: red→3V3 black→GND yellow→GPIO4 (4.7kΩ pull-up to 3V3) SEN0189: V→5V(VIN) G→GND A(analog out)→GPIO34 Pressure: V→5V G→GND signal→GPIO35 (optional) Battery: divider (2×100kΩ) bat+→GPIO36→mid→GND (optional, solar builds) ``` Keep the box sealed: glands on the bottom edge, desiccant inside, dielectric grease on connectors. Probes hang into the water on their own cables — strain-relieve them so nothing tugs the solder joints. ## 3. Firmware 1. Arduino IDE → install ESP32 board support, then libraries: **OneWire** and **DallasTemperature**. 2. Open `firmware/mininode/mininode.ino` (download: `/firmware/mininode.ino`). 3. Fill in the five lines at the top: WiFi name + password, `NODE_ID`, `NODE_KEY`, leave `API_URL` as printed on My stations. 4. Flash, open Serial Monitor (115200) — you should see `[ingest] 200 {...}` within a minute. 401 = wrong key. 400 = payload. 5. Unplug USB, seal the box, deploy. Deep-sleeps 15 min between posts — a USB wall adapter lasts forever, a 18650 + 5 W panel is comfortable off-grid. ## 4. Deploying in the water - Probe tips go **below the lowest expected water level**, out of direct silt — 10–20 cm off the bottom is the sweet spot. - Fasten the box above the **record flood line**, not the normal one. - Take a photo at install — it helps future cleanings find the rig. - Fish-bearing water: check permissions BEFORE installing (see /terms §2). ## 5. Calibration Turbidity is only as good as its two-point cal: 1. **Zero point** — dip the sensor in clean bottled/tap water, read the raw voltage in Serial Monitor, set `V_CLEAR` to that. 2. **High point** — a 100 NTU standard (or a fixed muddy-water sample you treat as a reference) → `V_100NTU`. 3. Reflash. Ten minutes, once a season. ## 6. Keeping it honest (the part that matters most) - **Clean monthly** — soft toothbrush on the turbidity lens, rinse the temp probe, clear the pressure port. Summer slough = biofilm city. - **Log the check-in** on My stations (the ✓ button) — stations 45+ days without a check-in show an overdue flag on the network. - If it goes silent >1 h the map shows `silent` automatically — check WiFi, power, then the probes. - Data is labeled **community** on the map — honest provenance, same QC flags as the reference gauges. That's the deal that makes your station part of something trustworthy. ## 7. School builds This guide is classroom-ready: parts fit a $150 budget, soldering is optional (screw-shield or breadboard), the firmware is ~120 lines students can actually read. Deploy at an approved site and the class station is live on the public map — guardian leaderboard included.