Searching \ for '[PIC] ICSP power supply isolation' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devprogs.htm?key=icsp
Search entire site for: 'ICSP power supply isolation'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] ICSP power supply isolation'
2005\05\16@123031 by Mike Hord

picon face
Okay, per a thread from a few weeks ago, I'm redesigning
to make robust ICSP a reality.  My system will normally
operate at 3.5V, so I need to isolate the PIC power
supply from the remainder of the system.

I was thinking about just sticking a diode in there, such
that it would be reverse biased during programming and
protect the rest of the supply rail from the voltage on the
PIC.  I was also thinking about using a Schottky.

The more I think about that, the less I like it.  Although
the current draw on the PIC is minimal (very low power
app), there's always that chance that something I do
will have an unexpected side effect and cause the drop
over the diode to exceed .3V, at which point the signal
from the SPI peripherals exceeds Vdd+.3V, which is
the limit specified by the datasheet.

The only device that I really feel the need to protect is
the regulator.  It's a low power PMOS pass LDO, so
if the output drops below the input, the parallel diode
in the PMOS pass element will back-conduct, and
there's no current limiter there.

All the other devices are fine with a brief (or even not
so brief) excursion to 5.5V for programming and
verification.  So what is the best way to protect my
regulator?  Three options spring to mind:

1.  Series diode, forward biased during normal
operation.  Of course, this means my system voltage
is not necessarily constant.  I dislike it.
2.  Reverse-biased Schottky from Vout to Vin.  That way,
in a situation such as programming where Vin = 0V,
the diode conducts "around" the regulator, protecting it.
Requires another reverse biased diode from Vin to gnd.
Again, not sure I like it.
3.  The "backwards PMOS" method, where a PMOS
with its drain tied to gnd through a large resistor is
hooked up "backwards" to the output of the regulator.
In normal operation, it would appear as a small resistance,
but since the current draw of the system is ~2mA at worst,
that's not such a big deal.

Sorry the post is so long, but I'd like to get it right this
time.  Anyone have any input on these ideas?

Mike H.

2005\05\16@125831 by Spehro Pefhany

picon face
At 11:30 AM 5/16/2005 -0500, you wrote:
>Sorry the post is so long, but I'd like to get it right this
>time.  Anyone have any input on these ideas?

What about a series Schottky on the input side of the LDO?

What's on the other side of the regulator? A battery & capacitor?

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
spam_OUTspeffTakeThisOuTspaminterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
>>>Inexpensive test equipment & parts http://search.ebay.com/_W0QQsassZspeff


2005\05\16@131425 by Mike Hord

picon face
> >Sorry the post is so long, but I'd like to get it right this
> >time.  Anyone have any input on these ideas?
>
> What about a series Schottky on the input side of the LDO?
>
> What's on the other side of the regulator? A battery & capacitor?

Input is battery -> PMOS reverse protection + cap.
Output is (currently) bypass capacitors per datasheet.

I'm not sure what the series cap for the input of the LDo would do.
It gives me input protection, but not protection against Vout<Vin,
which is the case when a programmer is powering the circuit and
the battery is disconnected.

Mike H.

2005\05\16@145640 by Spehro Pefhany

picon face
At 12:14 PM 5/16/2005 -0500, you wrote:
> > >Sorry the post is so long, but I'd like to get it right this
> > >time.  Anyone have any input on these ideas?
> >
> > What about a series Schottky on the input side of the LDO?
> >
> > What's on the other side of the regulator? A battery & capacitor?
>
>Input is battery -> PMOS reverse protection + cap.
>Output is (currently) bypass capacitors per datasheet.
>
>I'm not sure what the series cap for the input of the LDo would do.
>It gives me input protection, but not protection against Vout<Vin,
>which is the case when a programmer is powering the circuit and
>the battery is disconnected.
>
>Mike H.

Won't your reverse protection also prevent current from flowing
out of the regulator input into the battery?

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
.....speffKILLspamspam@spam@interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com




2005\05\16@145718 by Wouter van Ooijen

face picon face
> All the other devices are fine with a brief (or even not
> so brief) excursion to 5.5V for programming and
> verification.  So what is the best way to protect my
> regulator?  Three options spring to mind:

note: when your nominal operating voltage is 3V it makes no sense and
there is no need to verify at 5.5V. IIRC 4.5 is required for some
programming aspects (chip erase?) but not more.

How about a reverse (schottky?) diode over the regulator, maybe with a
series resistor at the input of the regulator?

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu


2005\05\16@152542 by Mike Hord

