Power on of GPRS shield from software

I am using GPRS shield v1.0 and I see now in the wiki a solution for sotfware power up (http://www.seeedstudio.com/wiki/GPRS_Shield_V1.0#Power_up_and_power_down).
I have tried the code proposed in the previous link but it does not work.

  pinMode(9, OUTPUT); 
  digitalWrite(9,LOW);
  delay(1000);
  digitalWrite(9,HIGH);
  delay(2000);
  digitalWrite(9,LOW);
  delay(3000);

Do you know if my shield version supports SW power up? If yes, any suggestion of what I may be doing wrong?
Thanks for your support!

Hi,you can try the following code:

int Power=9;//addition code 
unsigned char buffer[64]; // buffer array for data recieve over serial port
int count=0; // counter for buffer array 
void setup()
 { GPRS.begin(19200); // the GPRS baud rate 
Serial.begin(19200); // the Serial port of Arduino baud rate. 
pinMode(Power,OUTPUT);//addition code 
digitalWrite(Power,HIGH);//addition code

Thanks for the proposed solution.
Unfortunately it does not work :frowning:
Can you check if my GPRS shield version (1.0) supports software power up? If so, any other suggestion?
Thank you!

strange thing!! jacket, do you have a try ? and it works ? :cry:

Any update on this topics?
Thanks!

Montanerj

I’m just beginning experimentation with a GPRS shield.

Were you asking if the shield can be totally powered-off, and then awaken by (software) input?
Is this a common feature? Is it just a power saving feature that would benefit portable applications?

Hi,i have checked the schematic of GPRS 1.0 , the version of GPRS can’t support software power-on or power-off.

Thanks Jacket!
It is a pity that my old shield v1.0 cannot support SW on/off. It is not so convenient to have to push the button everytime that the arduino is powered on/off. Anyway, it is not the end of the world;-)

I received yesterday the new GPRS shield v2.0 and SW switch on/off works perfect on this one. I suggest that you add the sample code to the v2.0 wiki page (the wiki says v2.0 supports SW on/off but there is no indication about how to do it).

One last question. Is there an easy way to detect if the GPRS modem is on or off?
For your information, the way I do it now: In my setup method I try to send an AT command and if I receive no response I assume that is off. In this case I switch on thorugh SW using PIN9.

I found that the above posted code will both turn the shield or off, depending on the current condition of the shield.
The problem could come into play that you reset a already powered up and running arduino, and the powerup code, presumably in your setup routine, would execute again and turn off the shield.

I noticed with my V2.0 shield, that a much longer physical button press is required to turn the shield off than to turn it on.

I tinkered with the code, and I am now using this timing, which will turn the shield on, but will not turn it off if it is already on.

I suppose one could use AT commands to detect the current power-state of the SIM900, but this was easier for me.

  Serial.println("Powering Up SIM900");
  pinMode(9, OUTPUT);
  digitalWrite(9,LOW);
  delay(100);
  digitalWrite(9,HIGH);
  delay(500);
  digitalWrite(9,LOW);
  delay(100);
  Serial.println("SIM900 Powered Up");

Good hacking cfurner!!! Your solution is much simpler than my code to send a dummy AT command and wait for the response
Thanks for sharing!

I am also using GPRS studio v2.0. So far I have done everything I could but it still won’t power up from software.

I have soldered JP and included the power code in my routine and it still doesn’t respond.

any ideas of what I might be wrong?

I didnt bother messing with software solution…instead used a miniature reed relay actuated via arduino to perform powerup step. Theres always a caveman solution involving hardware sometimes…lol

Hi!

Try to keep D9 HIGH more than 2.5 seconds, it worked with my v2.0… .:slight_smile:

Edit: I also soldered JP although it was connected in schematics… I measured the connection and it wasn’t connected, though…

Tommi

is there a way to detect if the board is already powered on. I know I can send ‘AT’ and wait for ‘OK’ , just wondering if there is a more elegant solution like checking the state of a particular pin. Thanks!