Searching \ for '[EE] Analysis of Olin's EUSB2 Circuit' in subject line. ()
Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=analysis+olins+eusb2
Search entire site for: 'Analysis of Olin's EUSB2 Circuit'.

Exact match. Not showing close matches.
'[EE] Analysis of Olin's EUSB2 Circuit'
2007\01\29@102813 by

As an exercise Olin kindly gave me a circuit to try to analyze.  Here are my preliminary observations.

http://www.embedinc.com/products/eusb2/eusb2.pdf

It appears to consist of 6 separate modules, easy enough because there are six pages, and their function easy enough because it is written on the schematic. (-:

1) 7.5V and 5.5V power supplies
2) Controller
3) 17V and -2.2V power supplies
4) Target Vdd interface
5) Vpp interface
6) PGC,PGD drivers and target interface

>From this there is no way that I can tell what it does.

Olin suggested I pick a small part of each circuit at a time.  (Finding the "parts" may be the most difficult for me.)

He also suggested, "A good start might be to explain the sub-circuit of R2, D3, C2, and Q1 near the center of page 1.  What does it do?  Why is it needed?  Explain its detailed operation.  What does each part do?"

Ok.  Here goes.

Working left to right, a clue I got from Olin, the first thing I see is a USB port.  Whether it is relevant or not, I'm going to make my first assumption, that it is USB 2.0.  So I first go to the USB 2.0 spec.  I found this page useful: http://www.beyondlogic.org/usbnutshell/usb2.htm

So the power supply module is obviously getting its +5 volts from the USB.

If I look on the right side I see lines that don't connect to anything on this page:  8.2V, 7.5V, 5.6V, USBPWR, and on IC1 a 5V and GND.  Why was it marked GND and not a fat down arrow like the other grounds?  Could be some clue there.

All components are pretty standard except (IMO) L1 the 100mH coil or choke, not sure, and Q3 which kinda-sorta looks like a mosfet but I don't find that a symbol that matches it.

L1, the choke or coil, will smooth out DC current.  It's either there because it is a good idea, or Olin knows that USB power isn't steady.  Or it is there for another reason.

Are SH1 and SH2 switches? I don't recognize what they are.

There is a PIC10F204, IC2.  According to the datasheet this PIC has, among other things, I I/O pins, 1 comparator, timer and WDT, max speed 4MHz, and ICSP (in circuit debugging support).

So I think the simplest beginning is at the very top of the page.  We have +5 volts coming from the USB changing to 8.2V.  It looks like +5 volts from the USB passes through L1 then the zener diode D1, then SH1 (whatever that is) and voila, it has increased its voltage by 3.2 volts.

Diodes allow DC current to pass from plus to minus in the direction of the arrow.  Reverse them and they'll break.  But zener diodes are meant to be reversed.

I don't find any answers to this in any of the books I have (not that they aren't there.) So D1 and SH1 have me stumped.

Unless the power isn't supposed to pass directly from P1 to the 8.2V line.  Maybe as Dumitru's hint was, I need to find the path of least resistance.  Maybe the current is finding another way to the 8.2V line.  And that is a complicated path.

I think I need to review each component again more carefully then come back to this.  These are my first impressions, though.

Lindy

>Why was it marked GND and not a fat down arrow like the
>other grounds?  Could be some clue there.

This (and many other variations in schematic nomenclature) are down to
personal preference (as a colleague of old would put it, "how you were potty
trained"). Some people also prefer to use the "down arrow" or alternate
"three horizontal lines" arrow as a chassis ground, with the signal ground
labelled as Olin has in his circuit. Another alternative might be "0V"
instead. Again depending on the complexity of the device, I would start by
treating them as interchangeable, unless I found more than one variant on
the schematic, in which case they are "obviously" different grounds.

> I think I need to review each component again more carefully
> then come back to this.  These are my first impressions, though.
>
> Lindy
>
>
Think DC/DC step-up switching supply...

Somebody made a comment a while back that eventually you start to
recongnize "blocks".  This is an example of that situation.  Build
enough DC/DC converters and you start to recognize them in various
configurations.

Q3 by the way is an N-channel MOSFET, a spiffy little part and good to
have in your parts bin.  Olin is very good about putting down part

And since this is a switching supply, it is not uncommon to have
multiple ground nets, all tied together at single point to keep the
ground currents circulating in their own areas, minimizing the
contamination in other areas.  Again, I only looked at Olin's first page
but he does LOTS of DC/DC stuff and I'm willing to bet the layout
reflects this.

That brings up another point, the circuit layout on the PCB or
breadboard can be an important part of the circuit design too...

Rob

> He also suggested, "A good start might be to explain the
> sub-circuit of R2, D3, C2, and Q1 near the center of page 1.
> What does it do?  Why is it needed?  Explain its detailed
> operation.  What does each part do?"
>
> Ok.  Here goes.
>
> Working left to right, a clue I got from Olin, the first
> thing I see is a USB port.

Olin suggested to concentrate on R2..Q1. Those components are a pattern
that you might understand, or even recognise. Don't attempt to start
taste from it.

> L1, the choke or coil, will smooth out DC current.  It's
> either there because it is a good idea, or Olin knows that
> USB power isn't steady.  Or it is there for another reason.

It is part of a step-up switcher. You won't understand that pattern
without some basic knowledge of how a coil (induction) works. 'it
smooths current' is almost good enough, but only if you take that to its
logical extreme.

> There is a PIC10F204, IC2.  According to the datasheet this
> PIC has, among other things, I I/O pins, 1 comparator, timer
> and WDT, max speed 4MHz, and ICSP (in circuit debugging support).

ICSP != ICD

> I don't find any answers to this in any of the books I have
> (not that they aren't there.) So D1 and SH1 have me stumped.

parts of it in the books, but the other way round: start with the books.
That might be a less 'nice' route, but there is no royal path to
mathematics, and none to electronics either. (There is none to real
in-depth programming either, but in programming you can get a long way
with only superficial knowledge and a lot of improvising.)

Wouter van Ooijen

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

First impression could be a quite twisted design for it's final
function, don't you think ? A lot of PICs instead of standard
switching regulators. 5VUSB switching to 8.2V  then back to 5V with
linear regulator, 5VUSB up to 17V, -2.2V with a charge pump from PGD
just to supply the LM324... And a bunch of transistors for variable
voltage programming signals. The first look could fooling you, so take
care.
One fast fuse on VUSB line could make a few users much happy for sure.

The first rule when you'll design something electronics by your own:
"keep things simple". Remember this when your design will have more
than 10 or 20 pages.

success,
Vasile

On 1/29/07, Lindy Mayfield <lindy.mayfieldssf.sas.com> wrote:
{Quote hidden}

> -

>
> Think DC/DC step-up switching supply...

Just talking about the first page:

(NOTE: Olin does it his way, I do it my way.. I'm not Olin bashing, just
saying for illustration, what I would have done differently)

I would have arrainged things differently.  From the schematic, it's not all
that obvious that there's a high frequency, high current path from the
source of the mosfet and the diode  to the output capacitor. I would have
put the inductor, mosfet, diode, and cap all right together, connected their
"ground" sides with a wire, and then attached that to a ground symbol on the
bottom of the cap.
And re-arrainged pins on the micro to suit.

Similarly the whole Q1 circuit would be on the right side, as it's an
emitter follower on a Zener regulator. I would leave it where it is, IF it
weren't powering other parts of the circuit.

I would have brought the USBPwr rail out above everything else, it
needlessly crosses other circuits.
I avoid un-necessary crossovers, and try really hard to put all the
components that make up a given block, into a "section".  The area around Q2
could be cleaned up.

I would have a text note on the USBPWR showing what voltages to expect, and
current available.

Page 2 has too many crossovers for my taste
Page 3 has similar issues to page 1, and I would have shown the charge
pump differently.
Page 4 I have no issues with.
Page 5 got a little crowded, but ok.  I would have put in a note as to WHY
there are three 120 ohm resistors in series. No power ratings shown, but
it's a dissipation issue.
Page 6 is ok.

>
> That brings up another point, the circuit layout on the PCB or
> breadboard can be an important part of the circuit design too...

Absolutely.
And one reason why I refuse to use autorouters.

ground return through the logic section of the board is NOT something I
would ever do, but the autorouter says "Ground is ground", and merrily goes
on it's way.  :-P

On the real board, I used two 200 mil tracks, one over the other, from the
switcher output caps to the printhead, and returning the printhead ground to
the - leads of the switcher output caps.  The printhead logic ground of
course, went to the local ground that served all the logic.  At the switcher
output caps, the printhead return track joined into the ground plane for the
rest of the board.

There are many areas where layout is critical, or important to proper
function and EMI reduction, and those have to be done by hand.  I have been
known to save a board, and then let the autorouter have at it, to see where
the choke points will be, but even when it's down to those last difficult
tracks, I know I can always do a better job.

I hold a patent (5,367,581) on one aspect of PCB layout, using a mill to
create a pair of serpentine routes that carve away some of the board to
create a semi-flexible mount for a magnetic head or similar device. This
eliminated the usual spring/bracket/cable mess. The head is simply waved
onto the board like any other component, and the board plugs into a stepper,
and drops into the enclosure.  Amusingly, the other "inventors" listed were
all arguing against this, saying the board would break, and it would be
unreliable, and cause cows to give sour milk. They didn't contribute to the
idea, other than to throw rocks.  There were ZERO failures.

On 1/29/07, Vasile Surducan <piclist9gmail.com> wrote:
>
> First impression could be a quite twisted design for it's final
> function, don't you think ? A lot of PICs instead of standard
> switching regulators. 5VUSB switching to 8.2V  then back to 5V with
> linear regulator, 5VUSB up to 17V, -2.2V with a charge pump from PGD
> just to supply the LM324...

I might be tempted to do a multiple output flyback here..
But that's a whole different can of worms :)

2007\01\29@120801 by

On Jan 29, 2007, at 8:03 AM, Robert Young wrote:

> That brings up another point, the circuit layout on the PCB or
> breadboard can be an important part of the circuit design too...
>
Grr.  For a first effort...  NO!  It is not.  Stop confusing people.
That's like telling someone who is just learning their first
programming language to be careful about endianness.

BillW
Thanks for the hints!

And Q3 looked like an n-mosfet, but the zener diode threw me off. I wasn't sure if it was an extra part or part of the symbol.

{Original Message removed}
On 1/29/07, William Chops Westfield <westfwmac.com> wrote:
>
>
> On Jan 29, 2007, at 8:03 AM, Robert Young wrote:
>
> > That brings up another point, the circuit layout on the PCB or
> > breadboard can be an important part of the circuit design too...
> >
> Grr.  For a first effort...  NO!  It is not.  Stop confusing people.
> That's like telling someone who is just learning their first
> programming language to be careful about endianness.

I reject your "grr", and substitute my own!  :)

A student's first projects should be selected so that this sort of issue is
not present, or strongly avoided, but layout IS an important part of real
designs, and in cases can be absolutely critical to proper function.

Teaching students about parasitic effects, and the fact that those PCB
traces aren't superconductors with no inductance, is very important, if they
are to have any hope of getting things working right in the real world.
> There is a PIC10F204, IC2.  According to the datasheet this
> PIC has, among other things, I I/O pins, 1 comparator, timer
> and WDT, max speed 4MHz, and ICSP (in circuit debugging support).

ICSP != ICD

What is ICSP then?  I was sure in the data sheet it said at least something about in circuit debugging next to ICSP.

Lindy Mayfield wrote:

> ICSP != ICD
>
> What is ICSP then?  I was sure in the data sheet it said at least something about in circuit debugging next to ICSP.

ICSP is In Circuit Serial Programming
ICD is In Circuit Debugging

SImilar cable, similar functions... different things :-)
Hi Lindy, I am somewhat new to this as well, and I had a stab at
understanding it.

