Adjust timing to 1200dpi

At first I was using the 2400dpi mode of the printer. I now switched to
the native resolution of 1200dpi because the results are way better. The
2400dpi mode can still be used if a #define in config.h is changed.
This commit is contained in:
fruchti 2015-09-20 19:36:26 +02:00
parent ca25cfb38a
commit 8ac4d886e5
3 changed files with 40 additions and 29 deletions

View file

@ -6,9 +6,7 @@ It is based on [this](http://www.instructables.com/id/Modification-of-the-Lexmar
## Project status and performance
The project is in a "beta" state, meaning I can successfully print on PCBs with good quality but occasionally, my printer doesn't quite like the signals generated by my controller board and stops with a paper jam error until it is hard-rebooted. This seems to be unpredictable and the behavior even differs from time to time. The actual cause of these problems is unknown to me at this point (needless to say, the MCU software is quite beta, too).
The results are quite good: A minimal trace width of 5mil and a minimal clearance of 10mil are no big deal.
The printer behaves reasonably predictable and the way it should. The results are quite good: A minimal trace width of 5mil and a minimal clearance of 10mil are no big deal.
![MCU Board](https://raw.githubusercontent.com/fruchti/haxmark/master/samples/001.jpg)
@ -16,11 +14,11 @@ The results are quite good: A minimal trace width of 5mil and a minimal clearanc
### Some notes before you modify your printer
I strongly recommend that you test your printer in an unmodified state with exactly the driver and printer settings you intend to use it with to print on PCBs. I found out the hard way that the behavior and the timing differ from driver to driver. It is definitely a good idea to make a dump of the interesting signals (operator panel line, manual paper feed sensor, paper in sensor, exit sensor) with a logic analyzer to get the exact timing of your printing setup so you can adjust the timing settings in the MCU board's source code. I included a dump made with logic_sniffer and my settings. I use the printer with linux and [this](http://www.openprinting.org/printer/Lexmark/Lexmark-E360d) PPD file with 2400dpi image resolution. I have not used it with Windows, so if you plan to do that, better check the printer's behavior in detail before making any modification.
I strongly recommend that you test your printer in an unmodified state with exactly the driver and printer settings you intend to use it with to print on PCBs. I found out the hard way that the behavior and the timing differ from driver to driver. It is definitely a good idea to make a dump of the interesting signals (operator panel line, manual paper feed sensor, paper in sensor, exit sensor) with a logic analyzer to get the exact timing of your printing setup so you can adjust the timing settings in the MCU board's source code. I included a dump made with logic_sniffer and my settings. I use the printer with linux and [this](http://www.openprinting.org/printer/Lexmark/Lexmark-E360d) PPD file with 1200dpi native resolution. I have not used it with Windows, so if you plan to do that, better check the printer's behavior in detail before making any modification.
### Differences to the E260d
The main hardware difference between E260d and E360d is the use of a different operator's panel. But in the software there seem to be quite some:
The main hardware difference between E260d and E360d is the use of a different operator's panel. But in the software there seem to be quite some more:
- The E360d does not, unlike the E260d, pull in a piece of paper stuck into its front. Instead, it stops with a paper jam message.
- When starting a print, the printers motor runs for a while before it is stopped and the user has to confirm he has inserted a piece of paper into the manual feeder by pressing the tick button. Then, the motor starts running again and a few seconds later, a clutch is activated and the paper is finally pulled in. If the paper is inserted significantly before the clutch is activated, the printer reports a paper jam. Note that some drivers seem to omit the first motor running phase (this modification should work with both variants)

View file

@ -1,10 +1,10 @@
:100000001AC091C0A7C030C02FC02EC02DC02CC0B8
:100010002BC02AC029C028C027C027C025C024C0A3
:1000200023C022C021C0E2C0F1C00CC120C12EC13A
:1000300049C163C17CC111241FBECFEDCDBF10E00B
:10004000A0E6B0E0EAE6F3E002C005900D92A23629
:10005000B107D9F710E0A2E6B0E001C01D92A836C2
:10006000B107E1F785D07FC1CBCF1F920F920FB6BA
:1000300049C164C17DC111241FBECFEDCDBF10E009
:10004000A0E6B0E0ECE6F3E002C005900D92A23627
:10005000B107D9F720E0A2E6B0E001C01D92A836B2
:10006000B207E1F785D080C1CBCF1F920F920FB6B8
:100070000F9211248F939F93AF93BF93809164004D
:1000800090916500A0916600B09167000196A11D56
:10009000B11D8093640090936500A0936600B093B7
@ -30,28 +30,28 @@
:1001D00026E035E044E053E062E0E0916300F0E0C7
:1001E000E830F105D0F7ED5EFF4F0994C090640050
:1001F000D0906500E0906600F090670078E8C71640
:1002000073E1D706E104F10440F3AAC0C19AC29A8F
:1002000073E1D706E104F10440F3ABC0C19AC29A8E
:10021000C39A969AC4989498E0916000F091610016
:100220003697D8F6B099D9CFC49A949A9698609395
:1002300063001092640010926500109266001092A4
:100240006700CBCFC0906400D0906500E09066005E
:10025000F09067007EE4C7167DE0D706E104F10464
:10025000F090670077EEC7167DE0D706E104F10461
:1002600008F4BBCFC498C29850936300B6CFB09B3C
:10027000B4CFC198969A10926400109265001092C3
:1002800066001092670040936300A7CFC09064009F
:10029000D0906500E0906600F090670079E4C716A2
:1002A00073E0D706E104F10408F497CFC3981092E5
:10029000D0906500E0906600F090670072E8C716A5
:1002A00076E0D706E104F10408F497CFC3981092E2
:1002B00064001092650010926600109267003093FF
:1002C00063008BCFC0906400D0906500E090660022
:1002D000F090670075EDC716D104E104F10408F44D
:1002E0007CCFC29A10926400109265001092660052
:1002F000109267002093630070CFC0906400D0908C
:100300006500E0906600F090670077E3C71671E043
:10031000D706E104F10458F0C19A109264001092DB
:100320006500109266001092670090936300C09081
:100330006400D0906500E0906600F090670071E581
:10034000C71673E0D706E104F10408F446CFC39A58
:10035000109264001092650010926600109267007F
:0A036000809363003ACFF894FFCFBA
:02036A0006008B
:1002D000F090670073EAC71671E0D706E104F104F5
:1002E00008F47BCFC29A10926400109265001092BD
:1002F000660010926700209363006FCFC090640087
:10030000D0906500E0906600F090670076E7C71631
:1003100072E0D706E104F10458F0C19A109264002B
:10032000109265001092660010926700909363002F
:10033000C0906400D0906500E0906600F090670087
:1003400079E9C71676E0D706E104F10408F445CF51
:10035000C39A109264001092650010926600109289
:0C03600067008093630039CFF894FFCF52
:02036C00060089
:00000001FF

View file

@ -8,25 +8,38 @@
#include <avr/io.h>
#include <avr/interrupt.h>
// Printer settings
#define PRINTRES 1200 // Resolution, either 1200 or 2400 (dpi)
// All delay times are measured in milliseconds
#define T_HALL_L 6 // Hall sensor timeout. After this time
// is elapsed without a pin change, the
// motor is considered stopped
#define T_POWRON 5000 // Delay to allow printer to start up
#define T_CLUTCH 3406 // Delay between starting print job and
#if PRINTRES == 1200 // Printer set to 1200dpi
#define T_CLUTCH 3559 // Delay between starting print job and
// pulling in carrier/activating manual
// paper feed sensor
#define T_EXIT_H 841 // Delay between activation of paper in
#define T_EXIT_H 1666 // Delay between activation of paper in
// and activation of exit sensor
#define T_MNPF_L 213 // Delay before deactivation of manual
#define T_MNPF_L 419 // Delay before deactivation of manual
// paper feed sensor after exit sensor
// is activated
#define T_PPIN_L 311 // Delay before deactivation of paper
#define T_PPIN_L 630 // Delay before deactivation of paper
// in sensor
#define T_EXIT_L 849 // Delay before deactivation of exit
#define T_EXIT_L 1689 // Delay before deactivation of exit
// sensor
#else // Timing for 2400dpi image resolution
#define T_CLUTCH 3406
#define T_EXIT_H 841
#define T_MNPF_L 213
#define T_PPIN_L 311
#define T_EXIT_L 849
#endif
#define D_LED_RD DDRD // Red status LED
#define O_LED_RD PORTD
#define P_LED_RD PD6