element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Forget Me Not Design Challenge
  • Challenges & Projects
  • Design Challenges
  • Forget Me Not Design Challenge
  • More
  • Cancel
Forget Me Not Design Challenge
Blog eLDERmon  External Sensor (cont)
  • Blog
  • Forum
  • Documents
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: mcb1
  • Date Created: 4 Apr 2018 11:59 AM Date Created
  • Views 1007 views
  • Likes 1 like
  • Comments 0 comments
  • forget_me_not
  • b+
  • design_challenge
  • openhab
  • iot_eldermon
  • tektronix
  • rpisoc
  • eclipse
  • internet_of_things
  • enocean
  • raspberrypi
  • smarthome
  • challenge
  • iot
  • moteino
  • enocean_pi
  • arduino
Related
Recommended

eLDERmon  External Sensor (cont)

mcb1
mcb1
4 Apr 2018

This blog is to detail the changes made to my external sensor. (Hot Water)

I've had a few days to apply some thought and to review what information was relevant.

 

 

In my post here  eLDERmon Graphs  I made this comment

 

It has highlighted that the Hot Water temperature sketch needs adjusting.

Currently it will send if the temperature varies by 0.1 deg, and for this purpose that is too fine.

 

I really need to apply some logarithmic scaling, or incorporate time into the decision to send or not to send.

At the moment the RF isn't causing any issues, but it is consuming lots of RPi time.

 

image

 

Currently the sensor sends when the temperature changes by 0.1 deg.

 

if (t > (tempValue_previous + 0.1)|| (t < (tempValue_previous - 0.1)))
       // only send if not the same  
       {
            //send data  
            theData.deviceID = 6;  
            theData.var1_usl = millis();  
            //theData.var2_float = f;    // Fahrenheit 
            theData.var2_float = t;  
            theData.var3_float = 0;  
            radio.sendWithRetry(GATEWAYID, (const void*)(&theData), sizeof(theData));         
            tempValue_previous = t;

 

This produces a very nice graph, but it also contributes lots of RF 'noise' and gives little additional information.

It is was solar or battery powered the consumption would be a problem.

 

I want to know when the Hot Water was being used and for how long.

image

          slightly modified graph with the relevant points of interest.

 

The graph above does not show an extended use (shower), but if the top was flat I'd expect to know when it started dropping as well.

 

 

Modified sketch

I have modified the transmitter sketch, to only look for a 0.5 degree change, and to report the first increase, keep track of the climb, and report the top.

Once there it looks for a drop and reports, then tracks the drop and reports at the bottom OR if it climbs again.

 

 

 

edit 04/04/18

It appears that this sat in draft form until I discovered it today.

I had asummed that there was some glitch with a red banner of death, and the content was copied into another blog post.

 

Seems that was wrong ... it also explains why I thought I had posted the modified code and couldn't find it image

 

Mark

Attachments:
eLDERMON_Remote_Temp.ZIP
  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube