FONA 808 on battery without external power

Adafruit cellular platform - SMS and IoT over celluar

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
samantha_f
 
Posts: 5
Joined: Sat Oct 22, 2011 9:00 am

FONA 808 on battery without external power

Post by samantha_f »

Hi! I'm using the FONA 808 - Mini Cellular GSM + GPS Breakout to build a GPS tracker for my bike. I'm struggling to find info on running my external microcontroller from the same battery as the FONA breakout. I'm led to believe this is possible as the product advert says it supports: "onboard LiPoly battery charging circuitry so you can take your project on the go" (I happen to be using a Teensy 3.2, although this question would apply to many microcontrollers).

I have the FONA working well when powered from a 5V USB source, and supplying voltage to my microcontroller. I have wired it the same as shown in the wiring guide, with Vio tied to 5V. This works great when powered from an external source, but ideally I'd like to run the FONA, and the attached microcontroller, on the FONA's own battery without being plugged in via USB. 5V doesn't seem to be powered without an external power source attached, however.

I wondered if it would be safe to instead tie Vio to BAT, which seems to supply 4.2V at fully-charged state, and then use 5V to supply the microcontroller's VIN? From initial investigation with a multimeter, though, it looked like BAT powers down after a bit, so I'm now doubting whether this would work. Do you know of another, better, way to achieve what I want?

Ideally, I'd like to supply the microcontroller with 5V 100% of the time, from the same battery as the FONA is using, then use this to pull KEY pin to ground when I want to activate the FONA. I'm starting to think maybe extra hardware is necessary, for example the Adafruit Micro-Lipo Charger, but this seems to double up on the onboard LiPo charging circuitry.

Any guidance you can give would be gratefully received!

User avatar
rskup
 
Posts: 230
Joined: Sat Aug 01, 2020 9:04 pm

Re: FONA 808 on battery without external power

Post by rskup »

FONA 3G tinkerer here, I think you want the voltage on your FONA's Vio to match your microcontoller logic voltage. Looks like the Teensy 3.2 is 3 volt logic, so I'm pretty sure you want 3 volts on the FONA's Vio. I don't have a Teensy, but it looks like it does have a 3 volt pinout you could tie to the FONA's Vio.

