Author Topic: OpenTRV  (Read 5032 times)

0 Members and 1 Guest are viewing this topic.

DamonHD

  • Super Hero Member Plus
  • *******
  • Posts: 4130
  • Country: gb
    • Earth Notes
OpenTRV
« on: January 20, 2013, 03:47:13 PM »
Amongst other things I've been having a lot of fun with this over the last few days:

http://www.earth.org.uk/open-source-programmable-thermostatic-radiator-valve.html

ie developing a retrofit completely-open reference mechanical/hardware/software design for zoned heating control, with radiators and central heating AKA "hydronic heating" I believe.

It just seems that no one has a complete entirely open solution and all existing DIY has to be done with a closed overpriced system with limited extensibility, or with hacked or reverse-engineered equipment.

So I have been playing for the first time with PICAXE, and I think that I now have the skeleton of a system that will work with an existing TRV (reverse engineered wireless protocol) and X10 to call for heat from the boiler.

https://sourceforge.net/p/opentrv/code-0/78/tree/trunk/PICAXE/DHD201302L0/skeleton.bas

I have a stream of (fairly cheap) hardware coming at me from various suppliers to get this V0.001 running!

The first programs I wrote 30+ years ago were BASIC on our (first) school computer (a RM380Z) and our home MZ80K, and this PICAXE takes a very slightly smarter version, but fits in an 8+-pin chip and runs off batteries!

Rgds

Damon
Podcast: https://www.earth.org.uk/SECTION_podcast.html

@DamonHD@mastodon.social

Bruce S

  • Global Moderator
  • Super Hero Member Plus
  • *****
  • Posts: 5413
  • Country: us
  • USA
Re: OpenTRV
« Reply #1 on: January 23, 2013, 10:52:22 PM »
Damon;
Interesting follow through on the programming. Very well documented, even with parts being cutoff due to line length, was easy to follow.
What do you intend to use for the LDR or RoominUse sensor ? and will you possibly use multiples to decrease false positives?
Funny how a small program such as Basic and Fortan has survived and become popular again.
I'm by no stretch a programmer, gave it up when lines of code started going well beyond 1000 lines.
Then came the new C , C++ etc.
This will be an interesting thread to follow.
Bruce S
 
A kind word often goes unsaid BUT never goes unheard

DamonHD

  • Super Hero Member Plus
  • *******
  • Posts: 4130
  • Country: gb
    • Earth Notes
Re: OpenTRV
« Reply #2 on: January 24, 2013, 02:50:10 AM »
There is an LDR built into the prototyping board I'm using, so for simplicity I ordered duplicates, but within reason it shouldn't be that critical.

I think that I may increase confidence that the room is vacant the more sensors agree on that, and the longer that they agree on it, and I my use a larger setback as that confidence grows.

Rgds

Damon

PS. My aim is to use PIR (ie movement), but voice detection is another possibility for example.
« Last Edit: January 24, 2013, 04:11:58 AM by DamonHD »
Podcast: https://www.earth.org.uk/SECTION_podcast.html

@DamonHD@mastodon.social

Mary B

  • user
  • SuperHero Member
  • *****
  • Posts: 3213
Re: OpenTRV
« Reply #3 on: January 24, 2013, 03:43:34 PM »
I have a picaxe board, LCD display and a proto board I am not using, needs a new 5 volt regulator (I shorted 2 wires by accident and fried it), open to offers.

Simen

  • Sr. Member
  • ****
  • Posts: 479
  • Country: no
  • Grimstad, Norway
Re: OpenTRV
« Reply #4 on: January 24, 2013, 05:08:03 PM »
I just bought 50pc's of 78L05 regulators for around $8, but it would probably cost me twice that to send one to you... ;)

Edit;
But you could probably just run that picaxe for weeks with 3 AA batteries just fine... :*)
I will accept the rules that you feel necessary to your freedom. I am free, no matter what rules surround me. If I find them tolerable, I tolerate them; if I find them too obnoxious, I break them. I am free because I know that I alone am morally responsible for everything I do. - (R. A. Heinlein)

