My Account
Shopping Cart 0 item(s)
View Cart
Facebook Google Plus LinkedIn

The Single Channel Oscilloscope

Posted by Peter Hiscocks on 9/29/2017
We've recently seen a number of announcements for single channel digital
oscilloscopes. Some are configured like a (very large) pen. This is
convenient, but the single channel is a real limitation.

A single channel scope can display one signal, so it can show you a signal
at that point in the circuit: amplitude, frequency, waveform shape and so
on. That's certainly useful.

However, a large part of oscilloscope use is to determine the relationship
between two or more signals.  For example, when signal A transitions high,
does signal B transition low?  What is the time spacing between those two
events?  That information requires a two-channel display.

If two channels are good, are four channels even better? There are some
measurement situations where four channels are useful, but this is more a
matter of convenience than necessity.

Suppose you need to view three signals A, B and C and you have a two-channel
scope.  Then you could view and trigger from the A signal on channel 1.
Then use channel 2 to view signal B and then signal C.  You can see B and C
individually and relate them back to signal A, so you can determine the time
relationship between all three signals.

It is more convenient to have all four traces visible, but this creates
other challenges: keeping track of which trace is which, and configuring the
various display and triggering controls.

The cost of an oscilloscope is spread over different components: the analog
front end, the digital and microprocessor section, the power supplies and
the physical case.  For a two channel scope, the additional cost is in the
second analog front end.  Given the additional utility of a two channel
scope, we think it's worth it.  So, you may find an application where a
single channel scope is fine.  For general purpose circuit debugging,
however, you'll need a scope with at least two channels.

Curing Circuit Oscillation

Posted by Peter Hiscocks on 9/5/2017 to Technical Papers
You have built some clever analog circuit and now, when you go to check it
with an oscilloscope, you find that the output signal is a mess: not what
you expected, but a mass of oscillation riding on the output signal.

(This is one of many reasons why you need an oscilloscope to check out an
analog circuit: it is the only way to find problems like this one.  And we
have some fine scopes for that ;).

Now what?

There are, alas, a number of reasons a circuit may oscillate. If you are
unlucky, there may be more than one thing going wrong.  Fundamentally, some
signal is working its way around a complete loop, from output to input, with
a phase shift that is equal to or greater than 360 degrees, and magnitude
greater than unity.  That said, it's often not obvious which loop(s) are 
causing the problem.

You need to tackle the possible causes one at a time. It's essential to be
systematic, and it helps to keep notes of your progress - or lack of it.

Is it really oscillation?

An interfering signal, perhaps coupled into a high impedance point in the  
circuit or via some long wires, can masquerade as oscillation.  If the
signal changes dramatically when you move it or move metal objects in the  
vicinity, it may be an interfering signal.  For example, I mis-identified as
oscillation a signal that turned out to be electrical noise from a cooling
fan.  Turning off the fan instantly identified that it was the culprit.  The
solution: operate the fan from a separate supply, with its own separate
wiring.

Is it likely to oscillate?

The grizzled veterans among us can eyeball a circuit and tell whether it's
likely to oscillate.  More stages inside the feedback loop, higher gain  
inside the feedback loop, cascaded sections with different bandwidths -
these are warning signs that oscillation could be a problem. Then, at the
design stage, you can be prepared: if the loop oscillates, how can we fix
it?

Power supply decoupling.

The circuit causes an alternating current to flow in the power supply and
gound leads.  That AC current should ideally be localized to that particular
circuit, and the way to do that is with a bypass capacitor between power
supply and ground.  Always, always, always put 100nF between supply and
ground at each integrated circuit or circuit function.  Sometimes, a larger
capacitor is required.  Sometimes, a smaller capacitor is required in
addition to to the 100nF unit.

Put a large electrolytic capacitor, in parallel with 100nF, between each
supply voltage, where it enters the board, and ground.  This will minimize
the effect of the wiring impedance due to the connection between your
circuit and the bench power supply.

Grounding

