A Real-World Look at Lighting

Living on a granite hill during a thunderstorm gave Circuit Cellar founder Steve Ciarcia new respect for Mother Nature. In a classic 1998 article, Steve described how he worked with Circuit Cellar columnist Jeff Bachiochi on a solution to automatically unhook their appliances when large storms hit.

Steve writes:

Without a source for a reasonably priced “thunderstorm switch,” Jeff and I decided to make one. Conceivably, all it would take is a lightning sensor, decision logic, and a means to connect and disconnect the attached equipment …


An optically isolated pulse transmitter is connected to a low-cost McCallie Manufacturing lightning sensor mounted on a grounded pole on the roof.

The energy propagated from the current flow of a lightning strike contains wideband energy. Everything from 100 Hz to 100 MHz is produced. Emissions below 100 kHz travel along the wave guide formed by the earth’s surface and the lower ionosphere. With respect to the earth (ground), the air around the strike becomes charged, and there is a direct relationship between the amount of charge and the distance from the strike.

We located a minimum-cost lightning sensor from McCallie Manufacturing. Of the two models available, we chose the LSU2001, which is priced around $50. Simple circuits are also provided for adding a meter or LEDs to monitor live data, or you can connect the sensor through an optocoupler to a PC. Optional software lets you count and graph storm data (providing you wish to keep the PC on day and night).

The hits-per-minute converter also generates a “lightning alarm” output. This signal causes the circuit to physically disconnect the AC power, cable, and phone-line connections to the protected appliance.

The hits-per-minute converter also generates a “lightning alarm” output. This signal causes the circuit to physically disconnect the AC power, cable, and phone-line connections to the protected appliance.

The manufacturer suggests mounting the LSU2001 on a well-grounded metal pole. The higher above ground it’s mounted, the farther away you’ll be able to detect lightning strikes. Sensitivity is related to the differential charge between the air and ground—about 0.15 V/m. Put it twice as high, and it will be twice as sensitive.

Read the entire article from Circuit Cellar 90, 1998.

How-To Guide for Timing Analysis

Although many young engineers have been taught excellent circuit design techniques, most haven’t been schooled about the importance of timing analysis. What is timing analysis? Why is timing analysis important? How do you perform timing analysis? Philip Nowe’s Circuit Cellar 160 article covers the essentials.

As a hardware designer and manager, I’ve noticed that many electrical engineering students are often missing something when they begin their first full-time jobs. They’ve been taught how to design great circuits, some of them quite complex, but they haven’t been taught the importance of timing. What does timing analysis mean? Why is timing analysis important? How is it done? In this article, I answer these questions. In addition, I present you with a real design problem that was solved with timing analysis. So, here we go!


There are a couple of reasons for performing timing analysis. First and foremost, it can be used to verify that a circuit will meet all of its timing requirements. Timing analysis can also help with component selection. An example is when you are trying to determine what memory device speed you should use with a microprocessor. Using a memory device that is too slow may not work in the circuit (or would degrade performance by introducing wait states), and using one that is too fast will likely cost more than it needs to.


Timing analysis is the methodical analysis of a digital circuit to determine if the timing constraints imposed by components or interfaces are met. Typically, this means that you are trying to prove that all set-up, hold, and pulse-width times are being met.

A minimum or maximum digital simulation is not actually the worst-case analysis. That is what a number of entry-level engineers believe. The worst-case analysis takes into account minimum delays through some paths and maximum delays through other paths. For instance, the worst-case set-up timing with respect to flip-flop B in Figure 1 would be the minimum delay to the clock input combined with the maximum delay to the data input of flip-flop B.

Figure 1: The simplified digital circuit contains delays in the data and the clock paths. The timing values are shown in Table 1.

Figure 1: The simplified digital circuit contains delays in the data and the clock paths. The timing values are shown in Table 1.

Let’s assume the timing values in Table 1 are for the circuit elements in Figure 1. Do you think that there is a problem with these values? Take a look at this circuit in a waveform view in Photo 1. Notice that the bottom of the photo shows the parameters used in determining the set-up time and hold timing. Red indicates that a condition has not been met. If the setup time is read and has a margin of –1, the set-up time has not been met and is off by 1 ns. The hold time indicates that there is 1-ns margin.

Table 1: Here are the timing values for the circuit illustrated in Figure 1.

Table 1: Here are the timing values for the circuit illustrated in Figure 1.

In Photo 1, the gray areas of the waveforms indicate the uncertainty of when the edge occurs. Notice that the output of logic gate 2 has the largest uncertainty, because the uncertainty is cumulative as you go through a delay chain.

Photo 1: I used Timing Diagrammer Pro for the timing analysis of the simplified digital circuit. Note that the gray areas on the waveform denote regions of uncertainty. The red areas show a timing violation.

Photo 1: I used Timing Diagrammer Pro for the timing analysis of the simplified digital circuit. Note that the gray areas on the waveform denote regions of uncertainty. The red areas show a timing violation.

So, the delay at the output of logic gate 2 is equal to the delay from CLK A to Q of flip-flop A as well as the delays through logic gates 1 and 2. Note that the waveform also uses color highlighting to indicate that constraints are not being met.

Download the entire article.

Altium Launches Open Beta Program for PCB Design Tool

Altium recenlty announced an open beta program for its community-driven PCB design tool. CircuitMaker is intended to address the unique needs of the electronics maker and hobbyist community with a free software offering. Anyone interested in participating in the open beta can register now at CircuitMaker.com.open-beta-Altium

