Monday, November 11, 2013

Voltmeter wiring correction at the Museum of Science

Yesterday, the family and I spent the morning at the Museum of Science, and the kids wanted to revisit the Discovery Center (mentioned in this post). With mild trepidation, I approached the second floor to see the circuits display, and I was pleasantly surprised, thrilled actually, to see that the wiring error had been fixed!

Close-up of the meter connections...
The voltmeter and ammeter are no longer in series! Very nice. I admit that I didn't think it would be fixed, based on the rationalizations in the comments of the last post, but I am very happy to see that it has been. Score one for engineering education! (By the way, it is a fun exhibit; my daughter really liked it.)

Tuesday, May 14, 2013

Voltmeter wiring error at the Museum of Science

UPDATE: Fixed!

This post isn't really about EE Prototyping, but it is about electrical engineering education, so I will post it here.  I spent Mother's Day at the Boston Museum of Science with my wife and kids. The kids had a blast, and we all had a great time, except for one thing...

In the "Discovery Center" there was a fun little electricity demo that let you construct simple parallel and series circuits with some magnetic, conducting building blocks.  There was a light bulb block, a buzzer block, and an LED block (that glowed green when the current flowed in one direction and glowed red when the current flow in the other).  Neat exhibit.  The power supply was mounted above the desk with the circuit blocks, and it let you choose to power your circuit with two, four, or six AA batteries.  A large knob in the center of the panel selected the power source, and two analog meters displayed the voltage and current.

Here's the setting for 3V output (2 AA cells):

Here's the setting for 6V output (4 AA cells):

Here's the setting for 9V output (6 AA cells):

See the problem? The voltmeter and the ammeter are both wired in series.  As connected, this circuit couldn't possibly work!  Here's a clearer schematic:

WRONG. The ammeter measures the current through the batteries, but the voltmeter must measure the voltage ACROSS them.  The voltmeter should be connected in parallel with the batteries, not in series. The panel should be wired like this schematic:

Better yet, to emphasize that voltage is measured across the power source, and that current is measured through it, the panel should be redesigned to look like this schematic:

Of course, the orange wires in the display case are just representational, and the batteries shown aren't really connected to anything (there is a wall-powered power supply behind the panel), but this error in the connection of the voltmeter should be embarrassing.  This exhibit would be a good chance to discuss "across" variables and "though" variables to more advanced students, but the "artist" who designed the panel blew it.

So sad.

UPDATE: See the responses in the comments below.


Monday, March 11, 2013

Lab 4 layouts

The students have done a great job on the layouts for a wide variety of circuits from the Application Notes of Jim Williams. Here's a few of the projects:

Tachless motor speed controller (App Note 11, page 8)

Stabilized sine-wave generator (App Note 98, page 3)

Low-distortion sine-wave oscillator (App Note 43, page 33)

High-speed avalanche pulse generator (App Note 47, page 93)

Fast response V/F converter (App Note 14, page 4)

The Zoo Circuit, a micropower V/F converter (App Note 23, page 11)

The boards are on order, the parts are on order, and we're all looking forward to assembling the projects!

Tuesday, February 19, 2013

Lab 4

Forward Engineering. Using one of the schematics listed below, design a printed-circuit board to build a working copy of the circuit. Assignment:
  1. Look up the referenced Application Note and read the description of the circuit
  2. Compile a bill of materials and find sources for all the parts (including stock numbers and cost)
  3. Enter the schematic into the layout tool
  4. Produce the necessary PCB layout files for fabrication
  5. (Optional) Simulate the circuit in LTSpice (there are fewer weird ICs here)
The following circuits were all designed by Jim Williams, and the schematics appeared in application notes published by Linear Technology.
  • Tachless motor speed controller (App Note 11, page 8)
  • Fast response V/F converter (App Note 14, page 4)
  • Single-cell V/F converter (App Note 15, page 1)
  • Low-distortion sine-wave oscillator (App Note 43, page 33)
  • Complete AM radio station (App Note 47, page 52)
  • High-speed avalanche pulse generator (App Note 47, page 93)
  • Triggered pulse generator (App Note 61, page 21)
  • Stabilized sine-wave generator (App Note 98, page 3)
  • Output-leveled noise generator (App Note 106, page 11)
