EcoRenovator  

Go Back   EcoRenovator > Improvements > Geothermal & Heat Pumps
Advanced Search
 


Blog 60+ Home Energy Saving Tips Recent Posts Search Today's Posts Mark Forums Read


Reply
 
Thread Tools Display Modes
Old 07-09-14, 04:41 PM   #81
jeff5may
Supreme EcoRenovator
 
Join Date: Jan 2010
Location: elizabethtown, ky, USA
Posts: 2,428
Thanks: 431
Thanked 619 Times in 517 Posts
Send a message via Yahoo to jeff5may
Default

Quote:
Originally Posted by Ormston View Post
I fully understand the advantage of a whole bunch of sensors only using 1 pin, however i like any system i implement to be maintainable.

It may be possible for the system to detect a missing sensor, find the new one on the bus and replace the missing one with the address of new one and store in it to eprom.

But what if a 2 sensors need replacing, or if you get the plumber in to replace you're water cylinder and he puts all the sensors back in the wrong place or damages several whilst working(i have 5 DS18B20's on my current water cylinder alone).
That piece of software you wrote and kinda kept notes on may make perfect sense in 6 months time, what about in 5 or 10 years.
Will you still remember how to re-code all the sensors, will you even have a PC with the Arduino software and all those obscure library's you found on that eco something forum that no longer exists?

Everyone can have their own method/documentation for keeping their system maintained/repaired.
I intend to keep spares of everything, Arduino's already programmed with the sketch, sensors with a plug fitted ready to swap after the plumber visits.

Steve
That's where the tmp or LM sensors come in. They can be packaged exactly like the Dallas or maxim sensors. But they spit out analog voltag like a thermistor. If one fails you just change it. No funky serial numbers or anything.


Last edited by jeff5may; 07-09-14 at 07:55 PM..
jeff5may is offline   Reply With Quote
The Following User Says Thank You to jeff5may For This Useful Post:
Ormston (07-09-14)
Old 07-09-14, 04:52 PM   #82
takyka
Helper EcoRenovator
 
Join Date: Jul 2014
Location: Hungary
Posts: 34
Thanks: 0
Thanked 16 Times in 10 Posts
Default my controller source code

Hello,

First of all thank you for kind welcome!
I added my source code to github. As I can't add links yet, please go to https:// github dot com slash takyka slash heatpump to get it.

The starting point is "heatpump.ino"
I know, the code is ugly looking, sorry for that. But at least no goto used at all. :-)

There is Hungarian text in some places (presented by the software on the web status page) I will translate it to English sometime.

I will start a new thread here to discuss the sw in detail (if you want to).

T.
takyka is offline   Reply With Quote
Old 07-09-14, 05:29 PM   #83
Ormston
Apprentice EcoRenovator
 
Join Date: Mar 2013
Location: UK
Posts: 131
Thanks: 13
Thanked 35 Times in 32 Posts
Default

Last year i wrote a overly complicated weather compensation function to control our ASHP (we have no internal thermostat).
It was based on the method Worcester Bosch(Rebadged IVT) GSHP's use and matched the heat curves in their manual perfectly.
All winter i adjusted the settings, the heat curve, the ofset, the hysteresis and sometimes the house was the correct temperature. Then the weather would change and we'd be too hot again, more adjustment and a week later it'd be chilly in the house.
By march when i turned the heating off we had is sussed and the only time the system didn't cope well was after a few days with very high solar gain.

The short version, it took a whole winter of messing to get the weather compensation set correctly.

Towards the end of winter i was asked to look at a GSHP and a ASHP at 2 properties owned by a local builder, both were alarming due to incorrectly set weather compensation with the heat pumps objecting to the return temp or the water being far higher than they expected. The heat pumps were fighting the internal thermostats.

The GSHP used the system i had copied(I had commissioned the heat pump for him 2 years earlier) so i made a guess at how much to turn it down and told him to call me if it still alarmed. Nothing yet

The ASHP (by the same manufacturer) had a complete different method of setting up the weather compensation. One that doesn't involve picking a number between 1 and 10 and waiting to see what happens and even better in can be re-created in Arduino with only line of code.

For anyone that wants weather compensation and hasn't fallen asleep yet.