The open beta testing program enables designers to immediately download and begin using CircuitMaker while joining a collaborative electronics design community. The open beta process will also provide feedback and input to refine CircuitMaker.

CircuitMaker will be available at no cost to anyone interested in using the software, with no limits to design capability. This PCB design tool from Altium offers a polished and streamlined design tool for the maker community with features such as:

  • Comprehensive PCB design technology — Built from the foundation of existing Altium technology, all of the typical features needed for modern PCB design are built in to CircuitMaker. This includes schematic-PCB integration, interactive routing, and output generation tools.
  • Advanced community collaboration — With CircuitMaker, designers have the opportunity to collaborate in a community-driven design environment, with unlimited access to contributed design and component data. This collaboratively design process is made possible by combining an advanced, cloud-based platform and an industry-standard user experience in a native application-based design environment.
  • Streamlined interface — CircuitMaker is a native application, and provides a streamlined interface, allowing new and casual designers to create designs quickly. This removes the traditional, time-intensive learning curve usually required for new PCB design tools.

Open beta registrations for CircuitMaker begins today, and is freely available worldwide to all interested electronics designers. Those interested can register now for the open beta at the CircuitMaker website.

Source: Altium

Tips for Measuring Small Currents

Most inexpensive hand-held multimeters have measurement ranges from several amps to single-digit milliamps. While generally handy, such meters are insufficient for sensitive current measurements. There is a solution though. With the following project, you can extend the current measurement range from milliamps down into the nanoamp and picoamp range with simple, low-cost circuits.

In his January 2015 article (Circuit Cellar 294), David Ludington writes:

Most inexpensive hand-held multimeters have current measurement capability. The measurement range for these meters extends from several amps down to single-digit milliamps and sometimes into the microamp range. While this measurement capability is sufficient for many applications, there are times when more sensitive current measurement is required. There are meters available which measure much lower levels of current, but these meters are also more expensive and are often dedicated to just this one measurement function.

The goal of this article is to extend the basic hand-held current measurement range from milliamps down into the nanoamp and picoamp range with relatively simple, low-cost circuits. First, I’ll describe several types of current sources with their relevant performance characteristics that affect measurement circuits. Then, I’ll present practical circuits that deliver high performance at low cost. Each of these circuits will be analyzed to determine what level of measurement performance can be expected. General design issues common to all of the circuit techniques will also be discussed and recommended circuit component and layout techniques will be provided. Finally, two of the circuits will be discussed that were built and tested to demonstrate the desired goal of measuring nanoamp and picoamp currents.


Figure 1 shows several types of current sources. Figure 1a is the symbol of what electrical engineers call an ideal current source. It can have any level of current at the output and the output impedance is infinite. The result is that the output current is not affected at all by the characteristics of the measurement circuit. Of course no actual current source is ideal, but this is still a useful concept for approximating actual circuits and is used as a source in circuit simulation programs such as PSPICE.

Figure 1: The current sources: ideal (a), semiconductor (b), and resistive (c)

Figure 1: The current sources: ideal (a), semiconductor (b), and resistive (c)

Figure 1b shows a current source which uses semiconductor transistors (either bipolar or FET). In this circuit, the output impedance is not infinite but can still be quite high (megohms). This means that varying voltages at the collector of the bipolar transistor or drain of the FET transistor have little effect on the output current as long as the voltage is not large enough to affect transistor operation.

Figure 1c is the least ideal of the current sources. The current is generated by the voltage difference across the resistor R2. Any measurement voltage developed by the measurement circuit directly affects the voltage difference across the source resistor. This changes the current that is measured which can result in measurement error. Having said that, Keithley Instruments in Low Level Measurements Handbook (6th edition, page 2-20) uses this current source model in defining what they call the feedback ammeter (also transimpedance amplifier). It may well be that, in real-world circuits, this model is the one that describes the majority of practical applications.

Although the current sources just described are not part of the measurement circuit itself, it is helpful to understand their limitations so that the measurement circuits can be designed to disturb the current source as little as possible. In this way, measurement error is minimized.


In the past, current was measured directly with a moving coil meter. Now using semiconductor technology, voltage is the parameter that is measured directly. The current to be measured is first converted to a voltage by flowing through a load resistor. The resultant voltage is then measured and along with the load resistor is used to calculate the input current.

Figure 2: Current measurement circuits: resistive (a), transimpedance (b), and integrator (c)

Figure 2: Current measurement circuits: resistive (a), transimpedance (b), and integrator (c)

Figure 2 and Figure 3 show several circuit techniques which are used to convert current to a voltage. Figure 2 shows the basic techniques, while Figure 3 shows modifications to two of these basic circuits, which give more accurate results and extend the measurement range. The symbol for the input current used in these circuits is the same as the symbol for the ideal current source used in Figure 1; but in this case, it is used to show where the input current connects to the measurement circuit and can represent any of the described current sources.

Figure 3: Modified current measurement circuits: modified resistive (a) and modified transimpedance amplifier (b)

Figure 3: Modified current measurement circuits: modified resistive (a) and modified transimpedance amplifier (b)


