Feasibility of multi-stage temp controller (newb)

Hello there! To start, I am completely new to all of this. I have never dabbled with electronics, but I am a certified electrical contractor so I understand some of it - maybe.

Basically what I want to do, is make a better multi-stage temperature controller for my field of work, and produce a product that I can sell. By multi-stage temperature controller I mean relays that (1, 2, 3, 4, etc) that open and closed based on a temperature sensor and a programmed temperature.

For example: I have two water heaters in this building. I connect a sensor on the outlet of the two water heaters. I program a setpoint through an interface to have a target of 130 degrees F. I will use two relay outputs from my controller, each to turn on a water heater. So let say the temperature drops to 120 degrees, heater #1 will come on and run until it reaches 130 degrees. If it cannot keep up with load, and the temperature falls to 115 degrees, heater #2 will come on to help it out. I would also need a lead lag system programmed into it, to swap between which heater is the lead and which one comes on if the lead cannot keep up.

It is fairly simple, might have other little things to add to it. But what I would like overall is to be able to control several water heaters with relay outputs, connect a couple of temperature sensors to it, and maybe have it control a pump or two.

To me this sounds like a simple idea, but I have absolutely no experience or knowledge when it comes to the electronics controller of this. I did a good amount of google searching and I kept coming back to Arduino. Is Arduino something that I could use to make a nice little control to do this? Or would something else work better? I am looking for advice and guidance because I am trying desperately to figure out where to start! I know there will be programming involved, might have to pay someone to do that for me. I do have some programming experience but very minimal.

I would be trying to keep this no larger than 5 inches tall, 5 inches wide, and 2 inches deep, and preferably smaller if possible. I would like it to have an LED or liquid crystal, or some kind of screen to be able to change setpoints and values, enable or disable relay outputs, etc.

EDIT: I guess I should add this: I know there are all kinds of temperature controllers out there, but there aren't nearly as many for commercial use as there are for residential use. I am not looking for anything residential. I work strictly commercial with water heaters much larger than you would find in a house. I install and troubleshoot these controllers almost every day. My goal is to create a simpler, cheaper, more cost efficient temperature controller that what I currently find on the market.

Does this sound feasible? Or do I just sound like a total newb? I really hope someone can help point me in the right direction!

Thank you very much for reading.