picon face
Ah, the wonders of Gmail.  Easily putting 2 responses into one
mail...

First, to Spehro-

{Quote hidden}

Yes, and that's the idea.  During normal operation, a 9V battery feeds
a 3.5V regulator, which feeds the rest of the circuit.  During programming
there will be no battery in place, and the programmer will power the
circuit by simply hooking up to PGC, PGD, Vdd, Vss and Vpp of the PIC.

The problem is that the LDO I'm using (TI TPS77001) is a PMOS pass
regulator, so the "inherent" diode which parallels the source and drain
of the transistor becomes forward biased when Vout>Vin.  That means
it conducts, which in turn means that without some form of current
limiting, a rather large current can flow there.

ALTHOUGH now that I think about it, in the case of no battery,
there would be NO conduction, because there's nowhere for the current
to go.  Which makes me an ass, and this thread moot, since the
programming would occur with no battery present.

It would still be nice to be certain that, if someone were to try to program
the device with a battery in place, no smoke escapes.

--------Next, to Wouter-

> note: when your nominal operating voltage is 3V it makes no sense and
> there is no need to verify at 5.5V. IIRC 4.5 is required for some
> programming aspects (chip erase?) but not more.

True.  I'm not sure that I feel like being able to do 4.5V instead of 5V is
a huge improvement, however.

> How about a reverse (schottky?) diode over the regulator, maybe with a
> series resistor at the input of the regulator?

That was the idea I was trying to convey with option 2 from my first
message.  But, see above, this whole thing is now pointless, since I've
realized that with no battery present, the diode has nowhere to conduct
to, which leaves me with only one thing to worry about:  overvoltage on
the supply rail (i.e., someone connects the programmer and tries to
write the chip with a battery in place).

Mike H., feeling sheepish

2005\05\16@153828 by Dave Turner

picon face
Although the current cannot flow back to the battery, wouldn't it
still flow a large current back into the programmer's ground?  For the
PIC to run and program, mustn't both it's ground and positive pins be
connected to the programmer?  And shouldn't both of those pins be
hooked to the rest of the circuit for the PIC to run off the battery?

On 5/16/05, Mike Hord <mike.hordspamKILLspamgmail.com> wrote:
{Quote hidden}

> -

2005\05\16@170758 by Mike Hord

picon face
> Although the current cannot flow back to the battery, wouldn't it
> still flow a large current back into the programmer's ground?  For the
> PIC to run and program, mustn't both it's ground and positive pins be
> connected to the programmer?  And shouldn't both of those pins be
> hooked to the rest of the circuit for the PIC to run off the battery?

Yes, BUT...

