Monday, April 6, 2020

Testing the printer interface

In November I tested a prototype of my FPGA interface to the M32-TL printer using the Lattice iCEblink40-HX1K and a circuit assembled on solderless breadboard, described here. Since this worked well I was pretty sure this would also work on the P170-DH replacement board. But there is always a chance something didn't get laid out correctly, or something I overlooked.

When I put the replacement PCB into the P170-DH shell last month, I decided I really didn't want to be taking the board out again if I could help it. All the logic is on the exposed side of the board, and removing it requires removing 20 small screws. So I also connected the AC mains transformer and the printer. After proving out the keyclick sounder, the last untested subsystem was the printer interface.

My Verilog printer driver was written for use with the P170-DH board, so the only change required was to change the localparam that defined the clock cycle time from 100ns (10MHz) to 50ns (20MHz).

The test code required a bit more surgery. I don't have use of the Digilent Adept virtual I/O interface, so I hard-coded the characters to be printed and trigger printing based on the "FEED" key on the keypad. For this test I didn't bother debouncing the keypad input, which sometimes resulted in multiple lines printed.

Here's a video. It's not much different than the previous one, but it's a significant test nonetheless:


One of the things I somehow never bothered to look at was the current draw on the unregulated DC power supply. Since this test is being run using my bench supply, this was as simple to check as moving the camera before pressing the "FEED" key. More video:


Now, if these videos don't set your heart a-flutter, what are you doing reading this blog? :-D

When I measured the unregulated DC supply on the unmodified P170-DH I saw 7.85 VDC under load, and for this test I'm supplying about 7V. I'm not running the vacuum fluorescent display for this test so my idle current is only about 25 mA. When the printer motor fires up, though, that current jumps to about 340 mA. At the very end the current seems to spike to almost 400 mA; I suspect that's when the paper feed takes place.

One of the questions still remaining is how the AC power supply will behave under load. With no load the unregulated DC supply sits at just over 10V, which is much higher than I expected. It's a good thing I selected parts rated for use at 15V!

Measuring current draw when running off AC may be a bit of a challenge, as I didn't put a current sense resistor in that part of the circuit. I may be able to get a rough estimate from the voltage drop across the fuse on the AC side of the bridge rectifier. Its datasheet lists a "typical" cold resistance of 175 milliohms, which would give 87 mVAC at 500 mA. I suspect I can capture this on my oscilloscope if I'm careful.

However, what's most important is the stability of the 3.3V and 1.2V supplies to the FPGA. The LTC3607's datasheet gives an example of a 3.3V regulator operating with an input voltage of 4.5V to 15V, so I expect it will be pretty tolerant. This chip will pull its "power good" output to ground if the output gets more than 8.5% out of regulation, and that would drive the FPGA into reset. If this turns out to be a problem I may be able to mitigate this by switching off the VFD filament supply while the printer is running, thus saving over 100 mA of load.

No comments:

Post a Comment