Q1 is an NPN transistor, not a MOSFET. I do not understand the  R2, D3,
C2, and Q1  block either, but, I believe I understand what it is going
to do.... if that makes sense.

The 10F204 part is going to be a controller for a switch mode power
supply. It will boost the 5V USB volts to the  8.2 V indicated on the
schematic. In order to control this voltage at 8.2, there needs to be
feedback.

Briefly, the way it works is that the inductor (L1) is charged by
current flowing in to it. The current can flow because the 10F204 will
"switch on" the N-MOSFET Q3. When the inductor has the "appropriate"
charge, the Q3 will be turned off, and the only place that the stored
charge can dissipate to is through the rectifying schottky (not zener)
diode D1. It will do this at the regulated 8.2V (this will be because
the switch-on and off times of q3 is carefully controlled by the PIC).
The way that is controlled is by the comparator module. it compares the
0.6V reference voltage with the voltage between resistors R3 and R4. The
voltage between these resistors will be (Vreg -Vdiode) * 2.2K /  (2.2K +
25.5K)  where Vreg is the voltage marked as 8.2V. This drops through the
diode D2 (forward voltage 0.7V apparently), to 7.5V (as marked on the
schematic). This voltage is actually fluctuating a bit, but it is
important to realise that where Vreg, when it is 8.2V will cause a
voltage of (8.2V - 0.7V) * 2.2K / (2.2K + 25.5K) or 0.595V (very close
ot 0.6V). When the voltage between R3 and R4 is less than 0.6 it means
the  Vreg is less than 8.2, so the PIC works the inductir harder to
increase the Vreg...... when it is above 8.2V, the PIC reduces the
inductor load..... thus, regulated at 8.2V.

Unfortunately, I can sort of see how the switching happens, but I have
little idea of where the R2, D3, C2, and Q1 combination is important.
Like many "computer" people, the use of transistors in an analoge
context is foreign to me .... H&Hill tried to explain it to me...

I do believe though, but I am not certain, that the following applies....

Transistors are current controlled devices. The current can pass through
the base to the emitter when the base/emmitter voltage exceeds the diode
drop voltage of about 0.6V. With the 5.6V zener diode D3, the base is
kept at 5.6V. Thus, the only time the transistor will conduct, is when
the voltage at the emmitter drops below 5V.

So, the transistor acts as a type of regulator. The more the PIC demands
power, the lower the Vemmitter will drop, but the more the Vemmitter
drops, the more current the Q1 will supply, thus pushing up the voltage
again.

It acts as a voltage regulator that is more stable than just a zener
would be. Thats my guess.

It also isolates the PIC from the rest of the power system when it is
being programmed (Vdd from programmer).

That's my guess as to what's happening.

D3 provides the 5.6V reference for the appropriate 0.6V drop to the
emitter. C2 provides ripple stabilization for any noise comming through
R2. Q1 provides the regulation, and R2 is only there to limit the
current flow through the zener to ground.

But, I am sure to have missed the real reason it is there...

Rolf

Lindy Mayfield wrote:
{Quote hidden}

>
>
>
> On Jan 29, 2007, at 8:03 AM, Robert Young wrote:
>
> > That brings up another point, the circuit layout on the PCB or
> > breadboard can be an important part of the circuit design too...
> >
> Grr.  For a first effort...  NO!  It is not.  Stop confusing
> people. That's like telling someone who is just learning
> their first programming language to be careful about endianness.
>

