4
\$\begingroup\$

Background

I saw this video on youtube where this guy adds a marker to his analog oscilloscope by sending a pulse to the z axis input: https://www.youtube.com/watch?v=QCFBBiIm1h0

I want to do the same thing with my Tektronix 2213, but I want the cursors to be calibrated.

The two signals my system will deal with are A-GATE and the Z-AXIS input.

A-GATE is a positive going pulse that is high from the start of the horizontal sweep to the end. Its width represents the width of the oscilloscope screen.

The Z-AXIS input controls the brightness of the trace. A pulse at the right time will produce a bright dot on the trace.

The timing of A-GATE is generated by timing capacitors. There is no clock to synchronize to.

My plan is to:

  • Measure the width of A-GATE with a timer.
  • Read a rotary encoder. The value will be some fraction D of the full scale value.
  • Calculate a new pulse width by multiplying the width of A-GATE by D. This new width is labeled as Delay in the diagram below and is set by the rotary encoder.
  • Set a PWM to the calculated pulse width. The rising edge of the PWM should be synchronous with the rising edge of A-GATE.
  • Generate a narrow pulse on the falling edge of the PWM that will drive the Z-AXIS input. enter image description here

The 2213 doesn't have an A-gate output, but let's ignore that (the plan is to carefully open up the case, and get a buffered version of A-GATE through a pass-through in the case).

My first attempt will be a proof of concept with readily available parts. I will likely have to go to faster MCUs and components for good accuracy on the faster horizontal time scales.

The Z-AXIS pulse will have to be proportional to the horizontal time scale e.g. 1/100th of the screen width, but I think I can handle that. I'm thinking of a few astable pulse generators feeding into a mux.

Questions

  1. Should I use a PIC and program it in assembly for reliable timing? I think PICs do 1 instruction/clock.
  2. How do I synchronize the rising edge of the PWM with the rising edge of A-GATE? I am thinking I should use A-GATE as an input to a PLL to generate the clock for my MCU to synchronize the MCU to the scope.
  3. The timing of A-GATE will change with different horizontal time scales. If I generate the clock from A-GATE, Would an MCU be bothered by its clock changing? I realize I will need extra circuitry to figure out what time scale I am on.
  4. Does this plan have any major problems I should look out for?

Any other tips are appreciated.

Meta

I am doing this for fun - I know it would be easier to buy a cheap DSO with cursors.

This is my first system design question on the site. I checked the help section already. Let me know if this question is not appropriate for EE SE.

Most of my experience is with analog circuits. Dumbed-down MCU explanations are greatly appreciated.

Thanks!

\$\endgroup\$
  • 1
    \$\begingroup\$ This would be clearer if you added a sketch of what you want your screen to look like. \$\endgroup\$ – Scott Seidman Nov 21 '17 at 16:57
  • \$\begingroup\$ I can't believe that I'm having trouble digging up an image of a raster display on an analog storage scope!! It was de rigour in neuroscience to send the output of a window discriminator to a raster generator, and then shoot a polaroid for records and publication when the screen was full. \$\endgroup\$ – Scott Seidman Nov 21 '17 at 17:02
  • \$\begingroup\$ I will add some sketches in a moment. \$\endgroup\$ – DavidG25 Nov 21 '17 at 17:04
  • \$\begingroup\$ You can also do this with one 555 timer instead of a microcontroller, but that's not what this question is about :) \$\endgroup\$ – τεκ Nov 22 '17 at 1:45
  • 1
    \$\begingroup\$ @τεκ could I? I discarded 555 timers because their timing is set by a capacitor. How would I adjust the delay when I switched time scales in the scope? \$\endgroup\$ – DavidG25 Nov 22 '17 at 2:57
1
+50
\$\begingroup\$

The 555 circuit was just a "mickey mouse" example of how to use Z axis input on one sweep position and will not work on all positions.

The proper way is to use the X axis linear sweep output (sawtooth ramp) and use a variable threshold and comparator to trigger to fire Z-axis input low. The trick is how to get a variable pulse width that is a constant % of the sweep time somewhere around 1~3% of the sweep time. This again can be done with another comparator with a fixed offset voltage that corresponds to 1~3% of the linear sweep voltage.

Coincidentally, such a circuit was already thought of and included in those vintage scopes and used for Delayed - trigger, expanded sweep usually controlled by a 10 turn vernier pot.

Your 2213 did not have this yet and instead used a multiplier pot x1 to allow a delayed sweep to be used.

You can get both the Service manual manual with Theory of Operation and the User manual with an easy search engine result. ( hint : read the interesting parts of Service Manual)

Try a better question or update all the requirements and why you need this and what measurement do you really need?

enter image description here enter image description here

You can learn a lot about Analog and system design by reverse engineering these fantastic designs. That's what I did when I started out. Figure out how it works.

\$\endgroup\$
2
\$\begingroup\$

Sounds right to me. Measuring the A-width is something a bit extra, as the necessary timing is sort of independent of the width. Remember, you're putting up a "cursor" because you have interest in labeling some time point (which you don't need the width for) -- not some location on the screen (which you do need the width for).

You shouldn't need to program in assembly for accurate timing, but you might consider using timer interrupts.

For controlling the location of your Z-pip, you can certainly use a pot, but you can also use a frob-knob (i.e., encoder), up/down buttons, a keypad with a display, or anything else you find convenient.

Nice project!!

Not a great call on using the A as a clock, even with a PLL. Use a fast clock, trigger an interrupt with the rising edge of A. Also use A to gate a timer, so you know your sfreen width. PWM will be more difficult than just turning a pulse on and off, maybe with a CCP interrupt.

\$\endgroup\$
  • \$\begingroup\$ The rotary encoder is a great idea and will save me an ADC read - thanks! Also, I think I do need to read A-GATE, otherwise I could place the cursors "off-screen" and that would be confusing. I'm going to have a display output the time position of the cursors just like on a digital scope. Lastly, I think interrupts are no good because it takes extra clock cycles to do the ISR. \$\endgroup\$ – DavidG25 Nov 21 '17 at 20:57
  • \$\begingroup\$ Trust me, you'll be wanting interrupts. You'll gain more accucy than you'll lose by polling the digital ins for your A rising edge. \$\endgroup\$ – Scott Seidman Nov 22 '17 at 1:03
1
\$\begingroup\$

Since the A signal depends on whatever the scope is measuring, its frequency may not be fixed. For example the scope may be triggered on a signal whose frequency varies, or an infrequent signal.

However its pulse length will depend on the scope sweep time, so it should be constant (until you turn the knob).

I would use a cheap FPGA development board for this. You can get the cheapest ones for 20€. And unlike a micro, you have full control over timing, and you can use a high frequency for accuracy.

The algo would go like this:

Measure the A-pulse: easy to do, start a counter with the pulse, record the value when it ends and put it in a register.

Generate the cursor:

Load a value in a counter, start counting down when the A-pulse starts, stop at zero, output signal ;)

If you get one of these FPGA boards with a few 7-seg digits and buttons, you can even display the cursor settings/time/etc.

This will give you very good accuracy. For a lower accuracy, an analog timer would be simpler of course.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.