Post a new topicPost a reply Page 1 of 1   [ 10 posts ]
Author Message
 Post subject: Program crashing with 5V Power Jump connected
PostPosted: Thu Oct 06, 2011 5:24 pm 

Joined: Tue Sep 27, 2011 10:13 am
Posts: 8
Hi,

I have uploaded the start program to a waspmote v1.1 with XBee 802.15.4 PRO and a Smart Metering board. If I run the program (on battery power) and the 5V Power Jumper (Frequency-Voltage converter) is unplugged, the program works and I can receive data in the gateway. But if I plug the 5V Power Jumper, the program doesn't work.

How can I solve this problem?

Thanks.


Top
 Profile  
 
 Post subject: Re: Program crashing with 5V Power Jump connected
PostPosted: Thu Oct 06, 2011 6:41 pm 

Joined: Tue Sep 27, 2011 10:13 am
Posts: 8
Hi again,

I have deleted lines using RTC and ACC, and now the program works even with the 5V Power Jump connected.

Do you have any suggestion...?


Top
 Profile  
 
 Post subject: Re: Program crashing with 5V Power Jump connected
PostPosted: Fri Oct 07, 2011 2:41 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7516
Hi GRuiz,

Could you please post the code you are using, the one that didn't work, marking the lines you removed to fix it?

Regards.


Top
 Profile  
 
 Post subject: Re: Program crashing with 5V Power Jump connected
PostPosted: Sat Oct 08, 2011 4:59 pm 

Joined: Tue Sep 27, 2011 10:13 am
Posts: 8
Hi libelium-dev,

Here you have the code as you requested. I'm doing new tests.

Thanks.

Code:
packetXBee* paq_sent;
int8_t state=0;
long previous=0;
char aux[200];
char* macHigh="          ";
char* macLow="           ";
int aux_1 = 0;
int aux_2 = 0;

#define key_access "LIBELIUM"

uint8_t direccion[8]={0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF};

void setup(){

  // Store key access in EEPROM
  for(int i=0;i<8;i++){
    Utils.writeEEPROM(i+107,key_access[i]);
  }

  RTC.ON();                //----------------->>>>> DELETED
  ACC.ON();                //----------------->>>>> DELETED 
 
  XBee.setMode(XBEE_ON);
  XBee.begin(9600);
  delay(1000);
  XBee.print("+++");
  delay(2000);
  XBee.println("ATBD5,AP2,WR,CN");
  delay(150);
 
  XBee.setMode(XBEE_OFF);
  XBee.close();
   
  Utils.setLED(LED0, LED_ON);
  Utils.setLED(LED1, LED_ON);
  delay(5000);
  Utils.setLED(LED0, LED_OFF);
  Utils.setLED(LED1, LED_OFF);
  for (int i=0;i<24;i++){
    Utils.blinkLEDs(125);
  }
 
  // Inits the XBee 802.15.4 library
  xbee802.init(XBEE_802_15_4,FREQ2_4G,NORMAL);
 
  // Powers XBee
  xbee802.ON();
 
  // Get the XBee MAC address

  delay(500);
 
  int counter = 0; 
  while(xbee802.getOwnMac()==1&&counter<4){
    xbee802.getOwnMac();
    counter++;
  }
 
  Utils.hex2str(xbee802.sourceMacHigh,macHigh,4);
  Utils.hex2str(xbee802.sourceMacLow,macLow,4);
}

void loop(){

  sprintf(aux,"-mac:%s%s -x:%d,y:%d,z:%d -temp:%d -bat: %d%c%c%c",macHigh,macLow,ACC.getX(),ACC.getY(),ACC.getZ(),RTC.getTemperature(),PWR.getBatteryLevel(),'%','\r','\n');                              //----------------->>>>> DELETED

  //sprintf(aux,"-mac:%s%s -bat: %d%c%c%c",macHigh,macLow,PWR.getBatteryLevel(),'%','\r','\n');                              //----------------->>>>> ADDED
 
  paq_sent=(packetXBee*) calloc(1,sizeof(packetXBee));
  paq_sent->mode=BROADCAST;
  paq_sent->MY_known=0;
  paq_sent->packetID=0x52;
  paq_sent->opt=0;
  xbee802.hops=0;
  xbee802.setOriginParams(paq_sent,MAC_TYPE);
  xbee802.setDestinationParams(paq_sent, direccion, aux, MAC_TYPE, DATA_ABSOLUTE);
  xbee802.sendXBee(paq_sent);
 
  free(paq_sent);
  paq_sent = NULL;
 
  delay(1000);
}



Top
 Profile  
 
 Post subject: Re: Program crashing with 5V Power Jump connected
PostPosted: Sun Oct 09, 2011 10:07 pm 

Joined: Tue Sep 27, 2011 10:13 am
Posts: 8
Hi again,

I have tested again the original start program AND IT WORKS!
I don't know where the difference is, I did the same: load the start program, plug XBee 802.15.4, and plug Smart Metering board (including 5V Power Jumper).

