Our Cookies Policy
To make full use of www.electromaker.io, enjoy the personalised features and ensure the websites works to its full potential, your computer, tablet or mobile phone will need to accept cookies.
Our cookies don’t store sensitive information such as your name, address or payment details: they simply hold information about how you use our site so we can improve your experience and resolve any errors.
If you’d prefer to restrict, block or delete cookies from www.electromaker.io, or any other website, you can use your browser to do this. Each browser is different, so check the ‘Help’ menu of your particular browser (or your mobile phone’s handset manual) to learn how to change your cookie preferences.
Here’s a list of the main cookies we use, and what we use them for:
Electromaker – Login session
Google Analytics – Analytics
Twitter – Twitter Feed
Each web browser handles cookie management differently, please follow instructions for your chosen browser:
We used one of these boards with 4 channels instead.
Software app and online services
Particle 2.0 iOS App
This project is about controlling the temperature of a pool and a sauna.
Sergio contacted me some time ago to develop a control system for his pool and sauna. He did all the hardware connections and I developed the software. This write-up is the result of our team effort.
You can control your pool temperate with this project.
yes, control its temperature from your phone/device
Here's how it works: the heater of the pool turns on automatically when it detects water flowing. So the control here is as simple as turning the water pump on when the temperature of the water is lower than the desired temperature.
When the temperature reaches the target set by the user, the pump stops, hence the heater stops.
This project can control the temperature of your sauna as well.
how hot do you like it? (hint: use your phone to answer that)
The same philosophy used for the pool is used in the control of the sauna. In fact, the code is duplicated almost line by line - my apologies to the gods of good coding practices.
The behavior of the system was modeled using a Finite State Machine, which are wonderful at keeping the code clean and implementing the sequential steps required for making the system work.
Here's how it works:
When the system powers on, the finite state machine (FSM from now on) starts in the initState. After 10 seconds, it automatically transitions to the offState (if the previous system state was off) or the idleState (if the previous system state was idle or on).
In the offState, the system is completely off, nothing happens until the user turns it on.
In the idleState, the temperature of the pool/sauna is monitored all the time. There is no heating in this state. When the temperature goes under the target temperature configured by the user, the FSM transitions to the onState.
In the onState, the temperature of the pool/sauna is also monitored all the time. The heating in turned on in this state. When the temperature goes over the target temperature configured by the user, the FSM transitions to the idleState and the cycle repeats.
The user can set the system on or off by calling the cloud function setOnOff("on") or setOnOff("off").
State diagram of the system
Two DS18B20 digital temperature sensors are used in this project. Each one has a pull-up resistor of 4k7 as recommended in the datasheet. The pool sensor is connected to D2 and the sauna sensor is connected to D3.
We use two waterproof ds18b20 digital temperature sensorsMy prototype shows only one waterproof ds18b20, the second one is a 3 pin package
They are connected to D2 and D3 on the second socket the ControlEverything relay board comes with:
1 / 2 • The board comes with a second socket that we used for the sensor connections (click the arrow for more pics)
On the relay board, relay 1 is connected to the pool pump and relay 2 is connected to the sauna heater.
Here's a connection diagram for dummies :)
Connection diagram for dummies - I took 5V and GND from the photon's socket
You can use Porter (iOS or Android) or the Particle 2.0 app (iOS only for now - until Android gets version 2.0). The system comes with some defaults for the target temperatures but the user can modify them to their liking.
There is also a switch in the firmware for selecting Celsius (default) or Fahrenheit. The settings are stored in EEPROM (non-volatile memory) every time they are changed so the board keeps the users settings intact even if power is lost.
Here are some screenshots of the Porter app when the system is on and when it's off:
1 / 2 • System is heating (click the arrow for more pics)
We hope you find value in this article. Feel free to respect it and/or check Gustavo's other projects here. Something is not clear enough? Leave a comment below and we'll try to figure it out together.
Sergio and Gustavo.
If you require professional help with your projects, don't hesitate to write me a line about your needs at email@example.com. Thank you!
Plant UML code for the state machine of the firmware
To draw the FSM image, copy paste this code in http://www.plantuml.com/plantuml/uml