State of the Fake EE Union

Well hello there. It certainly has been a while since I’ve posted. Sorry about that, between the holidays and submitting a draft of my thesis to my adviser before Christmas I was running around with my head cut off and couldn’t seem to find the time to write anything. Just to keep everyone updated and what not here’s a couple of noteworthy news items:

1) Back on December, 20 I had an article published over on Engineer Blogs about the differences between school and work. Chris and the other EB writers were kind enough to offer me a spot guest writing for their site after I submitted the piece for their consideration. For the time being I will be submitting stories to EB for your enjoyment on a part-time basis and will work up to one day joining the team as a full-time author.

2) Though I’m writing for Engineer Blogs on occasion I will still be posting content here to this blog when I get a chance too. Fake EE Quips will stay more technical in nature (circuits, app notes, etc.) while any stories that I feel relate to engineering as a whole I will publish on EB. I’m currently trying to get a post out here before the new year so be on the lookout that in the next day or so (it’s about Jim Williams and a crazy op-amp trick). I’ve also got some more ideas bouncing around in my head but my lack of a home lab makes it difficult to prototype and test circuits. Hoping to acquire a scope and power supply in the new year but we’ll see…

3) The Amp Hour Bingo will be getting some updates in order to make it easier to win and more fun to play. For those of you who play along like I do I’m sure you’ve noticed it’s basically impossible to BINGO while listening to the podcast. As far as I know I’m the only one who has gotten a BINGO and it’s only happened once. Roel and I brainstormed a bit and came up with a way to place the tiles more efficiently so the most common aspects of The Amp Hour are always used when a board is generated and the rest serve as filler. Other features to add were also discussed including saving a board and posting results Twitter. I don’t know when exactly these changes will be put into place since I’m dead weight when it comes to coding but when Roel finishes them I’ll be sure to make it known.

So yeah, that’s what I’ve got for you at the moment. Thanks for checking out the site and reading my posts over these last 8 months or so. It’s been a lot of fun so far and I plan to keep writing in 2012 and longer assuming the world doesn’t end next December. Once my thesis is finally wrapped up I can even post on a more frequent basis too!

Happy New Year,

Carmen


Expanding the Analog Geek’s Toolkit

So I spent the other weekend in Washington, D.C. visiting a friend for his birthday. While I was waiting for my plane to take off in RDU Alan over at Tektronix was kind enough to provide me with some pre-flight entertainment. Back in 1987, Alan assembled The Ultimate Analog Engineer’s Toolkit designed to provide solace to engineers dealing with such problems as noise, the Miller Effect, and management, among other things. My personal favorites were the box of dBs (positive and negative flavors of course) and the Parasitic Pesticide. I tried to order some samples directly from Alan himself but he said his stock has run dry. I hope he can get another shipment delivered in time for the holiday season.

Anyways, as I was sitting in the terminal after reading it and I started to come up with a few additions to the toolkit and I present them to you here.

The Low Flow Current Adapter – We’re all familiar with the low flow shower heads installed in bathrooms nationwide to reduce water consumption. The Low Flow Current Adapter works in much the same way only on current instead of H2O. Plug this bad boy in between the power source and your circuit and watch as your product’s power consumption plummets before your very eyes.

Frequency Shaper Tool - Sometimes designs run over budget and when this happens you can’t always afford the box of high quality dBs needed to make a circuit meet the required specs placing a lot of “hertz” on you the designer. This is where the patented Frequency Shaper Tool comes in handy. While not as precise as a Box of dBs its low cost and reliable performance makes it ideal for the engineer on a budget. The Shaper allows a designer to grab a hold of an amplifier or filter’s frequency response and bend it to the desired shape. Need to nudge a zero in the stop band? Squeeze just a little more rolloff out of a filter? Reach for the Frequency Shaper and bend a transfer function into submission.

DocuGel – Come across an old PCB, product, or IC and have no idea what it does or how to use it? Did someone who’s clearly not as bright as you are forget to document their work and now the burden to upgrade the device is on you? Spread some DocuGel on the offending product and leave it sit overnight on your bench. Return the next morning and find datasheets, BOMs, gerber files, and schematics laying on your bench!

Grounding Stakes- Nasty PCB layout causing you problems? Is your circuit’s performance suffering at the hands of ground refusing to sit at 0V? Pound a ground stake into an open portion of your board and watch your problems disappear. Let your circuit know you only accept 0V, no more, no less.

I accept checks and all major credit cards :-)


Vintage Tek Gear

