Peter Pregler | 31 Jan 2005 21:02
Picon
Favicon

Re: AC detection explored

On Mon, 2005-01-31 at 19:42 +0100, Michael 'Mickey' Lauer wrote:
> > Looking through the kernel patches at OE, I came across the line
> > 2004/03/31 mickey     | +#define MIN_SUPPLY            12000 /* Less then
> > 12V means no powersupply */
> > 
> > Maybe someone of the kernel coders can verify this and change the value to
> > 11000 or 10000 for more reliability.
> 
> Sounds reasonable (to me at least). Juergen, Walter, Ralf, can I get a
> confirmation from you?

The original code is by Jürgen, but the usage is by me. So I feel
qualified too. :) The original definition is more or less this:

/*
 * We have two types of batteries a small and a large one
 * To get the right value we to distinguish between those two
 * 450 Units == 15 V
 */
#ifdef SMALL_BATTERY 
#define CALIBRATE_SUPPLY(a)   (((a) * 1500) / 51)
#define MIN_SUPPLY            8500 /* Less then 8.5V means no
powersupply */
#else
#define CALIBRATE_SUPPLY(a)   (((a) * 1500) / 45)
//#define MIN_SUPPLY            14000 /* Less then 14V means no
powersupply */
#define MIN_SUPPLY            12000 /* Less then 12V means no
powersupply */
#endif

The 14V are in the original code on which the code is based. So I guess
some smaller value is okay. So I'd say a value smaller than 12V is
appropriate. The actual value would be something between 12V and the
point the SimPad switches to battery-operation. Note that this is not
used for charging which AFAIK is controlled by an extra OS-independent
circuit. Thus my suggestion for an experiment to find that values: just
go up with the external voltage and see at what point the LED goes on
for charging.

-Peter
	

-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl

Gmane