Figure 2a is the least complicated of the measurement circuits. In this circuit, the current source is connected to one end of the load resistor R1 and the other end of the resistor is connected to ground or some other reference point. The voltage developed across this resistor is measured with the voltmeter and used to calculate the input current. This circuit is very simple and is often used on the spot with an available resistor for quick measurements at the workbench or in the field.
The voltage that is developed across the load resistor is called the burden voltage. For a current source that is nearly ideal (such as the transistor source), the burden voltage has relatively little effect on the current being measured unless it is large enough to change the internal working of the current source. For resistive current sources, the burden voltage can directly interact with the current source and give erroneous current readings. This occurs because the load resistor becomes part of the current generating resistance which reduces the current. To minimize this interaction, the load resistor should be much smaller that the output resistance of the current source. The corresponding burden voltage will then also be small.
When a simple hand-held voltmeter is used, the measured voltage cannot be too small because these meters rarely measure below 1 mV. Thus, a compromise is needed between measurement accuracy and a low voltage burden.

Most hand-held meters have a 10-MΩ input impedance on the voltage scale. The load resistor R1 will be in parallel with the meter impedance and needs to be selected appropriately to give the desired equivalent measurement resistance. An example in Table 1 shows the resistor values needed to give a measurement voltage of 50 mV for the given currents. This fairly low value of measurement voltage significantly decreases the burden voltage while at the same time providing enough voltage to give measurement accuracy on the order of 10%.

Table 1: Resistor Values versus Input Current for Resistive Circuit (*Rounded off value. Less than 0.1% error.)

Table 1: Resistor Values versus Input Current for Resistive Circuit (*Rounded off value. Less than 0.1% error.)

When making a current measurement with the resistive circuit, it is always a good idea to try several resistors of different values to see what voltage results. If changing resistor values by a certain amount changes the measurement voltage by the same amount, then the source current is not being affected by the measurement (burden) voltage. In this case you can use the higher value of resistance to get more output voltage and more measurement accuracy. Conversely, if the corresponding measurement voltage increases less than the amount of the resistor value change, the source current is being affected by the measurement circuit and the smaller resistor value should be used.
A small modification to the circuit as shown in Figure 3a gives improved performance by removing the burden voltage at the expense of adding a variable power supply. This can be particularly useful as a quick measurement tool using an available workbench power supply. The power supply is adjusted until VOUT is 0 V. The value of the current is then obtained by dividing the measured value of the power supply voltage by the resistance R1. In this way the burden voltage is removed and the load resistor can be increased so that the power supply voltage can be greater than 50 mV. This will give more accuracy in the measurements.
Because VOUT is zero, the leakage current going into the hand-held voltmeter is zero and the finite input impedance (10 MΩ) of the meter does not affect the measurement. Even when VOUT is not exactly zero, the leakage current is still small. For example, for VOUT < 5 mV, the leakage current will be less than 500 pA. This gives measurement accuracy of 1% or better for input currents greater than 50 nA. Since the resistor R1 in this modified circuit is not developing a burden voltage, the resistor value is decoupled from the input current and can be any practical value depending only on the maximum voltage of the power supply.


Figure 2b shows the circuit for a transimpedance amplifier. This is perhaps the most versatile of the current measurement circuits in that it can cover a large current measurement range using a simple circuit. In this circuit, the output from the current source is connected to the negative input of the operational amplifier while the positive input of the amplifier is connected to a reference voltage. This reference voltage is typically the circuit ground when there are bipolar power supplies and some intermediate voltage when there is a single power supply.
The inputs of an operational amplifier have very high input impedances (greater than 1 GΩ) so that little current goes into the amplifier. Thus, the input current drives the negative input toward one of the power supply voltages depending on the polarity of the input current. This causes a voltage difference between the amplifier inputs which is then amplified with the large internal open loop gain of the amplifier. As a result, the amplifier output voltage moves in a direction to provide current through resistor R2 which is opposite to the input current. Equilibrium is achieved when the amplifier output voltage is such that the current through R2 is equal in magnitude to the input current. With an ideal amplifier and no offset voltage, this results in 0 V at the negative terminal matching the voltage at the positive terminal. Only the value of resistance R2 and the amplifier output voltage are needed to determine the input current. Since we know the resistance value and can measure the output voltage, we can calculate the current through R2 which will equal the magnitude of the input current.
Since there is no burden voltage, the input current is not affected by the value of the feedback resistor R2 or the magnitude of the output voltage. The output voltage is constrained by the power supply voltages, but in principle there is no constraint on the value of the feedback resistor. Table 2 shows R2 resistor values for several nominal input currents for an output voltage (VOUT) of 1 V.
As seen in Table 2, the resistor values get quite large for small currents. These large value resistors are expensive and are often also physically large. Also, circuit constraints like stray capacitance can have an appreciable effect on the circuit when the resistor value is large.

Table 2: Resistor values for nominal input currents and VOUT = 1 V

Table 2: Resistor values for nominal input currents and VOUT = 1 V

There are two ways to reduce the resistor value required for a particular input current. One way is to allow smaller voltages than 1 V to represent the input current. This is acceptable as long as all anomalous voltages in the circuit due to circuit imperfections are calibrated out. This calibration can be either physical using potentiometers to cancel offset voltages. Alternatively, data calibration can be used by measuring the output voltage without the input current and then subtracting that data from the output voltage with the input current. Thus, as the input current (and corresponding output voltage) are reduced, the measurement voltage will still have sufficient accuracy.
The second way to measure lower values of current with a lower resistor value is to use the modified transimpedance amplifier shown in Figure 3b. Here, the output voltage is reduced by the voltage divider consisting of R3 and R4 before driving the feedback resistor R2. If the feedback resistor here is the same as the feedback resistor without the divider, the current flowing to the negative input terminal will be less than before. The internal gain in the amplifier will make the output voltage larger to compensate. For a voltage division of 10, the input current is 10 times lower for the same output voltage as before. One caution: although this circuit does give flexibility in the design, care is needed because there is an amplifier voltage gain equal to the divider ratio. The internal offset voltage and noise voltage of the amplifier are multiplied by this amplifier gain along with the current signal.

