CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Power Bank that Supplies a 5V Circuit

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Programmer I+D



Joined: 19 Jul 2018
Posts: 7

View user's profile Send private message

Power Bank that Supplies a 5V Circuit
PostPosted: Tue Apr 23, 2019 10:21 am     Reply with quote

I have a voltage regulator to 3.3V that feeds a circuit with a PIC18F4550 and a LoRa Module, the circuit transmits for 10 seconds and remains sleep for 5min, has a total current consumption of 16mAh. If the circuit is powered from the USB port of the PC it works continuously, but if I connect it to a Power Bank it only works the first 5 minutes. What can I do so that the Power Bank does not shut down?

Thanks and Regards
Ttelmah



Joined: 11 Mar 2010
Posts: 19195

View user's profile Send private message

PostPosted: Wed Apr 24, 2019 10:31 am     Reply with quote

What do you mean by a 'Power Bank'. I'm guessing this is probably a 12v
battery pack?. If so, then _it_ is not shutting down. Almost certainly the
regulator in your circuit is overheating and switching off.

Assume something like a 78L05. 16mA. The regulator will then have to
dissipate something like (13-3.3)*0.016W = 0.1552W
Assume a TO92 package this has a theta of about 260C/W , though
if the casing doesn't allow much airflow, this could easily double.
This then gives you a temperature rise of possible something like 80C.

A regulator like this has thermal shutdown, so when it gets too hot it
switches off....

You need either to increase the heatsink on the regulator, or add a
'pre-regulator' to bring the voltage down to a level it can accept.
Programmer I+D



Joined: 19 Jul 2018
Posts: 7

View user's profile Send private message

PostPosted: Wed Apr 24, 2019 10:48 am     Reply with quote

The Power Bank has a capacity of 20,000 mAh and delivers a voltage of 5V. Checking with the manufacturer your minimum consumption to stay on is 50 mA, since my circuit does not consume that I want to know how I can intervene to prevent it from turning off without increasing the consumption of my circuit.

Thanks and Regards
temtronic



Joined: 01 Jul 2010
Posts: 9081
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Wed Apr 24, 2019 11:13 am     Reply with quote

this is troubling...
Quote:
I have a voltage regulator to 3.3V that feeds a circuit with a PIC18F4550

That PIC is not designed to work at 3.3V. I just checked the datasheet.

Also what 'regulator' ? LORA modules( any RF device really ) requires a LOT of current during the transmit mode.

Whose 'power bank' ? The 'capacity' of power banks is one thing , the actual ability to draw current is another. Some will run for days only supplying a few mA, others can supply AMPS, but on a short time. Also, is the PB FULLY charged? You should do proper load tests to confirm the PB WILL supply the necessary power, Pay close attention to recharging it, as per mfrs specs.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Apr 24, 2019 11:40 am     Reply with quote

Use Google to find the answers for this. Search for:
Quote:
power bank keep alive circuit

Example:
https://www.audiosciencereview.com/forum/index.php?threads/powerbank-keep-alive-to-power-low-current-5v-devices.4065/
PrinceNai



Joined: 31 Oct 2016
Posts: 452
Location: Montenegro

View user's profile Send private message

PostPosted: Wed Apr 24, 2019 1:43 pm     Reply with quote

If what PCM programmer says works, it could also work with a small fet and a resistor calculated to draw more than 50mA. Wake up the controller maybe every minute, deliver a pulse through fet for some ms to keep the battery alive. And of course count what a wake-up does. 4 keep-alive pulses, one transmission. But I don't know what your aim for independent operation is. I assume you mean 16mAh per transmission? Or per hour? Anyway, even if it is per pulse, that would mean 20000mAh/(16mAh*12) or in total 104 hours of operation. If you wake up 4 times more per transmission for 100ms, that amounts to 400ms. With let's say 200mA total current per keep_alive that means additional 80mAs of consumption, which translates to 0,0222mAh or 1,4% increase of consumption. Which I believe is way better than the actual capacity tolerance of a typical battery.

Please correct me on my math or my assumptions.