Grr, nothin' ;-).  Re-parse the sentence, "can be" is an important
phrase here.  For a first effort this may not be the best circuit to
understand.  DC/DC converters require careful consideration of return
currents.  Heck, EMI for that matter.

And if their first programming language is assembly, then endianness
would be important to know.  BASIC, not so much.

When I taught undergraduate EE lab, I was amazed at the number of people
who didn't understand that op-amps need power.  "But there aren't any
power supplies shown on the little triangle thingie...".  Even on a
cheapo white plug-in breadboard, layout is a part of the circuit design.

The early recommendation that Lindy get a copy of AOE 2nd ed. is VERY
GOOD.  Lindy, if you are listening, take that one step further and see
if you can get your hands on the paper-back student manual they wrote to
go along with the hardbound edition.  Some material is a bit dated but
the fundamentals are still there.

Rob

> -----Original Message-----
> From: piclist-bouncesmit.edu
> [piclist-bouncesmit.edu] On Behalf Of Lindy Mayfield
> Sent: Monday, January 29, 2007 11:08 AM
> To: Microcontroller discussion list - Public.
> Subject: RE: [EE] Analysis of Olin's EUSB2 Circuit
>
>
> Thanks for the hints!
>
> And Q3 looked like an n-mosfet, but the zener diode threw me
> off. I wasn't sure if it was an extra part or part of the symbol.

It is built into the MOSFET (body diode).  Google for the datasheet to
see.

Rob

The USB spec I found from Google says that the data lines expect 3.3 volts, but I don't see 3.3 Volts anywhere.  And I cannot find where USBD+ and USBD- connect to.  I'll keep looking.

-----Original Message-----
From: piclist-bouncesmit.edu [piclist-bouncesmit.edu] On Behalf Of David VanHorn
Sent: Monday, January 29, 2007 7:00 PM
To: Microcontroller discussion list - Public.
Subject: Re: [EE] Analysis of Olin's EUSB2 Circuit

>
> Think DC/DC step-up switching supply...

Just talking about the first page:

Lindy Mayfield wrote:
> He also suggested, "A good start might be to explain the sub-circuit of
> R2, D3, C2, and Q1 near the center of page 1.  What does it do?  Why is
> it needed?  Explain its detailed operation.  What does each part do?"
>
> Ok.  Here goes.

You started out tackling a bigger picture that is harder to understand.
That's why I suggested starting with the parts I did.  That will also make
it easier to walk you thru the motivation of other parts of the circuit.

> So the power supply module is obviously getting its +5 volts from the
> USB.

Yes.

> If I look on the right side I see lines that don't connect to anything
> on this page:  8.2V, 7.5V, 5.6V, USBPWR, and on IC1 a 5V and GND.  Why
> was it marked GND and not a fat down arrow like the other grounds?
> Could be some clue there.

I use wires that end on the right with a label to indicate that this signal
is being driven on this page, but also goes elsewhere.  On other pages you
will see these lines coming in from the left, meaning the signal is being
received from elsewhere.  This is my convention, not universal accross other
people's schematics.  It all follows from generally wanting signals or
information flowing left to right.

> Q3 which kinda-sorta looks like a mosfet but I
> don't find that a symbol that matches it.

It is a N channel MOSFET made by IR (International Rectifier).  It
essentially shorts the two lines on the right side (Drain on top, Source on
bottom) when the Gate (left side) is high, and leaves them disconnected when
the Gate is low.

> L1, the choke or coil, will smooth out DC current.  It's either there
> because it is a good idea, or Olin knows that USB power isn't steady.
> Or it is there for another reason.

Yes, some other reason.  We'll get to that after you figure out more simple

> Are SH1 and SH2 switches? I don't recognize what they are.

They are just connections from your point of view.  I call them "shorts".
They are ways of connecting two nets in Eagle so that I can give each net
separate properties, and I can guarantee they will connect at the single
point wherever I place the short on the board.

> So I think the simplest beginning is at the very top of the page.  We
> have +5 volts coming from the USB changing to 8.2V.  It looks like +5
> volts from the USB passes through L1 then the zener diode D1, then SH1
> (whatever that is) and voila, it has increase

Your paragraphs are getting cut off since you are apparently sending them as
single long lines.  Send 80 character max lines if you want me to see
everything you write.  Again, you're not ready yet for L1, D1, and Q3.
Start out explaining the parts I originally asked about.  There is a reason
I had you start out with those.

> I don't find any answers to this in any of the books I have (not that
> they aren't there.) So D1 and SH1 have me stumped.

All the SHx are just connections, but don't worry about D1 and associated
yet.

> I think I need to review each component again more carefully then come
> back to this.  These are my first impressions, though.

with lots of posts from people trying to tell you what everything does, and
it will be hard to follow a logical sequence and lead you down the right
path of discovery.  I eventually want you to figure out L1, D1, and Q3, and
I fear that by you mentioning them ahead of time others will just tell you
what they do and a good opportunity for learning I had planned will be lost.

********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.
David VanHorn wrote:
> I would have brought the USBPwr rail out above everything else, it
> needlessly crosses other circuits.

I wanted to show the various lines that supply power to the rest of the
circuit with their height on the page sorted by their voltage.

********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.
David VanHorn wrote:
> A student's first projects should be selected so that this sort of
> issue is not present, or strongly avoided, but layout IS an important
> part of real designs, and in cases can be absolutely critical to proper
> function.
>
> Teaching students about parasitic effects, and the fact that those PCB
> traces aren't superconductors with no inductance, is very important, if
> they are to have any hope of getting things working right in the real
> world.

Yes, all in time.  He's still struggling with how a zener diode works and he
probably has a lot of looking up to do just to figure out how the NPN
transistor Q1 works in emitter follower mode.

Give the guy a break.  Give him the space to learn each step of the way.
You don't start explaining calculus to someone just learning to add either.
That will only snow them and turn them off and maybe never come back.

********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.
>
>
> It is part of a step-up switcher. You won't understand that pattern
> without some basic knowledge of how a coil (induction) works. 'it
> smooths current' is almost good enough, but only if you take that to its
> logical extreme.

As in "it is impossible to instantly stop the current flow in an inductor"..
:)
>> ICSP != ICD
>
> What is ICSP then?  I was sure in the data sheet it said at
> least something about in circuit debugging next to ICSP.

something else does not meant it is the same thing!

Wouter van Ooijen

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

Rolf wrote:
> Briefly, the way it works is that the inductor (L1) ...

Sigh.  I had expected that everyone understood this was a learning exercise
for Lindy and others somewhat new to electronics, and that the best way for
them to learn would be to have them figure out pieces themselves with
guidance as needed to "walk them down the garden path".  Just telling them
how it works defeats this purpose, at least until they've spent some
reasonable effort to figure it out themselves and got close enough.  The
best way to learn something is to figure it out yourself.  Not only does
that make it stick in the brain, it also provides a pride of accomplishment
and a desire to continue onto the the next hurdle.  Each hurdle must be a
challenge, but attainable with a little work.  Place one big hurdle at the
end and the student will get scared off being overwhelmed, feel inadequate
("I'll never get this!") and possibly not come back.  Take down all the
hurdles and the student just walks along too easily with no necessity to
learn anything.  I thought this to be self-evident, but alas not.

I'm really dissappointed that people either didn't get this, or understand
so little about teaching even though it should be intuitive.  I guess I
shouldn't be surprised with over 1000 people on this list, since all it
takes is one or two to ruin it.

