Starting my first project

Hi to everybody.

I'm new to the forum, but not completely new to arduino. I have used it before in one of my university project, where I had to control a 12pole H-bridge with the PWM ports, but unfortunately, I didn't create the program myself. I'm an power engineer, so electronics isn't a problem for me. Currently I have some spare time, so I wanted to work on some projects, I haven't programmed too much, but I know basic C#/C++ programming.
I wanted to automatize and increase the efficiency of heating in my apartment. Currently I have some cold spots, and in order to keep the temperature at 23 degrees Celsius in one room I end up with other rooms which are very hot or very cold.

My plan is to use arduino to control the central heating. The central heating has a thermostat switch to control the on/off function, but I can't control and regulate the temperature in each room.
I have 6 radiators (one in each room). I'm planning on buying 6 solenoid valves in order to stop/start (via relays) the water flow through each radiator. In each room I want to install a temperature sensor (LM35) to read the temperature and a button to heat the room for 5 minutes independent of the temperature ( a turbo function to heat the room in case I'm feeling too cold). I would also want to use a display to be able too see the set temperature and in order to be able to adjust the desired temperature (it would be nice if I could see and set a desire temperature in each room).

It should work like this:

The arduino reads the temperature sensors and in case one (or more) rooms are under the desired temperature, it puts a digital port to high which is connected through a relay to the heating main switch and starts the heating, and at the same time it puts the digital ports to high for that room(s) in order to activate the solenoid valves on the radiators. Then, as the temperature in each room gets at the desired temperature, it turn off each valve until no valves are opened anymore, at which point it can shut down the central heating.
In case one of the rooms feels too cold (I come inside from extreme cold and I need more heat) I can press the button and the heating comes on for 5-15 minutes in that room.
I want to set the temperature for each room individually, if possible with 2 time schedules (day/night).

Because I'm using 6 temperature sensors and 6 buttons I think I need the arduino mega, because it's the only one which has enough ports.

Can someone help me with my project? I don't want you to do it, I just need some help selecting the right tools (arduino board + display) and to be pointed in the right direction (what to read, where to read, where to ask the questions).

P.S. my heating central system is a gas water heater which is connected through pipes to wall radiators in each room. Each room radiator has it's own pipes, so I can stop them individually.

Thank you very much,

Best regards,

Emanuel

Hi Emanuel,

I guess you could use an arduino for a project like that, but there's quite a lot to consider.
Using just one controller... you'll have a lot to wire and programming 6 displays will probably also
be quite a task.

It's not impossible and... you may even be able to do it with a single non-mega arduino, but... I wouldn't suggest it for a first project.

Using multiple arduinos would make it a bit simpler.

I would probably start with just one room, get acquainted with hard/software before I'd start big projects.

One thing I certainly include would be some PIR-sensors to check whether anyone is actually in the room.
If so... check thermostat and take action, if not... turn off the heat. With an option like that (and my
attention to turn off the heat when I leave a room) the project will pay itself in no-time. XD

Bart.

thanks, I've never thought of that... Actually the PIR part make sense, but I'm also thinking that it takes 10-30 minutes to heat up the room. So I will try to see what solution is better.

I'm planning to use only one display, on which to set the temperature in all the room (normally I don't change it that often) and only one arduino mega. I have no problem wiring, I'm thinking to use cat5 wires.
But my problem is that I don't know what to buy in order to start.
I'm thinking to buy a starter kit with an arduino mega and a display.

What board you'll need depends a little on how you want to work I guess.

There is an advantage in having the nr. of pins of the Mega-board. You could easily attach all switches, sensors, circuits for solenoid valves and display.

The smaller board probably has more then enough memory for your program as well though.
Maybe it hasn't enough pins out of the box, but with a few cheap ICs, you could increase the number of IO-pins you need. There are several techniques to do that. With just two wires of your arduino you could control a network of chips using the I2C-protocol for example. That gives you the possibility to just add some more IO-pins, but also to talk with loads of specialized chips.

