Friday, March 3, 2017

The M-32TL printer works!

It took a couple evenings of work, but I have the M-32TL printer working!

I've only done some basic testing, but as you can see from the photo above it prints the intended test output (from right-to-left: delta, multiply, black space, decimal, zero).

Based on my analysis of the Canon P170-DH calculator, the basic algorithm is this:
  1. Apply power to the motor.
  2. As the character index goes inactive: if the start-of-rotation index is active reset the position count, else increment the position count.
  3. Wait until the solenoid index goes active 14 times (one full rotation of the print wheels).
  4. When the position count matches the character to be printed, activate the solenoid when the solenoid index goes active. Keep the solenoid active until the next time the solenoid index goes active unless it's the last character to be printed; to end the line keep the solenoid active for ~24ms.
  5. After the last character has been printed and the solenoid made inactive, keep the motor active until the solenoid index goes active 14 more times (one full rotation).
  6. Turn off power to the motor.
I was concerned that I might damage the printer if I drove the solenoid at the wrong time, so I removed the FET that activated it during initial testing. I needed the motor running to get the inputs from the position encoder so I had no choice there, but I didn't figure I could do much to the motor unless I ran it too long. After building the basic structure of the program, I tweaked the details until the signals it generated matched that of the P170-DH. Then I reinstalled the solenoid driver FET.

Note that checking the character and solenoid index signal levels isn't sufficient for proper operation. The state transitions need to occur on the edges of the indexes because of the way the start-of-rotation index overlaps the character index. I do edge detection as part of the software debounce so it's essentially free.

It appears the start-of-rotation region on the sensor disc has a dirty spot on it, as I see that index go inactive sometimes when it should be active. Or else the contact fingers bounce at certain rotational speeds. It doesn't affect the operation of the printer as it's not in an area where I'm sampling that signal.

Here's some of the things I still want to investigate:
  • How many numeric columns can this printer print? I know it'll do 12; will it do 15?
  • I haven't tested printing in red yet. Do I properly understand that?
  • How far does the print wheel need to rotate before I can print another character? For example, it looks like I can print a 3 immediately after printing a 1 without waiting for a full rotation, but can I print a 2? I don't think so.
  • Can it print only one symbol before switching to numerics?
  • Can it print more than two symbols?
 The first one is the most important. If this printer will only print 12 numeric columns then I'll probably use the 12-digit vacuum fluorescent display that came with the calculator. If it will print 15 digits (plus two symbols) I'll have to decide whether to try to replace the VFD with something else or play games in the display driver to only show 12 digits while printing the full 15 the Busicom software supports.

No comments:

Post a Comment