********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.
Robert Young wrote:
> DC/DC converters require careful consideration of return
> currents.

Yes, eventually, but not when you're just learning how they work at all.

********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.
Lindy Mayfield wrote:
> The USB spec I found from Google says that the data lines expect 3.3
> volts, but I don't see 3.3 Volts anywhere.  And I cannot find where
> USBD+ and USBD- connect to.  I'll keep looking.

I'm trying to help you, but you're not making it easy by jumping all over
the place.  You are getting way ahead of yourself.

********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.
Olin Lathrop wrote:

> Sigh.  I had expected that everyone understood this was a learning exercise
> for Lindy and others somewhat new to electronics, [...]

Hi Olin, maybe that *everybody* felt like they were "learner" :-)

--
Ciao, Dario il Grande (522-485 a.C.)

>> First impression could be a quite twisted design for it's final
>> function, don't you think ?

It has it's mysterious aspects.

Why is there both a discreet implementation of a 5V linear
regulator AND a 7805-style 5V regulator ?  Startup issues?
Given USB specs, why can't the 10f controlling the switcher
operate directly from Vusb ?

Later on, there are all those multiple resistors in series.  IIRC,
Olin made some remark about that being done to limit the number of
different parts used on the board, but I bet it does a fine job of
confusing someone just beginning to do circuit analysis...

BillW
>
>
> Give the guy a break.  Give him the space to learn each step of the way.
> You don't start explaining calculus to someone just learning to add
> either.
> That will only snow them and turn them off and maybe never come back.

Ok, for now it's enough that he knows that there ARE such effects, and that
they can be important.
On Jan 29, 2007, at 7:28 AM, Lindy Mayfield wrote:

> L1, the choke or coil, will smooth out DC current.

But it's become a bit dated.  In this case, the inductor is an
energy storage element, and the combination of Q3, D1, and L1 is
one of those "standard subroutines"; in this case a boost-mode
voltage regulator.  In a modern circuit, an inductor is probably
more likely to be used in a switching regulator than in a filter.

I suppose the for L and C, you have to consider whether the part
is in a spot where it "sees" mostly DC, mostly AC, or mostly STEPs.
The physics is all the same, but the simplifications that lead you
easily to an understanding of the circuit are quite different.

BillW
Olin Lathrop wrote:
{Quote hidden}

hi Olin

I'm sorry you feel that way. I found it a very valuable tool to do my
very first (yes, my first) circuit analysis of someone elses board....

I thought I was one of the people that this exercise was directed at? I
am new to electronics. I have read H&H as far as FET's and Op-Amps, but
am confused after that. I find FET's far easier to understand because
they are typically used in a digital fashion. Anything with  bi-polars
seems to be in the linear region, and very confusing to me.... but I am
trying.

Took me a long time to figure out what the transistor was actually
doing. Based on your response, I guess I got it right then.

I am building my first real project at the moment.... it just so happens
to use a 10F part. You saw it recently when I posted the circuit board
with the FET switching the ground of the Transmitter circuit. I was
begging for experienced eyes to review it. I have *never* used a
transistor in any circuit, ever! (Well, I did once, but that was my
mistake).

For the record, I *did* have to figure out the part by myself. It seems
I got really close. It *has* stuck in my brain, and  I have a serious
"pride of accomplishment" for having figured it out.

So, Olin, I am sorry you felt that it was inappropriate that I
responded, but I figured this was an exercise for the beginners, and I
certainly am one.

It so happens that my project includes an LT1111-5 switch-mode converter
to get 5V from battery, so I know a bit about switch-mode supply's as
well. Your first page of the schematic was an ideal learning aid for me.
Your efforts were not ruined, as far as I am concerned.

In that light, may I ask why you use the 4 components to get 5V to the
PIC, when you have the LM7805 right there?

Rolf

> Why is there both a discreet implementation of a 5V linear
> regulator AND a 7805-style 5V regulator ?  Startup issues?

Yes.

> Given USB specs, why can't the 10f controlling the switcher
> operate directly from Vusb ?

To guarantee better gate voltage swing for Q3.

> Later on, there are all those multiple resistors in series.  IIRC,
> Olin made some remark about that being done to limit the number of
> different parts used on the board, but I bet it does a fine job of
> confusing someone just beginning to do circuit analysis...

Well, yeah.  It was easier to use all stock 0805 resistors.  When I only
needed a little more power dissipation I put a few in series.  This is more
of a manufacturing and purchasing issue than electrical design.

********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.
Rolf wrote:
> I thought I was one of the people that this exercise was directed at?

That's fine, but you blurted out the solution for a problem we hadn't
discussed yet, and therefore denied everyone else the chance to learn that
part for themselves.  I guess it's tough when the "class" is so spread out
with such a large range of knowledge.

********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.
> Teaching students about parasitic effects, and the fact that
> those PCB traces aren't superconductors with no inductance,
> is very important, if they are to have any hope of getting
> things working right in the real world.
>
Students, maybe.  Beginning students, NO.  My entire undergraduate
EE education (at a F-ing prestigious Ivy League University) didn't
include one word about PCB parasitics, although there were occasional
warnings about wires having actual electrical properties, and there
was a fair amount about the internal issues of transistors.  (insert
irons.  All true.)  Of course, this was back in the days when 4MHz
was 'fast' for a system clock speed, and the FCC regulations on
unintentional emitters were in their infancy or earlier, so you weren't
expected to run into too many "real world" issues with "wire" unless

There is STILL an awful lot of "electronics" that is not radio-like,
and will be pretty immune to PCB layout, within reason.

And I've come to recognize a HUGE gulf in understanding of electronics.
Despite my education, I don't consider myself a particularly competent
EE (I've been doing software for most of my career.)  So I'm well aware
of the gap between me and the EEs laying out the GHz PCBs and designing
the ASICs in our products.  And yet, you look around in a hobby like
RC flight, and there are all these otherwise talented and obviously
intelligent people, show just have NO clue about anything electronic.
Ohms law is too complicated.  "I want a device to read a servo control
and turn on a light and I'm clueless."  There is a VERY LARGE AMOUNT
of electronics stuff you can do without having to worry much about
PCB layout other than "keep your high frequency lines short."  (and
for that matter, I'm frequently surprised about the length of traces
to the crystal on some commercial uC boards.)  So the gap between my
ancient education and "nothing" is pretty big too.

I'm pretty happy to exist in an electronics world where I can do
stuff that falls into either "PCB layout doesn't much matter" or
"follow the recommendations on the data sheet."  I'm pretty sure
that this includes a LOT of ground...

BillW
>
> Students, maybe.  Beginning students, NO.  My entire undergraduate
> EE education (at a F-ing prestigious Ivy League University) didn't
> include one word about PCB parasitics, although there were occasional
> warnings about wires having actual electrical properties, and there
> was a fair amount about the internal issues of transistors.

Hmm.. My first year class in high school (72) covered this to a degree, and
it was expanded in the second year, and unofficial third year and fourth
year classes that a few of us created by refusing to stop showing up.

There is STILL an awful lot of "electronics" that is not radio-like,
> and will be pretty immune to PCB layout, within reason.

That thermal printer design I spoke of is entirely real. Got the boards
right here.

And yet, you look around in a hobby like RC flight,

"voodoo land"!

(and for that matter, I'm frequently surprised about the length of traces
> to the crystal on some commercial uC boards.)

Yeah, but nothing says they did it right, either.
ISCP = in circuit serial programming
ICD  = in circuit debugging

John

--- Lindy Mayfield <lindy.mayfieldssf.sas.com> wrote:

{Quote hidden}

> --
I got it now, Olin.  I know where to start.  My goal was to get an overview of the page and then concentrate on the section you mentioned.  That is where I am going next.

I'm ignoring others explanations for now until I untangle that section you suggested.  I figured I needed to know a bit of the input/output in order to next better understand the sub-circuit you mentioned.

I'll take your advice and not move any further past that.  You've been very kind to me to help me and it would be rude of me to try it any other way.  My apologies if it seemed I was going off in tangents.

Lindy

{Original Message removed}
>Teaching students about parasitic effects, and the fact that
>those PCB traces aren't superconductors with no inductance,
>is very important, if they are to have any hope of getting
>things working right in the real world.

I still remember the university student we had here on a gap year, who had
no clues about using supply bypass capacitors - never come up in class ...

>> ICSP != ICD
>>
>> What is ICSP then?  I was sure in the data sheet it said
>> at least something about in circuit debugging next to ICSP.
>
>ICSP is In Circuit Serial Programming
>ICD is In Circuit Debugging
>
>SImilar cable, similar functions... different things :-)

