Tuesday, 21 October 2014

Tektronix 475 - Ok I am calling it fixed!

Mixed sweep rates problem

Well to be honest I still am not sure of the cause however this one has kind-of gone away. The problem was that for some B sweep rates the B sweep wouldn't start.


The really weird part is that the same sweep generator is used when in A mode and works fine for all sweep rates.

I looked at the gate signal coming in and found there is a B gate even when the B sweep doesn't start. I thought maybe the sweep disconnect amp Q974 was marginal and not passing the signal through or that something was going wrong on the timing board and the disconnect amp was being turned off.

Initially I thought the signal was not there after Q974 when in the broken B sweep rate but later I realized this was just a triggering problem on my test scope.

I had the thought to compare the signal at the output of Q974 with the output when in A mode and actually the B mode start signal was much smaller. I followed this back and it is much lower after the B gate amplifier (Q996) also.

Unfortunately Q996 is an old transistor that is not easy to replace. I decided to swap Q992 and Q996 to see what would happen (assuming the problem would just move) but actually the problem just went away! Weirdly it now works fine on all B sweep rates. 

For now I think this is near enough and I'll look at it again later if it is a problem.

A Start Problem

The next problem is that for the 0.1ms/div  and 0.2ms/div A sweep rates (when in MIX, A INTEN etc) mode is on the signal starts about half way along the screen and jitters a lot.

Looking at the sweep signal at CR985 and while also looking at the B gate signal you can see what is happening. Basically the sweep signal is not making it back to its initial state before the sweep start is going off. The B gate goes low (into hold-off) at the end of sweep but then goes high again before it has returned where it should.

The slope of the sweep as it returns looks low although not lower than the other slower sweep rates. The other slower sweep rates however wait longer before hold-off ends. At the faster sweep rates the slope of the sweep signal is high enough that the sweep makes it back to the initial level with enough time for some hold-off before the sweep start signal occurs.

If I adjust the sweep hold-off the signal looks fine on the display.

I give up

Given I have just one problem left and I can work around this easily enough I am giving up for now. The scope is very useable at this point. I might come back to this later and have another go but for now I've installed the unit into my test bench and it is up and running and actually pretty useful!



Thursday, 16 October 2014

Tektronix 475 - Doh!!

Short Trace

In the last post I was still trying to figure out why the trace got short when the scope was running in the fastest two or three sweep rates.

In the end I asked again on the Tektronix forum and once they got their head around what the problem was the answer was quite interesting. Essentially what I was seeing was normal!

I thought it was a bit of an ask to swing 100V or more within a few nanoseconds to unblank the display and sure enough it *is* too much of an ask! Apparently this is normal for fast scopes at high sweep rates - there was in fact (is in fact) nothing wrong with the blanking circuit. Someone commented on the fact that the delay line is 75ns which is intended to move the start of a fast pulse far enough into the display so you can see it after the scope has unblanked!

Well I'm learning! It would have been useful to know this however.

B Trigger

In the mean time the tunnel diode turned up so I turned my attention back to the B Trigger. I installed the new diode but because of the damage I did to the differential amplifier when trying to calibrate the scope, the only way I can tell it is working is by looking at the waveform on the diode.

Unfortunately the diode didn't seem to change things that much. The signal on the TD was pretty much a flat line no matter what I did with the trigger slope or level control. The signal still seemed to get lost somewhere around the second pair of amplifiers.

I assumed there was a capacitor gone or a resistor gone high-impedance but nothing I tried was conclusive. Out of desperation I tested the two TD driver amplifier transistors (Q776 and Q786). Weirdly it turned out Q776 was bad! How did I miss that! Turns out it is the same as the one used in the unity gain amp so I had spares. Changing this transistor now meant I do get a small signal on the tunnel diode when I adjust the trigger level but still nothing like the change you see on the A trigger diode.


The more I thought about it, the more I thought that this is not going to work without the hold-off signal coming back from the end of sweep. The trouble is I broke the B sweep before when trying to calibrate the scope and am still waiting on parts.

B Sweep

A couple of days later the JFET transistor pair I ordered turned up. I carefully organised the six leads on the thing and replaced the broken part. I turned the scope on but.. well nothing - no B sweep but now no A sweep either. If I remove the dual FET A sweep works again.

I tried fiddling with the time delay knob and measuring the voltage on the output of the delay pick-off but this looked Ok. I plugged the FET back in, turned it on and noticed that the graticule illumination was dim and when I moved the delay knob it changed. Hmm


There is a transistor configured as a current source for the differential amplifier formed by the dual FET and the dual bipolar transistors above it (Q928). I pulled this out and sure enough it was broken - a dead short in fact. I replaced it and now I have B sweep!

