How I Hooked Up My Cold Plunge to a Flow Sensor with ChatGPT
Dawn Ho • Mar 26, 2025
Ramit Sethi asks his readers a question on his finance blog that stuck with me: what does your rich life look like? Not how much money you want, but what you’d actually spend it on if you were living the life you wanted.
For me, the answer had always been a sauna. It sat in the back of my mind as a someday thing. Then I looked at my tiny patio and realized I could fit one right now. There was no reason to wait for someday.
Here’s what nobody tells you, though. Once you get a sauna, you get overheated. And then you need a cold plunge.
The Problem
I love my cold plunge, but it has one weak spot: the filter.
The system is a tub of water, a pump, a filter, and a chiller. The pump pushes water through the filter and the chiller to keep it clean and cold. When the filter clogs, the water stops flowing. Most of the time the system runs quietly in the background, so a clog could go unnoticed for hours.
I got into the habit of checking the filter by hand, and I still never really knew whether the water was moving. I got a little paranoid about it. If water stops flowing through the chiller, the pipes can freeze and brick it. And when the pump got stuck, it made a loud, strained sound that felt like a death knell. That sound haunted me.
After the seventh time I came home to a clogged filter, I finally decided to fix it. I wanted a Wi-Fi-connected sensor that would ping my phone when the water stopped moving, so I could stop checking and stop worrying. To get it done faster, I leaned on ChatGPT for most of the build.
If you just want the code, it’s here: github.com/dawnho/particle-flow-meter
What I Used
- Particle Photon: A Wi-Fi microcontroller (buy one here)
- Flow Meter Sensor: HA-1044 Flow Meter (3-wire), which fits ¾-inch pipe or tubing
- ChatGPT: Helped me write the embedded code and debug it
That’s it. One board, one sensor, and a resistor.
Setup Instructions
Wiring
The Particle Photon reads pulses from the flow sensor, uses the FlowMeter library to turn them into a flow rate, and sends the data to the Particle Cloud.
Wiring Guide:
- Black Wire: Connect to the GND (Ground) pin on the Particle Photon
- Red Wire: Connect to the VIN (Voltage In) pin on the Particle Photon
- Yellow Wire: Connect to A1 (Analog Pin 1) on the Particle Photon
- 10k Ohm Pull-Up Resistor: Connect one end to the 3V3 (3.3V) pin and the other end to A1

The sensor has an open-collector output, so it needs the pull-up resistor to give the Photon a clean pulse signal on A1.
Software
- Flash
particle_flow_meter.inoto your Photon with Particle Build - Add the FlowMeter library to your project (it’s in the Particle Library Manager)
What It Does
The flow meter sits inline with the pump. As water moves through it, a little turbine
spins and sends a pulse for each rotation. Every second, the Photon counts the pulses
it received and calculates a flow rate in liters per minute. If the rate drops to
zero, it sets isFlowing to false.
The device does three things:
- Publishes flow data to the Particle Cloud
- Exposes the flow state as a cloud variable
- Sends a Slack notification when water stops flowing, at most once an hour
How ChatGPT Helped
The whole build turned out to be easy. The hardware was simple, just one sensor and one board. The firmware was the part I was most daunted by, and that’s where ChatGPT helped the most. I built this mostly by asking it one question at a time.
First, I asked which flow sensors would fit my ¾-inch pipe. It suggested inline models with open-collector outputs that a microcontroller could read, and I picked the HA-1044. The product listing had almost no documentation, so I had ChatGPT help me work out the key specs and how the sensor worked.
Next was wiring it to the Particle Photon. ChatGPT walked me through the pull-up resistor and pin assignments, then pointed me to the FlowMeter library, which turns raw pulses into flow rates. I hadn’t used it before and probably wouldn’t have found it on my own.
Then I needed firmware that would notice when flow stopped. ChatGPT helped me write
a loop that checks flow once per second and calls Particle.publish() when it drops
to zero. It also showed me how to expose flow data with Particle.variable(), which
is what lets me check the current reading from anywhere.
For alerts, it offered Zapier, email, or Slack. I went with Slack, and it walked me through setting up a webhook and connecting it to a Particle integration. Getting that first notification on my phone felt incredible.
The Slack Notification Logic
My first version didn’t have any throttling, and I found out the hard way.
I was on a work trip when the filter clogged. The bot did exactly what I’d told it to do, which was send an alert every few minutes for as long as the water wasn’t moving. I woke up to a wall of Slack notifications.
So ChatGPT helped me add throttling. Now I get one alert as soon as flow stops, and then at most one per hour while the problem lasts.
Here’s the key snippet:
if (!isFlowing && (previousIsFlowing || (now - lastNotificationTime > notifyInterval))) { Particle.publish("is_flowing", "false", PRIVATE); lastNotificationTime = now; }
If flow was running a moment ago and just stopped, it alerts right away. If flow is still stopped, it only alerts again once an hour has passed. When flow comes back, it resets, so the next clog triggers an alert immediately.
Here’s what the alert looks like in Slack:

Since Then
I didn’t have to build much at all to end up with a cloud dashboard and a mobile app, because Particle handles most of that. I catch myself pulling out my phone, opening the Particle app, and showing people the latest reading. It’s so simple, and it still delights me.
It’s caught a lot of clogs since. The best part is when it happens while I’m out of town. I used to come home and find out after the fact. Now, instead of stressing about it, I just turn off the Wi-Fi smart plug that powers the whole cold plunge system, and the pump and chiller are safe until I get home.
My friends are bemused by how many things in my life I’ve automated at this point. This one is still my favorite.
Final Thoughts
All in, it took a couple of hours. Now my phone keeps an eye on the filter so I don’t have to.
The code is open source if you want to try it: github.com/dawnho/particle-flow-meter
Let me know if you build your own!