And in PICs use the same pins, for both functions where a chip has ICD. But
note that for some small chips, the normal chip has ICSP, but you can get a
special chip (with extra pins, on an adapter) that can do ICD.

>I use wires that end on the right with a label to indicate
>that this signal is being driven on this page, but also goes
>elsewhere.  On other pages you will see these lines coming
>in from the left, meaning the signal is being received from
>elsewhere.  This is my convention, not universal accross other
>people's schematics.  It all follows from generally wanting
>signals or information flowing left to right.

Some schematic capture packages also require things done in a similar way to
make connections between sheets. It may not be obvious when looking at a
printed schematic, but there are methods of doing hierarchical diagrams that
require specific connection methods to make the thing work as a whole. It is
a bit like modular programming or OOP for schematics.

I can second this from personal experiences.  I'm quite sure that my
first microcontroller project toward the end of undergrad (again, at
a top-notch rated EE school) didn't work solely (or at least
primarily) because I was switching a fair amount of current with a
bunch of latches and didn't have bypass caps on anything.  And no one
pointed it out either.  It wasn't until my senior design project
where I joined a team with a super bright student who knew all about
the realities of EE who taught me most of the real-world useful stuff
that I learned in school that I understood supply bypassing, layout
issues, and the like.

Now I'm in a grad program with artists and engineers working together
and I'm sure everyone is sick of hearing me preach about bypass caps.

-n.

On Jan 30, 2007, at 4:31 AM, Alan B. Pearce wrote:

>> Teaching students about parasitic effects, and the fact that
>> those PCB traces aren't superconductors with no inductance,
>> is very important, if they are to have any hope of getting
>> things working right in the real world.
>
> I still remember the university student we had here on a gap year,
> no clues about using supply bypass capacitors - never come up in
> class ...
>
> --
>
>
> Now I'm in a grad program with artists and engineers working together
> and I'm sure everyone is sick of hearing me preach about bypass caps.

Did you ever run into this "bypass solution"?

VCC----------------------------------------------------------------------
Chip       Chip           Chip         Chip
GND----------------------------------------------------------------------
cap        cap             cap           cap
VCC----------------------------------------------------------------------
Chip       Chip            Chip        Chip

(and so on.)

The caps are connected between the rails, but they are connecting VCC on one
row of chips to ground on the OTHER row.   I've not actually had a board
like this in my hands to measure recently, but I suspect this might be worse
than NO bypasses.

I remember seeing a lot of boards laid out this way back in the 70's and
80's though.
Wow, haven't seen that one.  Sounds like it would be pretty nasty
though.

Other than that, I've heard a few stories online of troubles caused
by excessive bypassing causing oscillations, etc, and I'm sure it's
possible, but in my relatively short time I haven't run into it.

-n.

On Jan 30, 2007, at 12:42 PM, David VanHorn wrote:

{Quote hidden}

> --
>
> Other than that, I've heard a few stories online of troubles caused
> by excessive bypassing causing oscillations, etc, and I'm sure it's
> possible, but in my relatively short time I haven't run into it.

I saw one case of a 7805 that was very hot on a light load.
with several volts P-P.
People forget that these regulators are high gain amplifiers with phase
shift.
On Tue, 2007-01-30 at 14:04 -0500, David VanHorn wrote:
> >
> > Other than that, I've heard a few stories online of troubles caused
> > by excessive bypassing causing oscillations, etc, and I'm sure it's
> > possible, but in my relatively short time I haven't run into it.
>
>
> I saw one case of a 7805 that was very hot on a light load.
> with several volts P-P.
> People forget that these regulators are high gain amplifiers with phase
> shift.

I'm surprised to hear that from a 7805, they generally can survive a
nuclear blast without doing anything weird... :)

That said, you are absolutely correct. This issue is especially worse
with newer linear regs. If the data sheet specifies a certain type of
cap you better use it. Same with ESR recommendations. It may seem like
"just a cap", but put the wrong one in and VERY bad things can happen!

Still, a 7805 oscillating at 2MHz, that's a surprising output from that
chip! I wonder if there is a way we can harness this effect... (putting
on my Doc Brown hat). TTYL

> Did you ever run into this "bypass solution"?
>
> VCC-------------------------------------------------------------------
> ---
>         Chip       Chip           Chip         Chip
> GND-------------------------------------------------------------------
> ---
>         cap        cap             cap           cap
> VCC-------------------------------------------------------------------
> ---
>         Chip       Chip            Chip        Chip
>

That was quite a standard way of doing things for TTL, and the habit has
continued into the CMOS era, although it is quite possible to get away with
about a 1/4 the number of caps for CMOS, as a rule of thumb.

For TTL the "generally accepted rule" was to have a 47nF to 100nF per chip,
normally put at one end of the chip. Suitable caps also tended to have a
0.3" lead spacing so they fitted the same grid as the chips. Remember that
TTL has quite high switching current spikes.

Another trick used on large boards was additional power distribution strips
consisting of two layers of metal separated by a thin insulation layer.
These allowed a higher current carrying capacity than the PCB tracks, and
was in addition to the capacitor per chip.

The other part of the "general rule" was to have large bulk capacitors,
10-100uF at each corner of the PCB, and if the PCB was large enough to need
stiffeners, then more bulk capacitors were fitted where the stiffener went
across. These served to deal with "long term" current surges, especially on
memory boards where there was a hefty current draw during the refresh cycle,
where most refresh schemes did all chips simultaneously.

'[EE] Analysis of Olin's EUSB2 Circuit'
2007\02\01@174147 by
Alan,

On Wed, 31 Jan 2007 08:51:37 -0000, Alan B. Pearce wrote:

>...
> Another trick used on large boards was additional power distribution strips
> consisting of two layers of metal separated by a thin insulation layer.
> These allowed a higher current carrying capacity than the PCB tracks, and
> was in addition to the capacitor per chip.

I think I've still got some of those somewhere - they're flat, horizontal strips designed to fit underneath 0.3" chips (or sockets) with pins going out to
the power and 0V pins.  They're probably as good as you can get in decoupling, since they're effectively zero distance from the chips' supply pins,
and you can use them on homemade boards (or even veroboard)  but I haven't seen them for a while, so presumably the demise of TTL as the
dominant technology means they're not necessary.

Cheers,

Howard Winter
St.Albans, England

Lindy Mayfield wrote:
> As an exercise Olin kindly gave me a circuit to try to analyze.  Here are my preliminary observations.
>
> www.embedinc.com/products/eusb2/eusb2.pdf
>
> It appears to consist of 6 separate modules, easy enough because there are six pages, and their function easy enough because it is written on the schematic. (-:
>
> 1) 7.5V and 5.5V power supplies
> 2) Controller
> 3) 17V and -2.2V power supplies
> 4) Target Vdd interface
> 5) Vpp interface
> 6) PGC,PGD drivers and target interface

