3zuli / thermalPrinter

Arduino controller for the CITIZEN LT-286 thermal printer module.
6 stars 4 forks source link

How do I connect it to the microcontroller #1

Open kszere opened 9 years ago

kszere commented 9 years ago

I have two such printers. I'd like to use with Arduino. How do I connect it to the microcontroller. I hope that the project will be further developed! :)

3zuli commented 8 years ago

Sorry for the late reply. The connections are described in the code. You need to check the datasheet of your printer. If the printer is the shift register type, then it should have three pins: Clock, Data and Latch. Then the head probably has several Strobe pins for enabling the printing head. The connections are defined here:

//pins for serial communication with the module
const int dataPin=6;  
const int clkPin=7;
const int latchPin=8;

const int stbPins[6]={9,10,11,12,A0,A1};  //strobe pins

For this module you need a high-current 5V supply. If you have the same module as me (CITIZEN LT-286), then this code should be ready for use. I kind of abandoned this project, as I don't have much time next to my school. However I still have the hardware lying around :)

kszere commented 8 years ago

Okay. I continue your project! :)

1 Stepper Motor

UNO => L293D D2 => 1A (PIN INPUT 1) D3 => 4A (PIN INPUT 2) D4 => 2A (PIN INPUT 3) D5 => 3A (PIN INPUT 4)

L293D => STEPPER 1Y (OUTPUT 1) => A (PIN 1 black) 4Y (OUTPUT 2) => B (PIN 2 yellow) 2Y (OUTPUT 3) => An (PIN 3 brown) 3Y (OUTPUT 4) => Bn (PIN 4 orange)

L293D - power: ENABLE 1 => 5V VSS => 5V VS=> 5V ENABLE 2 => 5V GND => GND

2 Thermal Module

LT-286 => UNO PIN_LT 4 => D6 PIN_LT 6 => D7 PIN_LT 5 => D8

POWER FOR THERMAL PRINTER PIN_LT 13,14,15,16,17 P-GND => GND PIN_LT 1,2,7,26,27,28 VH => +5V PIN_LT 7 Vdd => +5V PIN_LT 18 L-GND => GND

This connection is good? I buy l293d and thermal paper is beginning

3zuli commented 8 years ago

Sounds correct. Don't forget about the Strobe pins, you must connect them as well. LT-286 => UNO PIN_LT 8 => 9 PIN_LT 9 => 10 PIN_LT 10 => 11 PIN_LT 21 => 12 PIN_LT 22 => A0 PIN_LT 23 => A1 If the stepper is turning in wrong direction, just swap any two of its wires. Btw instead of the L293D, a much simpler solution would be to use the EasyDriver http://www.ebay.com/itm/EasyDriver-Shield-stepping-Stepper-Motor-Driver-V44-A3967-For-Arduino-/201414925354?hash=item2ee543dc2a L293D requires you to generate the stepping sequence, whereas with EasyDriver you just feed it with pulses and it does the stepping (as well as microstepping and current limiting) automatically. This would require a slight change to the code, but it would simplify both the code and the wiring. Good luck with the project!

kszere commented 8 years ago

Thanks you! I need only chip without module. I would like make new board drivers for this painter. You know other chip, who can using one data pin cable for control this stepper motor? :)

3zuli commented 8 years ago

Easydriver uses the A3967 IC. There are also other types of drivers, for example these are used often in 3D printers http://www.ebay.com/itm/For-Arduino-DRV8825-Stepper-Motor-Driver-Module-3D-Printer-RepRap-StepStick-CNC-/321875414856?hash=item4af1450f48 These use the DRV8825 chip. I think these modules from ebay are even cheaper than buying the individual ICs from a supplier like DigiKey or Farnell. If I were you I'd probably use the entire module, it's cheaper and easier.

kszere commented 8 years ago

Okay. Thank you very much. I order this chip, test and select one better. I have two printers. Maybe I have more. :)