In choosing a circuit, be sure that you can find all of the necessary components.  Some parts my be substitutable, some may not.  If you have any questions about part substitutions, please ask. 

For a more complicated project, the following circuits provide additional challenges.
  • King Kong V/F converter (App Note 14, page 2).  The output frequency goes up to 100 MHz, and this circuit leverages fast components and requires careful high-speed layout.
  • Op amp with 120-volt output stage (App Note 18, page 7). With lethal voltages present, this circuit requires careful layout and construction to prevent circuit damage and engineer injury.  If you choose this circuit, power the circuit from a lower voltage (like plus/minus 48V) for initial testing.
  • Son-of-Godzilla amplifier (App Note 21, page 8). This amplifier has a bandwidth over 100 MHz and a tendency to destroy itself. Read the adjustment procedure carefully.
  • The Zoo Circuit, a micropower V/F converter (App Note 23, page 11).  The development of this low-power circuit is also described in one of his books.
  • 28VDC-to-110VAC sine-wave power converter (App Note 35, page 15). Again, with lethal voltages present, this circuit requires careful layout and construction to prevent circuit damage and engineer injury.  If you choose this circuit, power the circuit from a lower voltage (like plus/minus 48V) for initial testing.
  • Substitute 2N3904 transistor for 2N2369 (for now, try other substitutions later)
  • Substitute 1N5711 Schottky diode for HP5082-2810

Monday, February 11, 2013

Op-amp applications

Today's lecture is a review of op-amp applications. There are several good references:
Here is a list of circuits you should know (and other interesting circuits):
  • Inverting and noninverting amplifiers
  • Summing amplifier (multiple inputs)
  • Differencing amplifier (two inputs)
  • Instrumentation amplifier (three op amps)
  • Integrator
  • Noninverting integrator
  • Single-pole low-pass filter
  • Single-pole high-pass filter
  • Differentiators don't work (*)
  • Lag and lead transfer functions
  • Negative impedance converters and gyrators
  • Low-pass and high-pass Sallen-Key filters
  • Analog computer block diagrams, which lead to...
  • Kerwin-Huelsman-Newcomb (KHN) biquad circuit
  • Tow-Thomas biquad circuit
  • Full-wave rectifier
  • Logarithm and exponential circuits
  • Temperature-compensated logarithm and exponential circuits
  • Multipliers (log/expo, light-bulb, servomotor, quarter-square, and PWM)
(*) Note that the simple differentiator circuit (input capacitor and feedback resistor) doesn't work because the op-amp feedback loop is unstable (there isn't enough phase margin). The TI Handbook says:
It should be mentioned that of all the circuits presented in this section, the differentiator is the one that will operate least successfully with real components. The capacitive input makes it particularly susceptible to random noise...
The first sentence is correct, but the second sentence is wrong. It's not a "random noise" problem, it's a loop-stability problem. The resistor and the capacitor introduce a low-pass filter in the feedback path, which reduces the phase margin (close to, or even below, zero degrees) of the op-amp loop.


Thursday, February 7, 2013

Resistors and capacitors

Some notes on specifying passive components. Resistors and capacitors come in a wide variety of options.

For example, resistors types include thick film (resistive ink on ceramic), metal film (nichrome), carbon film, carbon composition, and wirewound. Important specifications and parameters include the power rating (constant power and pulse handling), tolerance, temperature coefficient, and voltage coefficient (nonlinearity). Notable parasitics are the series inductance, the parallel capacitance, thermocouple effects, and excess noise. See references [1] and [2].