I was poking around in the Design Lab at work and happened to come across a few pieces of old Tek Gear. There’s one FG504 Function Generator and two AM503 Current Probe Amplifier modules together in a TM504 Power Supply chassis. The FG504 can generate a sine, square, or triangle waveform up to 30Vpp over an impressive 1mHz to 40MHz frequency range. It also has a host of other features too including burst and sweep modes. The AM503 can be attached to any oscilloscope and allows for current measurements of up to 100 A depending on the current probe used with it. I’m not sure if this stuff gets used much anymore, if at all, but it’s still cool none the less so I snapped a few pictures to share my findings. I also did a Google search for each module and found a few interesting sites which I linked to at the end. Enjoy!

Results of my Google searching:

  • What looks like a product page from a catalog for the function generator
  • Catalog page for the current probe amp. The AM501 Op Amp Module also on this page looks pretty cool too. I’d definitely like to play around with one of those.
  • An ebay page selling the power supply (includes pics of just the supply itself).
  • A manual for newer versions of the AM503 (AM503B and AM5030)
  • Website which shows a picture of the inside of the FG504, all through-hole and some crazy looking traces.

Want to see some more Vintage Tek Gear? Check out my new post on the 576 Curve Tracer.


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.


Transistor Latching Circuits: Improvement

This journey began back in Part 1 with me discussing the theory behind the transistor latch used by Dino at Hack a Week back in August.  Next it progressed to recreating Dino’s circuit using components I had on hand in Part 2.  Originally, the circuit I built didn’t work at all and I was able to narrow the problem down to leakage current in the base of the transistors.  Knowing what I was up against finally, our story concludes as I set out to improve upon the latching circuit.

Figure 3: Transistor Latch Using FETs

Figure 3 shows my first method of improving the transistor latch, losing the BJTs all together.  Since the 2N3904s and 2N3906s were drawing too much leakage current in the first place and setting off the latch randomly I decide they had to go.  What type of transistor could I use instead of a BJT that draws little to no leakage current?  Why a MOSFET of course. The gate leakage current of the only FETs I had on hand, the ALD1103 transistor array, was spec’d between 1 and 50pA, orders of magnitude less than the BJTs used before.  Surely such a small current wouldn’t cause the latch to turn on when it wasn’t supposed to.  After breadboarding the revised circuit using the ALD1103 I found that the circuit was much more consistent in its operation.  The only real changes to the circuit I had to make were the addition of bypass caps on the supply (not shown above, sorry) and tweaking the value of R8 (boxed in blue above) to 39kΩ.  While the latch worked well enough keeping R8 at 1MΩ I found that lowering its value caused many less false triggers.

Now that I had a functioning latch finally I decided to challenge myself. I wanted to see if I could go back and make a working latch using the “inferior” BJTs.  There were a few ideas floating around in my head on how to go about doing such a thing and Figure 4 below gives my best solution.  Since the base leakage current from Q3 through the 1MΩ resistor was causing most, if not all, of my problems the first time around my focus was now to minimize the effect that leakage could have on the overall operation of the circuit.

Figure 4: Improved Latch Using BJTs

Looking at Figure 4, one can see that R8 has been replaced with a fourth BJT.  Q3 and Q4 (boxed in orange above) form what’s called a simple current mirror (or current source depending on how you want to look at things but I digress) with Q4 configured as a diode connected transistor.  Note that when adding the simple current mirror to the latch the diode connected transistor MUST be located where Q4 is in the circuit.  With the diode connection Q4 acts like a standard diode with its anode at 9V meaning that at least in this application, it always looks forward biased. Diode connecting Q3 instead gives a constant path for current to flow from 9V to ground (via diode connected Q3, R4, and R5) and so the circuit will never turn off.  In an IC this would mean that a start up circuit would be unnecessary (typically a good thing) but in the case of the latch that’s exactly the opposite of what we want.  Placing the diode connection on Q4 means that even though it looks forward biased, current doesn’t flow through that branch of the bias network since the collector of Q1 would float high as Q1 itself is turned off.

Powering up this new circuit showed great improvement over my previous attempts to build a latch using BJTs.  Most of the time the latch was only triggering when I toggled the pushbutton.  With the main leakage problem taken care of I then began to look at Q1.  Ignoring R6 for a moment, Q1 looked an awful lot like how Q3 was configured with the 1MΩ resistor back in Figure 1 which had me thinking about leakage through this transistor.  Reducing the resistance of R5 down to 56kΩ (via trial and error) further improved the circuit’s reliability and I hardly ever saw a false trigger when testing the circuit.  I briefly toyed with the idea of adding a current mirror to the bottom half of the bias network which would remove R5 and R6 and add a fifth transistor but decided against it as I wasn’t quite sure if I could maintain reliable operation by doing so.  Instead, I called it a day, happy that I had successfully challenged myself to build a better circuit.