How did you build the circuit? On a protoboard? Those things are a wonderful
invention, and they are great for testing a small circuit that is unlikely 
to oscillate.  But the minute you see oscillation, you should be thinking  
about relocating to a copper ground plane, aka printed circuit board.  Start
with a bare copper board and then build up the circuit, dead bug style,
using soldered connections.  Solder terminal strips and banana jacks to the
board to make the input and output connections.  If the circuit involves high frequency
signals, use BNC connectors to bring the signals onto the circuit.

Some people suggest using glue to hold the components. I find that soldered
connections, using solid wire, tie the components in place well enough.

If you are building on a copper board, then you have a nice solid ground to
connect to, and that will minimize voltages that are set up by currents in
the ground plane.

Circuit Instability

You have decoupled all the circuit blocks (such as integrated circuits), you
have decoupled the power supply and the circuit is solidly mounted on a
copper PC board ground plane. And it still oscillates. Now what?
Have a look at the datasheets for the active devices used in your
circuit.  They may have important clues.  For example, power op-amps and
audio amplifiers often have an RC 'snubber' network between the output and
ground: something like 1 ohm in series with 220nF, for example.  At frequencies above
700kHz, the 1 ohm resistance appears across the output and acts with the
output resistance of the amplifier to form a voltage divider.  This reduces
the output signal high frequencies, where oscillation is likely to occur. 

There are some situations that should be an immediate red flag to a circuit
designer where oscillation is concerned. 

- Emitter followers have a tendency to oscillate.  This is
counter-intuitive, because the voltage gain of an emitter follower is less
than one.  But the emitter follower *does* have power gain, and for certain
phase conditions it will oscillate.  The solution is a resistor in the
base lead of the emitter follower: a few hundred ohms for a single emitter
follower, about 5000 ohms for a darlington pair.

- Resistor-capacitor lag (low pass) networks in the loop. Each RC lag
contributes up to 90 degrees of phase shift.  Assuming that there is a sign
change somewhere in the loop, then an additional 180 degrees of phase lag 
will cause oscillation.  These RC lag networks are often part of the 'hidden
schematic', invisible components such as stray wiring capacitance or the
collector-base capacitance of transistors.  A common technique is to bypass
the resistance with a capacitance, thereby turning the network into a
'lag-lead' network and at (least partially) cancelling the phase lag.

- Another form of the RC lag problem is a capacitive load at the output of
an op-amp.  This interacts with the output resistance of the amplifier to
create phase lag and thereby destabilize the operation of the amplifier. 
The simplest solution is to isolate the capacitance with a resistance that
is outside the feedback loop of the amplifier - if the circuit will allow
it.  If this is not possible, then a buffer amplifier between the amplier
and capacitive load may help.  There are also ways to include this 'buildout
resistance' inside the negative feedback loop, but they require some careful
analysis.

Fast-Slow Compound Circuit

You have now dealt with all the 'red flag' items and the circuit still
oscillates.  Here's an insight that I learned from Jim Williams: a circuit
will oscillate if the feedback loop includes two stages and the first stage
is much faster (greater bandwidth) than the second stage.  This is a very 
common situation, for example, where a relatively fast op-amp drives a power
amplifier stage containing high-current power transistors.  The power
transistors have a much lower bandwidth.  When a correction signal arrives
at the op-amp, it attempts to adjust the output via the buffer amplifier.
But because the buffer is slow, the op-amp overshoots on its output signal.
Then it belatedly detects the overshoot at the output of the buffer and
tries to correct in the opposite direction, again overshooting. The result
is oscillation.

In conceptual terms, the solution is very simple. Speed up the buffer stage
or slow down the op-amp.  In general, speeding up the buffer stage is not an
option, so the op-amp must be slowed down to the point where the buffer can
accurately track the op-amp output.  Often, it is sufficient to put a small
capacitor between the inverting input and the output of the op-amp.  This  
makes the op-amp behave as an integrator for fast signals, reducing the slew
rate for a step and reducing the AC gain for a sine wave.  This doesn't
always work perfectly: the capacitor adds phase shift as well as reducing
gain, so it may not be a perfect solution.  For example, it is sometimes
advantageous to put a resistance in series with this feedback capacitance.
Then at high frequencies, where the feedback capacitor is small compared to
this resistance, the amplifier gain is reduced by the resistance.

To find the optimum value for this resistance, you may need to do a more
detailed analysis or use circuit simulation.

Too Much Gain at High Frequencies

The output snubber network and the fast-slow compensation capacitor both
work by reducing the gain of an op-amp at high frequencies. There is another
technique that can be very effective: a resistor-capacitor network between 
the input pins of an op-amp, to reduce the so-called 'noise gain'.

The shunt resistor across the input acts to form a voltage divider with the
feedback resistors.  For example, if the feedback resistance is 1k and the
shunt resistance is 100 ohms, then the loop gain is reduced by a factor of
10.  We want this gain reduction not to occur at low frequencies, so the  
shunt resistor is placed in series with a capacitor.  At high frequencies,
the capacitor becomes a short circuit and the shunt resistor comes into   
effect. For example, if the oscillation is occurring at 1MHz, then choose 
the resistor and capacitor to become effective at, say, 1kHz. Again,
simulation may help to optimize this circuit.

Simulation.

Circuit simulation (like LTSpice) is a wonderful tool, and it can be very
useful in exploring circuit stability. However, there are some caveats. 

- The accuracy of the simulation depends on the accuracy of the circuit
model.  For example, we recently worked on a power op-amp circuit that
displayed oscillation when sinking current, but not when sourcing current.
That behaviour did not show up in the circuit model.

- Circuit simulation is of no help diagnosing grounding and power supply
problems because the inductance and capacitances of the wiring are generally
not known. They are part of the 'hidden schematic'.

- A circuit simulator does not suggest solutions to a problem. (Hey, Pete, I
think you should increase the phase margin of the second stage of this
circuit by adding a lead-lag network.) There may come a day when circuit
simulators have that capability, but we're not there yet. Consequently, you
need to have some ideas of Things To Try, and hopefully the points given  
above will provide a starting point.

Simulation is no substitute for building a prototype and testing it
thoroughly.

Try stuff to see what happens

Sometimes, it can be difficult to tell where to direct attention in the
circuit. If it's a large loop with several components, is there one
location where a fix can be applied? Well, try stuff. Place a capacitor
around one of the op-amps in the circuit and see if that has an effect. No
effect? Then try some other part of the circuit. Sometimes, making things
worse is a valuable clue where the problem lies.

It's stable! Now test it to be sure.

After hours of work, the circuit has been tamed. It does what it should do,
and does not oscillate. Are we done? No. The circuit could be marginally  
stable and some change in the circuit - component drift, temperature
dependence, power supply sensitivity - could send it back into oscillation.
Now you need to inject a transient signal into the system and see how it  
responds. The degree of overshoot and ringing indicates the stability of the
system - technically, the gain and phase margin. You want an overdamped or 
slightly underdamped response: multiple overshoots and ringing indicate that
the system is dangerously close to instability. Conversely, you may find
that yes, you've killed the oscillation, but the step response is terribly
slow. So maybe you can lighten the compensation networks - usually, this 
means reducing a compensation capacitance somewhere.

Bode Plots, Gain and Phase Margin

It's very useful to understand the concepts behind stability in negative
feedback systems. By all means, learn how to interpret open-loop and closed
loop gain plots, and how these techniques I have discussed appear on these
plots. Together with a simulation, these techniques can give you a very   
clear idea why a given circuit is unstable.

An example: Years ago, I built a regulated power supply, using an op-amp for
negative feedback. It oscillated. I tried various ad-hoc fixes and nothing 
worked. Finally, I consulted one of the local experts on negative feedback.
His advice: You need to construct a Bode plot and engineer a solution
properly. Somewhat chastised, I did as he advised. The Bode plot solution
suggested a feedback capacitor and resistor of certain values. Without much
hope, I installed those components in the circuit and lo, the oscillation 
went away.

So the ad-hoc methods I have described above are some help and can sometimes
lead to a quick solution, but be prepared to do a proper analysis if they  
don't work.

We recently debugged oscillation problems in a new product. The protoboard
circuit oscillated and did not yeild to simple fixes, so we moved the
circuit to a copper PC board. The copper board version seemed to be more
stable and it was certainly easier to work on.

We found:

- an oscillating darlington transistor, cured with a resistor in the base
lead.
- two fast-slow feedback loops that could be tamed by slowing down the fast
stage.
- one power-op amp stage that (per the datasheet) required a snubbing network
on the output. Simulation indicated that a noise gain network and a series  
RC local feedback network would be required to make it stable. That turned  
out to be the case.
- an RC lag network that could be compensated with a lead capacitor.

Now it's stable, and we have confidence in the circuit based on transient
tests with worst-case capacitor loads attached.





Testing a Selenium Rectifier

Posted by Peter Hiscocks on 10/25/2016

Before the invention of the silicon diode, designers had the choice of germanium point contact diodes for low currents, copper-oxide rectifiers in instruments, and selenium rectifiers for power applications. The selenium rectifier replaced the vacuum tube rectifier in the period 1950 onward and was in use until the 70's. Selenium rectifiers are recognizable by the cooling fins, which are often painted green or orange.

We were given a three-phase selenium rectifier, taken from an ancient Honda 150 motorcycle. The alternator is wired to produce 3 sine wave outputs, each 120 degrees apart. The rectifier consists of three diodes with one common terminal, so that the output is a reasonable approximation of direct current.

The owner of the bike had replaced the selenium rectifier with a modern three-phase silicon diode array, a much smaller and probably more efficient device.  Was the selenium rectifier still good?  We measured the forward and reverse resistance with a multimeter, and the results were inconclusive.

The Wikipedia page on Selenium Rectifier mentions that a 'forming current' may be required after a long period of disuse, and long period of disuse applies in this case: it had been out of service 40 years or more.  The forming current is a minimum current to regenerate the proper operation. So we connected it to a CTR-101 curve tracer to run the forward characteristic curve. 

Unlike a multimeter test, the curve tracer exercises the device under test over a range of voltage and currents, so it's a much more informative measurement.

As you can see from the graphs, the forward characteristic is a classic diode curve with a threshold about 0.2 volts, increasing to 0.8 volts at 1 amp forward current.  Switching on the measurement cursors, the forward resistance over the linear region is 0.37 ohms.

The reverse characteristic shows a reverse current of 800uA or so up to a reverse voltage of 30 volts, also very respectable.

This is the measurement of one of the three diodes: the other two have a similar characteristic.

So yes, the selenium rectifier is still functional. And the Honda 150 engine also runs just fine, and is being used to drive a home-constructed sawmill.

Yes, we test IGBTs

Posted by Peter Hiscocks on 10/6/2016 to Software
We were asked the other day whether our curve tracer CTR-101 can test IGBT devices.

What's an Insulated Gate Bipolar Tranistor (IGBT)? If you live in a world of small analog signals (that's us), then you probably haven't used an IGBT. But if you work in high power applications such as variable speed drives for induction motors or welding controllers, you've probably used them.

The IGBT is one of those hybrid devices that is 'the best of both worlds'. It combines the high input impedance of the MOSFET with the low saturation voltage of the bipolar transistor.  The IGBT is used almost exclusively as a switching device, so in the ON state, the power dissipation is proportional to the saturation voltage.  Smaller saturation voltage results in less power dissipation and simplified cooling requirements.

We ordered some of the IGBT model IRG4PF50 to test on the curve tracer. The specifications are impressive: 900 volt breakdown voltage, 51 amps current, 200 watts, all for $6 from Digikey.  Even allowing for the limitations of heatsinks and thermal resistance (which always make the actual power less than shown on the spec sheet), this is an impressive device.

The CTR-101 can measure up to 30 volts or so at a test current of 1 ampere: it's intended for small signal devices.  But we can test the behaviour in the small signal region.  This would be useful, for example, if you needed to match one or more units.

The figure shows the results: on the N-MOSFET setting of the curve tracer, we get a family of curves similar to an enhancement mode MOSFET.  There is certainly enough information here to determine the gate threshold voltage and match device characteristics.  So yes, the CTR-101 can measure the characteristics of an IGBT.

