10-08-14, 10:48 AM | #11 | |
Apprentice EcoRenovator
Join Date: Jul 2014
Location: Finland
Posts: 125
Thanks: 5
Thanked 35 Times in 34 Posts
|
Quote:
It sounds like your prices are less volatile than mine. Mine changes on the hour, every hour, in an unpredictable manner. |
|
10-08-14, 10:55 AM | #12 |
Supreme EcoRenovator
|
Im working on a sketch for a universal heat pump and temperature controller in another thread. I'm having issues with the way to read and store multiple one wire sensors. Can you elaborate on the method you're using? I'm trying to save as much memory as possible.
|
10-08-14, 01:46 PM | #13 | |
Apprentice EcoRenovator
Join Date: Mar 2013
Location: UK
Posts: 131
Thanks: 13
Thanked 35 Times in 32 Posts
|
Quote:
The library I mentioned does measure import/export using a single 100A ct exactly as you need, to do this it also needs to measure the voltage using a AC/AC transformer at the same time. If you look round openenergymonitor.org you will find people have built solar diverters. Steve |
|
The Following User Says Thank You to Ormston For This Useful Post: | Mikesolar (10-08-14) |
10-09-14, 02:00 AM | #14 | |
Apprentice EcoRenovator
Join Date: Jul 2014
Location: Finland
Posts: 125
Thanks: 5
Thanked 35 Times in 34 Posts
|
Quote:
I tried (and failed) with a couple of different approaches to the 1-wire stuff before I found Arduino 1-Wire Tutorial which I was able to use. The libraries I use are OneWire.h version 2.1 and DallasTemperature.h version 3.7.2 A sketch called Multiple.ino supplied with the DalasTemperature library works as expected with 0, 1 or 2 sensors. I have not tried using more than 2 sensors. The supplied sketch has hard-coded device addresses which is not ideal, but it will get you started. I am currently using code that finds the device addresses and resolutions of all sensors attached to the 1-wire bus, which is better. I can post that code at the weekend if you want it. However, I still have the names of my devices hard-coded, so I have to know which one will be found first in order to correctly identify them as fridge or freezer. Eventually I will make it possible to assign temperature sensor locations via the user interface, but I am not at that stage yet. |
|
10-09-14, 06:28 PM | #15 |
Supreme EcoRenovator
|
Due to the low pin count and onboard memory of the Uno, doing anything really elaborate with the data structure or interface will quickly gobble up all available memory. I'm trying to save RAM for the processor, buffers, and temporary variables as much as possible to avoid ugly things from happening. Plus, it saves more space for vital functionality and expansion later.
The controller, being universal and robust, should be able to find and track as many one wire sensors as the end user cares to connect. I am having no trouble with only one sensor, but with multiple sensors, I am looking for some code that can grab the addresses and data and write the values to an array or a matrix or something. Once the values are sorted and written somewhere, it will be easy for me (or someone smarter) to assign, log, display, and do other operations to them. Any code you can post or link to would be highly appreciated. What I'm finding in this (arduino) realm is just a google of snippets of code that call other modules or libraries to do most of the actual work. While this approach is OK for a device that only does one or two things, it's not very robust. It also ties up a whole lot of real estate on the chip, making the program run slower. |
10-09-14, 11:45 PM | #16 | ||
Apprentice EcoRenovator
Join Date: Jul 2014
Location: Finland
Posts: 125
Thanks: 5
Thanked 35 Times in 34 Posts
|
Quote:
Quote:
|
||
10-10-14, 01:22 AM | #17 | |
Supreme EcoRenovator
Join Date: Mar 2009
Location: Portland, OR
Posts: 4,004
Thanks: 303
Thanked 724 Times in 534 Posts
|
Quote:
Perhaps his source code could be useful for this project. -AC
__________________
I'm not an HVAC technician. In fact, I'm barely even a hacker... |
|
The Following User Says Thank You to AC_Hacker For This Useful Post: | jeff5may (10-10-14) |
10-13-14, 11:00 AM | #18 |
Supreme EcoRenovator
|
SDMCF,
Yes, if I was using a mega with a few additional shields, it would be much easier. In a future project, this might happen. For this project, a uno with hardly nothing else is specified. Very few libraries, an LCD keypad for user control, optional USB/serial interface, a 4-channel relay shield to manage high-power devices, and some sensors is all this controller will have in its basic form. The main objective is to specify a small "kit" to work with, and have some sketches that will just load and work. As a matter of fact, someone has already mentioned counting power pulses from smart meters (via the visible flashing LED) to monitor usage as dependable and reliable. Just search and browse.... AC, Thank you very much for pointing me towards that code! I've heard you talking about that little logger stamp before, but I didn't know it was able to assign and store 1-wire sensors like it does. Having skimmed through the source code, I believe I can adapt some gems in it for the uno-based stamp. From the structure and comments, it's obvious a lot of work was put into the source code. I hope I can glean something from it without screwing it up... Last edited by jeff5may; 10-13-14 at 04:07 PM.. |
10-18-14, 07:22 AM | #19 |
Apprentice EcoRenovator
Join Date: Jul 2014
Location: Finland
Posts: 125
Thanks: 5
Thanked 35 Times in 34 Posts
|
Sorry, been away. Expected to be back last Saturday but was only home for a couple of hours before rushing out again, so here I am a week later. Should be static for a while now. Do you still want a look at my sensor code? I'll put it up if so.
I had seen stuff about monitoring the flashes from the meter to count electricity usage. It sounds nice and I have bought a sensor to try that sometime, but it isn't what I want to do in this project. Here, I just want to monitor the power used by the devices which my controller controls, rather than all the power used in the house. |
Thread Tools | |
Display Modes | |
|
|