As a final helpful hint to anyone looking to build this circuit, pay careful attention to how you layout the latch on your breadboard.  Keep your jumpers wires and component leads as short as possible to avoid accidental shorts and reduce any coupling between nodes that may take place. Even though my improved designs functioned much better than the original they still were sensitive to disturbances on their nodes.  While testing the circuit in Figure 4 I rarely, if ever, experienced false triggers when simply pressing the pushbutton after I applied power but probing a node with my multimeter would often be enough to trip the latch and have it turn on.  Other than that, good luck!


Transistor Latching Circuits: Initial Hardware Attempt

In the first part of what’s fast becoming a novel of a blog post I discussed some of the theory behind the transistor latch circuit demonstrated by Dino at Hack A Week back in August.  In this section I’ll discuss what happened when I first attempted to get the circuit working myself. 

Figure 1: Initial BJT Latch Circuit

Here’s a quick recap of what was covered so far about Figure 1:

~ Instead of the BC547 and BC557 BJTs used by Dino I had to use 2N3904s and 2N3906s because that’s all I have available.

~ When C1 is charged pressing the pushbutton switch will cause the LED to latch on.  Pressing the pushbutton when C1 is discharged turns the LED off.

~ The area in the yellow box can be views as a bias network similar to one that may be used on an IC.  It has two desired state of operation, off and on which is why it was chosen for a latching circuit.

~The rest of the circuit forms a start up/shut off circuit which is used to snap the bias network into either one of its two states of operation.

Immediately upon firing up the circuit once it was breadboarded I saw a problem.  The LED lit right away and pressing the switch did nothing to turn it on or off (though occasionally it would flicker).  Probing the circuit with my multimeter I discovered that something was causing the three transistors to turn on independently of whether or not the pushbutton was pressed.  All three VBE voltages (VEB technically for Q3) were sitting solidly at 0.7 V which was more than enough to turn them on.  Checking the voltage on C1 showed it to be in the low millivolt  range which could be expected since Q2 was turned on.

In order to check for an error on my part when wiring the circuit together I then broke it up into three separate networks and tested each one individually. Network 1 consisted of the start up circuitry Q2, R1, R2, R3, and C1 which on its own properly charged and discharged the cap when Q2′s base was tied low or high.  Networks 2 and 3 were each a single string of the bias network with the bases of each transistor kept floating for testing purposes.  The LED load and pushbutton were removed during these tests.  On their own, each section of the circuit worked as I expected it to and it was only when the entire circuit was wired together that something was going wrong.

Leafing through Chapter 4 of Gray and Meyer again I recalled that these types of bias networks operated as a positive feedback loop. Basically, all it takes is a small disturbance on one of its nodes to cause it to turn fully on. The addition of a start up circuit is merely insurance that the small disturbance occurs every time power is applied.  Okay, I thought, what could be disturbing a node so much that the circuit would self start?  Perhaps it was the way I was applying power, some initial surge of current?  I had a 9V battery with a snap connector from Radio Shack on it to connect the battery to my breadboard and was just plugging and unplugging the positive lead when I wanted the circuit on or off, maybe that was doing it?  I tried slapping a few 1µF bypass caps to the 9V rail to improve circuit by smoothing out any initial pulses. It didn’t work but proper bypassing is always good practice so I left the capacitors on the board anyways.

At this point I was getting stumped so I started going back over each piece of the circuit again looking for clues. Something was nagging me about Q3 and R8 (outlined in green in Figure 1) but I couldn’t quite place it.  Lifting the one end of R8 from the 9V rail caused the LED to turn off but as soon it was reconnected, the LED would instantly turn on.  Ah ha! Something I could work with.  I began to suspect leakage current at this point. My theory was perhaps the base of Q3 was pulling current from the battery through R8 even though the circuit was supposed to be off.  This would cause a voltage to be dropped across R8 which might turn Q3 on just enough for the circuit to drive itself out of the off state.  Making R8 smaller should help alleviate this problem, less resistance, less voltage drop, and Q3 is not turned on as much.  I tried various values of R8 between 1kΩ and 1MΩ before finding a sweet spot between 30kΩ and 50kΩ.  Less than 30kΩ and the circuit would never turn on, greater than 50kΩ and it would never turn off.  Even in the sweet spot however the circuit was finicky and would often refuse function properly.  I had improved things but I still wasn’t satisfied.

