Post a new topicPost a reply Page 1 of 1   [ 4 posts ]
Author Message
 Post subject: deep sleep problems
PostPosted: Tue Jul 17, 2012 9:30 pm 

Joined: Wed Jun 20, 2012 1:23 am
Posts: 3
Hi guys!

I have problems when i send to sleep the mote, really when it wakes up.
the flow of my program is:
1.-read sensors from agriculture board.
2.-send the data
2.-sleep for 15 mins.(deep sleep)
3.-wake up
4.-go to point 1
this work for aprox 2-3 hours and after this time the mote don't wakes up.

regards ;)


Top
 Profile  
 
 Post subject: Re: deep sleep problems
PostPosted: Wed Jul 18, 2012 8:31 am 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7818
Hi favila,

did you check the charge of the coin cell and battery? Which sensors did you connect to your board, and what version of the board do you have? Could you please post your code so we can take a look?

Regards.


Top
 Profile  
 
 Post subject: Re: deep sleep problems
PostPosted: Wed Jul 18, 2012 3:44 pm 

Joined: Wed Jun 20, 2012 1:23 am
Posts: 3
The battery and the coin cell are charged. The sensor conected to the agro-board are:
-preasure
-hummidity and tempreature
-wind direction
-wind speed
-rain
-soil temperature
-leaf wetness
-1 soil moisture

mi main code is this:
Code:
void setup()
{
  int i = 0;
  xbeeZB.init(ZIGBEE,FREQ2_4G,NORMAL);
  // Powers XBee
  xbeeZB.ON();
  xbeeZB.setAPSencryption(XBEE_ON);
  xbeeZB.getOwnMacLow();
  Utils.hex2str(xbeeZB.sourceMacLow, myMac);
  delay(2000);
}

void loop()
{
  char macDest[17];
  SensorAgr.setBoardMode(SENS_ON);
  //capture the data from sensors
  readSoil();
  readWeather();
  readPlant();
  readClimate();
  toSleep();
}


and the fuction to sleep is:
Code:
void toSleep()
{
  RTC.ON();
  //Y:m:d:nd:H:m:s
  RTC.setTime("12:01:01:07:00:00:00"); 
  // Go to sleep disconnecting all the switches and modules
  // After 15 minutes, Waspmote wakes up thanks to the RTC Alarm
  SensorAgr.setBoardMode(SENS_OFF);
  PWR.deepSleep("00:00:15:00",RTC_OFFSET,RTC_ALM1_MODE1,ALL_OFF);
  if( intFlag & RTC_INT )
  { 
    intFlag &= ~(RTC_INT);
  }
}


Regards :)


Top
 Profile  
 
 Post subject: Re: deep sleep problems
PostPosted: Thu Jul 19, 2012 8:26 am 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7818
Hi favila,

It is probably owed to a collision in the I2C bus, if you turn off the board and then use deepSleep, when trying to configure the alarm the communication in this bus may be corrupted by the non-powered devices connected to the bus on the board. If you don't turn off the board (keep also on the sensors of the low consumption group) and use function sleepAgr from the SensorAgr library the problem should be solved.

Regards.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 4 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