Tag Archives: Op Amps

Office Tomfoolery

So Monday at work I successfully pulled a prank on the designer for the part that is currently occupying the majority of my time. Concept, planning, and execution took about two weeks or so as I had to fit this little side project in around my real work obviously. Ever since the part’s inception this designer had been claiming it was perfectly designed and any errors were clearly the fault of me, the Applications Engineer. He wasn’t being mean or anything, this sort of good-natured rivalry is pretty common between the Apps and Design departments at work, but being that this is my first part as lead apps since starting a year ago meant I got some extra abuse. I figured it would be a good idea to go on the offensive and show everyone I wasn’t such an easy target. My boss, who’s been good friends with the designer for a long time now, thought it would be pretty funny and approved the gag, eager to see how it would play out.

The part is a single phase buck regulator meant for Vcore applications in laptops and ultrabooks. Vcore means that the regulator provides the main voltage rail to the processor, specifically an Intel one in this case as AMD and other processors have different power requirements. My goal was to somehow screw with the regulator, cause the output voltage to glitch and go out of spec, and convince the designer this was a silicon bug and not a board issue. After a little brain storming I came up with the following circuit which could be cobbled together out of various parts in the lab:

Prank Circuit

My Prank Circuit

Without diving down the rabbit hole that is regulator compensation, the comp pin of any buck converter is the output of an error amplifier which connects to a networks of passives going back to its negative terminal (the Feedback pin) and is part of the control loop used to keep the output voltage stable and well-regulated. My circuit would periodically drive this pin away from its steady state operating point. This disturbance would propagate through the chip and result in a noticeable glitch on the output voltage until the compensation loop could regain control and bring the output voltage back into spec.

As phase switches merrily along at the frequency and duty cycle set by the controller it gets divided down by R1 and R2. When phase is high the output of this voltage divider is enough to forward bias the diode and cause current to flow into C1 for a brief period before going low again. C1, which also connects to the positive input comparator U1, charges over time and when the voltage across the cap gets to be higher than the reference voltage present on the comparator’s negative input the comparator’s output swings to 5V. When U1’s output goes high two things happen. One, comp is driven away from steady state through R5 and two, the gate of M1 goes high which discharges C1 below the reference voltage starting the cycle over again.

Prank Sims

Prank Circuit Sim Results (Click to view properly)

There really wasn’t much thought process behind the component values in my circuit; they were determined through trial and error in simulation. I didn’t care how often the circuit would trigger, only that it did and the disturbances it caused would appear on Vout. One of my only goals was to ensure that the resistor dividers wouldn’t draw enough current to interfere with the normal operation of the regulator and cause it not to start up. My second goal was to “break” the regulator just enough to cause concern but not enough to trigger any of various over voltage, current, or temperature protections built into the chip. This is why R5 had to be added; without it comp was driven too hard and the part simply shutdown (there’s no fun in that).

With the circuit idea solidified I headed into the lab to jury rig it into place underneath one of the eval boards. It was a messy hour after work one day, but I successfully placed each component and wired in the various signals and voltages from all across the board. Once things got going, there would be so many cables and probes attached to the board I knew it wouldn’t get turned over until I was ready to reveal what I’d done.

 

Holding my breath I powered up the board after making all the necessary modifications. Surprisingly enough it worked! I hadn’t made any disastrous mistakes when wiring it all up and the resulting waveforms basically match with my sims. All that was needed was some tweaking of R5 to find the right value and I was ready for action.

Cutting to Monday morning, I spent a little time taking scope captures of a good board and my doctored eval board. These were placed in a quick report which I shot off to my boss and the designer right after lunch. To add to the joke I took my clean scope caps using a part from an old rev of silicon and explained how the “bug” was only seen in the latest version of the chip. This caused the initial spark of concern in the designer as we’re currently waiting on a new rev of the chip to arrive from the fab and it was too late to make any changes. After getting some tests to run and tweaks to try, I actually went into the lab and did them! For one I was curious to see if any of them could actually fix the error (they didn’t) and secondly, this designer is pretty hands on and likes to come out to Apps Lab quite often. I knew that if he came out to see the glitch on the bench and none of his changes were made he would get suspicious. Fortunately, or unfortunately, other obligations kept him away for the day and he never came out to see the problem until the end of the day.

After running the initial list of tests the designer gave me I had a flash of brilliance that really threw him for a loop. I took a series of scope shots at each of the four switching frequencies our part could run at and varied the value of R5 at each one. Now I had created a problem that went away as switching frequency increased and could explain why we hadn’t seen this issue before as the majority of our testing had taken place at high frequency up until this point! Bingo.

