View Single Post
Old 10-01-14, 01:09 PM   #2
SDMCF
Apprentice EcoRenovator
 
Join Date: Jul 2014
Location: Finland
Posts: 125
Thanks: 5
Thanked 35 Times in 34 Posts
Default

I have made a start on the project, so this post is a description of what progress I have made so far. Let's start with the hardware.

The guts of the controller is an Arduino. I have bought a mega and an uno and I don't know yet which I will use. This is my first Arduino project so I am learning as I go.

I will use 1-wire temperature sensors. Initially I have been testing with two of these, one for a freezer and one for a fridge. I bought a few more in case I think of other applications.

For the internet access I will use an Ethernet shield.

To switch on & off the power for the controlled device(s) I will use a relay board. I have boards with 2, 4 and 8 relays. They are all basically the same, so I can use any of them, depending on the number of devices I decide to control.

To log temperatures and relay actions etc I will use the SD card on the Ethernet shield.

To provide a user interface I will using an LCD display. I bought some that were originally intended for Nokia 5110 GSM phones. Not very fancy but workable and cheap.

For configuration and a more sophisticated user interface I will create a web page for the controller which I can access with a browser.

I have a real time clock board so the controller knows the time of day.

I think that is about it for the hardware I have obtained so far. I would like to add hardware to measure the current used by the controlled device(s) but I have not given enough thought to that yet.

The approach I am taking to the software is to split the task into smaller sub-tasks and test each of these individually. When I have proven each one I will combine them into a single sketch. So far what I have working is:

Temperature reading with the 1-wire sensors. I can read the temperatures from multiple sensors on the same 1-wire bus.

I can log the temperature settings (or anything else I guess) to a text file on the SD card. I will create a new file for each day. I haven't yet finalised the layout of the text file.

I have tested output to the LCD. I have put the current temperature on a web page which I can view from any PC on my home LAN. (I have tested using a dynamic DNS service to make this data available over the internet, but I don't see any reason to do that in the final version). I have not yet tried any configuration settings via this web page.

I am able to set the time of day on the real time clock by checking the time on an internet NTP server. I can find the UTC time and I can add an offset for my timezone, but there is one bit for which I don't yet have a solution. I don't know how the controller can discover whether summer time is in operation, so I could be an hour wrong with the time I set.

I am able to switch relays on & off, with LEDs to indicate which relays are on.

At the moment I am working on getting electricity price data from the internet at Market data | Nord Pool Spot
As a native speaker of Pascal rather than C++ I have prototyped this using Delphi on a PC. I now have to port the code to C++ on the Arduino.
The web page gives the bulk price of electricity on the spot market, in euro per mWh. My price per kWh is the bulk price plus a fixed markup. I could convert the published price to my price but I don't think I need to. I am interested in the relative price at different times of the day, not the absolute price, so I can use the raw published data and don't need to change anything if the markup ever changes.

Summary: I think I am well on the way to understanding everything required for this project and I have proof-of-concept code for most of the individual elements of it. Soon I will start adding these building blocks together to create a full working controller. At that stage I can provide some photos and code.
SDMCF is offline   Reply With Quote
The Following User Says Thank You to SDMCF For This Useful Post:
AC_Hacker (10-07-14)