A transfer characteristic (drain current vs gate-source voltage) might also  e useful: if you have some interest in that, give us a shout and we'll add that feature to the software.

Peter Hiscocks
October 2016


Negative Tracking Power Supply

Posted by Peter Hiscocks on 6/27/2016 to Resources
It is not uncommon for a circuit to have available a positive power supply, but require a negative supply. For example, using op-amps to process an alternating voltage signal (one that goes both positive and negative) may require a negative power supply. 

There are charge pump integrated circuits for this purpose: a switching circuit charges discharges a group of capacitors such that the output capacitor is charged negative with respect to ground.  This is useful for small currents, in the order of a few milliamps, which may be sufficient for powering an op-amp or two.  But charge pumps are very limited in output current capability - and some have high internal resistance, which results in poor regulation.

For higher currents, the energy storage device must be an inductor. Current is dumped from the positive supply through a switch into the inductor. Current ramps up in the inductor, storing magnetic energy.

Then the switch opens. Current cannot change instantaneously in an inductor, so the current continues in the same fashion. A diode directs this currentinto a conductor into a capacitor, in such a manner that the capacitor charges up to a negative voltage.

There are many switching regulator integrated circuits that can be configured to generate a negative voltage in this fashion. Such a circuit can produce a few hundred milliamperes of current.

I needed a negative voltage supply that would track the positive supply over a range of 0 to +15 volts, so that the negative supply would produce 0 to -15 volts.  The target output current was 150mA.  Using the circuit of reference (1) as a starting point, I developed the circuit shown in figure 1.  It turns out that the CMOS version of the venerable 555 timer, the LMC555, can operate down over a supply range of +1 to +15 volts.  The output drives a PNP switching transistor, which pumps the 150uH inductor.  When Q1 switches off, the top end of the inductor goes negative, charging the output 10F capacitor to a negative voltage.

The two 100k resistors form a voltage divider between the two supplies. For tracking to occur, this voltage should be at zero volts, so it is used as a feedback signal through Q2 and Q3 to the control terminal of the timer IC.

It's really useful to be able to monitor the current in the inductor but there is no easy way to do that directly. I put a 1 ohm resistor in the return line to the input supply and monitored the voltage across that with the oscilloscope. That shows the current in the inductor when it is charging, so it's possible to determine the peak current -- which is the quantity of most interest.

It turns out (see reference 2) that the peak current in the inductor and switching transistor is at least 4 times the average output current. So, for 150mA output current, the switch must be able to handle 600mA. This is a consequence of the inductor waveform, which is a triangle. I decided that a circuit based on square waves would have a more favourable peak-average ratio, and so I did not pursue this circuit any further. But it might be useful for moderate output currents where a tracking supply is useful.

A caveat: the circuit of figure  is not fully debugged. It needs to be tested under a range of currents and voltages. It's likely that under certain conditions the system will be unstable and will require compensation. 

But it might be a starting point.


References

1. 555 as switching regulator supplies negative voltage	
S.L.Black							
http://www.epanorama.net/sff/Power

2. Switching Power Supply Design, 2nd Edition		
Abraham I. Pressman						
McGraw Hill

Analog Design Not Dead

Posted by Peter Hiscocks on 6/27/2016 to Resources
I'm not much of a party person but there are occasions when one's presence is required - and some parties can even be fun if you keep an open mind about it.  (Just beware of an open bar on an empty stomach, that can be deadly.) At one party, I asked one of the guests what he did: 'I'm an astrophysicist' he said.  I guess I looked astonished because he added'Well, someone has to do it.' True enough.  (See the movie Star Men for a nice take on that.)

Anyway, if someone asks me at a party what kind of electronics I do I may say 'analog circuit design', and then the response might be 'I thought analog had been replaced by digital'.  Well, no.

