Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Measuring on-time of a heater


Dale Reid Sep 13, 2024 03:05 AM

I've installed several c1000 systems with rather complete meteorologic sensors (wind, humindity, Baro, solar, precip) ready for a winter's monitoring.

As a little fun add on, I wanted to measure how much a house was calling for heat (time thermostat was on) and use this to look at temperature changes each day (sort of like degree days) compared to sunshine each day, wind speed, and humidity, essentially how many minutes per hou or day was there a call for heat..

In order to do that, I need to accumulate the on-time of the heating unit (furnace, heat pump, etc.)

I have an isolated switch closure for sensing when the building's thermostat is calling for heat.  I initially thought it would be similar to looking at the tipping bucket rain sensor, but instead of counting pulses, I would be counting minutes that the switch was closed. 

I planned on looking at a switch closure every minute in a scan, and if it were True, just record that as a 'pulse'.  I could count or sum the sensed on detections and either plot those as acccumulated values or for the whole day.  In order to see how much wind and direction and temperature changes with fronts, knowing if the heating unit were running at the start of every minute with the scan would be close enough.

I suspected there would be some code snippet or discussion here for other 'total time on and when' data collection needs.

I'm not sure what sensor to use.  It really isn't a pulse to accumulate, but just whether at the start of the scan the switch is closed.  Also, I'm running out of pulse inputs, so I thought of having the switch closure cause a voltage be pulled to ground via resister, thus meauring excitation voltage when off, and 0 when on.  Not tidy, but would work.

Am I missing something in reading through the CRBasic commands on how to capture data, and could someone point me to further reading or an easy solution? 

I thought this would be trivial, and the kludges I've come up with don't seem to be very elegant.

Thoughts or suggestions?  This isn't a vital part of the project, but an add on to make the project a little more fun.

Thanks.  Dale


JDavis Sep 13, 2024 04:59 PM

You are thinking in the right direction.Totalize() in a data table, and use the DisableVar parameter.

 

'CR1000X Series Datalogger

Public Switch_mV As Float
Public SwitchOpen As Boolean
Dim MinutesOn = 1

'Define Data Tables
DataTable (Test,1,-1) 'Set table size to # of records, or -1 to autoallocate.
  DataInterval (0,1,Hr,10)
  Totalize (1,MinutesOn,Long,SwitchOpen)
EndTable

'Main Program
BeginProg
  Scan (1,Sec,0,0)
    VoltSe (Switch_mV,1,mV5000,1,False,0,15000,1.0,0)
    SwitchOpen = Switch_mV > 2500
    CallTable Test
  NextScan
EndProg

 


Dale Reid Sep 18, 2024 12:01 AM

This post is under review.

Log in or register to post/reply in the forum.