Sunday, May 8, 2011


I recently took delivery of a Gabotronics Xprotolab device.  For less than $50 I now have a fully functional 2-channel oscilloscope, 8-channel logic analyzer, arbitrary waveform generator, frequency counter, and spectrum analyzer, all in a tiny matchbox-sized little package.  Very very cool.

Here's the device as it was shipped to me:

Out of the box

Sitting on keyboard for scale
One of the reasons I wanted an oscilloscope was to investigate why my control board doesn't seem to function properly at 32kHz but does fine at 16kHz.  So I wired it up to my control board:

I have channel one hooked to the output clock that goes to the other boards, and channel two hooked to the output of the inverter where the clock signal comes right off the crystal.

What I found was interesting.  Here are the signals while in 16kHz mode:

CH1 (top): 16kHz output clock
CH2 (bottom): 32kHz input clock

Notice that the 32kHz signal coming from the crystal/inverter is nice and square, with equal time spent at high and low.  Then I switch into 32kHz mode (which causes the output from the clock to skip the ripple counter and simply feed directly into the output buffers:

CH1 (top): 32kHz output clock
CH2 (bottom) 32kHz input clock

Yikes!  The resulting clock (top signal) is heavily skewed toward high, with barely any time at all spent at low.  The input clock clearly shows why: what was once a neat square wave has turned into a badly squished sine wave.  I suspect this is due to excessive current draw out of the inverter circuit.  Since I'm using a basic clock circuit using a crystal, two capacitors, and an inverter, the current sink into the output stage of the inverter can have very dramatic effects on how the resulting signal looks.

Since in 32kHz mode the output is going through a different (presumably higher draw and/or capacitance) path, the crystal is not able to generate the even periodic pulses that it's supposed to.

While it's unlikely that I'm going to rework my control board just to fix this one issue, it was very interesting being able to finally see down into the actual signals being generated, instead of having to infer this behavior from traces on the logic analyzer.

No comments:

Post a Comment