I haven't read anything beyond this. I figure it'll be a good exercise
for me, so here's my take on it. I'm quite a newb with some of the
circuits used (boost converters, op-amps, output drivers), so I've
probably got some of it wrong. Also, do realize that most (all) of my
electronics knowledge is self-taught (in my actual classes, we're still
doing light bulbs and switches).

=======================================================================
SPOILER SPOILER SPOILER SPOILER SPOILER SPOILER SPOILER SPOILER SPOILER
SPOILER SPOILER SPOILER SPOILER SPOILER SPOILER SPOILER SPOILER SPOILER
SPOILER SPOILER SPOILER SPOILER SPOILER SPOILER SPOILER SPOILER SPOILER
SPOILER SPOILER SPOILER SPOILER SPOILER SPOILER SPOILER SPOILER SPOILER

If you haven't tried to figure it out yourself yet, don't read this.

SPOILER SPOILER SPOILER SPOILER SPOILER SPOILER SPOILER SPOILER SPOILER
SPOILER SPOILER SPOILER SPOILER SPOILER SPOILER SPOILER SPOILER SPOILER
SPOILER SPOILER SPOILER SPOILER SPOILER SPOILER SPOILER SPOILER SPOILER
SPOILER SPOILER SPOILER SPOILER SPOILER SPOILER SPOILER SPOILER SPOILER
=======================================================================

Anyway, here it goes:

Page 1:
There's USB connection. The power line is being used for more than a
simple plug-in signal, so this is bus-powered (or has the option of
being so).

First thing that stands out is that this is a boost DC-DC converter,
among other things: L1, D1, and Q3 are the main components. The 10F PIC,
IC2, is the controller. Its built-in comparator is used as the switching
output controller, with the reference provided by its VDD, which is fed
by a simple 5V-ish linear regulator formed by Q1, D3, and associated
passives. This seems to take its input from the DC-DC output, but it
will bootstrap off of the USB 5V when powered-up (straight through L1).
Interesting the use of discretes instead of an LDO: is there a good
reason for this, besides cost?

The PIC compares this reference against a resistor divider fed from the
main output. The reference input can be grounded (and thus disabled)
through PWRDOWN through Q2. The output of the DC-DC then goes through
SH1 (what the hell is that? A jumper or fuse or something?), then a
diode D2 (unsure why, besides the 0.7V drop), and then a 7805 to
regulate the output to a stable 5V. There are bypass and smoothing caps
sprinkled around the major points and voltage rails. There is also a
100R resistor between USB GND and GND: why?

Page 2:
Here's the main controller, a PIC18F2550 (a quite capable USB-enabled
PIC, which I've used before, along with the 18F4550). This runs off of
raw USB power or 5V, as dictated by D4 and SH3 (ok, so there are
jumpers, right? SHort?). There's the usual programming header, a status
LED (running off of the boost 8.2V) with a transistor to drive it.
There's also a TTL serial port header, a jumper between grounds which if
I'm not mistaken are connected anyway (wtf? is this just for a
convenient ground connection?), an oscillator, and - oh my - PGD and PGC
inputs and outputs. This is a PIC programmer. There are PWM outputs for
VDD and VPP, so this can control the voltage levels.

Page 3:
Another booster, same topology as Page 1, but this time it boosts to
17V. Also, CIN+ isn't used for it's presumed purpose, so I'm guessing
there is an internal voltage reference on these PICs (I haven't looked
at the datasheet). Thus the one in Page 1 probably does that too, and
the resistor to VDD is just a pull-up (I was wondering about that).
GP2/CIN+ instead drives a pair of transistors, which drive diodes and
capacitors in a charge-pump setup to generate -2.2V. Weird charge-pump
arrangement on the schematic - it could have been clearer.

Page 4:
PWM-to-voltage converter for VDD. The input is first low-pass-filtered
using an R-C network, and then an op-amp (powered from +17V and -2.2V)
drives two transistors in darlington configuration to amplify this to an
output voltage. There's a transistor to short VDD to ground through a
22-ohm resistor to presumably empty out residual charge when powering
down. There's a second op-amp that just buffers the scaled-down output
VDD voltage (used as the - input of the first op-amp), which is then
clamped to between +5V and GND, and divided down again. This feeds back
into the PIC in Page 2.

Page 5:
Similar to Page 4, but somewhat different. I am unsure what the need /
use of transistors Q15 and Q16 are. Q17 is an on-switch for the output
(with Q18 to drive it from VPPON). Everything else is pretty much like
Page 4, except the second buffer is now driven by a separate divider,
and there is no further dividing down after that before feeding to the PIC.

Page 6:
Identical drivers for PGD and PGC, and target connectors. Each driver
has inputs for high and low driving, and a pair of transistors to drive
the output. The outputs are at the target VDD level. PGDHI drives Q22
which drives Q21 which then drives the output high, Q23 drives the
output low from PGDLO. I'm unsure about Q20 and Q24, maybe they're there
to improve the frequency response? (capacitors?)

Overall, this seems like a pretty complex USB PIC programmer. Some
things seem unneeded or extra (though I'm sure there's a good reason - I
just don't know it), like the discrete regulator for the switchers, or
the charge pump - do the op-amps need to go that low anyway? Wouldn't
rail-to-rail op-amps be more than enough to reach as low as the lowest
PIC operating voltage, not to mention programming voltage? The PGD and
PGC drivers are also pretty complex.

===============================
====== SPOILERS END HERE ======
===============================

I've been reading some of the other messages (after writing the above).
I think it'd be best if we set up a clearer introduction to these
exercises, so that others know how to post their own and how to respond
to others, without spoiling it for others. I find these exercises to be
very valuable (especially if someone clears up some of the doubts I had
above) for people who are learning (myself included). I did have the
foresight not to read anything beyond the beginning before doing my
analysis, but it's best if we organize it so that each "student" posts
their own answer to the initial thread, and then the responses to that

In the case of Lindy, am I the only one who can tell that people should
start at the beginning with her (besides Olin)? I've seen switchers
before, but she obviously hasn't. Let her get the emitter-follower+zener
linear regulator first before moving on (I know I would have liked it
that way back when I was starting to learn).

--
Hector Martin (hectormarcansoft.com)
Public Key: http://www.marcansoft.com/marcan.asc

Hector Martin [PIClist] wrote:
> IC2, is the controller. Its built-in comparator is used as the
> switching
> output controller, with the reference provided by its VDD,

You were fine up to here, but the 10F204 has a internal absolute 600mV
reference.  It's not very accurate, but can be internally tied to one input
of the comparator with a external pin being the other.  In this case GP1 is
the external comparator input.  The comparator is not directly driving Q3.
The comparator output is only read by the program, which then drives GP2 to
switch Q3 on and off as it sees fit.

> This seems to take its input from the DC-DC output, but it
> will bootstrap off of the USB 5V when powered-up (straight through
> L1).
> Interesting the use of discretes instead of an LDO: is there a good
> reason for this, besides cost?

Yes.  This was discussed at length in my response to Peter.  The main issue
is that LDOs aren't specified for operation when the input is less than the
regulated output voltage.  This zener regulator behaves nicely and
predictably when the input is 4V, for example.  Other advantages are cost
and the diode isolation from the rest of the circuit when Vdd is driven
during programming.

> The reference input can be grounded (and thus disabled)
> through PWRDOWN through Q2.

Actually that is the MCLR input configured in its MCLR role.  So the supply
is disabled when PWRDOWN is high by holding IC2 in reset.

> SH1 (what the hell is that?

I call them "shorts".  They are just connections from your point of view.
They are ways of splitting nets in Eagle to assign each different
properties, and also to force all the current between two parts of what
would otherwise be the same net thru a single point.  SH1 and SH2 keep the
switcher loop currents isolated and off the main power and ground nets.

> then a
> diode D2 (unsure why, besides the 0.7V drop),

This has to do with the only way you can kill a 7805.

> There is also a
> 100R resistor between USB GND and GND: why?

I'm not quite sure how all USB cables are wired and how the shield (if any)
is connected compared to the ground conductor.  If there is a shield I want
it not to flop around, but I also don't want the ground current flowing thru
it.

> a jumper between grounds which if
> I'm not mistaken are connected anyway (wtf? is this just for a
> convenient ground connection?),

Note that the grounds are two different nets, GND and GND2.  They would not
be connected automatically.  Eagle thinks SH4 is a two-pin component that
happens to connect to GND and GND2.  In reality, SH4 is just a copper
connection, so GND and GND2 are the same thing electrically.  The reason for
doing this is that GND2 is a local ground for IC3.  SH4 is the single
connection to the main ground, so only overall return current will flow thru
it.  The high frequency loop currents caused by the PIC will be kept
confined to GND2, which is also kept physically close to IC3 in the layout.

What isn't shown in the schematic is that SH3 (the single feed for the PIC
power) and SH4 are physically adjacent on the board, with C12 immediately
accross the two on the PIC side.  C12 then becomes a shunt for high
frequency loop currents.  From the rest of the circuit's point of view, the
PIC draws power at SH3 with ground return at SH4, and with little high
frequency components.