DamonHD

  • Super Hero Member Plus
  • *******
  • Posts: 4130
  • Country: gb
    • Earth Notes
Re: OpenTRV
« Reply #5 on: January 25, 2013, 03:31:02 AM »
Hey, that's very kind both of you, but I've got plenty of parts; my main pressure (self-imposed) at the moment is time.

A little breakthrough last night: the guy decoding the FHT8V TRV wireless protocol has it all working (on a different microcontroller and slightly different transmitter), so if I can replicate that over the weekend I think that I can get the first version working end-to-end by Monday!

Rgds

Damon
« Last Edit: January 26, 2013, 01:20:41 PM by DamonHD »
Podcast: https://www.earth.org.uk/SECTION_podcast.html

@DamonHD@mastodon.social

DamonHD

  • Super Hero Member Plus
  • *******
  • Posts: 4130
  • Country: gb
    • Earth Notes
Re: OpenTRV
« Reply #6 on: January 26, 2013, 01:19:46 PM »
Testing right now absolute minimalist control of boiler from PICAXE 'thermostat' as substitute for 2-wire mechanical (240VAC) thermostat: https://sourceforge.net/p/opentrv/code-0/130/tree/trunk/PICAXE/DHD201302L0/08M2-minimal.bas

Rgds

Damon
Podcast: https://www.earth.org.uk/SECTION_podcast.html

@DamonHD@mastodon.social

DamonHD

  • Super Hero Member Plus
  • *******
  • Posts: 4130
  • Country: gb
    • Earth Notes
Re: OpenTRV
« Reply #7 on: February 13, 2013, 03:45:21 PM »
Managed to control my wireless TRV from the PICAXE (with a lot of help!) and it's right now controlling my room temperature.

Going to combine that with direct/wired boiler control tomorrow and make the kitchen the first 'soft zone' able to "call for heat" by itself, at least temporarily.  (I'm doing things very inefficiently right now and power consumption is, I think, way too high.)

I've had to put together a library and the start of some unit tests to get this far!

Main code here:

https://sourceforge.net/p/opentrv/code-0/326/tree/trunk/PICAXE/DHD201302L0/bsrc/main/TRVControl.bas

Library code here:

https://sourceforge.net/p/opentrv/code-0/326/tree/trunk/PICAXE/lib/

Rgds

Damon

Podcast: https://www.earth.org.uk/SECTION_podcast.html

@DamonHD@mastodon.social

OperaHouse

  • Hero Member
  • *****
  • Posts: 1315
  • Country: us
Re: OpenTRV
« Reply #8 on: February 13, 2013, 04:00:50 PM »
I still don't know what TRV is and I wonder how many people will ever find this who actually want it under that heading some time in the future. 

DamonHD

  • Super Hero Member Plus
  • *******
  • Posts: 4130
  • Country: gb
    • Earth Notes
Re: OpenTRV
« Reply #9 on: February 13, 2013, 04:12:51 PM »
Thermostatic Radiator Valve
Podcast: https://www.earth.org.uk/SECTION_podcast.html

@DamonHD@mastodon.social

DamonHD

  • Super Hero Member Plus
  • *******
  • Posts: 4130
  • Country: gb
    • Earth Notes
Re: OpenTRV
« Reply #10 on: February 26, 2013, 02:18:43 PM »
Hurrah!  I just got it all working from valve to flame (the one in the boiler; no magic smoke yet!) today.

So when my room gets cold my PICAXE board sends a wireless message to the radiator TRV to turn on AND the PICAXE board in the kitchen turns on the boiler, regardless of any other thermostat, so my room is its own heating zone.

Rgds

Damon
Podcast: https://www.earth.org.uk/SECTION_podcast.html

@DamonHD@mastodon.social

Bruce S

  • Global Moderator
  • Super Hero Member Plus
  • *****
  • Posts: 5413
  • Country: us
  • USA
Re: OpenTRV
« Reply #11 on: February 26, 2013, 06:14:06 PM »
Nice ;D
I'll be curious to read the rest of the software layout.
NOW big question, does the links make sure that only that room is heated via boiler and tempering valves?
Which senors did you go with infrared or ??
OR did I miss those posts?
Bruce S
A kind word often goes unsaid BUT never goes unheard

DamonHD

  • Super Hero Member Plus
  • *******
  • Posts: 4130
  • Country: gb
    • Earth Notes
Re: OpenTRV
« Reply #12 on: February 26, 2013, 11:17:53 PM »
Hi,

1) When I get my (Open)TRV installed in the living room, then yes, basically, only the rooms needing heat will get heat, and at the requested level.