By the end of the day, the designer was pretty much stumped. He’d done an initial check of his schematics, couldn’t spot an obviously fault he made, but thought it was a mistake somewhere in the core of the modulator. He told me that at this point he essentially resigned himself to hoping the new version of the chip came out okay and whatever changes he made would happen to fix this (remember it’s too late to make changes now as the part’s being fabricated).

Right afterwards I called him into the lab saying I’d found something interesting and he should come take a look. When I showed him the circuit on back of the board he didn’t get it at first. He asked why all this crap was added and what did it fix? I couldn’t hold back anymore and broke out in a smile and said that I just wanted to mess with him. Slowly realization dawned on him and he started laughing as did my boss and a few other guys in the lab who were in on the joke.

In the end the designer took it really well and thought it was pretty funny. He told my boss to give me more work as clearly I didn’t have enough to do since I could pull these elaborate pranks but mostly he just laughed. I now owe him a round or two the next time a bunch of us go out after work but that’s a price I’m more than willing to pay all things considered. In the end I caused him just enough trouble so he started to sweat but not enough to take him away from any real tasks he had to get done. A well executed prank overall in my opinion. Surely, there’s no way this will every come back to haunt me right?

Advertisements

Jim Williams, AN13, & Op Amp Wizardry

Not too long ago I was reading through one of Jim Williams’ famous App Notes, AN13, High Speed Comparator Techniques. It’s an older App Note that was published back in 1985 and I didn’t really have a specific reason for reading it other than thinking it looked interesting and I wanted to learn more about comparators. For a comprehensive overview of AN13 I recommend reading Dr. Lundberg’s (aka Dr. Analog) three part summary over on his blog Reading Jim Williams.

The first section of AN13 is extremely informative and makes the app note well worth the read in my opinion. Entitled “The Rouges Gallery of High Speed Comparator Problems” this portion of the app note highlights common pitfalls of comparator circuits including bypassing, ground planes, probe compensation, and much more. As useful as The Rouges Gallery is what intrigues me the most in AN13 doesn’t actually have anything to do with comparators and is found in the first circuit of the Applications Section. The overall circuit is a Voltage to Frequency Converter shown in Figure 16 of AN13 and reproduced below with the part that fascinates me most boxed in red.

What Jim Williams has done is replace the input stage of A1, the LT318A, with a pair of 2N4393 JFETs. These JFETs drive the output stage of A1 via the two Comp pins of the amplifier. A1’s true inputs are shutdown by shorting them directly to the -15V supply leaving the rest of the amplifier free to serve Williams’ needs for this particular application. According to page 8 of the app note this trick was done “for low bias, high-speed operation.”  Now I don’t have a whole lot of experience using op amps with Comp pins to begin with let alone understand their internal architecture enough to hack them like Jim did. As far as I knew something like this wasn’t even possible and it definitely wasn’t brought up in any of the classes I took in school! Needless to say, upon seeing it done here in AN13 I was a little stunned.

After my initial shock I decided to look at the LT318A a little more closely to try to see how Jim Williams had pulled off this neat little trick. Linear Tech is usually pretty good about providing schematics  of their op amps with a description in their datasheets and I was hoping this was the case with the 318. As it turns out, the LT318A datasheet is a bit sparse compared to other datasheets from Linear but fortunately for me it does contain a schematic of the part. Unfortunately for me, it doesn’t appear to be a simplified version and there isn’t a functional description. Looking at the schematic in detail I could tell this wasn’t the basic op-amp architecture I was used to dealing with but I decided to dive in anyways. I’ve copied the LT318A schematic here and marked it up into functional blocks as best as I’m able to but if anyone out there has more info on this op amp or sees somewhere that I went wrong please let me know.

From studying the datasheet schematic of the LT318A I was able to understand more of how Jim’s op amp hack works. Connecting the amps inputs on pins 2 and 3 to the negative rail turns off the differential amplifier, the heart of which are the input transistors Q1-Q4 with Q13 and Q14 being the active loads. As a side note there may be some common-mode feedback on the diff pair but I’m not 100% sure. Thinking about what was said in the app note I would have to assume using two JFETs in place of the input circuit on the op amp would lower bias requirements and cutting out all those transistors speeds up operation of the overall application circuit.

The output from the input differential stage is then fed into what I assume to be a second gain stage  (not sure what Q21 does, this may be a weird folded cascode configuration too). From Figure 16 in AN13, you can see that Jim Williams has the JFET input transistors driving pins 1 and 5 on the LT318A. Sure enough these two pins correspond to the output of the diff pair on the amplifier and feed directly into the second gain stage. Following the gain stage comes what appears to be a Class AB output stage.