Let's look at an example of specifying a resistor part: Panasonic thick-film chip resistors (ERJ series)
  • E24 and E96 series values
  • Sizes: everything from 01005 to 2512
  • Power: 1/32 W to 1 W (based on size)
  • Tolerance 0.5% or 1%
  • Temperature coefficient: 50 ppm/C to 300 ppm/C
  • Operating temperature range: −55C to +125C or +155C
Decoding the part number:

Maximum power rating is a function of package size (and type, tolerance, and temperature).  The power in a resistor is P = V2/R. Thus, the maximum voltage that can be applied across a resistor is a function of its power rating V = sqrt(PR).  For a 01005 resistor (0.031 watts) with value 100 Ω, this limit is only 1.7 volts. For a 2512 resistor (1 watt) with value 1 MΩ, this limit is 1000 volts.  However, the package may have a much lower maximum voltage rating (in this case, the limiting element voltage (LEV) is 200 volts).  The rated continuous working voltage (RCWV) is the lower of the two numbers sqrt(PR) and LEV.

The maximum power rating has to be derated above 70C.

Most Unnecessary Disclaimer Award: "These products generate Joule heat when energized. Carefully position these products so that their heat will not affect the other components."

Capacitors can be friend or foe. There are many different varieties of capacitors, and they all have their own strengths and weaknesses. See references [1] and [2].  There are a large number of properties that we can use to compare capacitors, including value, voltage, size, self time constant, temperature coefficient, dielectric absorption [3], effective series resistance and, of course, cost.

The choice of dielectric has a big effect on the quality and properties of the capacitor.
  • Bypass types: aluminum electrolytic, tantalum electrolytic, high- K ceramic
  • Filter types: NPO ceramic, polycarbonate, polyester
  • Sample-and-hold types: teflon, mica, polystyrene, polypropylene
In App Note 47 [4], Jim Williams has some warnings about bypass capacitor types (see pages 25 and 26). Figure 60 is downright scary.

Be aware of the effects of voltage and temperature.  Some types of capacitors undergo huge variations over the range of operating voltage and temperature (these plots are from the LT1763 datasheet). Note the huge variation of Y5V types.

Example 1: AVX tantalum capacitors (TPS series, low ESR)
  • Values: 0.15 μF to 1500 μF (E6 series, 1.0 1.5 2.2 3.3 4.7 6.8)
  • Sizes: 0805 to 2924 (see table of custom case codes)
  • Voltage: 2.5 V to 50 V (derate by 2/3 above 85C)
  • Tolerance 10% or 20%
  • Effective series resistance (ESR): 0.03 Ω to 9 Ω (see chart)
  • Operating temperature range: −55C to +125C
Datasheet tour:
  • Table of case sizes
  • Decoding the part number
  • Rated voltage and surge voltage (and derating)
  • Table of capacitance, voltage, and ESR
  • DCL, DF, ESR, RMS current, and RMS voltage
Example 2: Murata chip monolithic ceramic capacitors (datasheet dated Oct. 1, 2012).  Start with decoding the part number, for example GRM188R71E153KA01D:
  • GRM tin-plated layer capacitor
  • 18 size 1.6x0.8mm (0603)
  • 8 thickness 0.8mm
  • R7 temperature X7R type −55C to +125C, change ±15%
  • 1E rated voltage 25V
  • 153 capacitance 15,000 pF (E6 series)
  • K tolerance ±10%
  • A01 internal specification code
  • D paper tape
Datasheet tour:
  • Decoding the part number, pages 15–17
  • Actual capacitor listed on page 70
  • Temperature characteristics, page 119
  • Soldering and mounting, page 129


[1] James Bryant, Walt Jung, and Walt Kester, "Passive components," in Op Amp Applications, Walter G. Jung, Ed. Norwood, Mass.: Analog Devices, 2002, ch. 7-1, pp. 7.1–7.24.

[2] Robert A. Pease, Troubleshooting Analog Circuits. Boston: Butterworth-Heinemann, 1991.

[3] Robert A. Pease, "Understand capacitor soakage to optimize analog systems," EDN, p. 125, Oct. 13, 1982.

