Power on of GPRS shield from software

Ardiuno Compatible shields

Moderator: cory.j.fowler

Power on of GPRS shield from software

by montanerj » Sun Jan 06, 2013 7:29 am

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.
Code: Select all
  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!
Pre-kindergarten
Pre-kindergarten
 
Posts: 9
Joined: Mon Nov 07, 2011 12:32 am

Re: Power on of GPRS shield from software

by Jacket Chen » Sun Jan 06, 2013 3:49 pm

Hi,you can try the following code:
Code: Select all
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
Love little, love long.
User avatar
Junior-6
Junior-6
 
Posts: 665
Joined: Thu Jun 21, 2012 4:25 pm
Location: China

Re: Power on of GPRS shield from software

by montanerj » Mon Jan 07, 2013 9:42 am

Thanks for the proposed solution.
Unfortunately it does not work :(
Can you check if my GPRS shield version (1.0) supports software power up? If so, any other suggestion?
Thank you!
Pre-kindergarten
Pre-kindergarten
 
Posts: 9
Joined: Mon Nov 07, 2011 12:32 am

Re: Power on of GPRS shield from software

by loovee » Wed Jan 09, 2013 5:24 pm

strange thing!! jacket, do you have a try ? and it works ? :cry:
User avatar
Elementary-3
Elementary-3
 
Posts: 353
Joined: Fri Nov 02, 2012 9:15 am

Re: Power on of GPRS shield from software

by montanerj » Sat Feb 02, 2013 4:19 am

Any update on this topics?
Thanks!
Pre-kindergarten
Pre-kindergarten
 
Posts: 9
Joined: Mon Nov 07, 2011 12:32 am

Re: Power on of GPRS shield from software

by datacomm_s » Thu Feb 21, 2013 11:29 pm

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?
Pre-kindergarten
Pre-kindergarten
 
Posts: 4
Joined: Thu Feb 21, 2013 5:29 am

Re: Power on of GPRS shield from software

by Jacket Chen » Fri Feb 22, 2013 9:09 am

montanerj wrote:Any update on this topics?
Thanks!


Hi,i have checked the schematic of GPRS 1.0 , the version of GPRS can't support software power-on or power-off.
Love little, love long.
User avatar
Junior-6
Junior-6
 
Posts: 665
Joined: Thu Jun 21, 2012 4:25 pm
Location: China

Re: Power on of GPRS shield from software

by montanerj » Fri Mar 15, 2013 2:53 am

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.
Pre-kindergarten
Pre-kindergarten
 
Posts: 9
Joined: Mon Nov 07, 2011 12:32 am

Re: Power on of GPRS shield from software

by cfurner » Thu May 30, 2013 4:42 am

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.

Code: Select all
  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");
Pre-kindergarten
Pre-kindergarten
 
Posts: 1
Joined: Thu May 30, 2013 4:38 am

Re: Power on of GPRS shield from software

by montanerj » Thu May 30, 2013 5:07 am

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!
Pre-kindergarten
Pre-kindergarten
 
Posts: 9
Joined: Mon Nov 07, 2011 12:32 am

Next

Who is online
Users browsing this forum: No registered users and 1 guest
cron