I changed my bash script to set simultaneous then read the voltage / Temp from cached data.  This HAS improved my "noisy" readings by 50%.
See attached trend,  from Monday night you can see an improvement.  The 8:00am slight dip is becaouse the sun shines on my pressure transducer.   Don't know if its also solved my missing data problems too early to tell yet.
 
 
More Filtering options I am thinking about :
 
A/  I have also noticed that Volt.All  Does NOT have the same values as Volt.A Volt.B Volt.C Volt.D.  I thought it maybe one scan behind however they are always slightly different.  On that basis it must be doing two conversions thus I may try and average the Volt.All (1st value) with the Volt.A to provide some averaging which would provide some filtering however not load my SLUG (NSLU2) too much ;
 
B/  I think a better solution maybe to cron start my script every two minutes and the script to loop 5 times which would gather data from 10 devices and average the data over that 5 seconds then save the results.   Is there a recommended limit on retrieving data .. ie 1wire devices / second.
 
Any thoughts on the above options ?
 
cheers
 
----- Original Message -----
Sent: Monday, November 06, 2006 3:03 PM
Subject: Re: [Owfs-developers] Fwd: [owfs - Help] DS2450 and the NSLU2 (SLUG)

Simultaneous uses a known "trick" of the 1-wire system.

Normally you address a specific device before sending a command. All the other devices drop off and stop listening.
If there is only one device on the bus, you can use the special 0x33 command that addresses it.

The convert command for temperature is only recognized by appropriate devices, so using 0x33 on a crowded bus will set every device listening, and all potentially converting. Only temperature sensors will actually do anything with the command. They will all start temperature measurement simultaneously, and all share the same delay.

Same for voltage. (Different "convert" command.

Caveates -- needs a lot of power, so parasytic is unwise.
Can't be in different DS2409 branches.
Timing can get complex if more than one program is accessing the bus.

The other data from the devices is not affected -- but usually don't require a significant delay.
Note the DS2438 can measure voltage on 2 channels, but not simultaneously. Humidity measurements won't be sped up by "simultaneous".

Paul Alfille

On 11/5/06, Serg Oskin <[EMAIL PROTECTED]> wrote:
It starts procedure "convert" on all devices on the bus - hence it actually only
for values volt* and temp*.
While read from simultaneous/volt value "1" (time of it is set by cache-options)
procedure "convert" is not started at data reading from device/volt*. Here an
example of my script for the program similar rrdtool:

[ -f $Base/simultaneous/temperature ] && {
         sim=`cat $Base/simultaneous/temperature`
         if [ "$sim" = "0" ]; then
                 echo 1 >$Base/simultaneous/temperature
         fi
}
val=`cat $Base/$dev/temperature`

It allows very quickly to obtain data from such quantity of gauges:

# ls -d /mnt/1wire/28.* | wc -l
77
#

:)

Rob Conway wrote:
> Serg & Paul,
>
> I use powered devices so I have updated my script to set
> simultaneous/voltage and temp to 1 then read all device data out
> of cached data.  crontab was also starting a rrdtool trend script at the
> same time as my 1wire read script.  It seemed to work OK however I put a
> sleep in my rrdtool script such that my 1wire script can complete first.
>
> Question:  does setting "simultaneous/volt & temp" to 1 initiate a
> reading of just the volts (I assume Volts.all & volt.x) and temp
> parameters or all data from the devices.
>
> cheers
>
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to