By mention of humidity I guess that you are using a telosb,
which might mean that you are trying to use the tmote
Oscilloscope program rather than the "regular" app/O'scope demo.
The messages seem to be different, and the tmote version uses
tinyos-1.x/tos/lib/Oscope to do interesting work. Why that is
in a lib when it is only used by one platform is an exercise
for the reader.
I will attach the README.Oscope from that directory, but I
suspect that you will have to reverse engineer the code in
order to figure out the exact message structure. I will also
attach the tmotesky readme from the Boomerang Oscilloscope
distribution because it contains actual information about
the sensors.
To interpret the serial message structure see this doc:
http://www.octavetech.com/pubs/TB5-01%20Deciphering%20TinyOS%20Serial%20Packets.pdf
which appears to be behind a wall of access now. Perhaps
someone thought to squirrel a copy someplace, so try Google.
I am once again speachlessly befuddled as to why these things
have to be so hard to understand since they are canonical
demo programs, but I guess it's just a feature of TOS that
keeps out the riff-raff. That said, I'm not going to try to
understand for you it either. Good luck.
MS
bouzayani walid wrote:
Thanks Michael,
Yes i used Listen.
In fact, I have little-endian too.
In this case What must that i do ?
And for the channels, how can separate data ?
Thanks very much
______________________________
BOUZAYANI Walid
Student Researcher
CES Laboratory, ENIS Tunisia
bouzayaniwalid2...@yahoo.fr
GSM: (00216) 94 306 603
------------------------------------------------------------------------
*De :* Michael Schippling <sc...@santafe.edu>
*À :* bouzayani walid <bouzayaniwalid2...@yahoo.fr>
*Cc :* tinyos-help@millennium.berkeley.edu
*Envoyé le :* Mercredi, 6 Mai 2009, 19h35mn 40s
*Objet :* Re: [Tinyos-help] Sensors Values
How are you "getting values in cygwin"?
If you are using Listen or some other serial "sniffer"
you'll need to look at the O'scope message structure
in order to interpret the data, remembering that you
probably have two byte little-endian ints sent low
byte first.
MS
bouzayani walid wrote:
> Hello,
>
>
> When i run the oscilloscope application (in tinyos1.x), the values
that i get (in cygwin) are different from the graph of oscilloscope.
>
> In otherwise, the curve isn't constant ( big variation). I'd like to
know how to separate the values of Temperature Data
>
> from Humidity data Light data to obtain three curves (one curve per
sensor).
>
>
> Thanks in advance
>
> ______________________________
> BOUZAYANI Walid
> Student Researcher
> CES Laboratory, ENIS Tunisia
> bouzayaniwalid2...@yahoo.fr <mailto:bouzayaniwalid2...@yahoo.fr>
> GSM: (00216) 94 306 603
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help@millennium.berkeley.edu
<mailto:Tinyos-help@millennium.berkeley.edu>
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
$Id: README.Oscope,v 1.2 2004/12/02 23:21:07 cssharp Exp $
README for Oscope
Author/Contact: tinyos-help@millennium.berkeley.edu
@author Cory Sharp <cssh...@eecs.berkeley.edu>
Description:
Oscope is a library service for easily sending aggregated data in the
packet format recognized by the Oscilloscope visualization application,
net.tinyos.oscope.Oscilloscope. Ten readings are aggregated into a single
Oscope message. The Oscope service manages the aggregation and buffering
for the application and immediately sends an Oscope message as soon as 10
readings are aggregated.
In the application module, sending data to Oscope is a single command:
call OscopeCh0.put( myDataValue ); //a single uint16_t
call OscopeCh1.put( myOtherValue ); //a single uint16_t
The additional wiring for the application configuration is also minimal:
Main.StdControl -> OscopeC.StdControl; //initialize OscopeC
MyApplicationM.OscopeCh0 -> OscopeC.Oscope[0]; //wire to channel 0
MyApplicationM.OscopeCh1 -> OscopeC.Oscope[1]; //wire to channel 1
By default, this service supports up to two channels through the
parameterized interface: 0 and 1. This quantity can be increased (or
decreased) with a compile time definition of OSCOPE_MAX_CHANNELS, for
instance by adding a line like this to your Makefile
CFLAGS += -DOSCOPE_MAX_CHANNELS=4
That's it! Go render some waveforms!
Tools:
Run the Oscilloscope Java visualization like this
java net.tinyos.oscope.oscilloscope
Known bugs/limitations:
Some readings may be dropped by Oscope if a channel fills its oscope data
buffer (10 readings) before that channel's previous data buffer has a
chance to get out over the radio. Dropped readings are indicated when
Oscope.put returns FAIL instead of SUCCESS.
README for Moteiv's Oscilloscope application on Tmote Sky modules
Author/Contact: supp...@moteiv.com
Description:
The OscilloscopeTmoteSky application senses all of the sensors on
Moteiv's Tmote Sky modules and communicates the sensor values over the
radio to a base station running the TOSBase application.
Supported sensors:
Sensirion Relative Humidity Sensor
Sensirion Temperature Sensor
Hamamatsu Photosynthetically Active Radiation Light Sensor
Hamamatsu Total Solar Radiation Light Sensor
TI MSP430 Internal Temperature Sensor
TI MSP430 Internal Voltage Sensor
Oscilloscope channel assignments:
0: Humidity
1: Temperature
2: TSR
3: PAR
4: InternalTemperature
5: InternalVoltage
Usage:
Install one mote with the Oscilloscope application.
Type: make tmote install,#
Where # is the address of the mote
Install a second mote (connected to the PC) with TOSBase.
Go to directory apps/TOSBase
Type: make tmote install
Run: java net.tinyos.oscope.oscilloscope.
If TOSBase is connected to COM3 (check using the motelist command)
then run:
motecom=ser...@com3:tmote java com.moteiv.oscope.oscilloscope
If no readings can be seen:
- check the "scrolling" checkbox
- click the "zoom out y" button to see values > 1024
Converting Tmote Sky sensor readings to SI units:
Lets start with channels 4 and 5 because they use the internal ADC.
The Internal ADC is 12-bits, so to convert the raw value to its
corresponding voltage, you do:
(1) value/4096 * Vref
where Vref = 1.5V
Converting the internal temperature voltage to degrees is described
in the Moteiv datasheet available from moteiv.com.
The internal voltage is reported in millivolts (mV), so no
conversion is necessary.
The TSR and PAR sensors are also measured using the microcontrollers
12-bit ADC with Vref=1.5V. The photodiodes create a current through
a 100kOhm resistor. By calculating the raw voltage using equation (1) above,
convert the voltage into a current using V=IR:
(2) I = Vsensor / 100,000
where Vsensor is the voltage calculated with the raw value and converted
using equation (1). The Moteiv datasheet includes curves for converting
the photodiode's current into light values (Lux).
Humidity and Temperature sensors are located in the external Sensirion
sensor. Their readings can be converted to SI units as follows:
For Temperature, Oscilloscope returns a 14-bit value that can be
converted to degrees Celsius (oC):
(3) temperature = -39.60 + 0.01*SOt
where SOt is the raw output of the sensor.
Humidity is a 12-bit value that is not temperature compensated.
(4) humidity = -4 + 0.0405*SOrh + (-2.8 * 10^-6)*(SOrh^2)
where SOrh is the raw output of the relative humidity sensor
Using this calculation and the temperature measurement, you can correct
the humidity measurement with temperature compensation:
(5) humidity_true = (Tc - 25) * (0.01 + 0.00008*SOrh) + humidity
where Tc is the temperature measured in oC from equation (3),
SOrh is the raw output of the relative humidity sensor,
and humidity is the uncompensated value calculated in equation (4).
Tools:
moteiv/tools/java/com/moteiv/oscope
Known bugs/limitations:
None
_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help