Cr0wstuf
Posts: 4
Joined: Sun Jun 30, 2013 1:46 am

Noob here. Can someone give me a pointer?

Sun Jun 30, 2013 1:52 am

I have a raspberry pi. First model I purchased the day they were released. I use it as a VPN to my home and I love it.

I'm interested in setting up a home automation project using several raspberry psi connected to wifi and using them to send commands to when necessary. One idea I had was to set one up in my shower to control water output using solenoid valves. Most of the programming I can take care of, I'm just not very good with GPIO or electrical work.

I feel like with a bit more work I can figure it all out. The reason I made this thread is to stop me if I need to be stopped. Is this possible? Can a pi control the size solenoid valves I would need for the hot/cold running into my shower? Or am I wasting my time?

Thanks!

erlaps
Posts: 2
Joined: Sun Jun 30, 2013 1:13 pm

Re: Noob here. Can someone give me a pointer?

Sun Jun 30, 2013 1:20 pm

Well there are a lot of books on amazon.com internet topics about raspberry pi and how to get started.

Katamari
Posts: 34
Joined: Fri Jun 28, 2013 1:26 pm

Re: Noob here. Can someone give me a pointer?

Sun Jun 30, 2013 6:46 pm

I don't know anything about plumbing, but from what I can find from Adafruit which sells stuff for fooling around with RaspberryPi/Arudino/etc, the minimum voltage for an actuator is 6V though the recommended is 12V (and I think the current is too great for the Pi alone).
As such, the Pi cannot directly power it, but if you just hook the GPIO to a transistor, then you can control the current and voltage you would need.
This means that you would need a separate power supply from the Pi or else have a more powerful supply for the solenoid that you also step down to power the Pi.
I would suggest googleing for "Arduino + solenoid valve" since that is a pretty common combination and the Pi can act almost exactly like an Arduino.

User avatar
inversesandwich
Posts: 30
Joined: Sun Jun 30, 2013 6:18 pm
Location: Hampshire, England
Contact: Website

Re: Noob here. Can someone give me a pointer?

Sun Jun 30, 2013 6:56 pm

erlaps wrote:Well there are a lot of books on amazon.com internet topics about raspberry pi and how to get started.
I think OP knows the basics of the Raspberry Pi, seeing as he bought one on launch day.

As the last post suggested, a transistor would be good, but you could also use a relay.
This project is more than do-able, but it might be a good idea to read up about basic plumbing just to make sure what you're doing (I know nothing about plumbing :lol: ) regarding safety, water pressures etc.
InverseSandwich
Visit my page at http://about.me/inversesandwich and follow me on Twitter @inversesandwich

Cr0wstuf
Posts: 4
Joined: Sun Jun 30, 2013 1:46 am

Re: Noob here. Can someone give me a pointer?

Sun Jun 30, 2013 10:42 pm

Thanks for all of the replies so far!

I saw someone else do something similar with a decorative water fountain controlled with an arduino, so I know that can be done, but I feel with all of the parts needed to use arduino it can become pricier than with a pi, so that's why I'm challenging myself with the pi.

I know a bit about plumbing, so I can figure out the water pressure and connecting that stuff... But the transistor and relays sound like a good idea. That way I can sort of "patch" in the voltage necessary for the valves, right? I'm reading more into it so I'm sure I'll figure it out.

I would like the pi to be wireless so I can send commands from my touchpad with an app I'll build eventually... And I'm going to have the pi programmed to open the valves to whatever is required for the desired temperature setting. Extensive temperature testing will ensue :D

PiGraham
Posts: 3939
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Noob here. Can someone give me a pointer?

Mon Jul 01, 2013 7:03 am

Do you just want to turn the shower on and off?
You could do that with a pair of solenoid / servo valves in the feed pipes. You would need a power supply to power them and an interface (e.g. PiFace) for the Pi to switch them.

Solenoid valves are commonly used in central heatings systems and you can buy them from any plumbing supplier.
Mixer valves are available, so potentially your Pi could control the water temperature, but getting to work reliably to give a stable temperature could be tricky. Make sure there is no risk of scalding if the temperature control loses regulation.

Note that there are water regulations about automated systems attached to mains water supply. If your system failed it could waste a l lot of water. It could also wasted heat too, but I don't think there are regs for that.

You may want to get a plumber to install the valves.

Obviously be careful with electrics anywhere near water. If you make any permanent connection to the main circuit you should get a qualified electrician to check it. Don't expose the Pi or other electronics to humid environments. Condensation could cause faults.

There are voice control programs available for Pi, so you could ask your Pi to run your shower and set the temp, but reliability could be a problem. You definitely don't want your shower to come on because a truck is reversing outside or something on the radio is interpreted as a command. You could combine sensing methods. E.g install a PIR motion sensor in the bathroom and only activate voice recognition if a person is detected. Fit door sensors to the shower cubicle so that the solenoids can't turn on with the doors open.

Return to “Automation, sensing and robotics”