If this were more than a two layer board I would have made GND2 a small
local ground plane patch immediately under the PIC and its crystal in a
layer above the whole board ground plane.  Since this is only a two layer
board, I just kept the GND2 connections short and straight and minimized
their overall length in layout.

> Also, CIN+ isn't used for it's presumed purpose, so I'm guessing
> there is an internal voltage reference on these PICs

Yes there is, and it's internally tied to one of the comparator inputs.

> GP2/CIN+ instead drives a pair of transistors,

Actually it's GP0, but you obviously have the right idea.

> Weird charge-pump
> arrangement on the schematic - it could have been clearer.

Hmm.  I guess it's not how charge pumps are usually shown, but I was using
height on the page as a rough indicator of voltage.  Perhaps you can suggest
a clearer way to show it?

> drives two transistors in darlington configuration to amplify this to
> an output voltage.

That's the basic idea, but it's not technically a darlington since the
collectors of Q10 and Q11 aren't tied together.  But the basic principle is
the same, which is that Q10 and Q11 together form a high gain emitter
follower.

> There's a transistor to short VDD to ground through a
> 22-ohm resistor to presumably empty out residual charge when powering
> down.

Since the VDD line is the target circuit's Vdd, there can be considerable
capacitance on it.  Substantial current drive is therefore required to
charge and discharge the capacitor when changing VDD.  Q10 and Q11 can only
drive high.  Without the active discharge path thru R31 and Q12, switching
Vdd low could take intolerably long.

> There's a second op-amp that just buffers the scaled-down output
> VDD voltage (used as the - input of the first op-amp), which is then
> clamped to between +5V and GND, and divided down again. This feeds
> back into the PIC in Page 2.

It's easy enough to see what is connected to what, but can you explain why
it is there?

> Page 5:
> Similar to Page 4, but somewhat different. I am unsure what the need /
> use of transistors Q15 and Q16 are.

Ah yes, that is much more of a challenge to figure out.  Just describing how
the circuit is wired isn't good enough for this one.

You are right in that the emitter of Q17 is kept at roughly the Vpp voltage,
and Q17 is turned on to raise the VPP line to that level.  Now think about
how the line at the emitter of Q17 is regulated?  Where is the feedback
path?  How is the right voltage ultimately guaranteed on the collector of
Q17 when it turns on?

> Page 6:
> I'm unsure about Q20 and Q24, maybe they're there
> to improve the frequency response?

Think about when they will turn on.  When they do turn on, what effect do
they have?

> Wouldn't
> rail-to-rail op-amps be more than enough to reach as low as the lowest
> PIC operating voltage, not to mention programming voltage?

But they need to do more than that.  In any case I've already discussed this
at length in a response to Peter.

> The PGD and
> PGC drivers are also pretty complex.

Yes they are, although note they are built totally from cheap parts.  I was
hoping to get away with less complex drivers, but those didn't meet all the
criteria.  Can you figure out what all the design criteria were for the PGC
and PGD output drivers?  Why are there two separate PIC outputs to control
each driver?

> In the case of Lindy, am I the only one who can tell that people
> should start at the beginning with her (besides Olin)?

Interesting that you think Lindy is a she.  I guess you could be right.  His
(her?) writing style didn't give me that impression.

********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.
Olin Lathrop wrote:

> Interesting that you think Lindy is a she.  I guess you could be right.  His
> (her?) writing style didn't give me that impression.

Oh, well, I started thinking the same as Hector. Then I got he was a
"he"... but now...

--
Ciao, Dario

> In the case of Lindy, am I the only one who can tell that people
> should start at the beginning with her (besides Olin)?

>>Interesting that you think Lindy is a she.  I guess you could be right.  >>His (her?) writing style didn't give me that impression.

I'm a 42 year old male who has been working with IBM mainframe computers for about 17 years or so now in a highly technical capacity.

But I love electronics and have spent years trying to "get it".  I think there is something wrong in how I am approaching the whole situation.

I admit that I really start to "get it" when I have a breadboard and oscilloscope and multimeter to work with.  When the summer comes I can put a cat-free office in my attic and begin again with my hobby.  I want to build a robot out of used CD's. (-:  Plus I want to build a pink noise generator.  And if I get better I'd like to build a Theremin.

Lindy

-----Original Message-----
From: piclist-bouncesmit.edu [piclist-bouncesmit.edu] On Behalf Of Dario Greggio.

Oh, well, I started thinking the same as Hector. Then I got he was a
"he"... but now...

--
Ciao, Dario

I don't mind the confusion anymore.  Lindy is one of those names that can go both ways. I think there is a famous baseball player named Lindy.  But there are girls named Lindy, too.

Lindy Mayfield wrote:
> I don't mind the confusion anymore.  Lindy is one of those names that can go both ways.

LOL Lindy :-)) all right then!
(something like "Andrea" which in Italy is male and in many other
countries it's female!)

--
Ciao, Dario
Olin Lathrop wrote:
> The main issue
> is that LDOs aren't specified for operation when the input is less than the
> regulated output voltage.  This zener regulator behaves nicely and
> predictably when the input is 4V, for example.  Other advantages are cost
> and the diode isolation from the rest of the circuit when Vdd is driven
> during programming.

> They are ways of splitting nets in Eagle to assign each different
> properties, and also to force all the current between two parts of what
> would otherwise be the same net thru a single point.  SH1 and SH2 keep the
> switcher loop currents isolated and off the main power and ground nets.
Hmm, I wonder how my software (I use gEDA) does this. Probably the same
way (dummy component).

> This has to do with the only way you can kill a 7805.
Ah, reverse polarity.

> I'm not quite sure how all USB cables are wired and how the shield (if any)
> is connected compared to the ground conductor.  If there is a shield I want
> it not to flop around, but I also don't want the ground current flowing thru
> it.
I missed the fact that the actual ground contact is directly connected.
It makes more sense now.

>
>> a jumper between grounds which if
>> I'm not mistaken are connected anyway (wtf? is this just for a
>> convenient ground connection?),
>
> Note that the grounds are two different nets, GND and GND2.  They would not
> be connected automatically.
I missed that. I get it now that I know what SHorts are.

