-
DIY digitizer, sort of
06/13/2022 at 17:04 • 0 commentsThis section spans about two months of work. It took that long because I wanted to get the job done with the tools that were on hand.
Without going in to excessive detail about the reasoning, I picked a Z8 dev board to take the first look at the signal. Over the course of a few weeks, my code went from a for(;;) loop watching an I/O pin to two timers linked to the DMA controller. In the end, the latency and resolution were both reduced to a single clock cycle. I used the "gated" mode of the timer, one timer running while the I/O pin was at the high level and the other running while low. The timer's interrupt would be triggered when the timer's gate signal went to the inactive state, or when the timer reached its' stop value. Also, at that moment, the timer's count value would be stored in the DMA buffer. When a DMA interrupt triggered, the buffer's contents would be sent to the workstation via RS-232. There's a race-condition or two, but there are also periodic 150 mSec. pauses in the input signal, so there should be adequate time to transmit the bits. Now what?
My first step was to convert the clock-cycle counts into something I could display in GNUPlot, but seconds of data with 50 nSec. resolution became unmanagable. Enter PulseView and VCD file format. With a little bit of Ruby to convert the captured data to an acceptably formatted VCD, I can finally begin reverse engineering.
-
How slow?
06/12/2022 at 18:12 • 0 commentsYou've probably read that photo-transistors are slow to respond to an input signal. Try it sometime, setup a 555 to drive an IR-LED at about 1kHz and a 1k resistor in series with the transistor. If you are quick enough, you could count one Mississippi, two Mississippi...
OK, not really. Still, the transistor I grabbed needs help. Let's try a cascode, but not just any cascode, a folded cascode. Why this configuration? It will operate nicely on the 3.3V supply used by the microcontroller and provide a logic level signal to the processor.
This is the circuit
as it stands today, though I still twiddle with it from time to time. A pending change is to use a 2N5087 in place of the A733. In the past, when I had 20m of cable between the circuit and dev board, there was an emitter follower on the output. (This was just a quick sketch, I should have checked annotations.)
-
Seeing (infra)red
06/10/2022 at 14:36 • 0 commentsInfrared does not normally rank very highly on my list of things to do. Suddenly, it is at the top of thay list. Confirimg the presence of a source was easy enough, I pointed a cellphone's camera at the control box, to discover a fairly bright, but flickering, light.
Digging around parts bins and junk boxes I find a selection of both photo-transistors and photo-diodes, but which to use? The transistors out numbered the diodes by a fair margin, so transistor it is. Taking a peek inside the monitor's case revealed a PIC16 microcontroller which was driving the IR LED via a single transistor. I'm guessing that maximizing the data rate was not a great priority for the manufacturer.
The first test was simply the transistor in series with a resistor, with a pair of AA batteries to power it and an oscilloscope to see the result. Well there was a square-ish wave, but I couldn't get my analog, non-storage, scope to lock on to the signal.
Let's digitize it!