Those comments have come back to me as I've been sweating over various analog circuits for the last few weeks.  The PSM-101 power supply has a major analog circuit, the scopes have preamps and signal generators, the curve tracer is full of analog circuits.  One of our products in development has 18 op-amps and a bunch of discrete transistors.  Op-amps have greatly simplified analog circuit design.  I'm old enough to remember when the one of the first integrated circuit op-amps (the Fairchild uA709) arrived at our workplace.  It came in a jewel box and cost about $100.  Everyone was terrified of using it.  That's changed over the years: one of our op-amp favorites, the TL074, is under a buck for a quad op-amp package.  But analog circuit design is more than plugging an op-amp and some discrete components into a circuit board.  We struggled for over an hour one evening to find the source of a mysterious offset, which turned out to be op-amp bias current (a rookie mistake on my part).

Microprocessor systems are easier to get working, and to do something significant with relatively modest circuit design effort and some programming. So the world is full of Arduinos and other Fruity Computers doing wonderful things, much of it accomplished by beginners - which is great stuff. (Beware, however, computer coders: big programs are not just bigger small programs: they are qualitatively different. You need to plan and design them.) But if you want to be a designer of electronic systems, you need to know both: digital *and* analog. For one thing, you need to be able to choose: sometimes one op-amp can replace hundreds of lines of computer code -- and work better. Other times, you need the flexibility of software to reduce the demands on the analog circuitry.

It takes some time to become an analog circuit designer. Analog design is a nice mix of theory and practice.  There is always new stuff to learn, which is one of the attractions.  It helps to like tinkering with circuits (the best way to learn) and to be endlessly curious.

That said, this is a great time to do analog circuit design: loads of information on the web, readily accessible parts catalogs and suppliers, free circuit simulators, inexpensive components, and terrific instruments for your workbench.  Go for it.

Waveform Averaging

Posted by Peter Hiscocks on 3/23/2016 to Software

Click here to read our latest application note on waveform averaging in the CircuitGear software.  Waveform averaging can be very useful in extracting a signal from noise as long as a solid trigger signal is available.  The application note shows how a software contribution from a Syscomp customer can significantly improve the signal-to-noise ratio using waveform averaging.

On Power Supplies

Posted by Peter Hiscocks on 1/13/2016 to Products

Are you starting to learn electronics? A power supply is an excellent starter project: the basics are very straightforward, and a power supply is reasonable to built and troubleshoot.  Even better, as your skills advance, there are some interesting - and not so obvious subtleties.

Integrating Sphere for Luminance Calibration

Posted by Peter Hiscocks on 1/13/2016 to Technical Papers

One of our projects is to measure the luminance (brightness) of various sources of light pollution, using a digital camera.  To do that, you need a calibrated source of luminance.  It turns out that a low-cost purpose-made light integrating sphere can provide this.  The linked paper describes the integrating sphere and provides some background information and theory.

Introduction to Electronics

Posted by Peter Hiscocks on 8/20/2015 to Technical Papers
Here is a presentation that Syscomp did for a group at the University of Toronto. Students are assumed to have *no* background in electronics. The objectives are to provide an introduction to circuit building and electronic measuring instruments with immediate results (an illuminated LED!), working up to a light-controlled warbler sound generator.

We also have this material available as a slide presentation. Contact us (support@syscompdesign.com) to obtain a copy in Open Office Presentation or Microsoft Powerpoint format.

 Software
 Resources
 Technical Papers
 Products
 Accessories

 The Single Channel Oscilloscope
 Curing Circuit Oscillation
 Testing a Selenium Rectifier
 Yes, we test IGBTs
 Negative Tracking Power Supply

 September 2017
 October 2016
 June 2016
 March 2016
 January 2016
 August 2015
 July 2015
 May 2015
 February 2015
 January 2015
 October 2014
 September 2014
 June 2014
 March 2014
 February 2014
 September 2013
 July 2013
 April 2012
 February 2012
 January 2012
 October 2011
 September 2011
 June 2011
 March 2011
 January 2011
 December 2010
 October 2010
 September 2010
 May 2010
 April 2010
 December 2009
 November 2009
 April 2009
 March 2009
 December 2008
 October 2008
 September 2008
 June 2008
 May 2008
 March 2008
 February 2008
 September 2007
 August 2007
 July 2007
 June 2007
 October 2006
 September 2006
 July 2006
 May 2006
 March 2006