More audio considerations

12 messages Options
Embed this post
Permalink
Werner Almesberger

More audio considerations

Reply Threaded More More options
Print post
Permalink
From discussion with Joerg on IRC:

- one of C3003 and C3008 is probably redundant

- B3001 doesn't seem to serve a real purpose either, assuming correct
  layout

- HP/SPKRVDD are fed by AVCC_CODEC, which is fed by CODEC_3V3, which is
  fed by LDO2. LDO2 has a maximum current of 50 mA. Joerg says we need
  at least ~150 mA.

  So that's a big problem. Thanks for catching it !

  GTA02 supplies the audio amp directly from VB, but since HP/SPKRVDD
  are limited to 3.6 V, we can't use VB (or VSYS) directly.

  Possible solutions:

  - feed HP/SPKRVDD from IO_3V3. Needs checking if we're still within
    our current budget for IO_3V3. Also, what happens if the output
    gets shorted during jack insertion/removal ? A drop or even
    shutdown of IO_3V3 would be fatal.

  - we could try to reorder the LDOs such that we use one with that
    limit for HP/SPKRVDD. It could still also supply AVDD (with proper
    separation of current paths.) However, it's not clear what the
    LDOs do if exposed to an overcurrent situation. I haven't found
    any indication of overcurrent behaviour for the LDOs (except for
    HCLDO) in the PMU manual.

  - add a diode or LDO to drop VB/VSYS to the acceptable range and
    add a switch to cut it if CODEC_3V3 is down. (Switch and LDO can
    be the same component.)

Oh, and did anyone notice that the audio amplifier is not powered in
GTA02 if running from USB with the battery removed ?

If we can confirm that the LDOs handle overcurrent gracefully, then I
think the reordering of LDOs looks like the most promising choice.
E.g., swap LDO2 (CODEC_3V3, 50 mA, off in Standby) and LDO4 (BT_3V2,
150 mA, 2.8V in Standby).

If they can't handle overcurrent, then we'd probably need an external
LDO with switch.

Opinions ?

- Werner

_______________________________________________
gta02-core mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/gta02-core
Christoph Mair

Re: More audio considerations

Reply Threaded More More options
Print post
Permalink
> If we can confirm that the LDOs handle overcurrent gracefully, then I
> think the reordering of LDOs looks like the most promising choice.
> E.g., swap LDO2 (CODEC_3V3, 50 mA, off in Standby) and LDO4 (BT_3V2,
> 150 mA, 2.8V in Standby).
Last monday I accidentally tried what happens when trying to boot with IO_3V3
shorted to GND (caused by a bad solder joint at the aux switch).

I could observe two possible behaviours before finding my mistake:
a) Qi booted, loaded the kernel and after some time I got a kernel panic (AUX-
LED flashing). Then I removed the battery. The screen backlight did not turn
on.

b) Qi boots, then nothing happens. Probably the PMU turned everything off.

I did not connect the serial console to see what happens, but my scope showed
some activity on the serial lines.

> If they can't handle overcurrent, then we'd probably need an external
> LDO with switch.
I think they probably can until the device becomes too hot and turns off
everything.

Christoph

_______________________________________________
gta02-core mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/gta02-core
Werner Almesberger

Re: More audio considerations

Reply Threaded More More options
Print post
Permalink
Christoph Mair wrote:
> Last monday I accidentally tried what happens when trying to boot with IO_3V3
> shorted to GND (caused by a bad solder joint at the aux switch).
[...]
>
> I could observe two possible behaviours before finding my mistake:
> a) Qi booted, loaded the kernel and after some time I got a kernel panic
> (AUX-LED flashing).

Hmm, that doesn't sound right. If IO_3V3 is really shorted to GND, the
anode of the AUX LED is grounded as well and the LED thus can't flash.

>> If they can't handle overcurrent, then we'd probably need an external
>> LDO with switch.
> I think they probably can until the device becomes too hot and turns off
> everything.

Let me be more precise: there are a number of possible outcomes of an
overcurrent situation:

1) Permanent hardware damage: not very desirable.

2) LDO delivers the extra current until thermal shutdown stops it.

   This bears the risk of the overcurrent and/or the thermal shutdown
   compromising system operation. I.e., the phone may reset or shut
   down then inserting/removing the jack.
   
3) LDO delivers the nominal current and adjusts the voltage accordingly.

   In this case, the other supplies would be isolated from the shorted
   rail. (Except for the battery, but a few hundred mA for some fraction
   of a second are generally no problem here.) This would be nearly
   optimal. Unfortunately, there's nothing in the manual to suggest this
   is the case.

4) LDO shuts down its output and tries to restart later.

   This is what HCLDO does. However, the manual (repeatedly) only
   mentions this feature for HCLDO, not for any of the other LDOs, so
   it's unlikely that the other LDOs do this too. HCLDO supplies the
   SD/MMC slot, which has obvious overcurrent risks of its own, so we
   can't just swap LDOs to get HCLDO for audio.

I guess only an experiment will tell. I'm afraid the result will be
2).

- Werner

_______________________________________________
gta02-core mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/gta02-core
Werner Almesberger

Re: More audio considerations

Reply Threaded More More options
Print post
Permalink
I wrote:
> Let me be more precise: there are a number of possible outcomes of an
> overcurrent situation:

Oh, and another question is what the codec does if the output is
overloaded or shorted. I couldn't find any clear indication in the
manual - all I found is that there's an optional (!) thermal shutdown
and some "built-in short circuit protection" which "[prevents] any
damage to the headphone outputs", but no details on what actually
happens.

- Werner

_______________________________________________
gta02-core mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/gta02-core
Rask Ingemann Lambertsen-2

Re: More audio considerations

Reply Threaded More More options
Print post
Permalink
In reply to this post by Werner Almesberger
On Fri, Oct 09, 2009 at 12:03:07PM -0300, Werner Almesberger wrote:
> From discussion with Joerg on IRC:
>
> - HP/SPKRVDD are fed by AVCC_CODEC, which is fed by CODEC_3V3, which is
>   fed by LDO2. LDO2 has a maximum current of 50 mA. Joerg says we need
>   at least ~150 mA.
>
>   So that's a big problem. Thanks for catching it !

   Definitely.

>   GTA02 supplies the audio amp directly from VB, but since HP/SPKRVDD
>   are limited to 3.6 V, we can't use VB (or VSYS) directly.

s/GTA02/GTA01/

> Oh, and did anyone notice that the audio amplifier is not powered in
> GTA02 if running from USB with the battery removed ?

   My GTA02 hasn't noticed yet, no.

   (For a moment I thought you were right, until I noticed that the speaker
was about half a metre away from the rest of my partially disassembled Neo,
thereby providing a plausible (and correct) explanation for the missing
audio output.  :-)

> Opinions ?

   I'd say reassign the PMU LDOs. I can't imagine that their overcurrent
protection won't be sufficient to prevent damage.

--
Rask Ingemann Lambertsen
Danish law requires addresses in e-mail to be logged and stored for a year

_______________________________________________
gta02-core mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/gta02-core
Werner Almesberger

Re: More audio considerations

Reply Threaded More More options
Print post
Permalink
In reply to this post by Werner Almesberger
I wrote:
> 2) LDO delivers the extra current until thermal shutdown stops it.

I did some measurements on a GTA02v4 with an overload condition on LDO4
(BT_3V2):

State           LDO4 (nominal) Rload   Ibat (Vbat = 4.2 V)     BT_3V2
--------------- --------------- -----   -------------------     ------
Idle            LDO4 = 0 V      open    104 mA                  3.29 V
Overload        LDO4 = 3.3 V    10 R    422 mA                  3.05 V
Short           LDO4 = 3.3 V     0 R    510 mA                  0.01 V

So the LDO does eventually limit the current, but around 500 mA, which
is considerably above the nominal limit of 150 mA.

Note that the system didn't reset or crash during this experiment. The
PMU got fairly warm after a while, so I stopped.

- Werner

_______________________________________________
gta02-core mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/gta02-core
AlvieBoy

Re: More audio considerations

Reply Threaded More More options
Print post
Permalink
Werner Almesberger wrote:

> I wrote:
>> 2) LDO delivers the extra current until thermal shutdown stops it.
>
> I did some measurements on a GTA02v4 with an overload condition on LDO4
> (BT_3V2):
>
> State           LDO4 (nominal) Rload   Ibat (Vbat = 4.2 V)     BT_3V2
> --------------- --------------- -----   -------------------     ------
> Idle            LDO4 = 0 V      open    104 mA                  3.29 V
> Overload        LDO4 = 3.3 V    10 R    422 mA                  3.05 V
> Short           LDO4 = 3.3 V     0 R    510 mA                  0.01 V

That makes 2.1W. Glad you stopped :)

So I guess we can handle those peaks for a short time, can't we ?

>
> So the LDO does eventually limit the current, but around 500 mA, which
> is considerably above the nominal limit of 150 mA.
>
> Note that the system didn't reset or crash during this experiment. The
> PMU got fairly warm after a while, so I stopped.

I wonder if, as last resort, we can put a NTC there. I am not sure such thing exists as SMT NTC however.

Álvaro

_______________________________________________
gta02-core mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/gta02-core
Werner Almesberger

Re: More audio considerations

Reply Threaded More More options
Print post
Permalink
In reply to this post by Rask Ingemann Lambertsen-2
Rask Ingemann Lambertsen wrote:
> s/GTA02/GTA01/

Oops ! And I was wondering why I had never noticed that one ;-))

>    I'd say reassign the PMU LDOs. I can't imagine that their overcurrent
> protection won't be sufficient to prevent damage.

Yes, it does look good. The ~500 mA limit we effectively get should
prevent any major trouble if the output is shorted or otherwise has
an impedance that's outside the normal operating range.

We have the option of supplying LDO34 from IO_3V3 instead of Vsys.
LDO3 is IO_2V8, well within range of the maximum drop of 250 mV.

For the amplifiers, the WM8753L manual cautions on page 71 that
"If HPVDD and /or SPKRVDD are lower than AVDD, the output signal may
 be clipped.", but I think that's just a distortion of amplitudes
that shouldn't be there in the first place.

If we supply from IO_3V3, this has the following effects:

- volume does not change with type and state of power source

- better energy efficiency, because we drop from Vsys to 3.3 V with
  the DC-DC converter, not the resistive drop in the LDO

- more load on IO_3V3 (AUTO current budget is 1100 mA)

So if we move the amplifier power to IO_3V3, basically all
power-hungry subsystems except IO_1V8, CORE_1V3, and SD_3V3 would go
through IO_3V3, taking about 400 mA for LDOs from the AUTO budget.
Still, doesn't look too scary at first sight.

- Werner

_______________________________________________
gta02-core mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/gta02-core
Werner Almesberger

Re: More audio considerations

Reply Threaded More More options
Print post
Permalink
In reply to this post by AlvieBoy
?lvaro Lopes wrote:
> I wonder if, as last resort, we can put a NTC there. I am not sure such
> thing exists as SMT NTC however.

The PMU should be able to protect itself - there's a temperature
sensor with proper (i.e., cannot be overridden by software) shutdown
logic, as explained section 8.6 of the PMU manual.

I didn't torture-test it yet, though. Maybe tomorrow :)

- Werner

_______________________________________________
gta02-core mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/gta02-core
Werner Almesberger

ECN0010 re-opened (was Re: More audio considerations)

Reply Threaded More More options
Print post
Permalink
In reply to this post by Werner Almesberger
Since we still have to clean up the power supply, I reopened ECN0010
and added a summary of the power supply discussion. The broad strokes
are as follows:

- swap CODEC and BT power, so that we have 150 mA for the amplifiers
  (instead of 50 mA)

- consider feeding LDOs 3/4 (IO_2V8 and CODEC_3V3) from IO_3V3 instead
  of Vsys, for better regulation efficiency

Comments, particularly about the latter issue ?

- Werner

_______________________________________________
gta02-core mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/gta02-core
Werner Almesberger

Re: ECN0010 re-opened (was Re: More audio considerations)

Reply Threaded More More options
Print post
Permalink
I wrote:
> Comments, particularly about the latter issue ?

No comments, so I moved it to "Execute".

Also, let's try to use IO_3V3 then. As a precaution, I'd add a 0R
before LDO34IN, so that it can be reworked to use Vsys in case
there are problems.

We should also rename CODEC_3V3 to either CODEC_3V or - probably
better - just CODEC_VDD.

- Werner

_______________________________________________
gta02-core mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/gta02-core
Werner Almesberger

Re: ECN0010 re-opened (was Re: More audio considerations)

Reply Threaded More More options
Print post
Permalink
I wrote:
> Also, let's try to use IO_3V3 then. As a precaution, I'd add a 0R
> before LDO34IN, so that it can be reworked to use Vsys in case
> there are problems.

Joerg raised a few good points against this plan. He's too shy to
post, so here's my summary:

- current surges would propagate from CODEC_whatever to IO_3V3,
  possibly causing trouble,

- inrush current on LDO3/4 would be drawn from the IO_3V3 capacitors,
  possibly causing trouble as well,

- last but not least, while a DC-DC converter is generally more
  efficient than an LDO, this seems to be a case where they're
  pretty much on par: if Vbat is 3.9 V and we burn 0.6 V in the LDO
  to reach 3.3 V, that's 85% efficiency, just about the same we'd
  expect for the DC-DC converter.

I've removed the section and added a rationale why it's not a great
idea to use IO_3V3 in this case.

- Werner

_______________________________________________
gta02-core mailing list
[hidden email]
https://lists.openmoko.org/mailman/listinfo/gta02-core