Yes, that sounds entirely feasible. You will need to identify relays capable of switching the loads (that will be the hard part, but I suspect you're well qualified for that!) and then use a relay driver circuit to drive it. There are some boards which integrate relays with the drive circuit, and if you can find one of these with a sufficient current/voltage rating then you're sorted. If you need to switch mains voltages then for safety's sake I would suggest you use a standard commercial module. They aren't small and they aren't cheap, but you can buy powerswitch tails off the shelf which deal with all the high voltage issues for you.

Mike_Sheppard:
I program a setpoint through an interface to have a target of 130 degrees F. I will use two relay outputs from my controller, each to turn on a water heater.

Does this sound feasible?

I think this is quite feasible but I'm sure you don't need an Arduino for this. You should be working with a minimum storage temperature of about 140F. The thermostats probably already reflect that.

PeterH:
Yes, that sounds entirely feasible. You will need to identify relays capable of switching the loads (that will be the hard part, but I suspect you're well qualified for that!) and then use a relay driver circuit to drive it. There are some boards which integrate relays with the drive circuit, and if you can find one of these with a sufficient current/voltage rating then you're sorted. If you need to switch mains voltages then for safety's sake I would suggest you use a standard commercial module. They aren't small and they aren't cheap, but you can buy powerswitch tails off the shelf which deal with all the high voltage issues for you.

Current wont be an issue as the commercial water heaters they will be controlling are cut on and off by either a 24v or 120v signal, with no load-bearing wiring; the water heaters have a separate power source, but have auxiliary contacts that when broken turn the heater off. Hard to explain but basically the water heaters already have a means of external control built in, low current and voltage, 120 being the highest.

One of the most common controllers I deal with is the T775:

The relays are in the picture below towards the bottom, the green terminals with three screws on each. Sorry this was the best picture I could find.

The T775 is relatively cheap at just over $200, but it is redundant and has many features that simply aren't needed in most applications. Not to mention is is a little bulky, a pain to wire, etc. Why have to pay over $200 just for a control to measure temperature and turn two relays on and off? This is where my idea came from.

Still sounding feasible?

My learning curve here will be learning all the different parts with Arduino and learning how everything works.

Once a product is developed, can it's production be outsourced to mass produce them if I make it with Arduino?

Nick_Pyner:

Mike_Sheppard:
I program a setpoint through an interface to have a target of 130 degrees F. I will use two relay outputs from my controller, each to turn on a water heater.

Does this sound feasible?

I think this is quite feasible but I'm sure you don't need an Arduino for this. You should be working with a minimum storage temperature of about 140F. The thermostats probably already reflect that.

Yes, this is true, temperature will not need to exceed 140F in most cases unless a mixing valve is being used, in which case it would see up to 180-190F depending on the application.

Basically I am trying to figure out how to best go about developing this. I came across Arduino while searching and I figured I would post up and ask. I am having a hard time trying to figure out where to start, what to develop with, etc.

It will basically be a thermostat for commercial use. It will need programable set points for each relay output, temperature differential set points for each main temperature set point (once target of 130F is reached, output will not make again until it has dropped to 120F), lead/lag capability, multiple sensor inputs, etc.

Should I use Arduino to do this, or is there something more efficient and cheaper for what I am trying to do? That is what I am trying to figure out.

Mike_Sheppard:

Nick_Pyner:
[You should be working with a minimum storage temperature of about 140F. The thermostats probably already reflect that.

Yes, this is true, temperature will not need to exceed 140F

No. The storage temperature should always exceed 140F. If you live in a country that has national standards you had better have your lawyer read them, particularly as you intend this for commercial use. The same lawyer might also point out some interesting facts about mixing valves.

I don't think there is anything new in what you propose, and you don't need an Arduino. However, using an Arduino brings three advantages.

  1. The temperature monitoring is bound to be more accurate than the sensors people have been using for years. I don't know if there is any benefit in that but, the bigger the project, the more likely the benefit, I guess. The trouble is that I suspect, the bigger the project, the less likely you are to use a system like this.

  2. The Arduino comes into its own by delivering information, both real-time and long term recording. This might provide data useful for fine tuning the system.

  3. An Arduino-controlled system might be able to use that data to advantage.

Nick_Pyner:

Mike_Sheppard:

Nick_Pyner:
[You should be working with a minimum storage temperature of about 140F. The thermostats probably already reflect that.

Yes, this is true, temperature will not need to exceed 140F

No. The storage temperature should always exceed 140F. If you live in a country that has national standards you had better have your lawyer read them, particularly as you intend this for commercial use. The same lawyer might also point out some interesting facts about mixing valves.

I don't think there is anything new in what you propose, and you don't need an Arduino. However, using an Arduino brings three advantages.

  1. The temperature monitoring is bound to be more accurate than the sensors people have been using for years. I don't know if there is any benefit in that but, the bigger the project, the more likely the benefit, I guess. The trouble is that I suspect, the bigger the project, the less likely you are to use a system like this.

  2. The Arduino comes into its own by delivering information, both real-time and long term recording. This might provide data useful for fine tuning the system.

  3. An Arduino-controlled system might be able to use that data to advantage.

I don't believe we are talking about the same thing here. I am referring to domestic water heaters for showers, sinks, etc in apartment/condo/commercial buildings. Domestic hot water temperature is generally kept around 120F supply to building. I don't know what you are referring to as storage. Most water heaters I work on are set at 120-130F. If they have storage tanks those are set to 120-140 and the heaters are set higher. If there is a 3-way domestic water mixing valve the heaters/tanks are generally set to 160-180F. In old folks homes the domestic hot water temp is generally set to 110F. Anything above 130-140F and you risk burning yourself due to high water temps. There are codes for this, not to exceed 140F for domestic hot water supply.

Anyways, none of that is the point. No where did I mention this was a new idea. My goal is to create a product that is an improvement and more cost effective for the customer.

I made this post looking for advice as a starting point. I have never developed electronic equipment before. I am trying to figure out the best hardware/software/equipment to use to make this work, and upon searching it always brought me back to Arduino.

If I do not need Arduino to do this, what would my next option be? That is what I am trying to figure out. Is there another platform that is tailored more for this kind of project?

All you need is basically a thermostat that switches relays (as you stated). There are many such things available and it would be EASIER just to buy some of those. But if you are interested in electronics, and want to learn how these systems work and how they can be improved for your specific field then choose Arduino.

Your project doesn't sound to difficult. Buy a starter kit (like one with a cheap LCD), and the appropriate temperature sensor and relays. Start by getting a display on the LCD, then a temperature reading etc - logical steps.

By the way I am using relays like these: https://www.google.co.nz/search?q=5v+relay+module&oe=utf-8&rls=org.mozilla:en-GB:official&client=firefox-a&gws_rd=cr&um=1&ie=UTF-8&hl=en&tbm=isch&source=og&sa=N&tab=wi&ei=WeJDUvGUIaTJiAem0YDwBA#facrc=&imgdii=&imgrc=k_G7qXdtYmo8XM%3A%3BfFt6EID1LfOqTM%3Bhttp%253A%252F%252Ffasttechcdn.com%252Fproducts%252F119%252F1196402%252F1196402-4.jpg%3Bhttp%253A%252F%252Fwww.fasttech.com%252Fproduct%252F1196402-arduino-compatible-1-channel-5v-relay-module%3B960%3B520

To switch mains current and haven't had any trouble yet - someone please advise if this is bad practice. But the relays ARE rated for 250V 10A so I guess as long as the device connected doesn't exceed those values its ok.

IF you want to actually build a commercially viable product however there will be hangups. A hell of alot of engineering/testing/development goes into even the most basic things to make sure they meet all the legal requirements for public safety. I remember my engineering lecturer telling me about his caving headlamp design. Took him a few years to get a final design, things like custom fabrication of seals/enclosures and other unexpected things come into play. And if you screw up you will be in trouble with the law. Reminds me of that movie where that guy invents an exercise machine that cuts off someones finger and he looses everything and goes to jail lol.

I think we are talking about exactly the same thing.

Hot water “kept” and in “storage” are the same thing - and both different from “instant” or “tankless” hot water.

I find it hard to believe your domestic hot water is “generally kept” at 120F as this is barely outside the temperature window in which the legionellosis bacterium thrives. If it is kosher to do this where you live, it is very likely that it won’t be next week, so you might as well plan for it now.

Down here in GodsOwn, the regulations essentially boil down to:

  1. It is illegal to store hot water below 60 degrees (140F). Thermostats for HWS cannot be set below this.

  2. All new and renovated domestic services with stored water must have an automatic tempering valve supplying the bathrooms.

  3. Tankless heaters are set to 50 and don’t normally need tempering.

I imagine the regulations are much the same wherever there are regulations.

As I understand it, your problem is one of having a sensible hot water service that can cope with substantial variation in demand. We are in exactly that position using two electric storage heaters in parallel. A solution is simply to take one storage heater out of service and install a tankless heater in series with the remainder. By virtue of the requirements under the code, this will typically be fed with water hotter than its own thermostat cutoff, and thus spend most of its life doing little more than going along for the ride, but will automatically give the boost when required. No Arduino is required for this but, since one is to be installed nearby for other purposes, it’s tempting use it to monitor the situation, although I find the sensors for this a bit daunting, and there isn’t much motivation.

Nick_Pyner:
I think we are talking about exactly the same thing.

Hot water "kept" and in "storage" are the same thing - and both different from "instant" or "tankless" hot water.

I find it hard to believe your domestic hot water is "generally kept" at 120F as this is barely outside the temperature window in which the legionellosis bacterium thrives. If it is kosher to do this where you live, it is very likely that it won't be next week, so you might as well plan for it now.

Down here in GodsOwn, the regulations essentially boil down to:

  1. It is illegal to store hot water below 60 degrees (140F). Thermostats for HWS cannot be set below this.

  2. All new and renovated domestic services with stored water must have an automatic tempering valve supplying the bathrooms.

  3. Tankless heaters are set to 50 and don't normally need tempering.

I imagine the regulations are much the same wherever there are regulations.

As I understand it, your problem is one of having a sensible hot water service that can cope with substantial variation in demand. We are in exactly that position using two electric storage heaters in parallel. A solution is simply to take one storage heater out of service and install a tankless heater in series with the remainder. By virtue of the requirements under the code, this will typically be fed with water hotter than its own thermostat cutoff, and thus spend most of its life doing little more than going along for the ride, but will automatically give the boost when required. No Arduino is required for this but, since one is to be installed nearby for other purposes, it's tempting use it to monitor the situation, although I find the sensors for this a bit daunting, and there isn't much motivation.

Never heard of any laws like that. I live in Northern VA and DC, who have some of the strictest laws and codes regarding anything mechanical. I've worked in literally thousands of buildings, hundreds of government facilities, and never once have I seen a water heater set to operate above 140F unless a storage tank was being used. 90% of my water heater work is done with tankless commercial water heaters. When a mixing valve is not involved even storage tanks are kept below 140F so that people do not get burned and I have read this in DC code. Surely we're not on the same page here.

But again this has nothing to do with my project here. This has been pretty discouraging rather than helpful.

Syphex is right, this is probably too much for a single person to bring to fruition in a reasonable amount of time.

I'm not a builder but my home complies with current building regs in the UK and has a standard conventional Y plan hot water/heating system. The hot water cylinder has a stat which can be adjusted from 80c down to below 40c. Maybe the minimum temperature regulations that Nick_Pyner describes apply to hospitals and hotels and so on, I don't know about that, but it doesn't apply to residential systems.

It would be perfectly feasible to use an Arduino to measure the temperature on the outside of a tank using a simple temp sensor such as a DS18B20 - it just needs a couple of wires and a few lines of code. It would be perfectly feasible to use the Arduino to switch a few relays or powertail switches on and off - it just needs a couple of lines of code. Providing some way for the target temperature range to be defined is the only complex part and that's still not complex. All this is well within the capabilities of an Arduino and perfectly practical for a novice to develop as a DIY project.

If it's something you intend to sell then there you will need to know what approvals it needs to have and should be considering failure modes and redundant protection and liability insurance. A cylinder of water being electrically heated presents some significant risks if the controller fails either through a software/hardware design fault or a hardware failure, and you can be pretty sure that failures will occur. I'd suggest this needs to be designed by or with the help of somebody with prior experience of developing safety critical electronic consumer goods.

There is an alternative approach. Car cooling fans are often controlled by a simple electronic gadget in a sealed unit. While I've never dismantled one to see what is inside, I'd expect to find a thermistor and some simple analog electronics to do a threshold comparison against a voltage set by a potentiometer which turns a transistor on. You'd need to build and package it, but the electronic components are negligibly cheap and all you'd really need externally is a regulated DC supply to power the thing. For other domestic devices I've seen that done by simply putting a wall wart DC transformer inside the same enclosure.

The simple mechanical otter switch does seem like the most obvious solution, though. It'll be cheaper, simpler, and probably more reliable than electronics in a heated environment.

But again this has nothing to do with my project here. This has been pretty discouraging rather than helpful.

Syphex is right, this is probably too much for a single person to bring to fruition in a reasonable amount of time.

This is a pretty simple project and well within the scope of an Arduino, although it's likely a bit tricky for your first one. The issues of certification for commercial use and legal liability however are where the difficulties lie.

PeterH:
I'm not a builder but my home complies with current building regs in the UK and has a standard conventional Y plan hot water/heating system. The hot water cylinder has a stat which can be adjusted from 80c down to below 40c. Maybe the minimum temperature regulations that Nick_Pyner describes apply to hospitals and hotels and so on, I don't know about that, but it doesn't apply to residential systems.

It would be perfectly feasible to use an Arduino to measure the temperature on the outside of a tank using a simple temp sensor such as a DS18B20 - it just needs a couple of wires and a few lines of code. It would be perfectly feasible to use the Arduino to switch a few relays or powertail switches on and off - it just needs a couple of lines of code. Providing some way for the target temperature range to be defined is the only complex part and that's still not complex. All this is well within the capabilities of an Arduino and perfectly practical for a novice to develop as a DIY project.

If it's something you intend to sell then there you will need to know what approvals it needs to have and should be considering failure modes and redundant protection and liability insurance. A cylinder of water being electrically heated presents some significant risks if the controller fails either through a software/hardware design fault or a hardware failure, and you can be pretty sure that failures will occur. I'd suggest this needs to be designed by or with the help of somebody with prior experience of developing safety critical electronic consumer goods.

There is an alternative approach. Car cooling fans are often controlled by a simple electronic gadget in a sealed unit. While I've never dismantled one to see what is inside, I'd expect to find a thermistor and some simple analog electronics to do a threshold comparison against a voltage set by a potentiometer which turns a transistor on. You'd need to build and package it, but the electronic components are negligibly cheap and all you'd really need externally is a regulated DC supply to power the thing. For other domestic devices I've seen that done by simply putting a wall wart DC transformer inside the same enclosure.

The simple mechanical otter switch does seem like the most obvious solution, though. It'll be cheaper, simpler, and probably more reliable than electronics in a heated environment.

Thank you very much for the info Peter!

As far as safety is concerned, the units themselves are already fully safety compliant. All this controller would be doing is remotely allowing heater to turn on or off. If the controller went bad, two things could happen: The controller tells the unit to stay on, which would end up letting the heater operate off it's own controls and thermostats. The heater still has to have it's own operating controls regardless of whether they are also being controller by an outside source. If the controller fails and causes the heater to stay off, people don't have hot water for a little while. I replace these bad controls all the time and in 6 years have never seen any safety hazards from any of them, so I would feel pretty confident about safety issues.

This would need to be powered by either 24vac or 120vac. You have brought back some of my inspiration so I am definitely going to look into it some more.

I am not sure what Nick is referring to at all, I work in hospitals and hotels as well (hotels all the time, almost every day) and I have never seen a domestic hot water system that is required to be above 140F, code does not allow it to go above 140F for safety reasons.

wildbill:

But again this has nothing to do with my project here. This has been pretty discouraging rather than helpful.

Syphex is right, this is probably too much for a single person to bring to fruition in a reasonable amount of time.

This is a pretty simple project and well within the scope of an Arduino, although it's likely a bit tricky for your first one. The issues of certification for commercial use and legal liability however are where the difficulties lie.

I agree, and I will admit I did not take that into consideration before this plan. I will have to look into it some more.

I will also add my 2 cents, which is generally repeating what is said. There is nothing wrong with what you are suggesting and is well within the capabilities of an Arduino, including some fancy interface that allows you do to something complicated.

However, I would be very careful and test out the market before attempting to sell this as a commercial/industrial product. A good part of what you pay for the expensive Honeywell control is the certifications behind it. I imagine it will be hard to convince a company that isn’t a fairly small business to take you seriously without CE/UL/etc certification, and that I believe costs a minimum of about $100K (Last I remember hearing about it at work). I would definitely look into the legal aspects. A possibility for a business (though this might be what you are doing already) is to instead of trying to sell a specific product, learn how to do this and sell yourself as an integrator/specialist/whichever who can save cost by building custom systems and interfaces quickly and cheaply. You still may run into the lack of CE/UL/EN certs, but I think that might be a more legitimate business plan.

Keep in mind there are legal aspects to the open source side of things as well.

PeterH:
The hot water cylinder has a stat which can be adjusted from 80c down to below 40c. Maybe the minimum temperature regulations that Nick_Pyner describes apply to hospitals and hotels and so on, I don't know about that, but it doesn't apply to residential systems.

This may be the case, as I understand the regs are pretty slack-arsed in the UK. There was a story that the recent outbreak of legionella in Edinburgh may have been caused by pennypinching on the thermostat. Being the Daily Mail, quite possibly untrue, but rather less likely to have been written in a country with better regulations. Having said that, the British government Health and Safety Executive has guidelines that look like they were written in Australia:- store at 60, distribute at 50, use tempering valve in the bathroom. Water doesn't discriminate between being fed to a house or a hotel, nor do the thermostats, so the regs here are the same.

Once a product is developed, can it's production be outsourced to mass produce them if I make it with Arduino?

Absolutely. The microcontroller on an Arduino is a garden variety Atmel chip, probably $2 each, less in quantity. The Arduino is just that chip with the minimum required to run that chip: Crystal, USB chip to program it, voltage regulator, and the pins brought out to connectors along the edge.

Pretty simple to port from one Atmel chip to another. So you can develop on an Uno, for instance, which has an Atmel 328P, but if you don't need a chip with so many ports, you can switch to a smaller, cheaper microcontroller.

You just need to have your requirements well-defined.

As described by others, it is probably the certification and legal requirements that'll be difficult.

Nick_Pyner:

PeterH:
The hot water cylinder has a stat which can be adjusted from 80c down to below 40c. Maybe the minimum temperature regulations that Nick_Pyner describes apply to hospitals and hotels and so on, I don't know about that, but it doesn't apply to residential systems.

This may be the case, as I understand the regs are pretty slack-arsed in the UK. There was a story that the recent outbreak of legionella in Edinburgh may have been caused by pennypinching on the thermostat. Being the Daily Mail, quite possibly untrue, but rather less likely to have been written in a country with better regulations. Having said that, the British government Health and Safety Executive has guidelines that look like they were written in Australia:- store at 60, distribute at 50, use tempering valve in the bathroom. Water doesn't discriminate between being fed to a house or a hotel, nor do the thermostats, so the regs here are the same.

Not just in Britain, there are similar rules in other EU countries.

Something to consider. A lot of the older systems use 24V AC as controls voltage (as you already mentioned), but there is quite a push by Carrier and Trane (and thus will trickle down to Honeywell eventually) to move towards 5v logic level controls on a lot of their bigger DDC stuff.

A lot of the honeywell, carrier, trane boards end up using small DC mechanical relays switched by a transistor or something similar. This small relay then switches the load relay using 24V. Carriers new DDC systems coming out look like they are switching the loads directly using logic level (5V DC) SSR's.

It might make sense to develop a board that uses SSR's instead of mechanical relays to switch your heater elements and pumps. This would actually simplify things for you, as you wouldn't need to figure out a way to switch your standard 24V AC relays with the 5/3.3v DC output of the arduino. It seems kind of silly to switch a relay that switches a relay, when you can just use SSR's (Which have come down in price a lot recently!)

SSR's do get hot when amperages climb, you'd need to heat sink them. The downside to using SSR's is that it can be expensive (amd hard) to find an SSR that can handle 575V 30-40amp.

Depending on the load voltage, I would do either one of the following.

  1. Switch load directly using an SSR if the heater coils are 220V or 110V.
  2. Use a cheap SSR (controlled directly by arduino) to switch the coil on a 575V 3 phase contactor.

Using SSR's with microcontrollers offer a lot of benefits, as they are optically isolated, and generally have a really high breakdown voltage. This means that your microcontroller is protected from your load side voltage, and you don't have to worry about inductance voltage spikes that come off of your mechanical relays. It also makes your system a lot quieter, which may or may not be an issue. SSR's certainly don't chatter or hum when approaching the end of their life either, which is nice.

Something to consider as well. Honeywell controllers have all been tested by FCC, IUC etc. This process is EXPENSIVE. I think you'd have a hard time selling a custom controller to any commercial operation, as I doubt that they would be insured if a fire resulted from non-certified parts.

Just the thoughts of a lowly HVAC-R tech.