Electronics > Beginners

Finally got my first project actually complete.

(1/2) > >>

paulca:
You know how it is, part finished projects building up, but I finally finished one today.

Raspberry PI heating display node.

(More photos: https://imgur.com/a/mK6si )

It's quite light on electronics, just a bog standard 16x2 HD44780  LCD display, a set of jumpers and a 2.2K resistor for contrast adjust.  The screen contains a current limit resistor for the back light, it draws about 18mA.

The coolness in is the software and networking design.  Nodes in the heating system are one of a few types:

1.  The central hub (1 of)
2.  Probe nodes (many) which send temperature (or other values) to the hub.
3.  Display nodes (many) which read values from the hub and display the data, not just temps, but historical and statistical data and of course control statuses.
4.  Controller nodes (many) which like display nodes read values from the hub but then control items such as the boiler relay or potentially radiator valves and lights via Wifi or BT.

Temps and other data can be added without configuration to the hub, it will just create storage for any new data "key" it is provided.  All nodes requesting data receive all data available.

Still quite a lot of software to do.  The display currently only shows "DS - downstairs" and "OD - Outdoor" temps.  The plan is to make it display:

1.  Current Temps (possible multiple screens)
2.  MaxMin 1 hour
3.  MaxMin 24 hour
4.  Gradient (rise/fail rate last hour)
5.  Heating status
6.  Active schedule name
7.  Next schedule name and time

The displays will cycle, 3 seconds per screen and I might introduce a button or two for control, such as "OVERRIDE OFF/ON" etc.

Big thanks to this: https://learn.adafruit.com/drive-a-16x2-lcd-directly-with-a-raspberry-pi/wiring although I improvised a few things.  The contrast only needs a single resistor to GND, not a full divider, which makes final wiring easier and I put all my GPIO pins down the same side of the header cause I was feeling a bit pedantic and OCD that day.

Forgot to mention that the hub produces RRDs for each temperature.  RRD=Round Robin Database.  It's a fixed size database that once full averages down the data to a lower resolution and overwrites.  So you get, for example, 1 month of 1 minute resolution data, 12 months of 5 minute resolution data and 10 years of 1 hour resolution data.  These can then be used to generate graphs like this:



See: https://oss.oetiker.ch/rrdtool/

capt bullshot:
Great idea,I like this kind of stuff. The enclosure looks nice, did you design it?
I'd prefer a somewhat larger graphic LCD (320x240), so one could display more values at once.

I've done similar at my home. Lots of data end up in various RRDs, mostly temperatures, power consumption, ...
It's a grown system that gets new guts from time to time: http://wunderkis.de/datenkrake/index.html
Some public data here: http://wc.wunderkis.de/webcam1.php

English titles for the diagrams:
Temperature (outdoor),
Absolute Humidity (outdoor),
Barometric Pressure,
Precipitation,
Power from Solar Panels

paulca:

--- Quote from: capt bullshot on December 03, 2017, 10:23:44 pm ---Great idea,I like this kind of stuff. The enclosure looks nice, did you design it?
I'd prefer a somewhat larger graphic LCD (320x240), so one could display more values at once.

I've done similar at my home. Lots of data end up in various RRDs, mostly temperatures, power consumption, ...
It's a grown system that gets new guts from time to time: http://wunderkis.de/datenkrake/index.html
Some public data here: http://wc.wunderkis.de/webcam1.php

--- End quote ---

Love the weather station idea.  Love applying what you know to solve a problem, because "You can.".  :)

I can lift 100 weather stations off a shelf, but I can bet that they aren't as configurable, controllable, tinkerable and extendable as the one you built.

Similarly my larger project is heating control and then possibly out to more home automation.  I'm convinced with the right software, sensors and control I can create a heating control system that works for me, the environment and my wallet.

For example, I have forumlae in my head for ramp times and indoor versus outdoor differentials in order to calculate pre-heat time to meet a large step up in a scheduled temperature demand.  Such as coming home from work or getting up in the morning.

Say for example it's 18*C inside, 10*C outdoors at 4pm and the next schedule is 5:45pm when I want it to be 22*C.  Based on the differential of the outdoor and indoor temperatures and a configurable constant, the pre-ramp can be calculated to reach 22*C by 5:45.  I also considered for efficiency this should ramp the temp slowly, not jump it and hope the timing is right.  If the timing is right the heating can go to 100% and just reach 22*C by 5:45, but if the pre-ramp is out it could get to 22*C half an hourearly.  By ramping the target temp linearly (for now) across the estimated ramp time it will never top out at target temp too early and waste fuel.

Then there is detecting my presence.  That 'should' be fairly easy to do with bluetooth and my mobile.  A schedule override should occur when I am present.  If I have a day off, the house should not cool through the day and ramp up at 5:45.  It should provide sensible temperatures all day.  If I come home early from work I can't complain it didn't preheat the house, but I can accept that it starts the heating immediately that I arrive.

Detecting 'where' I am is more difficult.  Am I in bed or up late watching TV?  The answer would change the heating demand.

Layered schedules seem to be the key.  A base of something like 5*C would cover 24/7 365.  If no other schedule applies it would default to that.  A weekday and weekend layer could be added to keep the place mostly 16*C+ even when I'm not in.  Basic time schedules based on when I get up and go to work or come home would set my main target temp and facilitate pre-heat/ramps.  Then a general "I'm in" override with no heating overnight, but 22*C heating all day.  The highest priority active schedule governs the control.  Inheritance in the profiles is doable and might be advantageous, but probably a head ***k to do.

The pains of heating and home automation is that the corporates are of course jumping in heavy, so proprietary, closed black box systems are prevailing.  No surprises there.  There are a few open source protocols one can implement to.  I haven't done enough research to comment much.  It matters when you want to buy a remotely operated radiator valve.  The proprietary devices will only work with "their" systems.  Honeywell, Philips, Nest and I'm sure Apple are all closed protocol incompatible frameworks.

I want open bits and white boxes so I can do what "I" want with them, not what their pesky cheap, glitzy and glitchy software provides.  I would rather have an A4 page of terminal style plain text output that's accurate and informative than 4 values in pretty colours with a nice "rounded edged boxes" bootstrap web UI with cheese easy to understand controls.  I'm an engineer god dammit!

I'll stop....

paulca:
Case is from here: https://www.ebay.co.uk/usr/hobby_parts_and_supplies?_trksid=p2047675.l2559

Larger display is something I had toyed with, maybe for version 2.  It would be nice to have a larger display and the raspberry is more than capable of making that easy to do.  A 3" colour X display would feel like cheating though.

Displaying a 10 line labelled list of temps or other data instead of 5 pages of dual readings on a 16x2 will become appealing soon I'm sure.  That said, for heating control I need little more than temperature.

There is always a balance between tinkering and playing and buying advanced stuff off the shelf and wiring it up.  An X display takes things into a very deep rabbit hole of GUI design. 

A 16x2 display is so much less complex, but allows for some ingenious UIs to emerge if done right.  Not for the millennial generation maybe. 

I might have to get into the lower level of the 16x2 to tweak.    Bits, words and bytes, shifts, ORs and ANDs, lovely.  Then move up to bigger more abstracted displays.

Jwillis:
That is really cool ! Congrats!

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod