osdir.com
mailing list archive

Subject: problems with temperature readings - msg#00122

List: os.tinyos.users

Date: Prev Next Index Thread: Prev Next Index
Hi,

I am using a MICAz with an MDA300 to do temperature and light readings. I've seen the posts about the problem of using the temperature sensor and the radio because they share one pin. I also have seen the modified PhotoTempM.nc module which is supposed to resolve the problem (look ../platform/micaz), I included in my project.
Now that I have done those changes, I'm trying to receive the the data and this is what I get:

  01 BE 03 88 00

where 01 is the mote number, 03BE is the light reading and 0088 is the temperature reading... I have more readings but they are almost the same.
The problem is that when I do the conversion for the temperature sensor, I get a -10 C which is impossible because I'm into a room and it is very far from the 30 C that we have now. Now I don't know if it is a problem of the shared pin, or if it is a problem of the formula (Which I don't think it is), or what is it?, there is something strange going on too, when I put my hand over the light sensor, the light and the temperature reading changes...both.
I attach a part of the program when I do the readings of the light and temperature, maybe I need to change the way I do it in order to get a correct temperature reading.

event result_t Timer.fired(){            // every time the timer fires it has to make a reading of both sensors
       
        if (cont < 59) cont++;
        else cont=0;
       
        if (cont == 59) return call ADC2.getData();
       
        return SUCCESS;
    }
   
    async event result_t ADC2.dataReady(uint16_t data){         // reading of temperature sensor as it is done in the tutorial
   
       
            atomic{
            data2 = data;
            }
       
       return  call ADC1.getData();
       
        }
   
   
    async event result_t ADC1.dataReady(uint16_t data) {    // reading of the light sensor as it is done in the tutorial
              
            atomic{
            data1 = data;
            }
       
     
            atomic{
            //current data                                                         // here I do the arrengement of the data to send it
            ptrmsg->actual.nodo = TOS_LOCAL_ADDRESS;       
            ptrmsg->actual.sensor1 = data1;
            ptrmsg->actual.sensor2 = data2;
            dada1++;
            ptrmsg->dada1 = dada1;
            }
           
       
        post envio ();                                                          // envio = send , it goes to a post where the data is sended
       
        return SUCCESS;
    }

task void envio () {
        ptrmsg =  call SendMHopMsg.getBuffer(msgptr, &len);
         
        call SendMHopMsg.sendTTL(0x00,sizeof(datos), msgptr,0);
       
    }   

I hope I was clear enough and somebody can help me

 
Daniel Villón V.
-----------------------------------------------------------
Departamento de Ingeniería Telemática.
Universitat Politècnica de Catalunya
-----------------------------------------------------------
C/. Jordi Girona 1-3
Modulo C3 Laboratorio 003
Barcelona CP 08034, España
Teléfono: +34 93 289 36 71
Celular:   +34 697 91 43 53
e-mail: dvil1541@xxxxxxxxxxxxxxxxxx

Was this page helpful?
Yes No
Thread at a glance:

Previous Message by Date: click to view message preview

Blackbook v.5.1 available

Sending this out again because some people didn't get it the first time... Yesterday I uploaded the newest version of Blackbook cross-platform compatible file system to the tinyos-1.x CVS, under /contrib/rincon/. This is a file system that currently runs on tmote's, mica2, mica2dot, micaz, etc. and was designed to be easily ported to other platforms. The TinyOS file system part of it that runs on the mote is in contrib/rincon/apps/Blackbook5. If you're just getting started with Blackbook, I recommend going through the demo apps and reading the documentation under Blackbook5/apps/. The Java programs that let your computer interact with the mote's file system is located at /contrib/rincon/tools/java/com/rincon/blackbook Many bugs were fixed from v.5.0, and longevity testing has been performed on both the mica- and telos mote types. TelosB Standalone (full): 16834 bytes ROM 1012 bytes RAM MicaZ Standalone (full): 20502 bytes ROM 968 bytes RAM The Blackbook 5 API pdf document for this file system can be found in CVS. You can contact me with questions, comments, bug reports, etc. -David

Next Message by Date: click to view message preview

CC2420 rx/tx energy

This is a multi-part message in MIME format. Spam detection software, running on the system "mail.Millennium.Berkeley.EDU", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi all, Does anyone know why CC2420 consumes more energy when receiving data than when sending. I know this issue was already raised and Joe answered that it's because of the modulation scheme. But if anyone could say why exactly decoding of O-QPSK signal costs more energy than encoding , I would appreciate it. [...] Content analysis details: (5.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.2 INVALID_DATE Invalid Date: header (not RFC 2822) 0.0 HTML_60_70 BODY: Message is 60% to 70% HTML 0.0 HTML_MESSAGE BODY: HTML included in message 1.2 MIME_HTML_ONLY BODY: Message only has text/html MIME parts 0.4 DNS_FROM_RFC_ABUSE RBL: Envelope sender in abuse.rfc-ignorant.org 1.8 RCVD_IN_BL_SPAMCOP_NET RBL: Received via a relay in bl.spamcop.net [Blocked - see <http://www.spamcop.net/bl.shtml?212.78.202.209>] 1.4 DNS_FROM_RFC_POST RBL: Envelope sender in postmaster.rfc-ignorant.org 0.1 DNS_FROM_AHBL_RHSBL RBL: From: sender listed in dnsbl.ahbl.org 0.1 MIME_BOUND_NEXTPART Spam tool pattern in MIME boundary The original message was not completely plain text, and may be unsafe to open with some email clients; in particular, it may contain a virus, or confirm that your address can receive spam. If you wish to view it, it may be safer to save it to a file and open it with an editor. --- Begin Message --- Hi all,   Does anyone know why CC2420 consumes more energy when receiving data than when sending. I know this issue was already raised and Joe answered that it's because of the modulation scheme. But if anyone could say why exactly decoding of O-QPSK signal costs more energy than encoding , I would appreciate it.   Thanks Szymon --- End Message ---

Previous Message by Thread: click to view message preview

Blackbook v.5.1 available

Sending this out again because some people didn't get it the first time... Yesterday I uploaded the newest version of Blackbook cross-platform compatible file system to the tinyos-1.x CVS, under /contrib/rincon/. This is a file system that currently runs on tmote's, mica2, mica2dot, micaz, etc. and was designed to be easily ported to other platforms. The TinyOS file system part of it that runs on the mote is in contrib/rincon/apps/Blackbook5. If you're just getting started with Blackbook, I recommend going through the demo apps and reading the documentation under Blackbook5/apps/. The Java programs that let your computer interact with the mote's file system is located at /contrib/rincon/tools/java/com/rincon/blackbook Many bugs were fixed from v.5.0, and longevity testing has been performed on both the mica- and telos mote types. TelosB Standalone (full): 16834 bytes ROM 1012 bytes RAM MicaZ Standalone (full): 20502 bytes ROM 968 bytes RAM The Blackbook 5 API pdf document for this file system can be found in CVS. You can contact me with questions, comments, bug reports, etc. -David

Next Message by Thread: click to view message preview

Re: problems with temperature readings

Hi Daniel: Have you done all the init? Like wiring to the TempStdControl and calling init and start? Have a look at $TOSROOT/apps/Micasbverify/ for an example of how to use the temperature sensor. Also the light and temp sensor share the same pin, so you have to wait sometime before calling ADC1.getData(). I think there was a fix to ensure that there is enough time gap when photo and temp are used at the same time, you will have to check that by looking at the PhotoTemp code. Hope that helps. RaghuMessage: 1Date: Wed, 7 Jun 2006 18:44:09 +0200 From: " Daniel Vill?n " <daniel.villon@xxxxxxxxx>Subject: [Tinyos-help] problems with temperature readingsTo: " tinyos-help@xxxxxxxxxxxxxxxxxxxxxxx"        <tinyos-help@xxxxxxxxxxxxxxxxxxxxxxx>Message-ID:        < b604b0720606070944w5075d624oacb42daba511a6e7@xxxxxxxxxxxxxx>Content-Type: text/plain; charset="iso-8859-1"Hi,I am using a MICAz with an MDA300 to do temperature and light readings. I've seen the posts about the problem of using the temperature sensor and theradio because they share one pin. I also have seen the modifiedPhotoTempM.nc module which is supposed to resolve the problem (look../platform/micaz), I included in my project. Now that I have done those changes, I'm trying to receive the the data andthis is what I get:  01 BE 03 88 00where 01 is the mote number, 03BE is the light reading and 0088 is thetemperature reading... I have more readings but they are almost the same. The problem is that when I do the conversion for the temperature sensor, Iget a -10 C which is impossible because I'm into a room and it is very farfrom the 30 C that we have now. Now I don't know if it is a problem of the shared pin, or if it is a problem of the formula (Which I don't think itis), or what is it?, there is something strange going on too, when I put myhand over the light sensor, the light and the temperature reading changes...both.I attach a part of the program when I do the readings of the light andtemperature, maybe I need to change the way I do it in order to get acorrect temperature reading.event result_t Timer.fired(){            // every time the timer fires ithas to make a reading of both sensors        if (cont < 59) cont++;        else cont=0;        if (cont == 59) return call ADC2.getData();         return SUCCESS;    }    async event result_t ADC2.dataReady(uint16_t data){         // readingof temperature sensor as it is done in the tutorial            atomic{            data2 = data;             }       return  call ADC1.getData();        }    async event result_t ADC1.dataReady(uint16_t data) {    // reading ofthe light sensor as it is done in the tutorial            atomic{             data1 = data;            }            atomic{            //currentdata                                                         // here I dothe arrengement of the data to send it             ptrmsg->actual.nodo = TOS_LOCAL_ADDRESS;            ptrmsg->actual.sensor1 = data1;            ptrmsg->actual.sensor2 = data2;            dada1++;            ptrmsg->dada1 = dada1;             }        post envio();                                                          // envio = send, it goes to a post where the data is sended        return SUCCESS;    } task void envio () {        ptrmsg =  call SendMHopMsg.getBuffer(msgptr, &len);        call SendMHopMsg.sendTTL(0x00,sizeof(datos), msgptr,0);    }I hope I was clear enough and somebody can help me Daniel Villón V.-----------------------------------------------------------Departamento de Ingeniería Telemática.Universitat Politècnica de Catalunya----------------------------------------------------------- C/. Jordi Girona 1-3Modulo C3 Laboratorio 003Barcelona CP 08034, EspañaTeléfono: +34 93 289 36 71Celular:   +34 697 91 43 53e-mail: dvil1541@xxxxxxxxxxxxxxxxxx -------------- next part --------------An HTML attachment was scrubbed...URL: http://mail.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20060607/e76a1935/attachment-0001.htm
Loading Comments...
Home | News | Patents | Sitemap | FAQ | advertise

Advertising by