I switch the B trigger mode from 'starts after delay' to trigger on Ch 1 and hey this works! If I fiddle with the trigger level, the B trace moves!

Combinations of Sweep Rates

So the final problem is that some sweep rates don't seem to work. For example, in MIX mode setting the B sweep rate to 50,20,10,5 or 2 us per div doesn't work - the A sweep rate just continues through to the other of the delay point. If you select B Delayed while in these speeds you get no sweep at all.

The odd thing about this is that the B sweep rate is what is used to generate the A sweep in A mode and *all* the sweep rates work correctly in A mode.

Some A sweep rates (in MIX or A INTEN mode) don't work either, The trace will start really late or you get multiple traces over each other. Adjusting the trigger delay cleans this up however which makes me think the circuit for cutting off the B sweep at the end of the A sweep isn't working but I haven't found any fault in that yet.

It doesn't make sense in terms of the switches in the B timing circuit.

This one has me stumped again...  Back to the bench...

Tuesday, 7 October 2014

Tektronix 475 - Still Stuck

Short Trace


So I am still waiting on parts to fix the B Sweep and to make progress with the B Trigger. Last time I was working on this odd problem where the start of the trace is lost when running at the three fastest sweep rates.

I'm pretty stuck. The problem is it sort-of works so there is no component that is clearly broken. Something in there is marginal but I'm not sure what.

Things I got wrong

I got a couple of things wrong when I was looking at this last time. First of all I was looking at the Z BNC on the back for output but this is in fact an INPUT <forehead smack>.

The second thing is that the signal coming out of J1333 is a current signal not a voltage signal. This is why the waveform looks really messy (depending on where you look). This is also why it looks quite different at Q688 if I disconnect the coax.

Theories

Here is the circuit diagram again as this will be useful here

Unfortunately I have a few theories but none of them seem to be leading anywhere. What it worse is that I tend to cycle between them as one theory becomes less likely! The theories I have examined (and none look good so far) are:

  1. There is a delay introduced somewhere (bad connection, open circuit resistor, bad capacitor). Looking at the signal before Q1338, after Q1344 and even at the output makes me think this is not the case.
  2. The gain on Q1338 is somehow too low so the output is not climbing fast enough. I haven't totally discounted this one and someone on the Tek forum suggested this also. They suggested I check C1330 in case this was broken as it could lower the gain of this amplifier but unfortunately it checks out. I also checked all the resistors, diodes and inductor in that area and they check out. I checked the voltage across R1342 is zero when beam finder is not pressed so the diode doesn't appear to be leaking. The voltage drops across the CR1343 and CR1341 make sense.
  3. Q1354 and Q1358 are not turning on fast enough. They both have baker clamps across them to improve their turn-off performance (to prevent them saturating) but this won't help their turn-on time. I thought perhaps if the diodes were leaking this could slow down the turn on but both checked out fine. I even pulled CR1354 as it looked suspect but it checked out Ok when out of circuit.
  4. The charge 'boost' isn't functioning. Ok I'm not sure I understand this circuit but essentially the capacitor C1358 gets discharged through Q1358 and Q1354 when the push-pull drives the output high. Q1362 will charge the capacitor up again when the output if the Z amplifier goes low. I presume the capacitor is there to provide a sharper rise curve which is why I looked at this. I can see the voltage on C1358 fluctuate but it seems to drop fast and then bounce back up again (getting charged via R1348). If I look at the voltage on the emitter of Q1362 it drops and then rises like a capacitor charge curve so I have to presume this is working. I even replaced C1366 as I couldn't test it (1pF) but it made no difference. Interestingly if I remove Q1362 from the circuit entirely it makes no difference to what is displayed on the screen! I don't understand the voltage trace on C1358 at all really - I would have thought that it would go low and stay low until recharged by Q1362.
  5. The 6,2V Zener diode (VR1362) reads about 6.0V. Interestingly there is a small chunk of the glass missing and the soldering on one of its legs looked dodgy. I touched up the soldering but given it is a 5% tolerance component 6.0V is still within spec.
So overall I am pretty stumped! Help!

Wednesday, 1 October 2014

Tektronix 475 - A step backwards

Ok it's been some time since I posted anything. I'm still pretty busy with work so I'm a bit limited on time to work on this. I have been working on it but only in small snatches of time and hence I've not had time to update the blog. So here it is a - a big update.

B Trigger

I looked at the B Trigger some more and compared the signals with the A trigger circuit. I tried to trace the signal through the amplifiers following the paraphase amplifier chips to see where it disappears and it does some to around Q776/Q786 but it isn't apparent why. The transistors look Ok so then I thought maybe the hold-off signal wasn't getting through to reset the tunnel diodes.

After lots of head scratching and looking I got desperate and simply swapped the tunnel diodes (I did this before but only one diode). This time I swapped both diodes from the A trigger to the B trigger and when I did the A trigger stopped working! Interestingly B trigger still didn't work but this is still progress.

I'm pretty sure the firing TD is damaged. I went to order a replacement and found they are not so easy to come by. I found this ebay vendor called Tucker that had some but the shipping was a bit over the top. Their website had the same part for a bit less shipping and not having much choice I ordered the part. I didn't see an order confirmation so I checked my emails and found the paypal notification. I noticed the part number was wrong! The part I accidentally ordered was a 152-0368-00 which is a diode for a different kind of scope (not a tunnel diode at all) - the one I wanted was 152-0386-00. Unfortunately they had already shipped it so I had to order *another* one. They said they would accept the wrong part back at least.

Calibration and Oops


Now apart from the B trigger the scope is pretty useable now. I thought if I calibrated it so the timing and voltage measurements were roughly accurate it would be fine until the part arrives. I started going through the calibration procedure and found I could do lots of it but there were a few steps I couldn't as they needed a signal insertion unit or a 200MHz signal generator (I have an accurate 20MHz Siglent unit but that's all).

This went really well - the waveforms look cleaner and now that it all lines up correctly it just works so much better.

At one point in the procedure I was adjusting a pot on the vertical output board which is inside the cavity next to the tube and (stupidly) I was using a metal screw driver (as I don't have a proper low capacitance one) and I bumped the leg of another capacitor! The screen fuzzed for a second but returned and it looked ok so I didn't worry. The next day I was looking at it and I realized the B sweep wasn't working at *all*. In Mix mode you only see the A sweep and in B Delayed you see nothing at all. Damn! I broke it!

B Sweep

I figured out I must have touched the leg of C1072 with 50V on the pot :(
My guess was this affected Q920 or Q984 in the sweep circuit. I quickly put a scope probe on these transistors to see if the sweep sawtooth was there and quickly figured out Q922 was toast. (See below)
Thankfully this was a 2N2369 which I already had from a separate repair. I replaced it and while the MIX, B DLY etc modes still didn't work, when I put the scope on this transistor I could see the sweep was running. In fact all the sweeps were running so why no B sweep? 

I thought maybe Q1086 could be bad but it is deep on the timing board which you can't get to without removing the sweep logic and trigger board. After some faffing about I went for it and removed the board. This went smoothly and I checked all the transistors I could see and all were Ok. I couldn't run it like this unfortunately.

So then I read the circuit descriptions again and realized that the delay after magic depends on this differential amp formed by Q938, Q940, etc. So I had a look at the levels on the output of the delay amp and they looked fine. I already checked the sweep sawtooth was present on Q926B's base so then what? Q940 looked ok as did Q944 an Q946 and even then these are to do with blanking.

I looked at the output of Q938 and there wasn't a signal there.The diodes looked fine. I pulled Q938 and tested both sides and they looked ok (normal bipolar transistor). I pulled Q926 and it didn't look right at all - this makes some sense. It looks like I killed it :( Again this is a special part and thankfully QService has one so I ordered it.

Fast Sweep

At this point I can't work on the B trigger, problem as I need parts. Also, I can't work on the problem where certain combinations of A and B sweep rates behave oddly as ... well I have no B sweep visible. So then what? I could park it for now but I remembered that when I was calibrating the scope the faster sweep rates seemed to 'fade in' from the left.

Slower sweep rates start at the very left but the faster one progressively start later. The photo above shows a 20MHz signal on the fastest (0.01us/div) rate.

Clearly this is a blanking problem. If I turn up the intensity I can see the start of the waveform (as well as the retrace unfortunately).


I looked at the waveform at the collector of Q698. This is the blank signal that goes out to the Z amplifier. The signal looks like a ringing mess!
If I remove the coax the signal looks Ok.

I looked at the signal that drives this on TP588 and it looks fine!

So then I attached channel 1 to the Z axis output on the back of the scope and the signal is practically not there. Even at the 20mV/div setting of the scope it is barely a bump.


So then I dug into the Z amplifier a bit more and even though the input signal and the Z axis output looks broken, the output of the amp seems to be Ok. 

Here the yellow waveform is the collector of Q1352 and the blue waveform is TP588. The signal is pretty clean and the delay between them seems minimal (20ns or so).

So I have no idea why there is a delay :(

Hmm...



Wednesday, 17 September 2014

Tek 475 Triggering

It was the paraphase amplifiers!

Unfortunately I've not had much time to work on the old scope lately. I've been flat out with work every day and evening as well as the weekends.

So anyway - I placed an order with QService for a pair of the Tektronix custom paraphase amplifier chips and a pair of 2N4258s (NOS Tektronix parts) to replace the 2N2907 I temporarily put in the input source followers of the trigger circuits. Then I waited... and waited... and eventually my parcel turns up.

Overwhelmed with the excitement of possibly making some progress I whipped out the A trigger amplifier, stuck in the new chip (which was tricky as the pins were not as straight as I would like and the metal is very soft!) and... It worked! I have A trigger!


I replaced the B trigger chip too but still no B trigger. Oh well.

I replaced the 2N2907s and while this didn't have a huge effect I did notice it triggers off the centre of the waveform now when the trigger is in the centre.

B Trigger

So then I looked at the B Trigger in more detail. Initially I thought I might have mixed up the replacement chips but I carefully swapped the chip in the A trigger circuit and found I had exactly two (of four) that worked. So both the the paraphase amplifiers were stuffed allright.

The nice thing is that as the two trigger circuits are nearly identical so I can compare voltages and waveforms.

First off I compared the output of the amplifier (pin 8 and 9 of the chip) and noticed this seemed distorted. I figured out if I twiddled the trigger level knob far off centre I could nearly get it to look normal. I looked at the input (pin 3 and the testpoint) and it looked correct. I remembered that the source follower has to have unity gain and has a DC bias of about 0.6V and so I checked this. The gain was quite close to unity but the offset was more like 1.4V.


I spent ages looking at what could be causing the bias. The base of Q746 already had a bias so it had t be before that. It wasn't any of the resistors or capacitors around the two JFETs. There was no bias on the input to the source follower. That at least narrows it down! The voltage drop over R739 was zero so the diode wasn't leaking (it's only there to prevent big negative going signals damaging things).

The JFETs are a matched pair and have the aluminium bracket around them so they are thermally bonded (see photo below). I undid this and swapped the JFETs around and noted that then the offset changed! This shouldn't happen as the JFETs should be identical. I put each into my trusty transistor tested and both tested Ok but with a very marginal difference in characteristics. So they are no longer matched? I had some other JFETs of equivalent type from the sweep circuit work but none of these were close to a matched pair.


Back to QService again... I ordered a matched pair of these JFETs. A week and a bit later they came, I put them in and now the input source follower is working correctly - the gain is right, offset is right etc but still no B trigger!

Starting to wonder if this thing will every fully work!


Thursday, 4 September 2014

Vexing C++ template issue

This is a pretty well know difference between the Visual Studio C++ compiler and GCC.

I wanted something that can clone a vector of pointers so I created

    template< class ContainerType, class ElementType >
    ContainerType *copySTLContainerPtr(
        const ContainerType *rhs )
    {
        ContainerType *returnValue = new ContainerType;

        ContainerType::const_iterator i;
        for(i=rhs->begin();i!=rhs->end();i++)
        {
            returnValue->push_back( new ElementType(*i));
        }

        return returnValue;
    }

Now this compiled just fine in Devstudio but GCC complained that const_iterator effectively didn't exist - it said it expected a ; before 'i'

Turns out that to make this work you have to say this instead

     typename ContainerType::const_iterator i;

This is pretty well documented on stack overflow here  

In honesty I've had this problem before but it took a while to dredge my memory. While searching for this I also found a really neat page describing some quite obscure C++ features includes templated template parameters, pointer to members and other cool stuff you may not have seen. Check it out here if this is of interest.

Friday, 22 August 2014

Google Mock - Dammit gets me every time

Actually this isn't Google Mock's fault but it does catch a code error.

I have a class

class MyServiceInterface
{
public:
   virtual void provideAService()=0;
   ...
};

Then I have a mock for this

class MockMyService : public MyServiceInterface
{
public:
    MOCK_METHOD0(provideAService, void());
};

In my test I expect it to be called

EXPECT_CALL( *mockService, provideAService());

When the test finishes I get this error. It's weird as I used a smart pointer to hold the pointer to the mock.

c:\work\XXX\test\src\MyServiceTest.cpp(132): ERROR: this mock object should be deleted but never is. Its address is @04334590.
ERROR: 1 leaked mock object found at program exit.

Yes the solution is obvious - the MyServiceInterface has no virtual destructor. The following to the service interface definition and we are all good.

virtual ~MyServiceInterface() { };

It just catches me out often enough that I thought if I write this out I might remember...