Using 3 pins you could work with shift-registers, one will give you 8 I or O pins. The beauty is that you can daisy chain them, the first chip driving the second and the second one driving the third. By placing 20 in a row, you could control 160 pins using just 3 pins on the arduino.

A third method might be using the 1-wire protocol. That also makes it possible to talk with several chips supporting different kinds of functions using just one pin. The number/functions of chips isn't as large as I2C-chips, but it's better at long distances. With a 1-wire temperature sensor and IO-chip in each room... you might be able to control the whole house with just one pin.

Disadvantage may be... that you'll have to know how to drive those chips and read a lot of data-sheet before... you can start/finish a full size project.

For me discovering and getting all kinds of chips/technologies working is what makes the hobby a challenge. Starting a first project, maybe having to spend loads... of time to get it working, can be frustrating though.

One advantage of the Uno (/DIP-based arduino) is... the easily replaced micro controller. Should you accidentally ruin the chip of a Mega-board, you'll have quite a lot of work to replace the chip and maybe even need a new board.

If you already got some electronics laying around, I'd just buy board, LCD-display and components needed. Starter kits with things like buzzers, a number of leds, resistors, light-sensors etc do give the absolute beginner in electronics some possibility to experiment, but if you already know a little I wouldn't spend the money.

The LCD could be a text-based or graphical based one. I'd go for an text-LCD based on the HD44780-chip. Those are probably most used by arduinoists and are available in several sizes, 2x16 characters, 2x20, 4x20 and other formats...

It's not easy to tell you what you could use best, since there are many ways to create what you want.

I hope I haven't made your choice more difficult sofar XD

actually you did. But it's ok.
Since I haven't worked with an arduino too much I still think I would go with the mega since I barely know programing (not my filed of studies), and at the same time i don't know anything about I2C protocols or 1 wire-protocol.
My house is not big, it's a 3 room apartment around 60m2 and the controller will be in the center, so I have no problem wit the length of the cables.
Right now I'm trying to decide what to buy in order to start working with arduino and familiarize myself with it, but at the same time, I'm a student, so I can't afford buying more than I need. In this case I want to buy one micro-controller and use it for learning and then to put it in the project.
I'll look also into your Idea.
I thought about buying the starter kit because I get the arduino and display at a pretty decent price (all the other passive electronics are useless to me, since I already have a breadboard and a full storage room with passive component at the university lab)

If it's for the right prize I'd just go for it.
Having one makes it far easier as hearing about it XD

I've been searching far too long before I bought mine, thought I knew what I would get, but the possibilities still surprise me daily.

Should you want to look at "difficult" techniques/protocols/etc you always can, at least you're not forced to.

One last thing I would seriously consider is how to turn on/off the heat in case you should work on another project or get unforeseen hard/software-problems. You can easily unplug most other projects and fix 'm a few weeks later, but this one... might need immediate attention.

thought about that problem. no biggie, I'll just have a manual switch for the valves (using a simple contact, and for the central heating I'll use the old thermostat, which it currently use).

Another thing that might be a problem is water hammer if you use solenoid valves. Solenoids are "bang-on, bang-off" and if water is flowing this can cause a hammer throughout your system (and maybe even your neighbours).


Rob

thanks graynomad. I've forgot about that. Well, my neighbors don't anything to do with my central heating since I have my own gas heater, but I've forgot about the pressure buildup and the hammer effect.
I have to calculate that now, but I think that shouldn't be a problem. My parents heating system has around 2 bars, and it can safely take 3 bars (after that the heater safe-valve pumps out excess pressure), and the pipes can take up to 10bars.
but still will suck.
do you have any alternative to the solenoid valve approach?

do you have any alternative to the solenoid valve approach?

I'm a frayed knot.

You can get servo-operated ball valves but I've only seen industrial versions for $$$$.

There must be something cheaper around though.


Rob

