Wednesday, March 1, 2017

New M-32TL printer testbed

I decided I'd learned enough about the M-32TL printer in my Canon P-170DH calculator, and it was time for surgery.

There are no screws holding the printer in the calculator shell, just careful design of the shell itself. So all that remained was disconnecting the wiring. For ease of assembly these wires are glued to a small piece of plastic which holds the wires at the proper (0.1" or 2.54mm) spacing. Unfortunately this had come loose during my handling. To make it easier to connect these wires to my solderless breadboard I assembled a plug of sorts from a small piece of pad-per-hole perf-board and an 8-position pin header.


I then assembled a test circuit using a Microchip 16F872 PIC processor I had laying around. As configured the PIC executes a bit faster than 1 MIPS. The shortest signal I need to monitor is active for a bit more than 500 uS so there should be enough CPU cycles available for the job.


Now it's mainly a software job, which happens to be something I'm quite good at. Thus far I have a simple program which spins the motor when the button is pushed. This may not seem like a lot, but it does prove the PIC correctly reading the switch and is capable of driving the FETs.

As I work out the state machines needed to drive the printer I noticed an interesting detail in the timing of the position sensor outputs. From Arne Rossius's description, and my initial impressions, I expected there to be exactly one period during each rotation when both the rotation index marking the start position of the print wheel and the start of symbol index would be active. As you can see in this logic analyzer output, this is not the case. There's one overlap at what I consider the start of the wheel sequence where the rotation index is active for the entire period the symbol index is active, but there's also a brief overlap just before the rotation index goes inactive.


Sampling at a higher rate (1 us) on my testbed I see the long overlap as 528 uS while the shorter is only 86 uS. I have to believe the intent is to use the long overlap, but that would mean the rotation index is sampled on the rising edge of the symbol index. I think I need to ponder this a while.

 
I did have one casualty while assembling the testbed. I'm using a pair of MOSFETs from my leftover parts bin to drive the motor and solenoid, visible as black squares on the upper right corner of the breadboard. I had the blue push-button switch wired to the FET driving the motor so the motor would spin when I pressed the switch. After this part of the circuit was assembled and working I walked away from my bench for a moment. When I came back I reached for the blue push-button switch and felt a spark at the tip of my finger. Pressing the button no longer made the motor spin, and I'm sure the spark trashed the FET. Oops.

This is the first piece of electronic hardware I've zapped with static since I trashed one of the 12 then-existing pre-production CMOS 8048 processors in 1981. I drew a 6 inch arc to my finger that day (no, I'm not kidding, and yes, it hurt a lot) and I've been pretty good about anti-static procedures since then. Fortunately I have quite a few of these FETs in a tube, so losing one was no big deal. But it looks like I need to re-evaluate my workbench environment.

No comments:

Post a Comment