Thursday, January 23, 2014

Diagnosing a Broken Oscilloscope

Analog oscilloscopes practically diagnose themselves. Without ever taking off the cover, here's how I tracked down a new problem on my primary oscilloscope.

I bought my BK Precision 1590A* quad-trace oscilloscope a few years ago because I liked the new-fangled blinky lights and pushbuttons, knowing full well I'd regret it some day.


It quickly became my primary oscilloscope due to small size and big features and soon it was my only scope as I sold off the others.

Then "some day" became today. The fancy blinky-lights and buttons on the CPU-controlled 1590A are spazzing. Some buttons don't work and those that do activate totally unrelated functions. I'm left wishing for mechanical switches. Drat.

Where do we start? I'll tell you...
A few years ago I found this wonderful Tektronix manual on (analog) oscilloscope diagnostics appropriately titled Troubleshooting Your Oscilloscope [pdf].

Blocks and Their Functions

How does an Oscilloscope work? By plotting voltages versus time. Oscilloscopes are designed and built in blocks of circuits. If you know what the blocks are and what they do, you can identify which block is causing problems. While other sites (like this one) provide more detail, here's a quick overview of the blocks and their functions.

Referenced here from Doctronics
for educational purposes

Vertical Pre-Amp 

Oscilloscopes draw a voltage waveform on a cathode ray tube (CRT) by sweeping an electron beam in the X and Y directions. The vertical pre-amplifier takes the voltage of the signal and scales it. When you manipulate the volts-per-division knob, the vertical position knob, the mode (CH1, CH2, DUAL, ADD), you're controlling the vertical pre-amp.

Vertical Amplifier

The vertical output amplifier converts the output of the vertical pre-amp signal into a high voltage that vertically deflects the electron beam in the CRT.





Sweep Generator

The beam also sweeps left to right at selected intervals, thanks to the sweep generator block. When you change the time/division knob or the horizontal position, you are controlling the sweep generator. It generates a sawtooth sort of waveform that's amplified to hundreds of volts by the horizontal amplifier to deflect the CRT electron beam left to right.

Blanking Circuit

When the sweep reaches the maximum (the beam reaches the far right), a blanking circuit turns off the beam until the sweep waveform returns to zero.

Horizontal Amplifier

The output of the sweep generator is fed into the horizontal amplifier to generate a high enough voltage to deflect the electron beam horizontally.

Trigger

To make sure you see the same shape every time the scope sweeps the electron beam, a trigger block makes the sweep generator wait at zero until the input signal reaches the trigger voltage level you've set. The blanking circuit is then disabled and the beam begins tracing at the same input voltage as last time. In other words, the trigger circuit synchronizes the sweep generator to the waveform.

Power Supply

As with many electronics, if the power supply goes bad, all sorts of problems occur. That's what was wrong with my HP204, for example. And an analog CRT oscilloscope has several power supplies: logic level 5V supply, medium voltage supplies for pre-amps, and high voltage supplies for the CRT.

Diagnosis

After messing with the malfunctioning scope haphazardly, scratching my head, and being overwhelmed by the circuit diagram (these are steps -2, -1, and 0, respectively), my "first" step was to systematically take detailed notes on the oscilloscope's symptoms and behavior, what was working, and what wasn't working. Basically you use the front panel controls to determine with what major block the problem lies.

First Step: Behavior

I said the scope was acting weird. Here's what it's doing.
  • Pressing MODE ADD should display a single waveform that is the sum of CH1 and CH2 voltages. Instead it switches to CH1 mode. Um... ok. That's strange.
  • Pressing TRIGGER SINGLE is supposed to activate single trigger mode. Instead it switches on X-Y where the CH1 input deflects the beam vertically and CH2 deflects it horizontally. I wasn't even pressing a button on the HORIZ DISPLAY area.
  • Pressing HORIZ DISPLAY A should switch to the A time base. Instead it activates MODE QUAD, displaying all four channels on the screen. I wasn't even trying to change the MODE. HORIZ DISPLAY has nothing to do with MODE.
It's like I press one key but the scope thinks I've pressed an entirely different one. Hmmm.