2) Currently I'm just using ambient light levels as a simple proxy for occupancy.  If it's too dark to see you don't need the heat cranked right up (and you're probably out of the room or asleep) so the target temperature is dropped by a degree.  I'd like to add PIR and/or other occupancy sensing.

3) See a snapshot of hardware and software here:

http://www.earth.org.uk/OpenTRV/snap...BoilerNode.bas
http://www.earth.org.uk/OpenTRV/snap...ststub.out.bas
http://www.earth.org.uk/OpenTRV/snap...1302L0.out.bas
http://www.earth.org.uk/OpenTRV/snap...302L0-r429.pdf

With a photo or two here:

http://gallery.hd.org/_c/energy-matt...4-DHD.jpg.html

Rgds

Damon
Podcast: https://www.earth.org.uk/SECTION_podcast.html

@DamonHD@mastodon.social

SparWeb

  • Global Moderator
  • Super Hero Member Plus
  • *****
  • Posts: 5452
  • Country: ca
    • Wind Turbine Project Field Notes
Re: OpenTRV
« Reply #13 on: April 20, 2013, 06:06:41 PM »
Hi Damon,
The links attached above have been forshortened by "..." in both the text and URL link.
I was able to find some, since a 404 page included a search bar.

Such as this:
http://gallery.hd.org/_c/energy-matters/_more2012/_more11/thermostatic-radiator-valve-programmable-terrier-i30-with-LCD-display-buttons-and-thumbwheel-screw-on-replacement-for-dumb-TRV-packshot-1-DHD.jpg.html

No one believes the theory except the one who developed it. Everyone believes the experiment except the one who ran it.
System spec: 135w BP multicrystalline panels, Xantrex C40, DIY 10ft (3m) diameter wind turbine, Tri-Star TS60, 800AH x 24V AGM Battery, Xantrex SW4024
www.sparweb.ca

SparWeb

  • Global Moderator
  • Super Hero Member Plus
  • *****
  • Posts: 5452
  • Country: ca
    • Wind Turbine Project Field Notes
Re: OpenTRV
« Reply #14 on: April 20, 2013, 06:11:50 PM »

I take it that this is the current "typical" programmable TRV device available to consumers. 
I see no sign of remote communications with these, so now I appreciate how you want to operate a small "network" of regulators from a central hub.
No one believes the theory except the one who developed it. Everyone believes the experiment except the one who ran it.
System spec: 135w BP multicrystalline panels, Xantrex C40, DIY 10ft (3m) diameter wind turbine, Tri-Star TS60, 800AH x 24V AGM Battery, Xantrex SW4024
www.sparweb.ca

DamonHD

  • Super Hero Member Plus
  • *******
  • Posts: 4130
  • Country: gb
    • Earth Notes
Re: OpenTRV
« Reply #15 on: April 21, 2013, 06:25:26 AM »
Yes, indeed, the two key issues that we are addressing which I could not find together are (a) ability to call for heat from the central boiler and (b) occupancy sensing and automatic adaptation.

Note that (a) does not imply being *controlled* by a central node (I like a fairly autonomous model), but some use cases imply that central control would be the best scheme.

Rgds

Damon

PS. Thanks for link fixing: must be my error somehow...
Podcast: https://www.earth.org.uk/SECTION_podcast.html

@DamonHD@mastodon.social