Post a new topicPost a reply Page 1 of 1   [ 10 posts ]
Author Message
 Post subject: problem with wasps
PostPosted: Wed Jun 13, 2012 8:13 pm 

Joined: Tue Mar 08, 2011 8:56 pm
Posts: 66
Hello,
It's been a long time I am using 5 waspmotes with gas sensors. For almost 1 year all worked good but now all 5 of them seem not to report gas readings.
2 out of three gas sensors (NO2 and CO) show a constant value 3.29999.. throughout working (true for all 5 modules). This didn't start for all at once but within last one month all 5 became 'ill'.

Please tell me what is wrong with them.

Thanks.

Regards,

Z


Top
 Profile  
 
 Post subject: Re: problem with wasps
PostPosted: Thu Jun 14, 2012 9:02 am 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7472
zeus2kx,

We understand that your problem is not about communication, due to some data is received.

So, the problem is that sensor values are not right. Is it OK?

Maybe you already did it, but, could you please check if sensor connections are OK? Compare it with socket description into corresponding programming guide.

Another question. Could you describe where sensor are placed?

Let us know.

Regards.


Top
 Profile  
 
 Post subject: Re: problem with wasps
PostPosted: Thu Jun 14, 2012 9:36 am 

Joined: Tue Mar 08, 2011 8:56 pm
Posts: 66
Thanks for reply.
As I mentioned that all those 5 wasps worked for almost one year and now they have stopped working correctly.
Again, two sensors are giving me constant values (which are not changing as they used to few days ago).
Neither code nor sockets of sensors were changed during the period.

Kindly help me solve this issue.

Thanks again.

Best,


Top
 Profile  
 
 Post subject: Re: problem with wasps
PostPosted: Thu Jun 14, 2012 10:15 am 

Joined: Tue Mar 08, 2011 8:56 pm
Posts: 66
libelium-dev wrote:
Another question. Could you describe where sensor are placed?

They are exactly connected as sensor manual suggests.
Here is the photo:
http://img689.imageshack.us/img689/20/waspo.jpg


Here is the code:
Code:
char T[30];
char co[30];
char voc[30];
char no2[30];
float CO_value = 0;
float VOC_value = 0;
float NO2_value = 0;
char bat[30];
char time1[30];
float value = 0;
int battery = 0;
uint8_t state = 0;
void setup(){
 
  USB.begin();
  SensorGas.setBoardMode(SENS_ON);
  SensorGas.configureSensor(SENS_SOCKET3B, 1, 1); 
  SensorGas.configureSensor(SENS_SOCKET2A, 1, 0.45);
  SensorGas.setSensorMode(SENS_ON, SENS_SOCKET2A);
  SensorGas.configureSensor(SENS_SOCKET2B, 2, 3);
  SensorGas.setSensorMode(SENS_ON, SENS_SOCKET2B);
 
  RTC.ON();
  USB.println("Processing Node 2");
  SD.ON();
  if(SD.create("Data_2.csv")) USB.println("'Data_2.csv' created");
//  if(SD.appendln("Data_2.csv","GPStime,GPSdate,Temp,Battery,Lat,Long,Alt,Speed,Course,Vout_CO,Vout_VOC,Vout_NO2\r\n")) USB.println("Header created");
  RTC.setTime("12:03:06:03:13:18:00"); //year, month, date, day, hour, minute and second
 
}
void loop()
{
   char* sd_data = (char*) calloc(125,sizeof(char));
   char* data = (char*) calloc(125,sizeof(char));

  value = RTC.getTemperature();                         
  Utils.long2array(value,T);
  delay(29000);
 
  CO_value = SensorGas.readValue(SENS_SOCKET3B);
  USB.print("CO Node 2: ");
  USB.println(CO_value);
  Utils.float2String(CO_value,co,10);

  VOC_value = SensorGas.readValue(SENS_SOCKET2A);
  USB.print("VOC Node 2: ");
  USB.println(VOC_value);
  Utils.float2String(VOC_value,voc,10);

  NO2_value = SensorGas.readValue(SENS_SOCKET2B);
  USB.print("NO2 Node 2: ");
  USB.println(NO2_value);
  Utils.float2String(NO2_value,no2,10);
 
  USB.print("Battery Level Node 2: ");
  USB.print(PWR.getBatteryLevel(),DEC);
  USB.println(" %");
  battery = PWR.getBatteryLevel();
 
  char* time_date;
  time_date = RTC.getTime();
  USB.println(time_date);

  sprintf(time1,"%s",time_date);
  sprintf(bat,"%d",battery);
  sprintf(sd_data, "%s,%s,%s,%s,%s,%s",time_date,T,bat,co,voc,no2);
  SD.appendln("Data_2.csv", sd_data);
  USB.println("FLUSHING NOW !!");
  USB.flush();
 
   free(data);
   data=NULL;
   
   free(sd_data);
   sd_data=NULL;
   
}