I enjoyed this little exercise of trying to understand some of Jim Williams’ techniques. While I may not have exactly figured out how the LT318A works I feel I did understand the high-level thought process behind this neat little trick. I also saw that my BJT design skills are a little rusty and that perhaps I should dust off Gray & Meyer or Sedra-Smith and brush up on the topic. Who knows, there could be a revisit to this post in the future…

Any neat op amp hacks of your own? See a mistake in my analysis of the LT318A? Let me know in the comments. Oh, and Happy New Year!


Useful App Notes: Part 2

AN104 – Load Transient Response Testing for Voltage Regulators, Linear Tech

An app note written by the late great Jim Williams back in 2006 discussing how to test linear regulators by applying a load transient to the output. These techniques discussed are also directly applicable to switching regulators as well making the app note doubly useful. My favorite parts of this app note are Figures 6 and 8 which show two interesting transient generator circuits, one BJT based and the other FET based. At the moment I’m trying to gather up the necessary parts to prototype one of the circuits and possibly throw it in a project box to use at work. A great resource for anyone doing work in power electronics.

ANA – The Monolithic Operational Amplifier: A Tutorial Study, National Semi

Want a fantastic reference about the intricacies of op amp design? Look no further than this app note written by Bob Widlar. Covering everything from input/output stages, to techniques for increasing slew rate and proper layout, any and all relevant topics related to op amp design are discussed.  There’s even a section on thermal feedback which is interesting as it’s not a topic typically covered all to often. While I don’t think I would recommend this app note as a stand alone reference for a beginner, it’s perfect for someone looking to expand their knowledge on op amp design. If you are a beginner I would suggest pairing ANA with either Johns & Martin or Gray & Meyer. Fun Fact: Gray and Meyer are cited several times in the bibliography.

The Data Conversion Handbook – Analog Devices

Not exactly an app note but still another good reference to keep at hand. If you’re looking for a general overview of ADCs and DACs  along with a bunch of other useful information I highly recommend this book. Chapter 1 is an interesting history of converter technologies throughout the ages. Chapter 2 discusses sampling theory and defines converter specs. Chapter 3 covers the various topologies of DACs and ADCs from a primarily applications standpoint rather than a design one but is still incredibly detailed.  Chapters 6 and 7 cover interfacing and all the various support circuitry that goes into properly using converters in your design. Chapter 9 has a some good information regarding board layout, passive components, prototyping, and more. I read through most of this handbook two summers ago during an internship while waiting for automated tests to run and I can say I learned quite a bit.


Useful App Notes: Part 1

Over the years I’ve accumulated a rather astounding number of app notes on my hard drive from various companies.  What few ones I’ve read so far are, in my opinion, very useful and should be shared.  The rest I’ve downloaded thinking “This looks like something I should keep around in case it ever comes in handy,” only to never open them and let them collect virtual dust.  Sharing the interesting ones on my blog seemed like a win-win-win situation, I learn things reading app notes, you learn things from reading app notes, and I de-clutter my hard drive/Dropbox account,everybody wins. So without further ado here’s a few of the most useful app notes I’ve come across.

AN1613: From SPICE Netlist to Allegro Design Sub-circuit, Intersil

If you’re like me whenever you come across a part that isn’t in any of the main component libraries when using P-Spice you think to yourself “Is this part really necessary? How well does my design work with this op amp instead of the one I want?”  I did this because up until I found this app note, even if I could find a SPICE model online for a part I wanted, I didn’t know what to do with it.  Enter AN1613.  It goes through an easy step by step process of how to take a SPICE model you’ve found online and actually make it work in a Cadence Allegro Design  simulator.   I’ve used this app note to help simulate parts from a few IC companies with great results.

Op Amps for Everyone, Texas Instruments

While not exactly a single app note, Op Amps for Everyone is still a great design guide to have handy when you need to quickly refresh yourself on a topic or get a basic overview of a concept before researching it in more detail.  It covers everything from basic circuit analysis and feedback theory to filter design, converter interface, and everything in between.  There’s plenty of examples to go along with the theory as well as a whole chapter on layout considerations.

AN95-1: S-Parameter Techniques for Faster, More Accurate Network Design, Hewlett Packard

Here’s a blast from the past, AN95-1 was first released in 1967 by HP. While slightly on the old side, I still found this app note pretty useful when trying to wrap my head around S-Parameters last summer.

Got any favorite app notes you can’t live without? Share them in the comments, I’m always looking to collect more of them.