Now why would that be? (You probably already figured it out, didn't you?)

Second Step: What Isn't The Problem

I said that oscilloscopes sort of diagnose themselves. Without going into excruciating detail, here's how I can tell by looking at the waveform display which block(s) are affected. If you want the detail, take a look at the pdf I linked to above. This is just a rough outline to give you the flavor of it.

A malfunction in the vertical pre-amp or amplifier could manifest as non-linear or completely non-existent vertical deflection, or a beam that is deflected too high or low, despite adjustment. I had a Protek P3502 with this deflection problem due to a cooked power resistor in the vertical amp. The 1590A shows no such symptoms.

A problem with the horizontal pre-amp or amplifier could result in a non-existent sweep with the beam stuck (a dot or vertical line on the screen), as was the case on my Hitachi V1050F, or a non-linear sweep as recently started happening with my Heathkit IO-12. You may also see a beam that is deflected to the far right or left despite adjustment.

A trigger problem might result in a mess of waveforms overlaid instead of a single crisp shape while a Z-axis amplifier  problem would affect the intensity of the beam. In fact the beam may not appear at all. A power supply problem would probably affect multiple areas.

My 1590A has none of these issues. It works just fine horizontally and vertically. I simply can't control the operating configuration of the scope. I never use ADD or SINGLE so those aren't an issue. But I almost always use the A timebase, so it's a pain to have it in the other horizontal display modes.

Eliminating the other blocks I'm left with one, unique to newer analog scopes like this one: the microcontroller. In truth, I kind of had a feeling there was something logic-y about this problem. I just wasn't quite sure what was going on. So I had to look at a service manual for more information.

Third Step: Get Schematic and/or Service Manual

Service manuals for many oscilloscopes can be found online--for free. Sure, you can pay money for a manual but do your searching first. And maybe post on a forum or two.

What you're really looking for is the schematic diagrams. You might find block diagrams, schematics for each board, and maybe a schematic showing connections between all the boards. If you're lucky you'll also find part numbers and descriptions for each of the many components on the boards.

Board level connection diagram, BK 1590A
With the manual in front of me, I started by looking at the block schematic to get a sense of what the malfunctioning switches are connected to and how things work at a high level. I traced connectors from module to module and found the panel switches and their LEDs connect to a CH3/4 Amp board and to the CPU Unit. I didn't quite understand how the amplifier board was involved until looking at the Schematic.
The right half of the CH3/4 AMP routes signals
Half of the board is used to pass the switch and LED signals to/from other modules. With a better sense of all the boards involved, I started tracing individual switch pins on the schematic. Each connector is numbered and so are each of the connectors' pins, making it easy but tedious to track down where all these signals go.

What I found was that the buttons are arranged in a 4x4 keyboard matrix. Upon documenting the switch and microcontroller pin connections in a table, the pattern emerged. The table below shows the matrix lines K0-K3 and P0-P3 connected to each button. The buttons misbehaving are highlighted in red.


K0 K1 K2 K3
P0 SINGLE DUAL(A,B) A ADD
P1 NORM B DLY'D CHOP DUAL(1,2)
P2 AUTO A-INT-B M ALT CH2
P3 X-Y H ALT QUAD CH1

As you can see, every button attached to the P0 and P3 lines are faulty in some fashion. Why? I don't know yet. It could be a faulty microcontroller. It could be a cold solder joint somewhere. But at least I know exactly what's wrong.

Fourth Step: Opening The Case

It was finally time to open the case and perform further diagnosis. With the case open I was faced with the extremely daunting task of extracting the CPU board from beneath a plate of copper shielding material with dozens of grounding straps soldered to it. Ugh.

The MCU pins are seeing the buttons being pressed.
Once that was done, I attached my beloved Saleae Logic to watch signals on the MCU pins. What I discovered was that the signals from the switches are, in fact, reaching the MCU pins. That eliminates a slew of possible issues and points the finger of blame somewhere inside the ancient chip.

So, now what? Repair. I am probably going to hack the scope, replace the MCU with an AVR and call it good. But that part will have to wait for a future article.

Alternatively, I may let the scope sit awhile. I bought a 100MHz Hewlett Packard 1740A dual channel scope to stand in.

If you found this useful and think others might too, could you take a second and share it? Thanks!

* Incidentally, based on markings inside, the scope appears to be manufactured by Kenwood Trio. Or at least contains parts from that company.

5 comments:

  1. Hmmm. I suspect from what you've said that the P0 and P3 lines are shorted together somewhere. It's fairly consistently reading the corresponding button on P3 when you press any button on P0, which is more likely to be the result of a short somewhere in the circuit than a fault in the MCU. (Also, the waveform you've captured with Saleae Logic looks fishy; are Channel 3 and Channel 4 meant to be connected to the same key matrix pin?)

    ReplyDelete
    Replies
    1. Thanks for the help. Would be great to talk more in email if you want, to make sure I'm not missing something.

      I had hoped for an issue outside the MCU. However the key polling signals come in strong and correct at the MCU pins but the MCU acts like a different (default?) button was pressed. Like the MCU isn't detecting the polling signal.

      I noticed after posting that this behavior is intermittent, though. I can get it to recognize the correct button press every once in awhile.

      Also just FYI, the Saleae CH3 shows the signal coming back in on one of the P lines (CH3) from polling the K lines (CH4-6). I tested on all the P lines--by connecting probes to the MCU's pins. The signals are correctly making it all the way to those pins.

      Delete
  2. I've had a TV do this, but in that case four buttons were arranged to put different resistors in circuit to form a voltage divider and the microcontroller analog input was drawing a bit too much current causing incorrect or phantom button pushes. Lowering all the resistances was only a temporary fix.

    ReplyDelete
  3. I have an unit of this scope it has a problem that looks like this,was that small battery 3v.

    ReplyDelete
  4. How to fix non working vertical scale vpp..

    ReplyDelete

Note: Only a member of this blog may post a comment.