[4] Jim Williams, "High speed amplifier techniques: A designer’s companion for wideband circuitry," Linear Technology Corp., Milpitas, Calif., Application Note 47, Aug. 1991.

Tuesday, February 5, 2013

Lab 3 part 1

The reverse engineering got off to a great start yesterday. Here's some quick photos of the students tearing into their chosen projects. (More updates later.)

Monday, February 4, 2013

Lab 3

Reverse Engineering: Take apart and fully document a piece of commercial electronics (provided). Assemble a complete documentation package describing the circuit, components, and behavior of the object. Deliverables (as a web page):
  • Basic test results showing behavior
  • Block diagram of system
  • Bill of materials of all parts
  • Complete schematic of circuit
  • Working LTspice or Matlab simulation (matching the test results)
Here are some candidate objects, in rough order of complexity.

Danelectro FAB pedals (D-1 through D-6): distortion, overdrive, metal, echo, chorus, and flange.

Joyo guitar pedals: phaser, tremolo, and octaver (JF-06, JF-09, and JF-12); and Behringer guitar pedals: slow motion, tremolo/pan, and vibrato (SM200, TP300, and UV300).

Korg Monotron variants: Monotron Duo (two VCOs) and Monotron Delay (with echo).

Saturday, February 2, 2013

Oscilloscope overdrive

Here's the oscilloscope problem that I was describing in class. If ANY part of the waveform is off the screen, you can't trust the results. Here's an example using a TDS3012B oscilloscope. As we saw in class, the falling edge of the square wave exhibits a little undershoot. At 500 mV/div, the undershoot appears to be about 800 mV (at the bottom of the screen). Note that some of the four-volt square-wave waveform is off the top of the screen.

However, if we move the trace up to the top of the screen, now the undershoot appears to be about 1400 mV (note that the vertical scale is still 500 mV/div).

The only change between these two screenshots is a small rotation of the vertical-position knob. When a large part of the waveform is off the screen, the oscilloscope's vertical amplifier is driven into saturation. When the trace returns to the screen, the increased undershoot is actually the recovery transient of the vertical amplifier. If ANY part of the waveform is off the screen, you can't trust the results.

Thursday, January 31, 2013

Bills of material

Here's a schematic for a simple 5V-to-3V linear regulator than includes input and output filtering (you can click on the figure for a larger version).

The above schematic includes component values, reference designators, part numbers (where appropriate), signal names, and connector pin numbers. However, to actually buy the parts and build the circuit (particularly if someone else is going to buy and build), you need more information. A bill of material (BOM) is a complete list of parts in your project. For example, for the above circuit (again, click on the table for a larger (more readable) version).

As shown here, the BOM must include
  • Line number (for reference)
  • Quantity
  • Manufacturer
  • Manufacturer's part number (complete with all suffixes)
  • Description (standardized, see below)
  • Package (form factor or layout-footprint cell name)
  • Reference designator(s)
  • URL or filename of datasheet (or a copy in the documentation zip file; the PDF version of this BOM includes links to datasheets)
The description line should include the important component parameters, such as value (of course), material composition, power or voltage rating, tolerance, and any other necessary specifications (like temperature range, temperature coefficient, ESR, frequency range, etc.).

Optional, but helpful for small production runs, are columns including retailer, retailer stock number, and cost (for example, item number 4, Digikey, 478-1751-1-ND, $0.77 each).

Getting the manufacturer’s part number correct (complete with all suffixes) is really important.  Here's the part-numbering table out of a Texas Instruments data sheet.

Not only does part number determine the package of the component (like SOIC or TSSOP), but it also determines the number of parts in a shipping package (tube of 25 or reel of 2500). Note the embarrassment that you would suffer if you needed ten tubes of SN74HCT00D, but accidentally ordered ten of SN74HCT00DR (or vice versa).

For volume production, you also may want to include information such as
  • Is this part substitutable?
  • Minimum order quantity
  • Lead time for delivery
  • Internal tracking number