The complete article appears in Circuit Cellar 294 (January 2015).


DIY Dead Man’s Switch (No Microcontrollers)

A “dead man’s switch” (abbreviated here as DMS) is a very useful device for applications where the effect of forgetting to turn something off ranges from a mild annoyance to costly or dangerous consequences. We first learned about the DMS from a locomotive engineer, who explained vividly that an engineer is supposed to press a button every minute to keep the locomotive going, otherwise the machine stops. Less “dramatic” applications include turning off lights or other equipment after a period of time.

The ideal DMS provides several minutes of “on” time, requires no programming, external controls, additional power supplies and no modifications of the existing equipment. In effect, no changes should occur in the standard operating procedures of using the equipment. To reset the timer from “off” back to “on,” it is desirable to either use a button or just cycle the power.

Ironically, a multitude of electronic timers available online or at home improvement retail stores are highly over-engineered. These timers either require programming of specific date-times to be “ON” or have very long pre-sets, require changes in equipment wiring, etc.


This article presents a DMS design that has been tested and currently in use in two different systems. One is controlling a UV source and another is controlling a hydrogen gas line valve. If someone forgets to turn off the UV source, the repairs are costly. When it comes to forgetting to turn off hydrogen, a violent explosion may happen!

The DMS works as follows. First, there are no microcontrollers—just plain physics. Capacitors C1 (bipolar, electrolytic) and C2 make a voltage divider (see Figure 1). Note this timer was originally designed for the European voltage; however, it is very simple to recalculate the capacitor divider for the US voltage.

Figure 1: This is the timer schematic. The Reset button S1 is optional.

Figure 1: This is the timer schematic. The Reset button S1 is optional.

The voltage is rectified by a bridge and smoothed by C3. The voltage on C3 is approximately 13 V. When the timer is powered on, both capacitors C4 and C5 are quickly charged each to a half of the supply voltage. FET is turned on and relay is engaged. At the same time, the charge begins a slowly redistribution between the capacitors, with C5 discharging via R3 and C4 further charging. Note that diode D1 is not conducting. When C5 is discharged enough, FET is turned off. This causes the relay to disengage. The timer will continue to be in this state as long as the power is provided, because C4 is effectively blocking any current flow. If the power is removed, D1 opens up to discharge C4 via R2. Remember: C5 is already discharged. Thus, the timer is reset to its initial condition. In addition, a manual reset switch S1 is added in case if it is more convenient to reset the timer by pushing a button rather than briefly disconnecting the mains power.


With the indicated components, the “on” time is for approximately 6 minutes. Changing C4 and C5 adjusts the “on” time. Our hydrogen valve control system uses capacitances of 30 µF each, resulting in approximately 25 minutes of “on” time. Note that the capacitances of C4 and C5 must be the same.


Dr. Alexander Pozhitkov has an MS in Chemistry and a PhD in Genetics from Albertus Magnus University in Cologne, Germany. For 12 years he has been involved with interdisciplinary research relating to molecular biology, physical chemistry, software, and electrical engineering. Currently, Dr. Pozhitkov is a researcher at the University of Washington, Seattle. His technical interests include hardware programming, vacuum tubes, and high-voltage electronics.

Hans-Joachim Hamann is a staffer at the Max Planck Institute for Evolutionary Biology.


