Author Topic: Internet controlled HotTub - Powered by Moteino  (Read 1368 times)

Steinarrr

  • NewMember
  • *
  • Posts: 27
  • Country: is
Internet controlled HotTub - Powered by Moteino
« on: May 04, 2016, 07:40:13 PM »
Hi everybody.

Me and a friend modified my parent's HotTub to be controllable from everywhere via the internet and here is how we did it.


Disclaimer: I just realized while writing this that Fosset is actually written as Faucet. But since the code is full of mentionings of a 'Fosset' I'll stick to that hehe.


Intro

I live in Iceland and the water(both hot and cold) here is dirt cheap. It is so cheap that we even use hot water to heat up the houses as it is cheaper than using electricity (for most parts of the country). So if your idea of a hot tub is an electric powered with circulating water you should forget that and embrace this new idea that you fill it up and empty it out with every use.

So the HotTub is connected like This. Here is a picture of the Fosset that controls the input flow of water. Before we made this people used to just turn the valve by hand and then turn the Fosset that is located in the garage. After a pleasant hot tub experience people would then open the valve again to empty it out. The biggest annoyance about this though is that while bathing you would have to get up and fiddle with the fosset (less power, more heat, etc).

Another problem was that during last winter the electric coil that was supposed to prevent the water from freezing in the pipes wasn't doing its thing so we also wanted the system to be able to prevent the pipes from freezing.


So let's get to it.

We kept our designs focused on being easily replaceable in case they weren't working so that the HotTub would be usable even though our inventions weren't.

This is how we controlled the Fosset. We used These stepper motors and These stepper drivers to control them. Of course we used Moteinos to control the drivers. Here is a picture of the completed circuit.:



First we decided to try and turn the valve by using a stepper motor and a 3D printed gearbox but that turned out to be to weak for the valve so we bought a 1" normally open solenoid valve from aliexpress. We fitted that one on, it wasn't easy but it worked. The circuit was just a moteino, a power supply and a single mosfet, didn't take a picture :/


Programming

Ahh, yes. How are we going to send info from a users smartphone to the Moteinos? We expected both android and iOS users so we decided to make a website rather than an app. We opted for a Raspberry Pi to both host the website and control the system. Everything on the Raspberry Pi runs on python. Here is a diagram showing the flow of information:


I am currently working on a big project with lots of moteinos and for that I wrote a communication module for communication between python and moteino that I am calling moteinopy. I've already mentioned it in another thread but using it in another setting gave me lots of improvement ideas that I have now implemented. If you are interested you can check out www://github.com/Steinarr134/moteinopy

The moteino sketches are not very well commented but if someone is interested I'll comment some of of it and paste, just ask :)

some relevant python code

Thanks for reading, I'll be happy to answer any questions if you want to know more :)

-Steinarr
« Last Edit: May 04, 2016, 07:44:08 PM by Steinarrr »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Internet controlled HotTub - Powered by Moteino
« Reply #1 on: May 09, 2016, 09:12:55 AM »
Great project, a few more photos and this could be a blog post.  8)