Arduino UNO R2 + GPRS Shield V1.0 Problem.

Hi All,
I am new to the Arduino Area.
I bought an Arduino UNO R2 and a GPRS Shield to send SMS.
Below is the Sketch. I can compile it and upload to the board. The program sent out SMS as expected.
How ever, I got a strange case. I try to reboot the board by disconnect the board by unplug the USB and use a power supply. Strange the board cannot boot up.

If I unmount the GPRS Shield, the board can boot up. Also if I set the GPRS_TX and GPRS_RX jumper to Xduino, the board can bootup too, but this not what I want.
Can anyone tell give me some hints to solve it.

#include<avr/io.h>
#include <NewSoftSerial.h>

NewSoftSerial mySerial(7, 8);
int sensorPin = A0;
int ledPin = 13;
int ledPin2 = 12 ;
int sensorValue =0;
int send_out = 0 ;

void setup() {
pinMode(ledPin,OUTPUT);
pinMode(ledPin2,OUTPUT);
mySerial.begin(19200);
}

void loop()
{
sensorValue = analogRead(sensorPin);
if (sensorValue > 500)
{
digitalWrite(ledPin,HIGH);
if (send_out ==0)
{
digitalWrite(ledPin2,HIGH);
send_out = 1 ;
mySerial.print(“AT+CMGF=1\r”); //Because we want to send the SMS in text mode
delay(500);
mySerial.print(“AT+CMGS=“xxxxxxxx”\r”);
delay(500);
mySerial.print(“SMS Sent out by the Program!\r SendorValue=”);
mySerial.print(sensorValue);
mySerial.print("\r");
delay(500);
mySerial.print(26,BYTE); //Equivalent to sending Ctrl+Z
delay(500);
mySerial.print(“ATZ”);
digitalWrite(ledPin2,LOW);
}
}
else
{
digitalWrite(ledPin,LOW);
}
delay(30);
}

Do you means the UNO + GPRS works when powered by USB while not works when powered by a battery? the battery must supply a max current of about 500mA at least with no obvious voltage drop. you could try to use aother source, eg: a 9v changer for shaver :stuck_out_tongue:

No. Even I reconnect the USB, it still have the problem.
If I use an external power supply and adjust it’s voltage to 12V, then around 70% can boot up the board and the shield.