Diode Bridge Solution (EE Tip #140)

Once I connected a battery up to a DSP in the wrong “direction,” thereby destroying the DSP. That incident drove home the necessity of “suspenders and belt” design.Diode

After the accident, my colleague and I added a diode to the circuit to make it impossible to repeat that mistake. Nowadays, when I teach elementary electronics courses, I generally mention the diode bridge as a way to make it possible to connect up a battery in either “direction” without endangering the electronics to which the battery is to be connected.

My mistake has served as a cautionary tale for many years now.—Shlomo Engelberg, CC25, 2013

One-Wire RS-232 Half Duplex (EE Tip #135)

Traditional RS-232 communication needs one transmit line (TXD or TX), one receive line (RXD or RX), and a Ground return line. The setup allows a full-duplex communication. However, many applications use only half-duplex transmissions, as protocols often rely on a transmit/acknowledge scheme. With a simple circuit like Figure 1, this is achieved using only two wires (including Ground). This circuit is designed to work with a “real” RS-232 interface (i.e., using positive voltage for logic 0s and negative voltage for logic 1s), but by reversing the diodes it also works on TTL-based serial interfaces often used in microcontroller designs (where 0 V = logic 0; 5 V = logic 1). The circuit needs no additional voltage supply, no external power, and no auxiliary voltages from other RS-232 pins (RTS/CTS or DTR/DSR).Grun1-Wire-RS232-HalfDup

Although not obvious at a first glance, the diodes and resistors form a logic AND gate equivalent to the one in Figure 2 with the output connected to both receiver inputs. The default (idle) output is logic 1 (negative voltage) so the gate’s output follows the level of the active transmitter. The idle transmitter also provides the negative auxiliary voltage –U in Figure 2. Because both receivers are connected to one line, this circuit generates a local echo of the transmitted characters into the sender’s receiver section. If this is not acceptable, a more complex circuit like the one shown in Figure 3 is needed (only one side shown). This circuit needs no additional voltage supply either. In this circuit the transmitter pulls its associated receiver to logic 1 (i.e., negative voltage) by a transistor (any standard NPN type) when actively sending a logic 0 (i.e., positive voltage) but keeps the receiver “open” for the other transmitter when idle (logic 1). Here a negative auxiliary voltage is necessary which is generated by D2 and C1. Due to the start bit of serial transmissions, the transmission line is at logic 1 for at least one bit period per character. The output impedance of most common RS-232 drivers is sufficient to keep the voltage at C1 at the necessary level.

Note: Some RS-232 converters have quite low input impedance; the values shown for the resistors should work in the majority of cases, but adjustments may be necessary. In case of extremely low input impedance, the receiving input of the sender may show large voltage variations between 1s and 0s. As long as the voltage is below –3 V at any time these variations may be ignore.— Andreas Grün, “One Wire RS-232 Half Duplex,” Elektor July/August 2009.

Issue 286: EQ Answers

Question 1—A divider is a logic module that takes two binary numbers and produces their numerical quotient (and optionally, the remainder). The basic structure is a series of subtractions and multiplexers, where the multiplexer uses the result of the subtraciton to select the value that gets passed to the next step. The quotient is formed from the bits used to control the multiplexers, and the remainder is the result of the last subtraction.

If it is implemented purely combinatorially, then the critical path through all of this logic is quite long (even with carry-lookahead in the subtractors) and the clock cycle must be very slow. What could be done to shorten the clock period without losing the ability to get a result on every clock?

Answer 1—Pretty much any large chunk of combinatorial logic can be pipelined in order to reduce the clock period. This allows it to produce more results in a given amount of time, at the expense of increasing the latency for any particular result.

Divider logic is very easy to pipeline, and the number of pipeline stages you can use is fairly arbitrary. You could insert a pipeline register after each subtract-mux pair, or you might choose to do two or more subtract-mux stages per pipeline register You could even go so far as to pipeline the subtracts and the muxes separately (or even pipeline *within* each subtract) in order to get the fastest possible clock speed, but this would be rather extreme.

The more pipeline registers you use, the shorter the critical path (and the clock period) can be, but you use more resources (the registers). Also, the overall latency goes up, since you need to account for the setup and propagation times of the pipeline registers in the clock period (in addition to the subtract-mux logic delays). This gets multiplied by the number of pipeline stages in order to compute the total latency.

Question 2—On the other hand, what could be done to reduce the amount of logic required for the divider, giving up the ability to have a result on every clock?


Answer 2—If you don’t need the level of performance provided by a pipelined divider, you can computes the quotient serially, one bit at a time. You would just need one subtractor and one multiplexer, along with registers to hold the input values, quotient bits and the intermediate result.

You could potentially compute more than one bit per clock period using additional subtract-mux stages. This gives you the flexibility to trade off space and time as needed for a particular application.

Question 3—An engineer wanted to build an 8-MHz filter that had a very narrow bandwidth, so he used a crystal lattice filter like this:


However, when he built and tested his filter, he discovered that while it worked fine around 8 MHz, the attenuation at very high frequencies (e.g., >80 MHz) was very much reduced. What caused this?

Answer 3—The equivalent circuit for a quartz crystal is something like this:EQ-fig2-CC287-June14

The components across the bottom represent the mechanical resonance of the crystal itself, while the capacitor at the top represents the capacitance of the electrodes and holder. Typical values are:

  • Cser: 10s of fF (yes, femtofarads, 10-15F)
  • L: 10s of mH
  • R: 10s of ohms
  • Cpar: 10s of pF

The crystal has a series-resonant frequency based on just Cser and L. It has a relatively low impedance (basically just R) at this frequency.

It also has a parallel-resonant (sometimes called “antiresonant”) frequency when you consider the entire loop, including Cpar. Since Cser and Cpar are essentially in series, together they have a slightly lower capacitance than Cser alone, so the parallel-resonant frequency is slightly higher. The crystal’s impedance is very high at this frequency.

But at frequencies much higher than either of the resonant frequencies, you can see that the impedance of Cparalone dominates, and this just keeps decreasing with increasing frequency. This reduces the crystal lattice filter to a simple capacitive divider, which passes high freqeuncies with little attenuation.

Question 4—Suppose you know that a nominal 10.000 MHz crystal has a series-resonant frequency of 9.996490 MHz and a parallel-resonant frequency of 10.017730 MHz. You also know that its equivalent series capacitance is 27.1 fF. How can you calculate the value of its parallel capacitance?

Answer 4—First, calculate the crystal’s equivalent inductance, based on the series-resonant frequency:EQ-equation1-CC287-June14

Next, calculate the capacitance required to resonate with that inductance at the parallel-resonant frequency:EQ-equation2-CC287-June14

Finally, calculate the value of Cpar required to give that value of capacitance when in series with Cser:EQ-equation3-CC287-June14

Note that all three equations can be combined into one, and this reduces to:EQ-equation4-CC287-June14

High Electron Mobility Transistors

gold backgroundThe TPH3002LD and the TPH3002LS are 600-V Gallium nitride (GaN)-based, low-profile power quad flat no-lead (PQFN) high electron mobility transistors (HEMTs). The HEMTs utilize Transphorm’s patented, high-performance EZ-GaNTM technology, which combines low switching and conduction losses, reducing the overall system energy dissipation up to 50%.

The TPH3002PD and TPH3002PS HEMTs are designed for use in smaller, lower-power applications (e.g., adapters and all-in-one computer power supplies). The HEMTs feature a Kelvin connection to isolate the gate circuit from the high-current output circuit to further reduce electromagnetic interference (EMI) and high-frequency switching capabilities.
Evaluation boards are available with the devices.

Contact Transphorm for pricing.

Transphorm, Inc.

A Serene Workspace for Board Evaluation and Writing

 Elecronics engineer, entrepreneur, and author Jack Ganssle recently sent us information about his Finksburg, MD, workspace:

I’m in a very rural area and I value the quietness and the view out of the window over my desk. However, there are more farmers than engineers here so there’s not much of a high-tech community! I work out of the house and share an office with my wife, who handles all of my travel and administrative matters. My corner is both lab space and desk. Some of the equipment changes fairly rapidly as vendors send in gear for reviews and evaluation.


Ganssle’s desk is home to ever-changing equipment. His Agilent Technologies MSO-X-3054A mixed-signal oscilloscope is a mainstay.

The centerpiece, though, is my Agilent Technologies MSO-X-3054A mixed-signal oscilloscope. It’s 500 MHz, 4 GSps, and includes four analog channels and 16 digital channels, as well as a waveform generator and protocol analyzer. I capture a lot of oscilloscope traces for articles and talks, and the USB interface sure makes that easy. That’s pretty common on oscilloscopes, now, but being an old-timer I remember struggling with a Polaroid scope camera.

The oscilloscope’s waveform generator has somewhat slow (20-ns) rise time when making pulses, so the little circuit attached to it sharpens this to 700 ps, which is much more useful for my work. The photo shows a Siglent SDS1102CML oscilloscope on the bench that I’m currently evaluating. It’s amazing how much capability gets packed into these inexpensive instruments.

The place is actually packed with oscilloscopes and logic analyzers, but most are tucked away. I don’t know how many of those little USB oscilloscope/logic analyzers vendors have sent for reviews. I’m partial to bench instruments, but do like the fact that the USB instruments are typically quite cheap. Most have so-so analog performance but the digital sampling is generally great.

Only barely visible in the picture, under the bench there’s an oscilloscope from 1946 with a 2” CRT I got on eBay just for fun. It’s a piece of garbage with a very nonlinear timebase, but a lot of fun. The beam is aimed by moving a magnet around! Including the CRT there are only four tubes. Can you imagine making anything with just four transistors today?

The big signal generator is a Hewlett-Packward 8640B, one of the finest ever made with astonishing spectral purity and a 0.5-dB amplitude flatness across 0.5 MHz to 1 GHz. A couple of digital multimeters and a pair of power supplies are visible as well. The KORAD supply has a USB connection and a serviceable, if klunky, PC application that drives it. Sometimes an experiment needs a slowly changing voltage, which the KORAD manages pretty well.

They’re mostly packed away, but I have a ton of evaluation kits and development boards. A Xilinx MicroZed is shown on the bench. It’s is a very cool board that has a pair of Cortex-A9s plus FPGA fabric in a single chip.

I use IDEs and debuggers from, well, everyone: Microchip Technology, IAR Systems, Keil, Segger, you name it. These run on a variety of processors but, along with so many others, more and more I’m using Cortex-M series parts.

My usual lab work is either evaluating boards, products and instruments, or running experiments that turn into articles. It pains me to see so much engineering is done via superstition today. For example, people pick switch contact debounce times based on hearsay or smoke signals or something. Engineers need data, so I tested about 50 pairs of switches to determine what real bounce characteristics are. The results are on my website. Ditto for watchdog timers and other important issues embedded people deal with.

Ganssle notes that his other “bench” is his woodworking shop. To learn more about Ganssle, read our 2013 interview.

Battery Charger Design (EE Tip #130)

It’s easy to design a good, inexpensive charger. There is no justification for selling cheap, inadequate contraptions. Many companies (e.g., Linear Technology, Maxim, Semtech, and Texas Instruments) supply inexpensive battery management ICs. With a few external parts, you can build a perfect charger for just about any battery.

Texas Instruments’s UC2906 is an older (Unitrode) IC designed to build an excellent sealed lead-acid battery charger with a sophisticated charging profile. Figure 1 shows the recommended charger circuit.

Figure 1: This lead-acid battery charger uses Texas Instruments’s UC2906 IC.

Figure 1: This lead-acid battery charger uses Texas Instruments’s UC2906 IC.

In addition to the IC, only a handful of resistors and a PNP power transistor Q1 are needed to build it. Q1 must be rated for the maximum charging current and fitted with a heatsink.

An LED with its current-limiting resistor R can be connected to pin 7, which is an open-collector NPN transistor, to indicate the presence of power. Similarly, an LED with a series resistor could be connected to pin 9, which is also an open-collector NPN transistor to indicate overcharge (it is not used in Figure 1). The UC2906 datasheet and the Application Note provide tables and equations for selection of resistors Rs, Rt, RA, RB, RC, and RD and suggestions for adding various features.

Editor’s Note: This is an excerpt from an article written by George Novacek, “Battery Basics (Part 3): Battery Management ICs,” Circuit Cellar 280, 2013.

Issue 284: EQ Answers

Can you name all of the signals in the original 25-pin RS-232 connector?

Pins 9, 10, 11, 18, and 25 are unassigned/reserved. The rest are:

Pin Abbreviation Source Description
1 PG Protective ground
2 TD DTE Transmitted data
3 RD DCE Received data
4 RTS DTE Request to send
5 CTS DCE Clear to send
6 DSR DCE Data Set Ready
7 SG Signal ground
8 CD DCE Carrier detect
12 SCD DCE Secondary carrier detect
13 SCTS DCE Secondary clear to send
14 STD DTE Secondary transmitted data
15 TC DCE Transmitter clock
16 SRD DCE Secondary received data
17 RC DCE Receiver clock
19 SRTS DTE Secondary request to send
20 DTR DTE Data terminal ready
21 SQ DCE Signal quality
22 RI DCE Ring indicator
23 DTE Data rate selector
24 ETC DTE External transmitter clock


What is the key difference between a Moore state machine and a Mealy state machine?

The key difference between Moore and Mealy is that in a Moore state machine, the outputs depend only on the current state, while in a Mealy state machine, the outputs can also be affected directly by the inputs.


What are some practical reasons you might choose one state machine over the other?

In practice, the difference between Moore and Mealy in most situations is not very important. However, when you’re trying to optimize the design in certain ways, it sometimes is.

Generally speaking, a Mealy machine can have fewer state variables than the corresponding Moore machine, which will save physical resources on a chip. This can be important in low-power designs.

On the other hand, a Moore machine will typically have shorter logic paths between flip-flops (total combinatorial gate delays), which will enable it to run at a higher clock speed than the corresponding Mealy machine.


What is the key feature that distinguishes a DSP from any other general-purpose CPU?

Usually, the key distinguishing feature of a DSP when compared with a general-purpose CPU is that the DSP can execute certain signal-processing operations with few, if any, CPU cycles wasted on instructions that do not compute results.

One of the most basic operations in many key DSP algorithms is the MAC (multiply-accumulate) operation, which is the fundamental step used in matrix dot and cross products, FIR and IIR filters, and fast Fourier transforms (FFTs). A DSP will typically have a register and/or memory organization and a data path that enables it to do at least 64 MAC operations (and often many more) on unique data pairs in a row without any clocks wasted on loop overhead or data movement. General-purpose CPUs do not generally have enough registers to accomplish this without using additional instructions to move data between registers and memory.

Issue 282: EQ Answers

Construct an electrical circuit to find the values of Xa, Xb, and Xc in this system of equations:

21Xa – 10Xb – 10Xc = 1
–10Xa + 22Xb – 10Xc = –2
–10Xa – 10Xb + 20Xc = 10

Your circuit should include only the following elements:

one 1-Ω resistor
one 2-Ω resistor
three 10-Ω resistors
three ideal constant voltage sources
three ideal ammeters

The circuit should be designed so that each ammeter displays one of the values Xa, Xb, or Xc. Given that the Xa, Xb, and Xc values represent currents, what kind of circuit analysis yields equations in this form?

You get equations in this form when you do mesh analysis of a circuit. Each equation represents the sum of the voltages around one loop in the mesh.

What do the coefficients on the left side of the equations represent? What about the constants on the right side?

The coefficients on the left side of each equation represent resistances. Resistance multiplied by current (the unknown Xa, Xb, and Xc values) yields voltage.
The “bare” numbers on the right side of each equation represent voltages directly (i.e., independent voltage sources).

What is the numerical solution for the equations?

To solve the equations directly, start by solving the third equation for Xc and substituting it into the other two equations:

Xc = 1/2 Xa + 1/2 Xb + 1/2

21Xa – 10Xb – 5Xa – 5Xb – 5 = 1
–10Xa + 22Xb – 5Xa – 5Xb – 5 = –2

16Xa – 15Xb = 6
–15Xa + 17Xb = 3

Solve for Xa by multiplying the first equation by 17 and the second equation by 15 and then adding them:

272Xa – 255Xb = 102
–225Xa + 255Xb = 45

47Xa = 147 → Xa = 147/47

Solve for Xb by multiplying the first equation by 15 and the second equation by 16 and then adding them:

240Xa – 225Xb = 90
–240Xa + 272Xb = 48

47Xb = 138 → Xb = 138/47

Finally, substitute those two results into the equation for Xc:

Xc = 147/94 + 138/94 + 47/94 = 332/94 = 166/47

Finally, what is the actual circuit? Draw a diagram of the circuit and indicate the required value of each voltage source.

The circuit is a mesh comprising three loops, each with a voltage source. The common elements of the three loops are the three 10-Ω resistors, connected in a Y configuration (see the figure below).

cc281_eq_fig1The values of the voltage sources in each loop are given directly by the equations, as shown. To verify the numeric solution calculated previously, you can calculate all of the node voltages around the outer loop, plus the voltage at the center of the Y, and ensure they’re self-consistent.

We’ll start by naming Va as ground, or 0 V:

Vb = Va + 2 V = 2 V

Vc = Vb + 2 Ω × Xb = 2V + 2 Ω × 138/47 A = 370/47 V = 7.87234 V

Vd = Vc + 1 Ω × Xa = 370/47 V + 1 Ω × 147/47A = 517/47 V = 11.000 V

Ve = Vd – 1 V = 11.000 V – 1.000 V = 10.000 V

Va = Ve – 10 V = 0 V

which is where we started.

The center node, Vf, should be at the average of the three voltages Va, Vc, and Ve:

0 V + 370/47 V + 10 V/3 = 840/141 V = 5.95745 V

We should also be able to get this value by calculating the voltage drops across each of the three 10-Ω resistors:

Va + (Xc – Xb) × 10 Ω = 0 V + (166 – 138)/47A × 10 Ω = 280/47 V = 5.95745 V

Vc + (Xb – Xa) × 10 Ω = 370/47V + (138-147)/47A × 10 Ω = 280/47 V = 5.95745 V

Ve + (Xa – Xc) × 10 Ω = 10 V + (147-166)/47 A × 10 Ω = 280/47 V = 5.95745 V

The Future of Inkjet-Printed Electronics

Silver nanoparticle ink is injected into an empty cartridge and used in conjunction with an off-the-shelf inkjet printer to enable ‘instant inkjet circuit’ prototyping. (Photo courtesy of Georgia Institute of Technology)

Silver nanoparticle ink is injected into an empty cartridge and used in conjunction with an off-the-shelf inkjet printer to enable ‘instant inkjet circuit’ prototyping. (Photo courtesy of Georgia Institute of Technology)

Over the past decade, major advances in additive printing technologies in the 2-D and 3-D electronics fabrication space have accelerated additive processing—printing in particular—into the mainstream for the fabrication of low-cost, conformal, and environmentally friendly electronic components and systems. Printed electronics technology is opening an entirely new world of simple and rapid fabrication to hobbyists, research labs, and even commercial electronics manufacturers.

Historically, PCBs and ICs have been fabricated using subtractive processing techniques such as photolithography and mechanical milling. These traditional techniques are costly and time-consuming. They produce large amounts of material and chemical waste and they are also difficult to perform on a small scale for rapid prototyping and experimentation.

This single-sided wiring pattern for an Arduino microcontroller was printed on a transparent sheet of coated PET film, (Photo courtesy of Georgia Technical Institute)

This single-sided wiring pattern for an Arduino microcontroller was printed on a transparent sheet of coated PET film, (Photo courtesy of Georgia Technical Institute)

To overcome the limitations of subtractive fabrication, over the past decade the ATHENA group at the Georgia Institute of Technology (Georgia Tech) has been developing an innovative inkjet-printing platform that can print complex, vertical ICs directly from a desktop inkjet printer.

To convert a standard desktop inkjet printer into an electronics fabrication platform, custom electronic inks developed by Georgia Tech replace the standard photo inks that are ejected out of the printer’s piezoelectric nozzles. Inks for depositing conductors, insulators/dielectrics, and sensors have all been developed. These inks can print not only single-layer flexible PCBs, but they can also print complex, vertically integrated electronic structures (e.g., multilayer wiring with interlayer vias, parallel-plate capacitors, batteries, and sensing topologies to sense gas, temperature, humidity, and touch).

To create highly efficient electronic inks, which are the key to the printing platform, Georgia Tech researchers exploit the nanoscale properties of electronic materials. Highly conductive metals (e.g., gold, silver, and copper) have very high melting temperatures of approximately 1,000°C when the materials are in their bulk or large-scale form. However, when these metals are decreased to nanometer-sized particles, their melting temperature dramatically decreases to below 100°C. These nanoscale particles can then be dispersed within a solvent (e.g., water or alcohol) and printed through an inkjet nozzle, which is large enough to pass the nanoparticles. After printing, the metal layer printed with nanoparticles is heated at a low temperature, which melts the particles back into a highly conductive metal to produce very low-resistance electrical structures.

Utilizing nanomaterials has enabled the creation of plastic, ceramic, piezoelectric, and carbon nanotube and graphene inks, which are the fundamental building blocks of a fully printed electronics platform. The inks are then tuned to have the correct viscosity and surface tension for a typical desktop inkjet printer.

By loading these nanomaterial-based conductive, dielectric, and sensing inks into the different-colored cartridges of a desktop inkjet printer, 3-D electronics topologies such as metal-insulator-metal (MIM) capacitors can then be created by printing the different inks on top of each other in a layer-by-layer deposition. Since printing is a non-contact additive deposition method, and the processing temperatures are below 100⁰C, these inks can be printed onto virtually any substrate, including standard photo paper, plastic, fabrics, and even silicon wafers to interface with standard ICs with printed feature sizes below 20 µm.

The Georgia Tech-developed printing platform is a major breakthrough. It makes the cost of additively fabricating circuits nearly the same as printing a photo on a home desktop inkjet printer—and with the same level of simplicity and accessibility.

These advancements in 2-D electronics printing combined with current research in low-cost 3-D printing are enabling commercial-grade fabrication of devices that typically required clean room environments and expensive manufacturing equipment. Such technology, when made accessible to the masses, has the potential to completely change the way we think about building, interacting with, and even purchasing electronics that can be digitally transmitted and printed.  While the printing technology is currently at a mature stage, we have only scratched the surface of potential applications that can benefit from printing low-cost, flexible electronic devices.

Client Profile: Lauterbach, Inc

1111 Main Street #115
Vancouver, WA 98660


LauterbachFeatured Product: The TRACE32-ICD in-circuit debugger supports a range of on-chip debug interfaces. The debugger’s hardware is universal and enables you to connect to different target processors by simply changing the debug cable. The PowerDebug USB 3.0 can be upgraded with the PowerProbe or the PowerIntergrator to a logic analyzer.

Product Features: The TRACE 32-ICD JTAG debugger has a 5,000-KBps download rate. It features easy high-level Assembler debugging and an interface to all industry-standard compilers. The debugger enables fast download of code to target, OS awareness debugging, and flash programming. It displays internal and external peripherals at a logical level and includes support for hardware breakpoints and trigger (if supported by chip), multicore debugging (SMP and AMP), C and C++, and all common NOR and NAND flash devices.

For more information, visit www.lauterbach.com/bdmusb3.html.