Hi,
I'm trying to program a way to trigger the FONA's Reset pin from a Raspberry Pi GPIO pin. I've connected it to GPIO pin 20, and as per the instructions I'm setting that pin low for 100ms, and then high, but it doesn't seem to work. (even tried high-low-high sequence). I'm wondering if I've connected the circuit incorrectly. It's a straight wire currently from GPIO pin 20 -> FONA Reset. I've confirmed with a multimeter that the pin does toggle states when I dispatch the code.
I have been able to trigger a reset by temporarily connecting the Reset pin to GND manually.
My knowledge in the area isn't 100%, so apologies for the noob question. I'm curious if the Reset pin's default pull-up state has any implication.
Anyways.. any help would be greatly appreciated.
Thanks,
Wiring the FONA Reset pin - Raspberry Pi
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit2
- Posts: 21864
- Joined: Fri Mar 11, 2005 7:36 pm
Re: Wiring the FONA Reset pin - Raspberry Pi
I wonder if the raspberry pi pin is unable to source enough current. the best way to tell i s use an oscilloscope, a multimeter wont give you the details of whats going on!
- tictag
- Posts: 224
- Joined: Sun Feb 15, 2015 4:01 pm
Re: Wiring the FONA Reset pin - Raspberry Pi
Joining both RPI and FONA grounds together?
- mseth
- Posts: 18
- Joined: Thu Jul 30, 2015 1:10 pm
Re: Wiring the FONA Reset pin - Raspberry Pi
@adafruit2: I didn't have access to an oscilloscope. I'll have to see if I can go to a lab somewhere and test. But I believe it should have been able to, I was using a high-quality 5.1V 2A adapter.
@tictag: yea, both the grounds are connected
Do I need any additional components/circuitry in between the RPi GPIO pin and the FONA Reset pin?
Sorry for the late replies. I didn't see the reply notification emails
@tictag: yea, both the grounds are connected
Do I need any additional components/circuitry in between the RPi GPIO pin and the FONA Reset pin?
Sorry for the late replies. I didn't see the reply notification emails
- adafruit2
- Posts: 21864
- Joined: Fri Mar 11, 2005 7:36 pm
Re: Wiring the FONA Reset pin - Raspberry Pi
no additional 'tronix required as long as Vio is tied to 3.3V
- iedoc
- Posts: 3
- Joined: Fri Sep 25, 2015 11:35 am
Re: Wiring the FONA Reset pin - Raspberry Pi
I know this is an ancient thread, but its the only place i have seen that talks about the same exact problem i am facing, even after days of research.
The FONA is currently powered by the raspberry pi 2, but we have an Li batter connected to the FONA to prevent brown outs. the problem is, when power is disconnected from the raspberry pi 2, the batter still seems to keep some sort of state on the FONA. When re powering the rpi, the FONA will no longer work. It will not respond to AT commands, and even when I use sudo screen /dev/ttyAMA0 115200, the screen blanks like it should with a cursor at the top, but anything i type will not show up, and i get no response. once i cut power to the rpi, and unplug the fona from the battery, then plug it in again and repower to rpi, everything works perfectly, at commands work and i'm able to use the fona.
So what i wanted to do was use the reset pin to hard reset the fona. when i manually hook up the fona's reset pin to ground, the red and blue lights turn off, when i cut that connection, the fona turns back on and everything is good.
the documentation says to power the reset pin low for 100 ms to hard reset the fona. This is where i'm having issues. I need to reset the fona each time the rpi is powered up (because most likely the power was cut previously and the fona is in a bad state).
i have tried a few different things with no luck:
1. hook the fona reset pin to GPIO18 on the rpi. set GPIO18 LOW for 100ms, then set to HIGH. does not reset the fona.
I checked the voltage from GPIO18. its starts off with a low pull ~0.81 volts. i set it to low, it stays there because thats what it started at. i set it to high and it measures around ~3.3 volts.
2. same thing as above, but set the low for 10 seconds then set to high. still nothing
3. So because GPIO18 is a low pull by default on startup, i found that GPIO5 and GPI06 are high pulls by default on startup. i connected the fona reset pin to GPI05, measured the pin and found it was indeed around ~3.3 volts by default. i set the pin to low for 100 ms, measure and saw it went down to ~~0.81 volts for low, then set to high, and again went up to ~3.3 volts. fona still had not reset (i know it didn't work because first, the lights had not turned off, second, because it was still in a bad state, no at commands work and not network)
4. same as 3 but tried for 2, 5 and 10 seconds, still no reset.
There was a problem with 3 and 4. after about an hour or so, it seems the rpi (running raspbian) would crash and needed to have power cut and reapplied)
I have tried so many different things, timing and whatnot to get this to work, nothing is working.
So again, when i connect the reset pin to ground, it resets. in the documentation, again it states that set the reset pin to low for 100 ms to reset. do you think because when i'm setting the pin to low and it being ~0.81 volts, that that is the problem?
also, for GPIO18, i had tried setting it to high for a few seconds, then low, then high again and still had not worked.
Any suggestions?
The FONA is currently powered by the raspberry pi 2, but we have an Li batter connected to the FONA to prevent brown outs. the problem is, when power is disconnected from the raspberry pi 2, the batter still seems to keep some sort of state on the FONA. When re powering the rpi, the FONA will no longer work. It will not respond to AT commands, and even when I use sudo screen /dev/ttyAMA0 115200, the screen blanks like it should with a cursor at the top, but anything i type will not show up, and i get no response. once i cut power to the rpi, and unplug the fona from the battery, then plug it in again and repower to rpi, everything works perfectly, at commands work and i'm able to use the fona.
So what i wanted to do was use the reset pin to hard reset the fona. when i manually hook up the fona's reset pin to ground, the red and blue lights turn off, when i cut that connection, the fona turns back on and everything is good.
the documentation says to power the reset pin low for 100 ms to hard reset the fona. This is where i'm having issues. I need to reset the fona each time the rpi is powered up (because most likely the power was cut previously and the fona is in a bad state).
i have tried a few different things with no luck:
1. hook the fona reset pin to GPIO18 on the rpi. set GPIO18 LOW for 100ms, then set to HIGH. does not reset the fona.
I checked the voltage from GPIO18. its starts off with a low pull ~0.81 volts. i set it to low, it stays there because thats what it started at. i set it to high and it measures around ~3.3 volts.
2. same thing as above, but set the low for 10 seconds then set to high. still nothing
3. So because GPIO18 is a low pull by default on startup, i found that GPIO5 and GPI06 are high pulls by default on startup. i connected the fona reset pin to GPI05, measured the pin and found it was indeed around ~3.3 volts by default. i set the pin to low for 100 ms, measure and saw it went down to ~~0.81 volts for low, then set to high, and again went up to ~3.3 volts. fona still had not reset (i know it didn't work because first, the lights had not turned off, second, because it was still in a bad state, no at commands work and not network)
4. same as 3 but tried for 2, 5 and 10 seconds, still no reset.
There was a problem with 3 and 4. after about an hour or so, it seems the rpi (running raspbian) would crash and needed to have power cut and reapplied)
I have tried so many different things, timing and whatnot to get this to work, nothing is working.
So again, when i connect the reset pin to ground, it resets. in the documentation, again it states that set the reset pin to low for 100 ms to reset. do you think because when i'm setting the pin to low and it being ~0.81 volts, that that is the problem?
also, for GPIO18, i had tried setting it to high for a few seconds, then low, then high again and still had not worked.
Any suggestions?
- cry4brk
- Posts: 180
- Joined: Tue Oct 09, 2012 3:14 pm
Re: Wiring the FONA Reset pin - Raspberry Pi
With your setup, connect a led (with a series resistor) to tha VBAT pin of the fona and the GPIO pin on raspberry PI, If the led turns on as you put the GPIO pin LOW, than the fona should reset. If not somethning is wrong. You can have a look on the hardware design pdf and use a transistor as described in the power section, but not on pwr pin,use it on reset pin and should work just fine.
- adafruit2
- Posts: 21864
- Joined: Fri Mar 11, 2005 7:36 pm
Re: Wiring the FONA Reset pin - Raspberry Pi
OK i did look at this and noticed that depending on the module/currentdraw capability of the chips you may need to jumper a diode to get it working with the Pi. Which exact Adafruit FONA modal # are you using?
- iedoc
- Posts: 3
- Joined: Fri Sep 25, 2015 11:35 am
Re: Wiring the FONA Reset pin - Raspberry Pi
We are using the FONA 800 UFL.
Also, just so i'm clear, where would we put the diode? which pins and what direction?
Also, just so i'm clear, where would we put the diode? which pins and what direction?
- adafruit2
- Posts: 21864
- Joined: Fri Mar 11, 2005 7:36 pm
Re: Wiring the FONA Reset pin - Raspberry Pi
OK this diode, remove it with a soldering iron and replace with a piece of wire *or* just solder a piece of wire to each end of the diode (basically 'jumpering' it over)
- iedoc
- Posts: 3
- Joined: Fri Sep 25, 2015 11:35 am
Re: Wiring the FONA Reset pin - Raspberry Pi
That was exactly it! thank you! the pi resets now when i power the pin to low. (its hooked up to gpio5, which has a high pull on startup, not sure if that matters, but in case someone else wanted to know which pin to hook the reset pin to after removing that diode and replacing it with a wire)
this is the script i'm using in case someone else wants it:
i'm sleeping for 200 milliseconds even though the documentation states we only need to power it low for 100 milliseconds just to be safe
also, after it resets, you need to give the FONA at least 10 seconds to get set up (5 seconds was too quick to start doing AT commands, 10 seconds seems to work just fine)
this is the script i'm using in case someone else wants it:
Code: Select all
import RPi.GPIO as GPIO
from time import sleep
GPIO.setmode(GPIO.BCM)
GPIO.setup(5, GPIO.OUT)
try:
GPIO.output(5, GPIO.LOW)
sleep(0.2)
GPIO.output(5, GPIO.HIGH)
except:
print "ERROR"
finally:
GPIO.cleanup()
also, after it resets, you need to give the FONA at least 10 seconds to get set up (5 seconds was too quick to start doing AT commands, 10 seconds seems to work just fine)
- stelian
- Posts: 2
- Joined: Mon Dec 21, 2015 7:29 am
Re: Wiring the FONA Reset pin - Raspberry Pi
I have the same problem on Fona 808. Could anyone repost the photo of the diode?
- adafruit2
- Posts: 21864
- Joined: Fri Mar 11, 2005 7:36 pm
Re: Wiring the FONA Reset pin - Raspberry Pi
apologies for the delay - holidays took over :)
here's the same RST diode as on the fona 808
here's the same RST diode as on the fona 808
- Attachments
-
- 2542-05.jpg (260.1 KiB) Viewed 1957 times
- stelian
- Posts: 2
- Joined: Mon Dec 21, 2015 7:29 am
Re: Wiring the FONA Reset pin - Raspberry Pi
Thank you. I can now reset it with my pcDuino board.
- adafruit2
- Posts: 21864
- Joined: Fri Mar 11, 2005 7:36 pm
Re: Wiring the FONA Reset pin - Raspberry Pi
OK the tutorial has been updated!
Please be positive and constructive with your questions and comments.