what if I use PWM and a thyristor to close the valve. might not work to smooth, but at least I should be able to do it in 2-3 steps.

Hmmm I wouldn't bet on it but maybe. It might just do nothing until a threshold is reached then slam shut.

Then again maybe not, the water pressure might give you a soft close.

I've not done anything with solenoids except just apply Vs straight up in the normal way so I really can't say.

In the absence of a solenoid guru pitching in I guess you'll have to get one and give it a try. If you do I'd really like to know the results.

EDIT: Not a thyristor, they don't turn off. Just a transistor or FET.


Rob

sorry, meant transistor. :slight_smile:

The hardware store has devices that help with the water hammer situation, like a little reservoir of air that you attach to the system to act as a shock absorber.

I think you're going to find out that the water flows through the radiators in series. The water recirculates from the tank, through the radiators, and back through the tank, right? You would then have to bypass any particular radiator instead of cutting off water flow.

What about controlling the flow of air through the radiators? You may want to use fans anyway.

well, I can't use those water reservoirs, since I'm using pexal for the water pipes, which is in open view. The heaters are in parallel. and I don't have any fans since it's naturally ventilated. I think the only solution is PWM.

Water Solenoid Electric Valve - 12V DC 3/8" Normally Closed 2-Way for Air, Gas, Diesel Oil good to 80°C
http://www.virtualvillage.com/3-8-electric-solenoid-valve-for-water-gas-diesel-12v-dc-001540-031.html?utm_source=googlebase&utm_medium=shcomp
or
http://compare.ebay.com/like/300530254950?var=lv&ltyp=AllFixedPriceItemTypes&var=sbar&rvr_id=219285844334&crlp=1_263602_309572&UA=WVF%3F&GUID=c15d49fb12c0a03662039833ffdc1833&itemid=300530254950&ff4=263602_309572

I'm sure you can find others like the ones used in dishwashers and so on. Pexal won't bang like metal pipe and should take a sudden change. But if it is a problem you can use an arrester like these
http://www.google.com/products/catalog?q=water+hammer+arrester.&hl=en&client=firefox-a&hs=hHY&rls=org.mozilla:en-US:official&prmd=ivns&biw=1590&bih=855&bav=on.2,or.r_gc.r_pw.&um=1&ie=UTF-8&cid=4373672689626390701&sa=X&ei=O6iFTZ3KK8XPgAeypLHNCA&ved=0CGIQ8wIwAA#

To read the temp I would use a(ds1820b) lots of sample code and simple to use over cat5. I'm not an electrical engineer but I'm pretty sure you could control the valves using a relay or mosfet on the same cat5 line. The valve being powered at each radiator.

I am currently building a automotive hvac control that does pretty much what your looking to do. Most of the code is done and I'd be happy to share it with you.

For display I'm using 7segment leds and a max7219 to drive them. I bought the max7219's on ebay http://cgi.ebay.com/MAX7219-MAX7219CNG-8-Digit-LED-Display-Driver-IC-DIP-24-/260581860674?pt=LH_DefaultDomain_0&hash=item3cabe3a542 you will need 6 7segment leds to display 3 rooms this chip will handle 8 so you could also read outside temp. with 8 . The Arduino Uno will be more then enough to take care of your system. And for a few bucks you can replace the uno with a standalone atmega 328 and have you arduino for the next project.

Forgot your displaying in °C so your going to want 3 digits for each room to display the decimal. so you'll need 2 max7219's. I love this chip easy to hookup and easy to code.
3 digit 7segment displays like these with common cathode
http://cgi.ebay.com/10x-0-56-3-Digit-Red-LED-Display-Common-Cathode-12pins-/320537737104?pt=LH_DefaultDomain_0&hash=item4aa189b790

I did a quick video of my project

Displays in °F or °C can adjust temp between 60°F and 90°F .
You'll notice the mode door that is activated via servo as temp is adjusted.
The led panel is temporary to represent actuators on the A/C unit.
Hope it helps

Mike