Top
 Profile  
 
 Post subject: Re: problem with wasps
PostPosted: Thu Jun 14, 2012 10:19 am 

Joined: Tue Mar 08, 2011 8:56 pm
Posts: 66
And here is the output:
http://img11.imageshack.us/img11/8188/outputo.jpg

Ignore the day and date - they are not set.


Top
 Profile  
 
 Post subject: Re: problem with wasps
PostPosted: Fri Jun 15, 2012 12:30 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7472
Hi zeus2kx,

your code seems correct, and given that it has been working for a long time I suppose there is no problem with it.

Is it possible to manipulate your motes, I mean, are they in your lab or deployed in an accessible place? If this is the case, could you try to reset them and, if it doesn't work, reload the code? In case they are not accessible, in which conditions were they deployed?

A question about the output: those static values at 3.3V you are getting, were progresively reached, this is, voltage started to increase until the 3.3V or it was of a sudden?

Regards.


Top
 Profile  
 
 Post subject: Re: problem with wasps
PostPosted: Fri Jun 15, 2012 12:48 pm 

Joined: Tue Mar 08, 2011 8:56 pm
Posts: 66
libelium-dev wrote:
Is it possible to manipulate your motes, I mean, are they in your lab or deployed in an accessible place? If this is the case, could you try to reset them and, if it doesn't work, reload the code? In case they are not accessible, in which conditions were they deployed?

I have them all in lab and have already reloaded code many times but this doesn't help.

libelium-dev wrote:
A question about the output: those static values at 3.3V you are getting, were progresively reached, this is, voltage started to increase until the 3.3V or it was of a sudden?

This value started from beginning of the respective day of failure.


Top
 Profile  
 
 Post subject: Re: problem with wasps
PostPosted: Mon Jun 18, 2012 9:37 am 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7472
Hi zeus2kx,

please, reconnect all and try this code to check if there is a hardware problem. Anyway, take into account that you configured a 1k load resistor for the CO sensor, being the minimum resistor for this sensor of 10k, as indicated in the data sheet and board technical guide, so it may have been damaged.

Code:
// Set delay here
#define TIME 30000

// Set resistor here
#define RESISTOR 10
#define GAIN 1 

float value=0;

void setup(){
  // Init USB port
  USB.begin();
  USB.println("Gases Sensor Board..");

  //switch on the gases sensor board
  SensorGas.setBoardMode(SENS_ON);
  delay(100);
  // Init RTC
  RTC.ON(); 
  delay(100);

  SensorGas.configureSensor(SENS_SOCKET2B,GAIN,RESISTOR);
  SensorGas.configureSensor(SENS_SOCKET3B,GAIN,RESISTOR); 
  SensorGas.setSensorMode(SENS_ON,SENS_SOCKET2B);
  USB.println("Heating Sensor...");
  delay(TIME);

}

void loop(){

  value = SensorGas.readValue(SENS_SOCKET2B);

  USB.print("NO2 :");
  USB.print(value);

  value = SensorGas.readValue(SENS_SOCKET3B);
 
  USB.print(" CO :");
  USB.print(value);
 
  delay(1000);

}


Regards.


Top
 Profile  
 
 Post subject: Re: problem with wasps
PostPosted: Mon Jun 18, 2012 11:29 am 

Joined: Tue Mar 08, 2011 8:56 pm
Posts: 66
Thanks. It seems like this code solved the problem. Actually change in load resistance to 10K for both CO and NO2 did the magic.
In case of NO2 you are applying 10K instead of 3K.

libelium-dev wrote:
Anyway, take into account that you configured a 1k load resistor for the CO sensor, being the minimum resistor for this sensor of 10k, as indicated in the data sheet and board technical guide, so it may have been damaged.


I changed to 1K after consulting with you in this forum about an year ago. With 10K resistance (minimum suggested) CO values were getting 'saturated' (3.3mV) while calibration under 1 PPM.

I hope to see things better this time.

Thanks again for help.

Best,
Z


Top
 Profile  
 
 Post subject: Re: problem with wasps
PostPosted: Tue Jun 19, 2012 9:18 am 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7472
Hi zeus2kx,

Glad you had it working, please tell us if you have any further problem.

Regarding the load resistor question, could you please tell us in which post were you told you could use this value? Maybe a teammate missed the sensors, because we cannot recommend to use a load resistor below the minimum recommended in the data sheet, specially for long term applications.

Regards.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 10 posts ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Libelium theme based on 610nm Style by Daniel St. Jules of http://www.gamexe.net


© Libelium Comunicaciones Distribuidas S.L. | Terms of use