To further try to prove my theory I studied the datasheets of the BC557 and the 2N3906.   I was thinking that Dino’s transistors had to be drawing less base current than mine which would explain why most of the time his circuit was working and mine wasn’t.  Sure enough the 3906 was drawing just over 3 times as much current in the off state than the 557 (see Figure 2 below).  As far as I could tell, the increase in off-current for the 3906 was enough to barely turn on Q3 which would then cause the positive feedback of the bias network to drive the circuit fully on.  Feeling validated, I then set out to improve upon the circuit with the components I had available…

Figure 2: Off State Base Current Comparision


Transistor Latching Circuits: Theory

Back in August Dino published a latching circuit made from BJTs over at his blog Hack A Week.  In his video Dino made a comment or two on how the circuit was a little finicky and adding a capacitor from the +9 V rail to the output node seemed to help things though he didn’t understand why.  I took an interest in the circuit and spent some time prototyping and refining the design.  I did succeed in tweaking the circuit for the better but I never did figure out why Dino needed the extra cap in his build. During my tests I found no difference in performance by having the capacitor in place and so it’s labeled as an optional component in my schematics. Read on for my analysis on the transistor latch.

Figure 1: BJT Latch Circuit

Figure 1 displays my initial attempt to copy Dino’s latch circuit; I didn’t have any BC547 or BC557 BJTs on hand when breadboarding the circuit so I turned to the ever popular 2N3904 and 2N3906 instead.  Ignoring the two colored boxes for now let’s discuss how the circuit is supposed to operate.  When power is first applied all three of the transistors are off and the LED on the output is unlit as both it’s anode and cathode are at 9V (Q2 being off causes the output at it’s collector to rise to 9V through the two pull up resistors).  Capacitor C1 also begins to charge to 9V through the two 470kΩ resistors R1 and R2.  Toggling the pushbutton switch momentarily causes the voltage across R5 to be equal to that of C1 which causes Q1 to turn on.  Q1′s collector is then pulled low which pulls the base of Q3 low turning it on.  The LED, with its cathode now close to ground, turns on. Q3′s collector is now close to the supply voltage turning on Q2.  At this point the voltage at the R5-R6 node is high enough to keep Q1 turned on and the circuit “latches” keeping the LED on.  With Q2 turned on, C1 discharges through R2 and eventually sits at 0V.  Toggling the switch again pulls Q1′s base low turning it off and causing a domino effect around the loop, latching the circuit in the off state.

My first impression upon studying this circuit was that closely resembled a bias network that I had seen in my IC design classes at school and so I went to my stack of books to refresh myself.  Sure enough, in Chapter 4 of Gray and Meyer there were all sorts of circuits that were similar in form to the yellow boxed in section of Figure 1.  It was official, the yellow boxed in area is a form of bias network which would be used in IC design as a support circuit so to speak to develop a key voltage or current needed to bias a transistor along the signal path somewhere else on chip.

The rest of the components form what’s known as a start up circuit.  Bias circuits themselves tend to have two different operating points; one is the operating point set by the designer and the second is off.  When designing an IC, having it fail to turn on when power is applied is generally a bad thing.  Start up circuits are used to prevent this from happening by providing a temporary kick to one the nodes in the bias circuitry before shutting themselves off.  After this initial disturbance, the bias network turns itself full on via positive feedback found inherently in the bias loop itself.  In an actual IC the pushbutton switch and Q3 could be replaced with a single diode and C1 replaced with a string of diodes but that’s a post for another time.  The circuit in Figure 1 requires the user, through the form of the pushbutton, to provide the needed kick from the start up circuit to get the bias network of Q1, Q3, and associated resistors to the desired operating point, though I guess in this case it would be a start up, shut off circuit…

Well this post has certainly turned into a much longer article than I expected it to. I haven’t even begun to talk about the actual results I got in hardware. I guess I have a lot to say about the intricacies of transistor circuits.  Sorry, it’s kinda my thing.  I realize that I kind of glossed over how positive feedback affects the bias loop but the actual analysis is rather in-depth, complicated, and involves a lot small signal analysis (I don’t know if I fully understand more than the basics of it myself either).  Hopefully I’ve made my descriptions relatively clear, if not just let me know and I’ll attempt to fix them.  I’ll discuss the hardware results in a new post to break things up a bit.


Follow

Get every new post delivered to your Inbox.