[TriEmbed] TriEmbed Digest, Vol 16, Issue 18 - Power regulator questions

Shane Trent shanedtrent at gmail.com
Tue Jan 27 13:04:53 CST 2015


Chip,

If your Vcc IS stable you can use it as a reference and convert your ADC
reading of the battery voltage directly into a real voltage. But I would
think that using the internal 1.1V reference would give you a more accurate
measurement even if your Vcc drifts. An other issue for your application
may be adjusting the battery voltage reading for temperature. The reference
or the output of your buck-boost converter may change with temperature. At
the same time, the useful capacity of your batter will definitely change
with temperature. The link below has some charts but you may be able to get
THE chart for YOUR battery from the manufacturer.

http://www.houseofbatteries.com/custom-batteries-custom-lithium-polymer-c-1_67-l-en.html

Shane

Shane

On Tue, Jan 27, 2015 at 1:57 PM, Shane Trent <shanedtrent at gmail.com> wrote:

> Chip,
>
> Here is the link for using a high-side P-FET to connect your battery
> voltage divider long enough to measure the voltage. This would let you use
> lower value voltage divider resistors for a more accurate measurement.
> http://jeelabs.org/2013/05/18/zero-power-measurement-part-2/
>
>
> I did a blog post on options for reducing voltage divider power
> consumption.
>
> http://fettricks.blogspot.com/2014/01/reducing-voltage-divider-load-to-extend.html
>
>
> You would still need to measure your internal 1.1V reference with your ADC
> so you can convert your ADC counts into millivolts. There may be a newer
> article on this but I do not have it bookmarked if there is.
>
> http://provideyourown.com/2012/secret-arduino-voltmeter-measure-battery-voltage/
>
>
> Shane
>
>
>
> On Tue, Jan 27, 2015 at 1:43 PM, Charles McClelland <chip at mcclellands.org>
> wrote:
>
>> Shane and all,
>>
>> I am coming back to this after some time.  I have re-red your message
>> below a few times and read the linked article and I want to make sure I am
>> understanding this correctly.
>>
>> Here is the problem I am looking to solve:  I am building a battery
>> powered sensor that depending on the use case, could have battery packs
>> supplying from 1.8 to 5.5V.  I then use a TI TPS63031 (which with Pete’s
>> help we can now solder reliably despite the diabolical SON10 PowerPad
>> packaging) a buck-boost regulator to provide up to 800mA at 3.3V.  This
>> device will be one of those Internet of Things things so I want it to
>> report its batter level so I know when it is time to go retrieve it and
>> replace the batteries.
>>
>> I looked at the link below and decided that it may not relevant as it is
>> solving for a problem I don’t think I have - that Vcc is not stable.  Not
>> sure, so that is why I am reopening this thread.
>>
>> I am making one (large?) assumption, which I think makes my problem
>> easier to solve:  That the TI buck-boost chip will do its best to do its
>> duty to keep the voltage at 3.3V as long as the following are true: 1.8 <=
>> Vin <= 5.5V, Imax <= 800mA, adequate filtering for noise and spikes in
>> current.
>>
>> If this assumption is correct, I think I could simply use one of the
>> Analog In pins to do the measurement.  Right?
>>
>> Also, I recall there was a discussion in one of our meetings about a
>> circuit that would allow for dividing voltage without suffering constant
>> current loss.  If you know of the link for that circuit, I would be
>> interested.  I remember reading that as you increase the total resistance,
>> you reduce that current loss but introduce potential error and the prospect
>> of noise.  If the input impedance of the Arduino analog ports is 100M ohms,
>> I am thinking that I can use the following:
>> - Put a 0.01uF capacitor between the Analog pin and ground to reduce
>> noise (battery levels change slowly after all)
>> - Use the following resistors: Vbat to Analog 47k and Analog to ground
>> 56k.  So when Vbat is 5.5V, Analog In should be 2.99V.
>> - 100k total resistance is 0.033mA or 5.5mAH over a week which is only
>> 0.3% of my LiPoly battery’s capacity
>> - Vbat will then be = analogRead(Analog) * 6 (in mV) give or take percent
>> or two
>>
>> Am I thinking about this right?
>>
>> Thanks,
>>
>> Chip
>>
>>
>>
>> Charles McClelland
>> chip at mcclellands.org
>> 919-624-5562
>>
>>
>>
>>
>>
>> On Sep 19, 2014, at 10:10 AM, Shane Trent <shanedtrent at gmail.com> wrote:
>>
>> Cool work Chip. I look forward to reading more about the project.
>>
>> I wanted to pass along a trick that allows you to measure your battery
>> voltage in a standard Arduino setup without requiring a voltage divider. In
>> short, they use Vcc as the ADC reference (as usual) but measure the 1.1V
>> internal reference to calibrate the ADC and then convert ADC counts to
>> millivolts. Just using the 1.1V reference on the ADC would require a
>> voltage divider to drop Vcc to less than the 1.1V ADC max limited by the
>> 1.1V reference. I am using it with a Li-poly battery powered project and
>> seemed pretty accurate. There is extra code to get the correct registers
>> for several chips but it is pretty straight forward.
>>
>>
>> http://provideyourown.com/2012/secret-arduino-voltmeter-measure-battery-voltage/
>>
>> Shane
>>
>> On Fri, Sep 19, 2014 at 8:48 AM, Charles McClelland <chip at mcclellands.org
>> > wrote:
>>
>>> Glen and Rodney, yes the tradeoffs part is typically how things work -
>>> but not today.
>>>
>>> I am not sure exactly what RTFM stands for but I have received this
>>> friendly advice in the past.  Well, when I looked at my FONA board’s
>>> instruction set, it turns out there is a function in Adafruit’s library to
>>> get the battery voltage.  So, looks like I am getting this functionality
>>> for “free”.
>>>
>>> Once I saw this, I implemented the situation I described in yesterday’s
>>> post.  My trail counter now sends the current battery voltage when it
>>> reports the trail counts.  Event better, Ubidots (will do a writeup on them
>>> for the blog) will send me an email or text message when the battery
>>> voltage drops below a certain level.  While I am in the learning phase, I
>>> think this will be very helpful.
>>>
>>> Here is what it looks like: <Screen Shot 2014-09-19 at 8.39.27 AM.png>
>>>
>>> <Screen Shot 2014-09-19 at 8.46.52 AM.png>
>>>
>>>
>>> My next step is to add one more “widget” to send the signal strength
>>> (more discovery in the Adafruit library) at the beginning like I do with
>>> the GPS data.
>>>
>>> Of course, the FONA board is not cheap - $39 - so I know I am paying for
>>> this functionality.
>>>
>>> Chip
>>>
>>>
>>>
>>> On Sep 18, 2014, at 3:13 PM, Glen Smith <mrglenasmith at gmail.com> wrote:
>>>
>>> Charles,
>>>
>>> As you said in a previous email, "As with all things electronic, there
>>> is a trade off."
>>>
>>> How much is it going to add to your BOM cost is the bottom line. Once
>>> the part is on board, measuring and transmitting the data is virtually
>>> free, and for your prototypes, can provide useful information. Bench
>>> testing batteries and extrapolating their lifetimes gets you close to an
>>> answer, but ambient conditions on your bench are a far cry from real world.
>>> Getting the metadata and watching it graph would be interesting to ME. But
>>> now we start down a slippery slope again - how does temperature affect that
>>> battery life? Let's add a temp sensor to your system... (Do I remember that
>>> there is a temperature sensor in the 328? Google says yes:
>>> http://playground.arduino.cc/Main/InternalTemperatureSensor ). So
>>> assuming that the 328 is sleeping most of the time, the die should be
>>> pretty close to the ambient temp inside your enclosure. Temperature might
>>> very well affect trail usage - so reporting that regularly might be useful
>>> for the primary function as well.
>>>
>>> Collecting a graph of battery voltage and temp vs time may be of value
>>> for other projects that you come up with in the future. It may not be of
>>> much interest to Parks & Rec - except to know when a sensor may need
>>> maintenance. It might be nice if a sensor went unexpectedly off line to be
>>> able to look at the last reported voltage. If it is close to nominal,
>>> chances are something else happened. Close to the built in cut off voltage
>>> of the battery would lead me to suspect things are still intact, but have
>>> no juice.
>>>
>>> Personally, I think I would add a spot for the component on the board,
>>> with a jumper setting or code support to know if it is populated. Early
>>> deployed units would be populated and the data watched. If I discovered
>>> that the data was boring, future units would lack the sensor.
>>>
>>> Glen
>>>
>>> On Thu, Sep 18, 2014 at 2:27 PM, Charles McClelland <
>>> chip at mcclellands.org> wrote:
>>>
>>>> Rodney,
>>>>
>>>> Agreed, it is overkill for my current non-connected sensor for exactly
>>>> the reasons you state below.  I should have mentioned that this is for the
>>>> GPRS based connected sensor which has much higher and more variable power
>>>> demands.
>>>>
>>>> I was reading this article
>>>> <http://e2e.ti.com/blogs_/b/fullycharged/archive/2014/08/12/where-39-s-the-gauge-part-1.aspx?DCMP=fullyc&HQS=pwr-bms-gmap-wheresmygaugept1-fullyc-20140812-myti-en> from
>>>> the TI power folks who - unsurprisingly - thought that fuel gauges should
>>>> be included in all battery designs.  I started thinking about how emotional
>>>> this engineer was getting with words like “baffled”, “excited” and
>>>> “flustered”.  I figured there must be something here.  Full disclosure - TI
>>>> also sent me a sample of their BQ27410-G1 Gas Gauge chip
>>>> <http://www.ti.com/product/bq27410-g1>
>>>>
>>>> I am planning on putting a connected sensor in the local Ulmstead park
>>>> to measure vehicle traffic.  I was thinking about the “metadata” I could
>>>> send with each transmission and I realized that including the battery
>>>> voltage might be a good thing.  I could watch the battery levels and know
>>>> when I needed to swing by the park to change the battery.  I am using the
>>>> Sparkfun one you pointed out below so, it is not about under voltage but
>>>> about remote monitoring.  Over time, I will probably get a sense of how
>>>> long a battery lasts so perhaps this is just for the learning phase.
>>>> According to the RC blogs, cold weather can affect LiPO performance so, the
>>>> battery life could change significantly as we go from Fall to Winter.
>>>>
>>>> Does this make sense or am I making this more complicated than it needs
>>>> to be?
>>>>
>>>> Thanks,
>>>>
>>>> Chip
>>>>
>>>> On Sep 18, 2014, at 2:09 PM, Rodney Radford <ncgadgetry at gmail.com>
>>>> wrote:
>>>>
>>>> The subject of Lipo batteries and battery fuel guage were discussed at
>>>> a previous TriEmbed meeting.  For your application, I think it is overkill
>>>> as what you are doing is constant - wake up, take a measurement, log it,
>>>> and go back to sleep - so you should be able to determine the length of
>>>> time a charge will last without it.
>>>>
>>>> The issue with Lipos is that you should not overuse them so they go
>>>> undervoltage, but why not go with one with builtin overcharge, overcurrent
>>>> and undervoltage circuitry built in, like this one from Sparfun:
>>>>
>>>> https://www.sparkfun.com/products/341
>>>>
>>>> They have a variety of sizes from from 40mah to several thousand mah,
>>>> so you could first test your circuit with the smaller unit, determine how
>>>> long it will last, and be able to better extrapolate out how big of a
>>>> battery you would need to last for the amount of time you would need
>>>> between charges.
>>>>
>>>>
>>>> On Thu, Sep 18, 2014 at 1:11 PM, Charles McClelland <
>>>> chip at mcclellands.org> wrote:
>>>>
>>>>> Michael,
>>>>>
>>>>> Thanks for taking a look at the power supply thread,  as my projects
>>>>> run on batteries, I have put some time into this.
>>>>>
>>>>> Here are a few thoughts:
>>>>> - Like you, my circuits draw a relatively small amount of current.  I
>>>>> developed these tests at a higher current so they would not take a month to
>>>>> run
>>>>> - your current regulator (MCP1700-3302E
>>>>> <http://ww1.microchip.com/downloads/en/DeviceDoc/20001826C.pdf>) is
>>>>> Linear so it will dissipate - read waste - power equal to the product of
>>>>> the difference between Vin and Vout time current (Eqn 6-1 in data sheet)
>>>>> - This is where I started but I decided to move to a switched power
>>>>> supply for three reasons:
>>>>> - They are battery omnivores - since the TPS63031
>>>>> <http://www.ti.com/lit/ds/symlink/tps63030.pdf> is both boost and
>>>>> buck and is over 90% efficient over a large range (1.8-5.5Vin) - I can
>>>>> throw all sorts of batteries at it
>>>>> - As they are more efficient, they should throw off less heat -
>>>>> potentially a big deal since I put them in a box and bury them
>>>>> - This supply can handle from very small 25uA to 800mA currents
>>>>>
>>>>> As with all things in Engineering, there are some trade-offs I had to
>>>>> accept:
>>>>> - more expensive
>>>>> - QFN packaging - ugh
>>>>> - weird and exotic new component required - an inductor - no really!
>>>>> There are a bewildering number of choices here!
>>>>>
>>>>> Some suggestions:
>>>>> - I would be happy to loan you my test rig which you could use to test
>>>>> your current power supply and compare it to the three I made.
>>>>> - I added the Excel spreadsheet with the full set of tests and results
>>>>> to the posting on the Triembed.org
>>>>> <http://triembed.org/blog/?page_id=234> site
>>>>> - I could give you a TPS63031 breakout board so you could test the
>>>>> supply in your circuit without the pain of soldering - I have some extras
>>>>> - You could look at commercial options such as the little breakout
>>>>> boards from Pololu - I have one of these you could borrow
>>>>> <http://www.pololu.com/product/2122> if you like
>>>>>
>>>>> Hope this helps.
>>>>>
>>>>> BTW, my next step in my power supply obsession is to add a battery
>>>>> fuel gauge to the circuit so my Arduino can check it and so I could use
>>>>> LiPO batteries with more confidence.
>>>>>
>>>>>
>>>>> Chip
>>>>>
>>>>>
>>>>>
>>>>> On Sep 16, 2014, at 5:00 PM, triembed-request at triembed.org wrote:
>>>>>
>>>>> MCP1700-3302E
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Triangle, NC Embedded Computing mailing list
>>>>> TriEmbed at triembed.org
>>>>> http://mail.triembed.org/mailman/listinfo/triembed_triembed.org
>>>>> TriEmbed web site: http://TriEmbed.org <http://triembed.org/>
>>>>>
>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Triangle, NC Embedded Computing mailing list
>>>> TriEmbed at triembed.org
>>>> http://mail.triembed.org/mailman/listinfo/triembed_triembed.org
>>>> TriEmbed web site: http://TriEmbed.org <http://triembed.org/>
>>>>
>>>>
>>>
>>>
>>> _______________________________________________
>>> Triangle, NC Embedded Computing mailing list
>>> TriEmbed at triembed.org
>>> http://mail.triembed.org/mailman/listinfo/triembed_triembed.org
>>> TriEmbed web site: http://TriEmbed.org <http://triembed.org/>
>>>
>>>
>>
>>
>
>
> --
> A blog about some of my projects.  http://fettricks.blogspot.com/
>



-- 
A blog about some of my projects.  http://fettricks.blogspot.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.triembed.org/pipermail/triembed_triembed.org/attachments/20150127/60e058b2/attachment.htm>


More information about the TriEmbed mailing list