> What isn't shown in the schematic is that SH3 (the single feed for the PIC
> power) and SH4 are physically adjacent on the board, with C12 immediately
> accross the two on the PIC side.  C12 then becomes a shunt for high
> frequency loop currents.  From the rest of the circuit's point of view, the
> PIC draws power at SH3 with ground return at SH4, and with little high
> frequency components.
I need to start doing this in my circuits :)

>> Weird charge-pump
>> arrangement on the schematic - it could have been clearer.
>
> Hmm.  I guess it's not how charge pumps are usually shown, but I was using
> height on the page as a rough indicator of voltage.  Perhaps you can suggest
> a clearer way to show it?
The capacitor at a right angle makes it a little weird at first. Here's
how I usually see them drawn (pardon my bad ascii art):

IN---||--o------.
__|__  __|__
_\_/_  _/_\_
|      |
GND-------o--||--o-----OUT

The idea is that you can copy the circuit to the right to multiply the
voltage further.

Here's the same idea for a positive multiplier:
http://en.wikipedia.org/wiki/Image:Voltage_Multiplier_diagram.PNG

>> There's a second op-amp that just buffers the scaled-down output
>> VDD voltage (used as the - input of the first op-amp), which is then
>> clamped to between +5V and GND, and divided down again. This feeds
>> back into the PIC in Page 2.
>
> It's easy enough to see what is connected to what, but can you explain why
> it is there?
This feeds back the output voltage to the PIC ADC for closed-loop
voltage regulation, correct?

> You are right in that the emitter of Q17 is kept at roughly the Vpp voltage,
> and Q17 is turned on to raise the VPP line to that level.  Now think about
> how the line at the emitter of Q17 is regulated?  Where is the feedback
> path?  How is the right voltage ultimately guaranteed on the collector of
> Q17 when it turns on?
Q16 is identical to Q17, is permanently on via R52, and provides the
proper voltage drop for the feedback path. Right?

I'm still not sure what Q15 does, though.

>> I'm unsure about Q20 and Q24, maybe they're there
>> to improve the frequency response?
> Think about when they will turn on.  When they do turn on, what effect do
> they have?
I'll look into it later tommorrow. The driver circuits are pretty
interesting.

> Interesting that you think Lindy is a she.  I guess you could be right.  His
> (her?) writing style didn't give me that impression.
I made an assumption from the name. I was completely wrong then :)
From http://www.nameplayground.com/Lindy :
> Lindy is primarily a girls' name, but it is used for boys 13.64
> percent of the time."

--
Hector Martin (hectormarcansoft.com)
Public Key: http://www.marcansoft.com/marcan.asc

Olin Lathrop wrote:
> The main issue
> is that LDOs aren't specified for operation when the input is less than the
> regulated output voltage.  This zener regulator behaves nicely and
> predictably when the input is 4V, for example.  Other advantages are cost
> and the diode isolation from the rest of the circuit when Vdd is driven
> during programming.

> They are ways of splitting nets in Eagle to assign each different
> properties, and also to force all the current between two parts of what
> would otherwise be the same net thru a single point.  SH1 and SH2 keep the
> switcher loop currents isolated and off the main power and ground nets.
Hmm, I wonder how my software (I use gEDA) does this. Probably the same
way (dummy component).

> This has to do with the only way you can kill a 7805.
Ah, reverse polarity.

> I'm not quite sure how all USB cables are wired and how the shield (if any)
> is connected compared to the ground conductor.  If there is a shield I want
> it not to flop around, but I also don't want the ground current flowing thru
> it.
I missed the fact that the actual ground contact is directly connected.
It makes more sense now.

>
>> a jumper between grounds which if
>> I'm not mistaken are connected anyway (wtf? is this just for a
>> convenient ground connection?),
>
> Note that the grounds are two different nets, GND and GND2.  They would not
> be connected automatically.
I missed that. I get it now that I know what SHorts are.

> What isn't shown in the schematic is that SH3 (the single feed for the PIC
> power) and SH4 are physically adjacent on the board, with C12 immediately
> accross the two on the PIC side.  C12 then becomes a shunt for high
> frequency loop currents.  From the rest of the circuit's point of view, the
> PIC draws power at SH3 with ground return at SH4, and with little high
> frequency components.
I need to start doing this in my circuits :)

>> Weird charge-pump
>> arrangement on the schematic - it could have been clearer.
>
> Hmm.  I guess it's not how charge pumps are usually shown, but I was using
> height on the page as a rough indicator of voltage.  Perhaps you can suggest
> a clearer way to show it?
The capacitor at a right angle makes it a little weird at first. Here's
how I usually see them drawn (pardon my bad ascii art):

IN---||--o------.
__|__  __|__
_\_/_  _/_\_
|      |
GND-------o--||--o-----OUT

The idea is that you can copy the circuit to the right to multiply the
voltage further.

Here's the same idea for a positive multiplier:
http://en.wikipedia.org/wiki/Image:Voltage_Multiplier_diagram.PNG

>> There's a second op-amp that just buffers the scaled-down output
>> VDD voltage (used as the - input of the first op-amp), which is then
>> clamped to between +5V and GND, and divided down again. This feeds
>> back into the PIC in Page 2.
>
> It's easy enough to see what is connected to what, but can you explain why
> it is there?
This feeds back the output voltage to the PIC ADC for closed-loop
voltage regulation, correct?

> You are right in that the emitter of Q17 is kept at roughly the Vpp voltage,
> and Q17 is turned on to raise the VPP line to that level.  Now think about
> how the line at the emitter of Q17 is regulated?  Where is the feedback
> path?  How is the right voltage ultimately guaranteed on the collector of
> Q17 when it turns on?
Q16 is identical to Q17, is permanently on via R52, and provides the
proper voltage drop for the feedback path. Right?

I'm still not sure what Q15 does, though.

>> I'm unsure about Q20 and Q24, maybe they're there
>> to improve the frequency response?
> Think about when they will turn on.  When they do turn on, what effect do
> they have?
I'll look into it later tommorrow. The driver circuits are pretty
interesting.

> Interesting that you think Lindy is a she.  I guess you could be right.  His
> (her?) writing style didn't give me that impression.
I made an assumption from the name. I was completely wrong then :)
From http://www.nameplayground.com/Lindy :
> Lindy is primarily a girls' name, but it is used for boys 13.64
> percent of the time."

--
Hector Martin (hectormarcansoft.com)
Public Key: http://www.marcansoft.com/marcan.asc

Hector Martin [PIClist] wrote:
> This [IC5B on page 4] feeds back the output voltage to the PIC ADC
> for closed-loop voltage regulation, correct?

Not really.  It does allows the PIC to measure Vdd, but that is mostly to
verify that it has gotten to the desired value and for verification.  There
is no attempt in the firmware to control the Vdd voltage based on feedback.
The filtered PWM output and the control circuit of IC5A are good enough for
that.

But note that there are two lines from IC5B going to the PIC.  It has
another purpose, although it's a bit hard to tell without knowing what the
firmware is doing.  RA3 is used as a comparator input, not A/D input.

> Q16 is identical to Q17, is permanently on via R52, and provides the
> proper voltage drop for the feedback path. Right?

Yup, you got it.

> I'm still not sure what Q15 does, though.

Think about what conditions would cause it to turn on.

********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.

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