For comparison, I have a FONA 3G and a Adafruit Feather (#2771, also 3V logic) that I used together in a DIY cell phone I built. I tied the Feather's 3V output to the FONA 3G's Vio (and of course tied the grounds together).

Power wise, since both boards have JST connectors, I have two JSTs connected in parallel to one LiPo, and power both boards that way. I don't have anything connected to my FONA 3G's 5V or BAT pinouts (never thought about powering the Feather with the FONA's 5V pinout, interesting idea). When I need to re-charge the LiPo I plug a USB cable into the Feather (though it certainly seems the same could be accomplished plugging into the FONA 3G).

Anyways, hope I'm making sense and maybe helped a bit. Would also like to make a GPS tracker, started one using a SimCom 7000 board, but got bogged down in the code and set it aside unfortunately.

Below is my phone post from a while ago. Caution--definitely not the best pics since some breadboard wires are not even being used, but both boards are powered from the one LiPo and the phone works fine:

viewtopic.php?f=54&t=170985&p=835278#p835278

User avatar
samantha_f
 
Posts: 5
Joined: Sat Oct 22, 2011 9:00 am

Re: FONA 808 on battery without external power

Post by samantha_f »

Hey rskup – thanks! Your cell phone project looks awesome! Were you reading the pulse-dialling straight from the rotary phone?

The Teensy is 5V-tolerant (on some pins) but you're right, it makes sense to take Vio to the 3 (or is it 3.3V? I forget.) pin on it. I've bought a couple of the Adafruit micro-lipo chargers and some JST connectors to play around with, as they'd give me a regulated 5V for power. Still, seems a bit of a pity that I can't use the built-in charge circuitry (if that's definitely the case), as the FONA will always need a microcontroller to run anyway...

I'll have a further play around and maybe post some photos next week. I've mostly been working on the software/firmware side as I want to add an accelerometer and power down the board if there's been no movement in the last 15 minutes. :D

User avatar
rskup
 
Posts: 230
Joined: Sat Aug 01, 2020 9:04 pm

Re: FONA 808 on battery without external power

Post by rskup »

Hi Samantha, yes, I have one of the Feather pins counting the pulses on the rotary dial. Though I found I also had to code in a brief "dead zone" (5 ms) to eliminate "contact bounce", otherwise the Feather would always count more pulses than the number I dialed.

Just pondering here...but to be able to use your FONA's charging circuity couldn't you plug the LiPo into the FONA's JST, and then run a wire from the LiPo's or JST's positive side to the Teensy's Vin to power that? It looks like the Teensy Vin can take a wide range of input voltages (3.6 to 6.0 ?) looking at this spec sheet:

https://www.pjrc.com/store/teensy32.html#pins

Then it seems when the LiPo needs re-charging, plugging a USB cable into the FONA would do it. For convenience, I think you would also want to add a on/off switch between the LiPo/JST positive side and the Teensy's Vin.

However, all the above thinking is based on just one cup of coffee so far this morning, so my brain may not be working quite right. Hope your project goes well, would be interested in hearing about it.

User avatar
samantha_f
 
Posts: 5
Joined: Sat Oct 22, 2011 9:00 am

Re: FONA 808 on battery without external power

Post by samantha_f »

Got it! You got me thinking on the right lines. Thanks for your help.
SIM808 Breadboard
SIM808 Breadboard
IMG_20220130_220052.jpg (194.98 KiB) Viewed 1169 times
I checked continuity between BAT and the +ve JST pin: if there is a resistance on that line, it's very low, so I'm thinking they're directly connected. So I wired BAT to Vin on the Teensy, and Vio to the Teensy 3.3V output (the blue jumper wire). This works, but to avoid putting 5V into the battery when the USB cable is connected to the Teensy for programming, the trace on the underside of the Teensy board which connects VUSB to Vin needed to be cut.

I'm a wary of relying on the battery's own protection cut-off circuitry, but I think the Teensy will drain it down to the 2.8V limit where it should cut out. I guess this is technically undervolting it, but I'm going to run it down overnight to test what happens when it gets low.

I'm wondering if I didn't have a good connection before when I observed BAT cutting out, per my first post. The Teensy currently seems to keep running even when I pull KEY to ground to toggle the SIM808 off. I could flash the LED test firmware example to check this.

My next tinkering evening will be spent seeing if I can connect KEY to an output pin to pull it to ground to send the SIM808 to sleep. I've seen some info hinting that it's possible to use the open drain output mode on Teensy pins, which might just be what I want.

User avatar
rskup
 
Posts: 230
Joined: Sat Aug 01, 2020 9:04 pm

Re: FONA 808 on battery without external power

Post by rskup »

Your JST "+" to BAT link is a good find, and I think Adafruit's 808 board schematic below confirms your discovery...see the "LiPo Charger" section, bottom left of drawing below:

https://cdn-learn.adafruit.com/assets/a ... 1432925469

"Open drain output mode" is over my head, ug. Using the Feather I have a "HIGH" pin wired to the FONA 3G, and set it "LOW" for just two seconds. That turns the FONA 3G on if it's off, and off if it's on.

Your project board looks really nice, hope your testing goes well!

User avatar
rskup
 
Posts: 230
Joined: Sat Aug 01, 2020 9:04 pm

Re: FONA 808 on battery without external power

Post by rskup »

Hi Samantha ... referencing your Teensy and the comment about undervoltage, check out Adafruit part number #3428. I just happened to spot it in my wish list as I was putting together an order. Maybe you can incorporate it (or something similar) to safely shut down the Teensy when the voltage gets too low.

User avatar
samantha_f
 
Posts: 5
Joined: Sat Oct 22, 2011 9:00 am

Re: FONA 808 on battery without external power

Post by samantha_f »

rskup wrote:check out Adafruit part number #3428
Hey rksup, thanks for the heads up on the Reset / Enable controller. That's a good idea. I did run the test I mentioned before: in practice, the FONA shut off first, way before the Teensy, at 3368mV. I figured I'd keep track of the level and halt when I stopped getting responses, but this seems cleaner.

On my previous comment about "Open drain output mode"– turns out there was no need and I was off down the proverbial rabbit hole looking for red herrings... er, that metaphor got away from me.

I'd been looking into it as I'd been having trouble getting KEY to work. I'd been reading the pin it was connected to with a multimeter when pulled low and was seeing something like 0.5V on it. I figured it wasn't being pulled to ground and from reading around thought maybe there was a special mode for that. Turns out I had the the wrong pin number #defined in code and it was floating. ¯\_(ツ)_/¯ It's working now: I check the PS power status pin and if it's low, pull down KEY for 2s to activate the FONA.

User avatar
rskup
 
Posts: 230
Joined: Sat Aug 01, 2020 9:04 pm

Re: FONA 808 on battery without external power

Post by rskup »

Cool, nice that Key is working! About the FONA shutting down, that reminded me there is an AT command to control the voltage at where the FONA shuts off, AT+CPMVT=xxxx.

See page 307 of the 5320 AT Command manual.

There's also a "Low Voltage Alarm" setting, AT+CVALARM, page 306.

Anyways, thought I'd mention those in case they're handy for your project, hope all's well.

Locked
Please be positive and constructive with your questions and comments.

Return to “FONA”