Comfort Home Automation/ Security System Forums Home
Home Search search Menu menu Not logged in - Login | Register

ISM02 Analogue Input Filtering
 Moderated by: slychiu
 New Topic   Reply   Printer Friendly 
 Rate Topic 
AuthorPost
 Posted: Sunday Jul 30th, 2017 04:11 pm
   PM  Quote  Reply 
1st Post
rollem
Member
 

Joined: Monday Feb 19th, 2007
Location: Chester, United Kingdom
Posts: 21
Status: 
Offline

  back to top

I have an analogue 0-10V light level sensor attached to my ISM02. The value that comfort reads when the light level is decreasing (or increasing) is not very stable. In comfort 0=10V is scaled 0-255. 
I have the input threshold set to 55 and the sensor report offset set to 5. Even with this filtering the value can jump above and below the set point many times before its dark enough (or light enough) to remain in the correct state. The value can change more than 10 points in either direction.


Would it be possible to have a better filtering option on the input that could maybe average the last X number of measured values? With X being a variable that could be set?
My current workaround is to set another flag (which only sets on the first cross of the threshold in a day) using a response attached to the sensor but I feel this isn't the most elegant solution as this response gets called almost continuously.




Last edited on Sunday Jul 30th, 2017 07:55 pm by rollem



 Posted: Monday Jul 31st, 2017 11:29 am
   PM  Quote  Reply 
2nd Post
slychiu
Administrator


Joined: Saturday Apr 29th, 2006
Location: Singapore
Posts: 4099
Status: 
Offline

  back to top

Thye next version of Comfigurator will be able to map 0-10V to Virtual Inputs. Virtual Input can be asigned to any unused Input eg on a slave which is not installed

This allows the input to be activated when the threshold is crossed, ie when it becomes dark.

Your problem is that the sensor is very erratic, or it fluctuates a lot due to changing light conditions.

You can program a Zone Response;
Start a timer for eg 2 minutes assuming the exact time is not critical. At the end of the timer, check the zone again, if the zone is stil on, that means the light is definately low
That means that  the light has to go low for 2 minutes  to be confirmed

This would be an effective filter





 Posted: Monday Jul 31st, 2017 02:02 pm
   PM  Quote  Reply 
3rd Post
John W
Member
 

Joined: Wednesday Feb 18th, 2009
Location: United Kingdom
Posts: 74
Status: 
Offline

  back to top

slychiu,
surely this would give a positive if it were true only twice at those two times.
To get a better 'debounce' you would need to sample more values. set the timer for say 20 seconds, and in conjunction with a counter, count x (say 6) consecutive readings.
If any of the readings at timer expiry is false, cancel timer and clear counter, awaiting for the next threshold crossing.
if counter reaches 6 then its dark.

Just a thought.



 Posted: Tuesday Aug 1st, 2017 02:25 am
   PM  Quote  Reply 
4th Post
slychiu
Administrator


Joined: Saturday Apr 29th, 2006
Location: Singapore
Posts: 4099
Status: 
Offline

  back to top

Actually, the method I described will give True if there is consecutive period of no light
Each transition from light to no light will cause the input to turn on and restart the timer for x minutes
Only if. Only if there is no more No light transitions will the timer expire and the inpuit checked again

ie if the light is fluctuating, the timer gets restarted, and when it stoips fluctuating, then the timer runs to the end



 Posted: Tuesday Aug 1st, 2017 11:17 pm
   PM  Quote  Reply 
5th Post
John W
Member
 

Joined: Wednesday Feb 18th, 2009
Location: United Kingdom
Posts: 74
Status: 
Offline

  back to top

Yep, I'm with you now. Makes sense.



 Current time is 02:25 pm
Top




UltraBB 1.172 Copyright © 2007-2014 Data 1 Systems