DesiredWaterTemp = map(osTemp, coldOS, hotOS, coldWater, hotWater);

Descriptions

DesiredWaterTemp is the return temp from your heat emitter or buffer tank.

osTemp it the current outside temp

coldOS is the outside temp on a cold day, you need to record this value and the required water return temp needed to heat your house.
coldWater is the return water temp you recorded on the above cold day

hotOS is the outside temp on a warm day (that still requires heating), you need to record this value and the required water return temp needed to heat your house.
hotWater is the return water temp you recorded on the above hot day

Hope someone finds this useful

Steve
Ormston is offline   Reply With Quote
Old 07-09-14, 09:47 PM   #84
jeff5may
Supreme EcoRenovator
 
Join Date: Jan 2010
Location: elizabethtown, ky, USA
Posts: 2,428
Thanks: 431
Thanked 619 Times in 517 Posts
Send a message via Yahoo to jeff5may
Default

AC,

OK, I did some research about the RS485 serial, and it seems to be almost just like standard (RS232) serial, only with balanced line output. The arduinos don't natively support it, so you're going to have to add an adapter. The bad new is if you use the built in serial port to translate, you will need 3 pins: D0, D1, and 1 more digital pin. So for a generic MAX485 board, you will connect the 3 digital pins, 5V, and ground to the module, totaling 5 pins.

Last edited by jeff5may; 07-09-14 at 09:50 PM..
jeff5may is offline   Reply With Quote
Old 07-09-14, 11:01 PM   #85
AC_Hacker
Supreme EcoRenovator
 
AC_Hacker's Avatar
 
Join Date: Mar 2009
Location: Portland, OR
Posts: 4,004
Thanks: 303
Thanked 723 Times in 534 Posts
Default

Quote:
Originally Posted by jeff5may View Post
AC,

OK, I did some research about the RS485 serial, and it seems to be almost just like standard (RS232) serial, only with balanced line output. The arduinos don't natively support it, so you're going to have to add an adapter. The bad new is if you use the built in serial port to translate, you will need 3 pins: D0, D1, and 1 more digital pin. So for a generic MAX485 board, you will connect the 3 digital pins, 5V, and ground to the module, totaling 5 pins.
Good work.

I've been ripping & rending on my house lately, to move things in the direction of a highly insulated room with a low-temperature hydronic floor (in preparation for the heat pump install). So, I've been more focused on nail pounding, than keyboard pounding.

So, I think I'll build a board using the hardware you choose, but my application will be a bit different... so that will get us at least that much closer closer to a GPC board, made from very widely available hardware.

I understand the thinking behind having a serial port because that can
not only allow monitoring & logging, but it opens the possibility of making a standalone controller become a sub controller in a more complex setup... right?

So jeff5may, if you think we have enough pins to do the job, let's go with it.

Keep me current as to what you consider to be the hardware requirements, and I'll do an order...

So far, it looks like:
  • Arduing Mega R3
  • DFRobot LCD Shield
  • RS485 adapter (shield? chip?)
  • 4-relay shield
...am I up to date?

* * *

BTW, I was having a bit of trouble getting to takyka's code at 'github', so HERE_IS_A_LINK to his code, which he has generously shared with us. Thank you so much!

-AC
__________________
I'm not an HVAC technician. In fact, I'm barely even a hacker...

Last edited by AC_Hacker; 07-09-14 at 11:16 PM..
AC_Hacker is offline   Reply With Quote
Old 07-09-14, 11:09 PM   #86
NiHaoMike
Supreme EcoRenovator
 
NiHaoMike's Avatar
 
Join Date: Oct 2008
Location: Austin, TX
Posts: 1,154
Thanks: 14
Thanked 257 Times in 241 Posts
Default

STM32 is cheaper and more capable than Arduino Mega.
__________________
To my surprise, shortly after Naomi Wu gave me a bit of fame for making good use of solar power, Allie Moore got really jealous of her...
NiHaoMike is offline   Reply With Quote
Old 07-10-14, 06:13 AM   #87
takyka
Helper EcoRenovator
 
Join Date: Jul 2014
Location: Hungary
Posts: 34
Thanks: 0
Thanked 16 Times in 10 Posts
Default

What functionality is planned here for the controller, a 32bit microcontroller is not mandatory. However a good thing.
I don't have any problem, handling floating point numbers by Mega even it has to deal lot's of stuff concurrently. Having a 32bit controller is good thing, but
huge advantage of arduino, the popularity, convenient, beginner friendly development, wide range of shields and libraries. These things help work off 8bit controller's handicap.
Can be I'm wrong here, I don't know nothing about STM32 ecosystem.

Related to 1wire, I'm not afraid to share one 1w line with multiple sensors. To (re)place new sensor and assign it to any function is easy from my config menu. No need to reprogram the controller. Any time attached sensor is detected automatically and listed as unused. I like ds18b20 because it's calibrated out of factory and high resolution. However it's quite slow.

rs485 does not specify any protocol, used for communication. It is specification to the electrical characteristics of the communication. If you want to use rs485 to communicate to remote PC I would recommend ethernet and TCP/IP instead. You may avoid PC side programming and implementation of a communication protocol.

If I would start the development of my controller with my current experience, I would go with beagle bone black instead of any microcontroller. To implement concurent tasks, having web interface is a pain in microcontrollers. Why I didn't choose BBB in the begining, I was afraid about realtime processing capabilities. Meanwhile I realised, there are two PRUs (32bit independent microcontrollers capable to reach I/O and shared memory) in BBB. Those could handle easily time critical tasks.

T.
takyka is offline   Reply With Quote
Old 07-10-14, 10:27 PM   #88
jeff5may
Supreme EcoRenovator
 
Join Date: Jan 2010
Location: elizabethtown, ky, USA
Posts: 2,428
Thanks: 431
Thanked 619 Times in 517 Posts
Send a message via Yahoo to jeff5may
Default

AC,

For the first version of a controller, I would like to use an uno. Having less pins isn't a bad thing unless you want to do something like takyka did, and have gobs of sensors and comms in lots of platforms at once. Actually, i kinda picked the lcd shield i did because it gobbles up some pins, while making others available to directly wire to the shield. That way, the uno can be easily yanked to change sketches or whatever and be put right back into the unit. While it's running, the keypad is available to mess with "user" functions and menus built into the sketch. Or you can use an icsp connector in situ (or usb - hopefully: not 100% sure until i see it work with serial comms off pins)to program. Either way, the shield will still fit on a mega and have more pins open for expansion later.

I have a good question for you: what kind of data is the thing you will be controlling this unit with going to be sending and receiving? Switch states? readings of what frequency? Keep alive sgnals?

When we get this uno version working, a mega version can be built with a massive amount of possibilities (aka huge configuration file, a handful of libraries, and massive setup/conditions/states/ menus) built in. By then, it will be easier for me to attack and manage the beast.
jeff5may is offline   Reply With Quote
Old 07-10-14, 11:52 PM   #89
NiHaoMike
Supreme EcoRenovator
 
NiHaoMike's Avatar
 
Join Date: Oct 2008
Location: Austin, TX
Posts: 1,154
Thanks: 14
Thanked 257 Times in 241 Posts
Default

Use a RTOS (such as FreeRTOS) to handle multiple tasks at once.
__________________
To my surprise, shortly after Naomi Wu gave me a bit of fame for making good use of solar power, Allie Moore got really jealous of her...
NiHaoMike is offline   Reply With Quote
Old 07-11-14, 02:11 AM   #90
AC_Hacker
Supreme EcoRenovator
 
AC_Hacker's Avatar
 
Join Date: Mar 2009
Location: Portland, OR
Posts: 4,004
Thanks: 303
Thanked 723 Times in 534 Posts
Default

Quote:
Originally Posted by NiHaoMike View Post
Use a RTOS (such as FreeRTOS) to handle multiple tasks at once.
NiHaoMike,

These are such splendid ideas.

Don't you really think they belong on your "Advanced Heat Pump Controller" thread?

You did start one, right?

-AC

__________________
I'm not an HVAC technician. In fact, I'm barely even a hacker...
AC_Hacker is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 09:46 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Ad Management by RedTyger
Inactive Reminders By Icora Web Design