Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.raspberry-pi > #25783 > unrolled thread
| Started by | Simple Simon <please.dontspa@me.com> |
|---|---|
| First post | 2021-01-12 12:14 +0000 |
| Last post | 2021-01-17 13:53 +0000 |
| Articles | 20 on this page of 89 — 22 participants |
Back to article view | Back to comp.sys.raspberry-pi
Battery Powered Project Simple Simon <please.dontspa@me.com> - 2021-01-12 12:14 +0000
Re: Battery Powered Project Chris Green <cl@isbd.net> - 2021-01-12 12:40 +0000
Re: Battery Powered Project Simple Simon <please.dontspa@me.com> - 2021-01-12 12:50 +0000
Re: Battery Powered Project "A. Dumas" <alexandre@dumas.fr.invalid> - 2021-01-12 15:15 +0100
Re: Battery Powered Project Theo <theom+news@chiark.greenend.org.uk> - 2021-01-12 21:43 +0000
Re: Battery Powered Project Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> - 2021-01-13 09:40 +0000
Re: Battery Powered Project Jim H <invalid@invalid.invalid> - 2021-01-13 18:02 +0000
Re: Battery Powered Project Joe <joe@jretrading.com> - 2021-01-13 22:04 +0000
Re: Battery Powered Project Theo <theom+news@chiark.greenend.org.uk> - 2021-01-13 23:37 +0000
Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-14 00:43 +0000
Re: Battery Powered Project The Natural Philosopher <tnp@invalid.invalid> - 2021-01-14 03:59 +0000
Re: Battery Powered Project Ahem A Rivet's Shot <steveo@eircom.net> - 2021-01-14 10:18 +0000
Re: Battery Powered Project The Natural Philosopher <tnp@invalid.invalid> - 2021-01-14 11:04 +0000
Re: Battery Powered Project Ahem A Rivet's Shot <steveo@eircom.net> - 2021-01-14 11:46 +0000
Re: Battery Powered Project The Natural Philosopher <tnp@invalid.invalid> - 2021-01-14 12:21 +0000
Re: Battery Powered Project Ahem A Rivet's Shot <steveo@eircom.net> - 2021-01-14 12:38 +0000
Re: Battery Powered Project David Higton <dave@davehigton.me.uk> - 2021-01-14 14:17 +0000
Re: Battery Powered Project The Natural Philosopher <tnp@invalid.invalid> - 2021-01-14 14:28 +0000
Re: Battery Powered Project David Higton <dave@davehigton.me.uk> - 2021-01-16 20:09 +0000
Re: Battery Powered Project The Natural Philosopher <tnp@invalid.invalid> - 2021-01-17 07:19 +0000
Re: Battery Powered Project David Higton <dave@davehigton.me.uk> - 2021-01-17 15:57 +0000
Re: Battery Powered Project The Natural Philosopher <tnp@invalid.invalid> - 2021-01-18 07:05 +0000
Re: Battery Powered Project David Higton <dave@davehigton.me.uk> - 2021-01-18 14:14 +0000
Re: Battery Powered Project John Aldridge <jpsa@cantab.net> - 2021-01-17 17:52 +0000
Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-14 12:56 +0000
Re: Battery Powered Project Theo <theom+news@chiark.greenend.org.uk> - 2021-01-14 13:46 +0000
Re: Battery Powered Project The Natural Philosopher <tnp@invalid.invalid> - 2021-01-14 14:26 +0000
Re: Battery Powered Project The Natural Philosopher <tnp@invalid.invalid> - 2021-01-14 03:46 +0000
Re: Battery Powered Project Folderol <general@musically.me.uk> - 2021-01-14 09:23 +0000
Re: Battery Powered Project The Natural Philosopher <tnp@invalid.invalid> - 2021-01-14 11:04 +0000
Re: Battery Powered Project Folderol <general@musically.me.uk> - 2021-01-14 17:48 +0000
Re: Battery Powered Project Jim H <invalid@invalid.invalid> - 2021-01-18 17:07 +0000
Re: Battery Powered Project Joe <joe@jretrading.com> - 2021-01-18 20:33 +0000
Re: Battery Powered Project Jim H <invalid@invalid.invalid> - 2021-01-21 20:36 +0000
Battery Powered Project nospam.Vincent.Coen@f1.n250.z2.binkp.net (Vincent Coen) - 2021-01-12 14:35 +1300
Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-12 16:40 +0000
Re: Battery Powered Project The Natural Philosopher <tnp@invalid.invalid> - 2021-01-13 13:56 +0000
Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-13 15:12 +0000
Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-16 12:24 +0000
Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-16 17:53 +0000
Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-16 20:39 +0000
Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-16 22:33 +0000
Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-16 23:30 +0000
Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-16 23:52 +0000
Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-17 10:39 +0000
Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-17 14:32 +0000
Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-18 13:20 +0000
Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-18 13:41 +0000
Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-18 14:02 +0000
Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-18 15:15 +0000
Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-19 13:46 +0000
Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-19 15:24 +0000
Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-19 15:34 +0000
Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-19 16:21 +0000
Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-19 17:18 +0000
Re: Battery Powered Project Richard Kettlewell <invalid@invalid.invalid> - 2021-01-19 19:31 +0000
Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-20 10:12 +0000
Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-19 22:15 +0000
Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-20 10:03 +0000
Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-20 10:49 +0000
Re: Battery Powered Project Chris Elvidge <chris@mshome.net> - 2021-01-20 11:29 +0000
Re: Battery Powered Project A. Dumas <alexandre@dumas.fr.invalid> - 2021-01-20 12:18 +0000
Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-20 13:02 +0000
Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-20 15:49 +0000
Re: Battery Powered Project Richard Kettlewell <invalid@invalid.invalid> - 2021-01-20 16:54 +0000
Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-20 17:19 +0000
Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-21 10:24 +0000
Re: Battery Powered Project A. Dumas <alexandre@dumas.fr.invalid> - 2021-01-20 12:18 +0000
Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-20 13:18 +0000
Re: Battery Powered Project Chris Elvidge <chris@mshome.net> - 2021-01-20 14:14 +0000
Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-20 14:51 +0000
Re: Battery Powered Project A. Dumas <alexandre@dumas.fr.invalid> - 2021-01-20 14:45 +0000
Re: Battery Powered Project A. Dumas <alexandre@dumas.fr.invalid> - 2021-01-20 14:44 +0000
Re: Battery Powered Project Richard Kettlewell <invalid@invalid.invalid> - 2021-01-20 15:07 +0000
Re: Battery Powered Project "A. Dumas" <alexandre@dumas.fr.invalid> - 2021-01-20 16:38 +0100
Re: Battery Powered Project Chris Elvidge <chris@mshome.net> - 2021-01-20 15:45 +0000
Re: Battery Powered Project druck <news@druck.org.uk> - 2021-01-21 10:07 +0000
Re: Battery Powered Project "A. Dumas" <alexandre@dumas.fr.invalid> - 2021-01-21 12:30 +0100
Re: Battery Powered Project druck <news@druck.org.uk> - 2021-01-21 13:09 +0000
Re: Battery Powered Project Anssi Saari <as@sci.fi> - 2021-01-22 10:08 +0200
Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-22 10:29 +0000
Re: Battery Powered Project Chris Green <cl@isbd.net> - 2021-01-22 10:25 +0000
Re: Battery Powered Project Kees Nuyt <k.nuyt@nospam.demon.nl> - 2021-01-19 17:03 +0100
Re: Battery Powered Project A. Dumas <alexandre@dumas.fr.invalid> - 2021-01-17 01:09 +0000
Re: Battery Powered Project Chris Elvidge <chris@mshome.net> - 2021-01-17 11:48 +0000
Re: Battery Powered Project Pancho <Pancho.Dontmaileme@outlook.com> - 2021-01-17 12:11 +0000
Re: Battery Powered Project Martin Gregorie <martin@mydomain.invalid> - 2021-01-17 14:43 +0000
Re: Battery Powered Project Chris Elvidge <chris@mshome.net> - 2021-01-17 11:52 +0000
Re: Battery Powered Project Andy Burns <usenet@andyburns.uk> - 2021-01-17 13:53 +0000
Page 2 of 5 — ← Prev page 1 [2] 3 4 5 Next page →
| From | David Higton <dave@davehigton.me.uk> |
|---|---|
| Date | 2021-01-17 15:57 +0000 |
| Message-ID | <204a4ef058.DaveMeUK@BeagleBoard-xM> |
| In reply to | #25942 |
In message <ru0oeu$f6t$1@dont-email.me>
The Natural Philosopher <tnp@invalid.invalid> wrote:
> On 16/01/2021 20:09, David Higton wrote:
> > Using an inductor in a conventional step-down switching regulator is much
> > more efficient, and of course requires the inductor to store energy.
> >
>
> No, it doesn't have to store ALL the energy - like it does in a step up
>
> And if you don't mind massive ripple, it isn't needed *at all*. Consider a
> 6V battery deeding a 3V lamp. Simply chop the 6V on a 50% duty cycle and
> there you are. No choke needed at all.
Yes, but that situation is entirely unlike what the OP was talking about,
and is indeed inapplicable.
> Add an LC filter and the cap stores all that is necessary. All the L does
> is limit the peak current into the C.
If it's going to limit the current, it must not saturate, in which case
it'd store the energy that you claim is unnecessary. You'd also have
to remove the energy from the inductor every time the switch switched
off, otherwise the switch would break down. Basically you'd have created
a conventional step-down converter.
Or, if the inductor saturated but still limited the current, it would
have to be a high enough resistance to be quite lossy.
David
[toc] | [prev] | [next] | [standalone]
| From | The Natural Philosopher <tnp@invalid.invalid> |
|---|---|
| Date | 2021-01-18 07:05 +0000 |
| Message-ID | <ru3bvr$8pi$7@dont-email.me> |
| In reply to | #25950 |
On 17/01/2021 15:57, David Higton wrote: > If it's going to limit the current, it must not saturate, in which case > it'd store the energy that you claim is unnecessary. Go back and re read your electronics 101 -- "The great thing about Glasgow is that if there's a nuclear attack it'll look exactly the same afterwards." Billy Connolly
[toc] | [prev] | [next] | [standalone]
| From | David Higton <dave@davehigton.me.uk> |
|---|---|
| Date | 2021-01-18 14:14 +0000 |
| Message-ID | <d0bec8f058.DaveMeUK@BeagleBoard-xM> |
| In reply to | #25952 |
In message <ru3bvr$8pi$7@dont-email.me>
The Natural Philosopher <tnp@invalid.invalid> wrote:
> On 17/01/2021 15:57, David Higton wrote:
> > If it's going to limit the current, it must not saturate, in which case
> > it'd store the energy that you claim is unnecessary.
>
> Go back and re read your electronics 101
Most amusing, given my decades-long career in electronic engineering.
In what way do think that my statement is incorrect?
David
[toc] | [prev] | [next] | [standalone]
| From | John Aldridge <jpsa@cantab.net> |
|---|---|
| Date | 2021-01-17 17:52 +0000 |
| Message-ID | <MPG.3a6e89ad73b51209989790@news.eternal-september.org> |
| In reply to | #25942 |
In article <ru0oeu$f6t$1@dont-email.me>, tnp@invalid.invalid says... > > On 16/01/2021 20:09, David Higton wrote: > > Using an inductor in a conventional step-down switching regulator is > > much more efficient, and of course requires the inductor to store > > energy. > > > > No, it doesn't have to store ALL the energy - like it does in a step up > > And if you don't mind massive ripple, it isn't needed *at all*. > Consider a 6V battery deeding a 3V lamp. Simply chop the 6V on a 50% > duty cycle and there you are. No choke needed at all. 25%? John
[toc] | [prev] | [next] | [standalone]
| From | Martin Gregorie <martin@mydomain.invalid> |
|---|---|
| Date | 2021-01-14 12:56 +0000 |
| Message-ID | <rtpf1n$f78$1@dont-email.me> |
| In reply to | #25885 |
On Thu, 14 Jan 2021 10:18:57 +0000, Ahem A Rivet's Shot wrote: > On 13 Jan 2021 23:37:18 +0000 (GMT) > Theo <theom+news@chiark.greenend.org.uk> wrote: > >> Joe <joe@jretrading.com> wrote: >> > Lithium cells have a linear-ish discharge curve, from 4.2V down to >> > around 3V. Any sensibly designed lithium battery will cut off its >> > output at the chosen lower bound, because if it completely >> > discharges, it's dead forever. Not a 'steep' decline, a 'fall off the >> > wall' decline. >> > >> > It's a good idea to have some independent means of anticipating this >> > point. >> >> But lithium ion cells don't work for this application. We need 5V. >> One cell is too little, two cells is too much. > > One cell and a DC-DC converter to give you a regulated supply, > monitor the cell so you can shut down (well) before there's too little > to run the converter. The Powerboost 1000C from Adafruit does that - has 5v input an is connected to an RPi and a single cell LiPO cell, so is a a postage-stamp sized 1 amp UPS. It can run the attached RPi while charging the LiPO from the 5v supply and continue to run the RPi off the LoPO in the 5v feed is turned off. Needs some soldering: it comes with all the connectors that can be attached to it, but not soldered in. The idea is that you only install the ones you need. Note I have one, but haven't yet found the round tuit I need to get it and a Pi Zero up and running using it. When the project is complete I'll what will be effectively a pocketable system TFT touch screen and built- in charger. -- -- Martin | martin at Gregorie | gregorie dot org
[toc] | [prev] | [next] | [standalone]
| From | Theo <theom+news@chiark.greenend.org.uk> |
|---|---|
| Date | 2021-01-14 13:46 +0000 |
| Message-ID | <7ul*nlbay@news.chiark.greenend.org.uk> |
| In reply to | #25885 |
Ahem A Rivet's Shot <steveo@eircom.net> wrote: > One cell and a DC-DC converter to give you a regulated supply, > monitor the cell so you can shut down (well) before there's too little to > run the converter. Which is all very nice, but is not what the OP is doing. They're monitoring *the input rail of the Pi*, because that's all the Pi hardware does. You put 5V in, it tells you if it sags below some threshold. You don't get to put some other voltage in to test. If you put in your raw cell voltage that will under- or over-volt the Pi and it'll either not work or fry[1]. If they want to monitor some other voltage, they'll have to start from scratch because none of what they're doing (hardware or software) will work. Theo [1] the main SoC has some protection as it has its own voltage regulators, but USB-side things do use that 5V directly and you may fry it that way
[toc] | [prev] | [next] | [standalone]
| From | The Natural Philosopher <tnp@invalid.invalid> |
|---|---|
| Date | 2021-01-14 14:26 +0000 |
| Message-ID | <rtpka2$rjp$1@dont-email.me> |
| In reply to | #25910 |
On 14/01/2021 13:46, Theo wrote: > Ahem A Rivet's Shot <steveo@eircom.net> wrote: >> One cell and a DC-DC converter to give you a regulated supply, >> monitor the cell so you can shut down (well) before there's too little to >> run the converter. > > Which is all very nice, but is not what the OP is doing. > > They're monitoring *the input rail of the Pi*, because that's all the Pi > hardware does. You put 5V in, it tells you if it sags below some threshold. > You don't get to put some other voltage in to test. If you put in your raw > cell voltage that will under- or over-volt the Pi and it'll either not work > or fry[1]. > > If they want to monitor some other voltage, they'll have to start from > scratch because none of what they're doing (hardware or software) will work. and the point is that any regulated supply will simply die without warning, so they will have to > > Theo > > [1] the main SoC has some protection as it has its own voltage regulators, > but USB-side things do use that 5V directly and you may fry it that way > -- Those who want slavery should have the grace to name it by its proper name. They must face the full meaning of that which they are advocating or condoning; the full, exact, specific meaning of collectivism, of its logical implications, of the principles upon which it is based, and of the ultimate consequences to which these principles will lead. They must face it, then decide whether this is what they want or not. Ayn Rand.
[toc] | [prev] | [next] | [standalone]
| From | The Natural Philosopher <tnp@invalid.invalid> |
|---|---|
| Date | 2021-01-14 03:46 +0000 |
| Message-ID | <rtoeq0$pt9$1@dont-email.me> |
| In reply to | #25869 |
On 13/01/2021 22:04, Joe wrote: > > Lithium cells have a linear-ish discharge curve, from 4.2V down to > around 3V. They do. > Any sensibly designed lithium battery will cut off its > output at the chosen lower bound, No, it wont. That isn't in the *battery* - that's in whatever is drawing current off it. I have many lthium packs with no such ptotection > because if it completely discharges, > it's dead forever. Not a 'steep' decline, a 'fall off the wall' decline. No, again it goes on down to zero, 3V is just approximately the point at which irreversible damage starts to happen. > > It's a good idea to have some independent means of anticipating this > point. > The way to run a lithium in this application is to use a 2 cell lithium, a constant voltage constant current charger limited to 8.4V and probably no more than the battery mAh capacity divided by one hour... and a switched mode 5V regulator to feed the Pi and then somehow monitor raw battery voltage and switch it all off when it gets to say 6.6V and hope that the SMPS and monitoring circuit don't then still draw enough to damage the battery, or even if it is take it on the chin and replace the battery when that happens. I would imagine that the whole setup would cost more than the Pi itself -- “It is dangerous to be right in matters on which the established authorities are wrong.” ― Voltaire, The Age of Louis XIV
[toc] | [prev] | [next] | [standalone]
| From | Folderol <general@musically.me.uk> |
|---|---|
| Date | 2021-01-14 09:23 +0000 |
| Message-ID | <20210114092324.58fbac69@devuan> |
| In reply to | #25875 |
On Thu, 14 Jan 2021 03:46:08 +0000 The Natural Philosopher <tnp@invalid.invalid> wrote: >On 13/01/2021 22:04, Joe wrote: > >> >> Lithium cells have a linear-ish discharge curve, from 4.2V down to >> around 3V. > >They do. > >> Any sensibly designed lithium battery will cut off its >> output at the chosen lower bound, > >No, it wont. That isn't in the *battery* - that's in whatever is drawing >current off it. I have many lthium packs with no such ptotection > > > >> because if it completely discharges, >> it's dead forever. Not a 'steep' decline, a 'fall off the wall' decline. > >No, again it goes on down to zero, 3V is just approximately the point at >which irreversible damage starts to happen. > >> >> It's a good idea to have some independent means of anticipating this >> point. >> >The way to run a lithium in this application is to use a 2 cell lithium, >a constant voltage constant current charger limited to 8.4V and probably >no more than the battery mAh capacity divided by one hour... and a >switched mode 5V regulator to feed the Pi and then somehow monitor raw >battery voltage and switch it all off when it gets to say 6.6V and hope >that the SMPS and monitoring circuit don't then still draw enough to >damage the battery, or even if it is take it on the chin and replace the >battery when that happens. To get round that use a latching relay 'start' circuit, and when the battery voltage gets too low unlatch the relay- Zero power demand then. -- W J G
[toc] | [prev] | [next] | [standalone]
| From | The Natural Philosopher <tnp@invalid.invalid> |
|---|---|
| Date | 2021-01-14 11:04 +0000 |
| Message-ID | <rtp8f3$55d$3@dont-email.me> |
| In reply to | #25884 |
On 14/01/2021 09:23, Folderol wrote: > On Thu, 14 Jan 2021 03:46:08 +0000 > The Natural Philosopher <tnp@invalid.invalid> wrote: > >> On 13/01/2021 22:04, Joe wrote: >> >>> >>> Lithium cells have a linear-ish discharge curve, from 4.2V down to >>> around 3V. >> >> They do. >> >>> Any sensibly designed lithium battery will cut off its >>> output at the chosen lower bound, >> >> No, it wont. That isn't in the *battery* - that's in whatever is drawing >> current off it. I have many lthium packs with no such ptotection >> >> >> >>> because if it completely discharges, >>> it's dead forever. Not a 'steep' decline, a 'fall off the wall' decline. >> >> No, again it goes on down to zero, 3V is just approximately the point at >> which irreversible damage starts to happen. >> >>> >>> It's a good idea to have some independent means of anticipating this >>> point. >>> >> The way to run a lithium in this application is to use a 2 cell lithium, >> a constant voltage constant current charger limited to 8.4V and probably >> no more than the battery mAh capacity divided by one hour... and a >> switched mode 5V regulator to feed the Pi and then somehow monitor raw >> battery voltage and switch it all off when it gets to say 6.6V and hope >> that the SMPS and monitoring circuit don't then still draw enough to >> damage the battery, or even if it is take it on the chin and replace the >> battery when that happens. > > To get round that use a latching relay 'start' circuit, and when the > battery voltage gets too low unlatch the relay- Zero power demand then. > > Its getting as complicated as a renewable energy grid though isn't it? -- In todays liberal progressive conflict-free education system, everyone gets full Marx.
[toc] | [prev] | [next] | [standalone]
| From | Folderol <general@musically.me.uk> |
|---|---|
| Date | 2021-01-14 17:48 +0000 |
| Message-ID | <20210114174852.5bc19953@devuan> |
| In reply to | #25887 |
On Thu, 14 Jan 2021 11:04:03 +0000 The Natural Philosopher <tnp@invalid.invalid> wrote: >On 14/01/2021 09:23, Folderol wrote: >> To get round that use a latching relay 'start' circuit, and when the >> battery voltage gets too low unlatch the relay- Zero power demand then. >> >> >Its getting as complicated as a renewable energy grid though isn't it? Oh come on now! I designed my first latching relay/(manual)shutdown thing when I was about 10. When I was in my early teens I did one that would automatically time out, using one of those new-fanged transistor things and a cap. -- W J G
[toc] | [prev] | [next] | [standalone]
| From | Jim H <invalid@invalid.invalid> |
|---|---|
| Date | 2021-01-18 17:07 +0000 |
| Message-ID | <lffb0gte9bljd86tmuqto62ske7fqoccq7@4ax.com> |
| In reply to | #25875 |
On Thu, 14 Jan 2021 03:46:08 +0000, in <rtoeq0$pt9$1@dont-email.me>, The Natural Philosopher <tnp@invalid.invalid> wrote: >On 13/01/2021 22:04, Joe wrote: > >> >> Lithium cells have a linear-ish discharge curve, from 4.2V down to >> around 3V. > >They do. > >> Any sensibly designed lithium battery will cut off its >> output at the chosen lower bound, > >No, it wont. That isn't in the *battery* - that's in whatever is drawing >current off it. I have many lthium packs with no such ptotection > > > >> because if it completely discharges, >> it's dead forever. Not a 'steep' decline, a 'fall off the wall' decline. > >No, again it goes on down to zero, 3V is just approximately the point at >which irreversible damage starts to happen. > >> >> It's a good idea to have some independent means of anticipating this >> point. >> >The way to run a lithium in this application is to use a 2 cell lithium, >a constant voltage constant current charger limited to 8.4V and probably >no more than the battery mAh capacity divided by one hour... and a >switched mode 5V regulator to feed the Pi and then somehow monitor raw >battery voltage and switch it all off when it gets to say 6.6V and hope >that the SMPS and monitoring circuit don't then still draw enough to >damage the battery, or even if it is take it on the chin and replace the >battery when that happens. Yes... with special care to observe that safe cutoff voltage so that when power returns the constant current, constant voltage charger doesn't charge the battery any faster than it can accept safely. But wait... the constant current needs to be all that is needed to run the Pi PLUS the additional safe amount to recharge the battery, but... how do you assure the Pi and the battery share the current appropriately so that the Pi runs and the battery recharges safely? Maybe a bit more control is needed to assure a battery voltage above a certain value before the Pi is rebooted. >I would imagine that the whole setup would cost more than the Pi itself Likely so, but I've always wondered at comparing the COST of the Pi to the cost of supporting equipment vs comparing the CAPABILITIES of the Pi (vs desktops/laptops/etc) to the cost of support. One can't really expect support costs to scale down proportionally to the lower cost of the Pi. -- Jim H
[toc] | [prev] | [next] | [standalone]
| From | Joe <joe@jretrading.com> |
|---|---|
| Date | 2021-01-18 20:33 +0000 |
| Message-ID | <20210118203321.00c28e56@jresid.jretrading.com> |
| In reply to | #25958 |
On Mon, 18 Jan 2021 17:07:59 +0000 Jim H <invalid@invalid.invalid> wrote: > On Thu, 14 Jan 2021 03:46:08 +0000, in <rtoeq0$pt9$1@dont-email.me>, > The Natural Philosopher <tnp@invalid.invalid> wrote: > > >The way to run a lithium in this application is to use a 2 cell > >lithium, a constant voltage constant current charger limited to 8.4V > >and probably no more than the battery mAh capacity divided by one > >hour... and a switched mode 5V regulator to feed the Pi and then > >somehow monitor raw battery voltage and switch it all off when it > >gets to say 6.6V and hope that the SMPS and monitoring circuit don't > >then still draw enough to damage the battery, or even if it is take > >it on the chin and replace the battery when that happens. > > Yes... with special care to observe that safe cutoff voltage so that > when power returns the constant current, constant voltage charger > doesn't charge the battery any faster than it can accept safely. But > wait... the constant current needs to be all that is needed to run the > Pi PLUS the additional safe amount to recharge the battery, but... how > do you assure the Pi and the battery share the current appropriately > so that the Pi runs and the battery recharges safely? Maybe a bit more > control is needed to assure a battery voltage above a certain value > before the Pi is rebooted. > The way to do it is to use a purpose-made lithium battery charger IC, for a pound or two. A diode, an inductor, a capacitor, a resistor and a transistor are all that is additionally needed, and some ICs incorporate the transistor. You then need a power source that will provide current for both charging and a reasonable amount to run the device itself. The resistor sets the main charging current, typically 0.3-0.5 of the battery capacity, independently of the device consumption. The diode, inductor, capacitor and transistor do the same jobs as in any switch-mode power supply. -- Joe
[toc] | [prev] | [next] | [standalone]
| From | Jim H <invalid@invalid.invalid> |
|---|---|
| Date | 2021-01-21 20:36 +0000 |
| Message-ID | <76pj0g9apfuuo3nk41047vikdpp7lba23p@4ax.com> |
| In reply to | #25959 |
On Mon, 18 Jan 2021 20:33:21 +0000, in <20210118203321.00c28e56@jresid.jretrading.com>, Joe <joe@jretrading.com> wrote: >On Mon, 18 Jan 2021 17:07:59 +0000 >Jim H <invalid@invalid.invalid> wrote: > >> On Thu, 14 Jan 2021 03:46:08 +0000, in <rtoeq0$pt9$1@dont-email.me>, >> The Natural Philosopher <tnp@invalid.invalid> wrote: >> > >> >The way to run a lithium in this application is to use a 2 cell >> >lithium, a constant voltage constant current charger limited to 8.4V >> >and probably no more than the battery mAh capacity divided by one >> >hour... and a switched mode 5V regulator to feed the Pi and then >> >somehow monitor raw battery voltage and switch it all off when it >> >gets to say 6.6V and hope that the SMPS and monitoring circuit don't >> >then still draw enough to damage the battery, or even if it is take >> >it on the chin and replace the battery when that happens. >> >> Yes... with special care to observe that safe cutoff voltage so that >> when power returns the constant current, constant voltage charger >> doesn't charge the battery any faster than it can accept safely. But >> wait... the constant current needs to be all that is needed to run the >> Pi PLUS the additional safe amount to recharge the battery, but... how >> do you assure the Pi and the battery share the current appropriately >> so that the Pi runs and the battery recharges safely? Maybe a bit more >> control is needed to assure a battery voltage above a certain value >> before the Pi is rebooted. >> > >The way to do it is to use a purpose-made lithium battery charger IC, >for a pound or two. A diode, an inductor, a capacitor, a resistor and a >transistor are all that is additionally needed, and some ICs >incorporate the transistor. You then need a power source that will >provide current for both charging and a reasonable amount to run the >device itself. The resistor sets the main charging current, typically >0.3-0.5 of the battery capacity, independently of the device >consumption. The diode, inductor, capacitor and transistor do the same >jobs as in any switch-mode power supply. This type of charger will work PROVIDED the battery doesn't run so low that it's reluctant to take a recharge. In that case you need a REAL LiIon charger (what you describe above doesn't even come close) that detects this condition and charges at a very low rate until the voltage rises to the point that the battery will accept charge. Simple chargers like you describe above work for cell phones because the logic that protects the battery is in the cell phone. -- Jim H
[toc] | [prev] | [next] | [standalone]
| From | nospam.Vincent.Coen@f1.n250.z2.binkp.net (Vincent Coen) |
|---|---|
| Date | 2021-01-12 14:35 +1300 |
| Message-ID | <1610462814@f1.n250.z2.binkp.net> |
| In reply to | #25783 |
Hello Simple! Tuesday January 12 2021 12:14, you wrote to All: > I am working on a battery powered car and want the Pi to shut down > automatically if the battery starts to go flat to try to prevent SD > card corruption. I am a beginner to bash scripts! I will run this via > crontab... > #!/bin/bash > powerstatus=$(vcgencmd get_throttled) > if [ $powerstatus="throttled=0x1" ] > then > echo Under Voltage Detected - Shutting Down > sudo halt > else > echo Voltage Normal > fi > Obviously it is not working!! Could someone correct and explain for me > please. You have another 2/3 possible issues :- 1. crontab will only run the script at the defined point of time so you need to run it often OR better still as a subtask from a routine that WILL run if the battery is low at a given point (not almost flat) to shutdown the system , NOTE the term shutdown by using similar to shutdown -h now and not halt which may well not close down any processes running first and possbly cause curruptions on your system disk / SD etc. 2. As a follow on from 1 , you need a low level process that is constantly running say with a sleep of nn seconds that tests the battery state and if good sleeps or runs process similar to your bash script but not it and suggest say a little C process as it would use less resources. 3. As a follow on from both of the above. You should check what battery setting you have for throttled and have it set to at least 25% battery power if you have a lot of proceses that can be running at any one time and if needed a higher value. I have a similar set of processes but linked to a APC UPS so see package apcupsd. Vincent
[toc] | [prev] | [next] | [standalone]
| From | Pancho <Pancho.Dontmaileme@outlook.com> |
|---|---|
| Date | 2021-01-12 16:40 +0000 |
| Message-ID | <rtkjd5$p68$1@dont-email.me> |
| In reply to | #25783 |
On 12/01/2021 12:14, Simple Simon wrote: > I am working on a battery powered car and want the Pi to shut down > automatically if the battery starts to go flat to try to prevent SD card > corruption. I am a beginner to bash scripts! I will run this via crontab... > > #!/bin/bash > powerstatus=$(vcgencmd get_throttled) > if [ $powerstatus="throttled=0x1" ] > then > echo Under Voltage Detected - Shutting Down > sudo halt > else > echo Voltage Normal > fi > > Obviously it is not working!! Could someone correct and explain for me > please. Not being much help, but... I'm aware of Under Voltage problems from entries in journalctl. It seems to me that listening for events logged to journalctl would be a pretty common thing to do. So common that there should be some standard way of doing it. Some kind of standard Observer pattern on jounalctl. Does anyone know of one?
[toc] | [prev] | [next] | [standalone]
| From | The Natural Philosopher <tnp@invalid.invalid> |
|---|---|
| Date | 2021-01-13 13:56 +0000 |
| Message-ID | <rtmu74$ule$1@dont-email.me> |
| In reply to | #25788 |
On 12/01/2021 16:40, Pancho wrote: > On 12/01/2021 12:14, Simple Simon wrote: >> I am working on a battery powered car and want the Pi to shut down >> automatically if the battery starts to go flat to try to prevent SD >> card corruption. I am a beginner to bash scripts! I will run this via >> crontab... >> >> #!/bin/bash >> powerstatus=$(vcgencmd get_throttled) >> if [ $powerstatus="throttled=0x1" ] >> then >> echo Under Voltage Detected - Shutting Down >> sudo halt >> else >> echo Voltage Normal >> fi >> >> Obviously it is not working!! Could someone correct and explain for me >> please. > > Not being much help, but... > > I'm aware of Under Voltage problems from entries in journalctl. It seems > to me that listening for events logged to journalctl would be a pretty > common thing to do. So common that there should be some standard way of > doing it. Some kind of standard Observer pattern on jounalctl. Does > anyone know of one? Well that's just another problem with systemd. When coming up with something similar in Apache, I could tell apache to log to a process that tripped certain (security relevant) events. There ought to be a way to tell systemd to do similar so you can have a watchdog attached...but who knows how to do it? -- “Puritanism: The haunting fear that someone, somewhere, may be happy.” H.L. Mencken, A Mencken Chrestomathy
[toc] | [prev] | [next] | [standalone]
| From | Martin Gregorie <martin@mydomain.invalid> |
|---|---|
| Date | 2021-01-13 15:12 +0000 |
| Message-ID | <rtn2l1$hbh$2@dont-email.me> |
| In reply to | #25837 |
On Wed, 13 Jan 2021 13:56:52 +0000, The Natural Philosopher wrote:
> On 12/01/2021 16:40, Pancho wrote:
>> On 12/01/2021 12:14, Simple Simon wrote:
>>> I am working on a battery powered car and want the Pi to shut down
>>> automatically if the battery starts to go flat to try to prevent SD
>>> card corruption. I am a beginner to bash scripts! I will run this via
>>> crontab...
>>>
>>> #!/bin/bash powerstatus=$(vcgencmd get_throttled)
>>> if [ $powerstatus="throttled=0x1" ]
>>> then echo Under Voltage Detected - Shutting Down sudo halt else echo
>>> Voltage Normal fi
>>>
>>> Obviously it is not working!! Could someone correct and explain for me
>>> please.
>>
>> Not being much help, but...
>>
>> I'm aware of Under Voltage problems from entries in journalctl. It
>> seems to me that listening for events logged to journalctl would be a
>> pretty common thing to do. So common that there should be some standard
>> way of doing it. Some kind of standard Observer pattern on jounalctl.
>> Does anyone know of one?
>
One way to get a rapid notification of entries written to a log is the
use 'tail' in a script.
Running "sudo tail -f /var/log/messages" from a console shows you each
message as it is written to /var/log/messages, so a script started a boot
time to run with sufficient privilege to read those log entries could
easily use tail to read messages as they are written and filter out the
ones of interest with grep or awk and use them to , for instance force a
clean shutdown on low battery, something like
#!/bin/bash
tail -f /var/log/messages | awk <<ENDPROG
/Under voltage/ { shutdown -h NOW }
ENDPROG
In this example tail is reading the logfile and piping messages into awk,
which as running an awk script from a 'here document', i.e. the awk
script is all the lines from the line after <<ENDPROG and before the
'ENDPROG line.
As messages are written to the logfile, tail reads and passes them to awk,
which shuts the Pi down if it gets passed a line containing 'Under
voltage' and ignores all other lines. Onve the script is written and
tested, put it in /usr/local/bin
tail and awk (aka gawk) is a standard Linux utility that IIRC is
installed by default as part of the Raspbian toolset. Its manpage is also
its manual and describes the awk language - there's also an O'Reilly
book, "sed & awk" that contains the awk language specification plus a
tutorial with examples of doing quite complex things with it, such as
building a sorted list of all the words in a document.
The stuff I've shown above is pretty much the standard way of running a
process in the background iunder any flavour of Linux.
> Well that's just another problem with systemd.
>
Systemd isn't the issue here because the example script I've shown will
run equally well under systemd or the old SysV init.
The only difference is in setting things up so the script gets launched
at boot time.
- Under systemd you'd define a service to manage it.
- Under sysV init you'd write a control script, put that in /etc/init.d
and then hack around with with the contents of the /etc/rc?.d
directories to specify the runlevels at which its started and those at
which its not.
--
--
Martin | martin at
Gregorie | gregorie dot org
[toc] | [prev] | [next] | [standalone]
| From | Pancho <Pancho.Dontmaileme@outlook.com> |
|---|---|
| Date | 2021-01-16 12:24 +0000 |
| Message-ID | <rtuluh$b4f$1@dont-email.me> |
| In reply to | #25843 |
On 13/01/2021 15:12, Martin Gregorie wrote:
> On Wed, 13 Jan 2021 13:56:52 +0000, The Natural Philosopher wrote:
>
>> On 12/01/2021 16:40, Pancho wrote:
>>> On 12/01/2021 12:14, Simple Simon wrote:
>>>> I am working on a battery powered car and want the Pi to shut down
>>>> automatically if the battery starts to go flat to try to prevent SD
>>>> card corruption. I am a beginner to bash scripts! I will run this via
>>>> crontab...
>>>>
>>>> #!/bin/bash powerstatus=$(vcgencmd get_throttled)
>>>> if [ $powerstatus="throttled=0x1" ]
>>>> then echo Under Voltage Detected - Shutting Down sudo halt else echo
>>>> Voltage Normal fi
>>>>
>>>> Obviously it is not working!! Could someone correct and explain for me
>>>> please.
>>>
>>> Not being much help, but...
>>>
>>> I'm aware of Under Voltage problems from entries in journalctl. It
>>> seems to me that listening for events logged to journalctl would be a
>>> pretty common thing to do. So common that there should be some standard
>>> way of doing it. Some kind of standard Observer pattern on jounalctl.
>>> Does anyone know of one?
>>
> One way to get a rapid notification of entries written to a log is the
> use 'tail' in a script.
>
> Running "sudo tail -f /var/log/messages" from a console shows you each
> message as it is written to /var/log/messages, so a script started a boot
> time to run with sufficient privilege to read those log entries could
> easily use tail to read messages as they are written and filter out the
> ones of interest with grep or awk and use them to , for instance force a
> clean shutdown on low battery, something like
>
> #!/bin/bash
> tail -f /var/log/messages | awk <<ENDPROG
> /Under voltage/ { shutdown -h NOW }
> ENDPROG
>
I thought << was a way of redirecting stdin, not redirecting command
line or program file.
But perhaps more importantly, Linux seems to buffer pipelines, meaning
an event watcher on the journal isn't close to immediate.
In fact I couldn't get the following to work at all:
sudo journalctl -f | awk '{ print $0 }'
Let alone anything more ambitious.
Also, although I've read that Unix pipe lines should work as a "push
queue" event mechanism they always feel like a busy loop pull to me.
[toc] | [prev] | [next] | [standalone]
| From | Martin Gregorie <martin@mydomain.invalid> |
|---|---|
| Date | 2021-01-16 17:53 +0000 |
| Message-ID | <rtv96p$3kh$1@dont-email.me> |
| In reply to | #25933 |
On Sat, 16 Jan 2021 12:24:48 +0000, Pancho wrote:
> I thought << was a way of redirecting stdin, not redirecting command
> line or program file.
>
'man bash' is your friend - look up 'here documents' in the bash manpage
> In fact I couldn't get the following to work at all:
>
> sudo journalctl -f | awk '{ print $0 }'
>
awk is expecting to be passed the awkscript in one of these ways:
1) awk -f sourcefile
2) awk -- 'program text'
and in (2) the '--' which marks the end of awk options, is mandatory
if you use this syntax.
> sudo journalctl -f | awk -- '{ print $0 }'
Since journalctl only reads the systemd journal, if you want to read any
other journal, and /var/log/messages is the default for most non-system
programs you need to use tail, not journalctl, so write something like
sudo tail -f /var/log/messages | awk -- '{ print $0 }'
which works here.
--
--
Martin | martin at
Gregorie | gregorie dot org
[toc] | [prev] | [next] | [standalone]
Page 2 of 5 — ← Prev page 1 [2] 3 4 5 Next page →
Back to top | Article view | comp.sys.raspberry-pi
csiph-web