On his blog, Andrew "Bunnie" Huang has a great series of posts on volume production in China called "The Factory Floor". The first installment is the most applicable to this course, but all four parts are a informative read.
Also, don't miss his excellent investigation into some "grey market" MicroSD cards that found their way into his supply stream.

Wednesday, January 30, 2013


Some comments about schematics. First of all, neatness counts! You are not Jim Williams [1].

A good art department can help [2]. This schematic is much clearer (but there are still some problems).

Some people are natural artists [3], but you are not Bob Pease.

Find a drawing package that you like and learn how to use it. Personally, I like xcircuit. Whatever you choose, strive for clarity and accuracy.

An important point in drawing schematics is that crosses never connect and connections never cross. Never draw a four-way connection: it is too easy for a crummy photocopy, or a printing error, or an absent-minded artist to forget a dot (or add a smudge) and change the function of your circuit. Despite the three examples above (all of which have dots at crosses), dots at crosses are technically wrong (both IEEE standards and MIL standards strongly advise against it).

If you don't follow this advice, you can end up with errors like this schematic [4]:

There is a missing dot from the four-way junction on the negative-input terminal of the op amp.  The feedback capacitor and the two resistors should be connected to the op amp, but since the artist forgot the dot, the schematic is incorrect.  With properly drawn connections, dots are redundant, and a missing one doesn't spell disaster.

Some best practices for schematics:
  • Make circuit functions clear and unambiguous
  • Group functional blocks together and label them
  • Signals usually flow left-to-right, current usually flows top-to-bottom
  • Label important signals and show important waveforms
  • Label parts with reference designators, types, values, polarities, etc.
  • For many-pinned components, label pin numbers (outside) and signal names (inside)
  • Show all power connections and the disposition of unused inputs
  • Be consistent
In general, err on the side of too much information (without getting cluttered). There is some more good advice in Appendix E of [5].

Tektronix produced beautiful schematics in their oscilloscope service manuals. This calibrator schematic shows bias voltages and well as waveforms at important points in the circuit. Very nice!

Some more good schematic style
  • Reference designators are often italicized, but units are not: R2 = 47 kΩ and CF = 22 nF.
  • The names of units are not capitalized if spelled out: volts, ohms, farads
  • Always use a leading zero in front of a decimal point: C1 = .1 μF (no!), C1 = 0.1 μF (yes). As MIT Professor Henry Kendall told me in Junior lab, "Always use a leading zero, so you can tell the difference between a fraction and fly shit."
  • Some engineers replace the decimal point with an SI exponent abbreviation. Thus, the construction "1k5" is an abbreviation for 1500. For example: R4 = 6k8 = 6.8 kΩ and C2 = 3n3 = 3.3 nF
This last point has been significantly abused since the year 2000. Note that, according to the title, the following video game takes place in the year 2900. (I am surprised that Kevin Garnett is still popular in over eight hundred years, and I am disappointed by the lack of robots playing basketball. Are they all playing soccer?)

I'll discuss bills of material in the next post.

[1] Jim Williams, "Max Wien, Mr. Hewlett, and a rainy Sunday afternoon," in Analog Circuit Design: Art, Science, and Personalities, Jim Williams, Ed. Boston: Butterworth-Heinemann, 1991, ch. 7, pp. 43–55.

[2] Jim Williams, "Bridge circuits: Marrying gain and balance," Linear Technology Corp., Milpitas, Calif., Application Note 43, Jun. 1990.

[3] Bob Pease, "A tale of voltage-to-frequency converters," in Analog Circuit Design: Art, Science, and Personalities, Jim Williams, Ed. Boston: Butterworth-Heinemann, 1991, ch. 29, pp. 349–360.

[4] Jim Williams, "Some techniques for direct digitization of transducer outputs," Linear Technology Corp., Milpitas, Calif., Application Note 7, Feb. 1985.

[5] Paul Horowitz and Winfield Hill, The Art of Electronics, 2nd ed. Cambridge: Cambridge University Press, 1989.