1.  The battery won't be connected.  Normally, the worry with a PMOS
LDO is that the diode which inherently exists, reverse biased in
parallel with the source and drain, will conduct if Vout > Vin.  How
can an LDO have a greater output than input?  That's what happens
in the case where the input bypass cap is "charged" to 0V, and the
output is driven by another supply.  Let's imagine a 3V output LDO
driven by 3.5V worth of batteries (say, 3 marginally flat AA's).  Now,
hook your 5V PIC programmer up to it.  Suddenly, that reverse
biased diode is forward biased, and it's a direct connection between
a 5V supply and a 3.5V supply.  Say that diode drops ~.8V.  That
leaves .7V drop over the various resistances between the two sources.

Disconnect those batteries.  Now where does the current go?  For a
few micro- or milli- seconds, it goes into the input cap to charge it up,
but then it droops off (asymptotically) to the leakage current of that
cap.

2.  Yes, they do need to be connected, but where's that huge current
going to come from?  And of course they will be connected, since the
connection to the programmer is a header on the PCB.

I think perhaps I was unclear in my original message.  In the case of
production grade ICSP, it is (usually) important that the PIC be run
at 4.5V, to facilitate bulk erase.  Then, it should be verified at the min
and max voltages the system expects to see.  This means that all
components in the system which share a power bus with the PIC
either
A.  must tolerate this excursion to 4.5V or
B.  must be isolated from this excursion to 4.5V.

All the components in my system, save possibly the regulator, can
tolerate the excursion to 4.5V.  I was concerned about what would
happen to the regulator if its output is raised to 4.5V with nothing
on its input.  An element in the design of this LDO is a reverse
biased diode connecting the output to the input, which of course
becomes forward biased if Vin<Vout.  My worry was that with no
battery connected, Vin = 0, so any Vout would put the diode into
conduction.  HOWEVER, what I failed to take into account is that
without anything else present on the input, save the bypass cap,
there's no current path, so even if the diode DOES conduct, it
only does so long enough for the input bypass cap to charge up.

Which means that, yes, the regulator CAN survive the 4.5V on
the input.  And that I wasted a lot of time and bandwidth on a
question that I only needed to be prompted to think a little harder
on, or rather, on a question I didn't need to ask but needed to
think harder to realize I didn't need to ask.

Mike H.

2005\05\16@171618 by Mark Rages

face picon face
On 5/16/05, Dave Turner <.....dave.w.turnerKILLspamspam.....gmail.com> wrote:
> Although the current cannot flow back to the battery, wouldn't it
> still flow a large current back into the programmer's ground?  For the
> PIC to run and program, mustn't both it's ground and positive pins be
> connected to the programmer?  And shouldn't both of those pins be
> hooked to the rest of the circuit for the PIC to run off the battery?

Does Kirchoff's current law apply in your jurisdiction?  Because this
might be illegal!

Regards,
Mark
markrages@gmail
--
You think that it is a secret, but it never has been one.
 - fortune cookie

2005\05\16@172127 by Spehro Pefhany

picon face
At 04:07 PM 5/16/2005 -0500, you wrote:


>Which means that, yes, the regulator CAN survive the 4.5V on
>the input.  And that I wasted a lot of time and bandwidth on a
>question that I only needed to be prompted to think a little harder
>on, or rather, on a question I didn't need to ask but needed to
>think harder to realize I didn't need to ask.
>
>Mike H.

Well, don't beat yourself up over it. Sometimes when you're in the
thick of it all you need is a sounding board. A patient spouse, even if non-
technical, can sometimes suffice-- you just explain the problem in
straightforward terms, and the answer often pops out. Or a silly (on the
surface) suggested solution prompts a practical suggestion.

I still think you might not have a problem even with the battery.
Vout > Vin is essentially the same situation as reverse battery,
except in the latter case Vout = 0 and Vin = -Vbatt, vs. Vout = 5V and
Vin = 3V or whatever.

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
EraseMEspeffspam_OUTspamTakeThisOuTinterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
>>>Inexpensive test equipment & parts http://search.ebay.com/_W0QQsassZspeff



2005\05\17@040034 by Alan B. Pearce

face picon face
>ALTHOUGH now that I think about it, in the case of no battery,
>there would be NO conduction, because there's nowhere for the
>current to go.  Which makes me an ass, and this thread moot,
>since the programming would occur with no battery present.
>
>It would still be nice to be certain that, if someone were to
>try to program the device with a battery in place, no smoke escapes.

Umm, hang on a minute mate. I know my maths is bad, but ...

If the battery is 9V, and the ICSP is at 5V, how is the diode going to
conduct ??? It seems to me that you may have another danger, which you may
like to verify first, and that is the risk of blowing up the regulator
because you are applying a voltage greater than the design output voltage.
You may like to try this on a sacrificial lamb first.

2005\05\17@095505 by Mike Hord

picon face
> >ALTHOUGH now that I think about it, in the case of no battery,
> >there would be NO conduction, because there's nowhere for the
> >current to go.  Which makes me an ass, and this thread moot,
> >since the programming would occur with no battery present.
> >
> >It would still be nice to be certain that, if someone were to
> >try to program the device with a battery in place, no smoke escapes.
>
> Umm, hang on a minute mate. I know my maths is bad, but ...
>
> If the battery is 9V, and the ICSP is at 5V, how is the diode going to
> conduct ??? It seems to me that you may have another danger, which you may
> like to verify first, and that is the risk of blowing up the regulator
> because you are applying a voltage greater than the design output voltage.
> You may like to try this on a sacrificial lamb first.

You're completely correct; the question of protection against
attempting ICSP with a battery in place is a separate issue.

The issue in that case is two competing sources, one trying to
hold the rail at ~5V and the other trying to hold it at 3.5V.  In
the absence of protection, the stronger one wins, which would
almost certainly NOT be the regulator I'm trying to protect.

Imagine a black box connecting the output of my regulator to
the rest of the circuit.  Inside that black box is some circuit
which isolates the regulator against voltages greater than the
current output voltage of the regulator (0V when no battery is
in place, 3.5V when the battery IS in place).  That's what I'm
after.

HOWEVER (bold letters again!), further consideration of all
elements of the design, including programming conditions, is
leading me to believe that it is highly unlikely that high voltage
ICSP will be a common event, which decreases the odds of
an accidental battery-connected program, and that the regulator
will survive without the battery connected, no problem.

Mike H.

More... (looser matching)
- Last day of these posts
- In 2005 , 2006 only
- Today
- New search...