0

How to power on/off Adafruit FONA 808 with KEY pin from Ardu
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

How to power on/off Adafruit FONA 808 with KEY pin from Ardu

by johnpop7 on Tue Jul 21, 2020 12:36 pm

Hello all,

I am trying to develop a project with Fona 808 (this model https://learn.adafruit.com/adafruit-fon ... ut/pinouts) and one arduino Nano. I connected Fona to Nano and I can send SMS is working well.
I would like to power on/off the GSM shield with the Fona KEY pin which turns the shield on/off if it is connected with GND for 2sec in order to save energy.
For the moment I do it manually (when I connect the Fona KEY pin with Nano GND for 2s the shield becomes on or off) and is working perfectly, but I want to do this automated from Nano.

I have read in adafruit's manuals:
"Key - This is also a super important pin (but not as important as Vio). This is the power on/off indicator. Its also tied to the button in the top left. Tie this pin to ground for 2 seconds to turn the module on or off. It's not a level signal so it isn't like "low is off, high is on" - instead you must pulse it for 2 seconds to turn off/on. The module comes by default off. Tie this permanently to ground if you never want your micro to turn off the FONA for power saving".

How to pulse it for 2s from Nano? (see in red).

How can I power on/off Adafruit FONA 808 with KEY pin from Nano? Can this be done with a Nano pin or I need a relay or mosfet? .
Does anyone know how this can be done?

Thank you in advance!

johnpop7
 
Posts: 2
Joined: Tue Jul 21, 2020 12:34 pm

Re: How to power on/off Adafruit FONA 808 with KEY pin from

by adafruit_support_mike on Thu Jul 30, 2020 12:47 am

Just connect the KEY pin to one of the Nano's digital IO pins and set the pin OUTPUT, LOW for at least two seconds.

adafruit_support_mike
 
Posts: 61796
Joined: Thu Feb 11, 2010 2:51 pm

Re: How to power on/off Adafruit FONA 808 with KEY pin from

by johnpop7 on Fri Aug 07, 2020 7:08 am

Hello Mr. Mike,

I tried your given direction and understood the mechanism. I explain below for others to be easy and clear. If something is wrong please correct me.


I connected Vio and Gnd (not any other pins yet) to Fona and powered it on/off manually with Key button to check if it's ok and working, and it is.
After that I connected Digital pin 7 form Nano to Fona Key pin. I wrote the following code and is working perfectly.

Code: Select all | TOGGLE FULL SIZE
void setup() {
  pinMode(7, OUTPUT);  // digital Nano pin 7 wired to FONA Key pin
  digitalWrite(7, HIGH);
  delay(1000);
}

void loop() {

  digitalWrite(7, LOW);      // Give 0V (similar to manual press the Fona Key button)
  delay(2100);               // for 2s
  digitalWrite(7, HIGH);     // and give again 5V back (similar to manual release the Fona Key button) and Fona should become ON
  delay(20000);              // for 20s (an example).

  digitalWrite(7, LOW);      // Give 0V (similar to manual press the Fona Key button)
  delay(2100);               // for 2s
  digitalWrite(7, HIGH);     // and give again 5V back (similar to manual release the Fona Key button) and Fona should become OFF
  delay(5000);               // for 5s (an example).

}


After this sequence of code Fona sould be ON 20s and OFF 5s. And all this repeating in loop.

Thank you Mike for help and directions.

johnpop7
 
Posts: 2
Joined: Tue Jul 21, 2020 12:34 pm

Please be positive and constructive with your questions and comments.