Regards
temtronic



Joined: 01 Jul 2010
Posts: 9081
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Wed Apr 24, 2019 3:00 pm     Reply with quote

simple, easy solution...
If you're going to run at 3 volts, get rid of the DCDC upverter in the power bank and just run on the batteries.
You WILL have to get an 'L' version of your PIC though...
Ttelmah



Joined: 11 Mar 2010
Posts: 19195

View user's profile Send private message

PostPosted: Thu Apr 25, 2019 12:08 am     Reply with quote

The L version requires different wiring.

On the 4550, you need 4.2v _minimum_ to run the regulator to feed the
USB transceivers.
If you use the 'L' version, then you must disable the regulator, and supply
3.3v yourself to feed the Vusb pin (look at Figure 17-1, and note 3 below).
Also at 3.3v, with the L version, the maximum CPU clock supported is
18.7MHz. He has not yet said what speed he actually wants to clock the
CPU?.

Honestly, if he is designing a low power circuit, and wants to run at 3.3v,
then much better to switch to a more modern PIC supporting this, and
wire it so the USB transceivers are only powered when USB is attached.
A device like the 18LF18K50, draws less than half the current, and can clock
at 20MHz, right down to 2V.
temtronic



Joined: 01 Jul 2010
Posts: 9081
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Apr 25, 2019 5:00 am     Reply with quote

Too many PICs, too little time Laughing
I have a tube full of 4550s here, intead I use an external TTL<>USB module as it is cheaper, saves a LOT of memory (no driver) and works 100%.
Without knowing the scope of the OP's project, it might be an option, though as Mr. T points out there are newer PICs that might fit the bill...

Jay
Programmer I+D



Joined: 19 Jul 2018
Posts: 7

View user's profile Send private message

PostPosted: Thu Apr 25, 2019 10:02 am     Reply with quote

Mr. Ttelmah did not know the information of these new PICs. I think I could try a new design with this model, to which I have a doubt. In terms of energy saving, would it be better to use a PIC18 or a PIC32?

Thanks and Regards
Ttelmah



Joined: 11 Mar 2010
Posts: 19195

View user's profile Send private message

PostPosted: Thu Apr 25, 2019 11:01 am     Reply with quote

PIC18 uses less than any PIC24/32.

The 18F4550, is the 'first generation' PIC with USB. There are many
ultra low power models now, and if you disable the USB peripheral when
the USB connection is not made, the consumption will be much lower.
However also be aware that a linear regulator may well use more than the
PIC!. You need to be careful on your selection of every part and use
some basic rules:
Don't leave any pins 'floating' (set as an input and undriven).
You may well be able to save a lot by putting the PIC to sleep when
not actually working. It is often much more efficient to have a PIC running
at (say) 8MHz, and sleeping for 90% of the time, than trying to run
at a much slower speed.
Look at what other peripherals may have to be running, and if these
too can be switched off.
asmallri



Joined: 12 Aug 2004
Posts: 1630
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

Re: Power Bank that Supplies a 5V Circuit
PostPosted: Thu Apr 25, 2019 12:30 pm     Reply with quote

Programmer I+D wrote:
I have a voltage regulator to 3.3V that feeds a circuit with a PIC18F4550 and a LoRa Module, the circuit transmits for 10 seconds and remains sleep for 5min, has a total current consumption of 16mAh. If the circuit is powered from the USB port of the PC it works continuously, but if I connect it to a Power Bank it only works the first 5 minutes. What can I do so that the Power Bank does not shut down?

Thanks and Regards


Do you mean the average current consumption covering both transmit and sleep time is 16mA hour? If so, you are using the wrong platform - it should be at least an order of magnitude lower than this. I have built a complex air quality monitoring system driving multiple gas sensors, including one with a fan, plus driving a GPS module and transmitting data via LoRa and my entire system, sampling every 5 minutes, recording and transmitting the data over LoRa consumes significantly less than 16mA hour.

If you go to thethingsnetwork.org/forum you will finds lot of posts covering very low power LoRa implementations.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group