But now I have got another problem when trying to enable 24V CONVERTER. I used the original start program, then enabled Smart Metering board and enabled 24V converter. After enabling the last one, the mote restarts. The code is below, including lines added to use 24 converter.

Could you please test this code? Thank you

Code:
packetXBee* paq_sent;
int8_t state=0;
long previous=0;
char aux[200];
char* macHigh="          ";
char* macLow="           ";
int aux_1 = 0;
int aux_2 = 0;

#define key_access "LIBELIUM"

uint8_t direccion[8]={0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF};

void setup(){

  // Store key access in EEPROM
  for(int i=0;i<8;i++){
    Utils.writeEEPROM(i+107,key_access[i]);
  }

  RTC.ON(); 
  ACC.ON(); 
  XBee.setMode(XBEE_ON);
  XBee.begin(9600);
  delay(1000);
  XBee.print("+++");
  delay(2000);
  XBee.println("ATBD5,AP2,WR,CN");
  delay(150);
 
  XBee.setMode(XBEE_OFF);
  XBee.close();
   
  Utils.setLED(LED0, LED_ON);
  Utils.setLED(LED1, LED_ON);
  delay(1000);
  Utils.setLED(LED0, LED_OFF);
  Utils.setLED(LED1, LED_OFF);
  for (int i=0;i<3;i++){
    Utils.blinkLEDs(250);
  }
 
  // Inits the XBee 802.15.4 library
  xbee802.init(XBEE_802_15_4,FREQ2_4G,NORMAL);
 
  // Powers XBee
  xbee802.ON();
 
  // Get the XBee MAC address

  delay(500);
 
  int counter = 0; 
  while(xbee802.getOwnMac()==1&&counter<4){
    xbee802.getOwnMac();
    counter++;
  }
 
  Utils.hex2str(xbee802.sourceMacHigh,macHigh,4);
  Utils.hex2str(xbee802.sourceMacLow,macLow,4);
 
  SensorSmart.setBoardMode(SENS_ON);              //----------->>>>>>>>> ENABLE BOARD
}

void loop(){

  SensorSmart.setSensorMode(SENS_ON, SENS_SMART_24V_CONVERTER);   //----------->>>>>>>>> ENABLE 24V CONVERTER

  sprintf(aux,"-mac:%s%s -x:%d,y:%d,z:%d -temp:%d -bat: %d%c%c%c",macHigh,macLow,ACC.getX(),ACC.getY(),ACC.getZ(),RTC.getTemperature(),PWR.getBatteryLevel(),'%','\r','\n');
   
  paq_sent=(packetXBee*) calloc(1,sizeof(packetXBee));
  paq_sent->mode=BROADCAST;
  paq_sent->MY_known=0;
  paq_sent->packetID=0x52;
  paq_sent->opt=0;
  xbee802.hops=0;
  xbee802.setOriginParams(paq_sent,MAC_TYPE);
  xbee802.setDestinationParams(paq_sent, direccion, aux, MAC_TYPE, DATA_ABSOLUTE);
  xbee802.sendXBee(paq_sent);
 
  free(paq_sent);
  paq_sent = NULL;
 
  delay(1000);
}


Top
 Profile  
 
 Post subject: Re: Program crashing with 5V Power Jump connected
PostPosted: Mon Oct 10, 2011 2:53 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7516
Hi GRuiz,

could you please try again placing this lines

Code:
SensorSmart.setBoardMode(SENS_ON);              //----------->>>>>>>>> ENABLE BOARD
SensorSmart.setSensorMode(SENS_ON, SENS_SMART_24V_CONVERTER);   //----------->>>>>>>>> ENABLE 24V CONVERTER


at the begining of the setup function?

Regards.


Top
 Profile  
 
 Post subject: Re: Program crashing with 5V Power Jump connected
PostPosted: Mon Oct 10, 2011 4:37 pm 

Joined: Tue Sep 27, 2011 10:13 am
Posts: 8
Hi Libelium,

The program is now working all right, thank you!

Could you please tell me the reason of this behaviour? Is there any reference to this in technical and programming guides?

Thanks.


Top
 Profile  
 
 Post subject: Re: Program crashing with 5V Power Jump connected
PostPosted: Fri Oct 14, 2011 1:30 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7516
Hi GRuiz,

it is a problem we have recently found, we think it is owed to a matter of the current peaks demanded by the DC-DC converter. We are trying to find a way to fix it so it is not necessary to turn on the converter at the beginning of the program.

Regards.


Top
 Profile  
 
 Post subject: Re: Program crashing with 5V Power Jump connected
PostPosted: Tue Oct 25, 2011 7:16 pm 

Joined: Tue Sep 27, 2011 10:13 am
Posts: 8
Hi again,

Does it exist any way to power off the DC-DC converter during the main loop to save battery? I'm trying some posibilities but at the moment any of them works.

Thanks.


Top
 Profile  
 
 Post subject: Re: Program crashing with 5V Power Jump connected
PostPosted: Thu Oct 27, 2011 10:42 am 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7516
Hi GRuiz,

I'm afraid not, it is a hardware issue that we are trying to solve, we will let you know as soon as we figure out how.

Best 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:
cron


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