Home
Thermal printer adapter board for the STM3210C-EVAL
Contents
1. Table 5 Definitions of acronyms Acronym Definition PTVM Parking ticket vending machine PTVMDB Parking ticket vending machine daughter board MCU Micro controller unit LCD Liquid crystal display SPI Serial peripheral interface 12 Inter integrated circuit JTAG Joint test action group ESD Electrostatic discharge Doc ID 17729 Rev 1 19 21 Revision history UM0977 Revision history 20 21 Table 6 Document revision history Date Revision Changes 03 Sep 2010 1 Initial release Doc ID 17729 Rev 1 UMO0977 Please Read Carefully Information in this document is provided solely in connection with ST products STMicroelectronics NV and its subsidiaries ST reserve the right to make changes corrections modifications or improvements to this document and the products and services described herein at any time without notice All ST products are sold pursuant to ST s terms and conditions of sale Purchasers are solely responsible for the choice selection and use of the ST products and services described herein and ST assumes no liability whatsoever relating to the choice selection or use of the ST products and services described herein No license express or implied by estoppel or otherwise to any intellectual property rights is granted under this document If any part of this document refers to any third party products or services it shall not be deemed a licen
2. M 34 BOM list Table 4 BOM list Manufacturer s Reference ordering code Supplier orderin Category Component description Package Manufacturer orderable part Supplier PP 9 designator code number or equivalent U1 Push pull tour channel 20 STMicroelectronics L293DD driver with diodes ST devices U2 Protection device cutoff TDFN 10 lead STMicroelectronics STBP120AVDK6F voltage 6 02 V 2 5 x 2 mm D1 STPS1L30U SMB Socket 2 54 8 mm double row i Socket 2 54 mm double p y CN1 CN2 row machine spring 9303 50 11 N Formed Contact contact formed contact through hole straight 2 36 zi way Connector CN3 30 pin SMD connector SMD SAMTEC ZF1 30 01 T WT SAMTEC ZF1 30 01 T WT Socket DC CN4 Power jack 2 5 mm iets 2 5 mm Protectron PDCJ01 08 right angle locking type Terminal block side entry 2 pin terminal 2 way block PM Weidm ller Parti N Weidm ll Farnell al Pitch 5 08 mm mounting 5 08 mm pitch 5 08 2 90 1131853 type PC board orange color ZZ60INN 5 2 91 L eH 62444 di Table 4 list continued Manufacturer s Reference ordering code Supplier ordering Category Component description Package Manufacturer orderable part Supplier designator code number or equivalent Capacitors Capacitor tant 47 uF 6 3 V 3216 18 EIA 2 C1 20 9
3. UM0977 User manual Thermal printer adapter board for the STM3210C EVAL Introduction The thermal printer adapter board for the STM3210C EVAL is an addition to the solution of parking ticket vending machines This daughter board is interfaced with a Connectivity line Demonstration Board using the touch based TFT as the user interface keypad The objective of this demo is to print and generate parking tickets for different types of vehicles as well as printing text messages received over the ethernet It is an application which can be reused in PoS based applications Paper feed is done by a stepper motor for which a driver is required The driver used for the stepper motor L293DD has a push pull four channel driver with diodes The signals are manually changed across the input ends of the driver in a particular sequence according to the timing diagram of the stepper motor and the motor rotates A connector for the DC power adaptor is provided and the EVAL board is powered up using the supply from the daughter board This is done by setting the jumper position on the EVAL board The data to be printed is entered through the touchscreen based keypad on the TFT data entered is also displayed on the TFT screen Figure 1 STEVAL IPCOOSV1 Thermal printer adapter board for STM3210C EVAL UT Y T ODM SD DD Te AMO7725v1 September 2010 Doc ID 17729 Rev 1 1 21 www st com
4. Contents UM0977 Contents 1 i i Cer 4 2 Getting 5 5 2 1 uc o as et hee 5 2 2 System set 5 3 System overview 7 3 1 Hardware design description 7 3 1 1 STM3210C EVAL board 7 3 1 2 Thermal printer FM205 HS 7 3 1 3 eic vmm danse ERR ERU vee ace ene ORE KE 9 3 1 4 Touchscreen based keypad 9 3 1 5 Power supply unit llle n 10 3 1 6 Command description 10 3 2 Hardware layout esas reece dienei EEr pE eee 10 3 3 Hardware 5 12 9 4 rreraren raer Sood XE pue AER ER 14 4 Working principle of thermal printer 16 Appendix A Definitions 19 Revision DISIOFV uius sam kk x arae dad aca eR a aca E RA JE 20 2 21 Doc ID 17729 Rev 1 ky UM0977 List of figures List of figures Figure 1 STEVAL IPCOOS3V1 Thermal printer adapter board for STM3210C EVAL 1 Figure 2 STEVAL IPCOO3V1 mounted on the 210
5. 6 Figure 3 Blockdiagram iussus a ek arr aa eek OR Rx a s 7 Figure 4 Input voltage signals for the sample drive circuit 8 Figure 5 Hardware layout main board top 10 Figure 6 Hardware layout main board bottom 11 Figure 7 Demonstration board connector and power supply 5 lt 12 Figure 8 Printer connector and motor driver schematics 13 Figure 9 Font E etd aa Gos Fal vedere ar ae A doge aHa pear dre 16 Figure 10 Fonts showing strobe 18 y Doc ID 17729 Rev 1 3 21 Features UM0977 1 Features The key features of the application are e Designed for connectivity line Eval board e Thermal printer is interfaced through SPI3 Stepper motor driver L293DD interfaced through GPIOs of STM32 to rotate the printer head while printing e The touchscreen on the TFT is used for touch detection for key pad data entry e QVGA color TFT available on the STM3210C EVAL board is also interfaced through to display the touch based key pad and user entered data e Thecomplete package demonstration board and daughter board needs a single power supply input of 5 V Change the jumper position on the demonstration board to daughter board p
6. 11111111 ol o Ox1FFC 11111111 olo 1 o o o o o 0x000C olol ol ol o ol o 0x000C olol o ol o olo 0x000C oW ol ol o ol o ol o 0x000C WA ss ol o 0x000C olol ol ol o ol o 0x000C 11111111 ol o 11111111 ol o o o 0 0000 ol ol ol ol olol of ol o olo 0x0000 ol ol ol ol ol olol ol o o ol o 0 0000 ol o ol ol ol ol ol ol o ol o 0x0000 ol ol ol ol ol ol ol 0 ol o olo 0x0000 ol ol ol ol ol olol ol o o ol o 0 0000 AMO07732v1 Then the stepper motor is rotated by 2 steps so that the printer head is pointing to the 2nd row Now the printer prints the 2nd row of all the characters and so on Similarly when the 24th row is printed the first line of data can be seen on the paper Doc ID 17729 Rev 1 UM0977 Working principle of thermal printer The character shown above can be interpreted in the string format as E 0x0000 Ox3FFC Ox3FFC 0x000C 0x000C 0x000C 0x000C 0x000C Ox1FFC 0x000C 0x000C 0x000C 0x000C 0x000C 0x000C Ox3FFC Ox3FFC 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 These data to be printed are transferred to the printer through the SPI Then the stepper motor is rotated by 2 steps so that the printer head is pointing to the 2nd row Now the printer prints the 2nd row of all the characters and so on Similarly when the 24th row is printed the first line of data
7. Figure 5 PH1 Stepping motor 1st phase 2nd pin A see Figure 5 PH2 Stepping motor 2nd phase 1st pin B see Figure 5 PH2 Stepping motor 2nd phase 2nd pin B see Figure 5 3 1 3 TFT A 3 2 QVGA color TFT with resistive touchscreen is used as the user interface to show the keypad and the information entered by the user This TFT is available on the STM3210C EVAL board which is using SPI3 to communicate with the microcontroller 3 1 4 Touchscreen based keypad A resistive touchscreen on the TFT is used to detect the key pressed Therefore this touchscreen acts as the data input source ky Doc ID 17729 Rev 1 9 21 System overview UM0977 3 1 5 3 2 10 21 Power supply unit A 5 V DC adapter is attached to the connector on the daughter board and this power supply is then provided through a protection device the STBP120AVDK6F to ensure the input voltage range is within the required limits In this case if the DC adapter voltage is above 6 02 V there is no output and the whole system remains in shutdown mode Otherwise power is transferred to output and the system stays in the ON condition Make sure that jumper JP25 on the STM32F10C EVAL board is in the DTB daughter board power source position Command description e Process print command thermal printer starts printing the data stored e Process set date command the date and time of the system is modified Process entry command entry type Pass or Single is
8. SMD 1206 491 476 Digi Key 399 3700 1 ND i MuRata Ceramic capacitor 100 GRM219R71C104K m C2 C4 C8 C9 16 V 10 X7R 0805 SMD0805 Electronics North AO01D Digi Key 490 1683 1 ND Capacitors America 10 pF cap tantalum 10 pF 2012 15 EIA T T C3 C5 10 V 20 SMD 0805 AVX Corporation TAJP106MO10RNJ Digi Key 478 3281 1 ND 1 pF cap tantalum 1 0 uF 2012 12 EIA T C6 C7 10 V 10 SMD 0805 AVX Corporation TAJR105KO10RNJ Digi Key 478 3278 1 ND OSRAM opto LEDs D2 D3 D4 LED red color 8 8 MCD SMD0805 semiconductors 5 ooo Digi Key 475 2510 1 ND Inc R4 R5 100 kQ SMD0805 Any R1 BES peu Len uc SMD0805 Susumu Co Ltd RG2012P 181 B T5 Digi Key RG20P180BDKR ND R7 R8 R9 RES a SMD0805 Panasonic ECG ERJ 6GEYJ471V Digi Key P470ACT ND nero RES 10 1 8 W 1 9 Stackpol RMCF 1 k RMCF1 Q 1 10 10 ko 1 1 1010 Pa Me 0805 SMD SMDS Electronics Inc ND R10 R11 R12 0 SMD0805 Any R2 RESET KO po W32 SMD0805 Yageo RC0805JR 0727KL Digi Key 311 27KARCT ND 0805 SMD Misc Thermal printer Thermal printer Modular APS FM 205 HS Evolute FM 205 HS Ulo s S ZZ60INN Working principle of thermal printer UM0977 4 16 21 Working principle of thermal printer Printing on the thermal paper is done by rolling paper over the thermal head of the printer and then specific heat elements on the the
9. data of 1 complete row is dumped and then the strobe signals are provided block by block And so the 1st strobe signal is enabled for the first block 64 heat elements and after the printing of the same block this strobe signal is turned off and the 2nd strobe is enabled and so on Then the 2nd strobe signal is provided in a similar way and so on up to the 6th strobe Figure 10 Fonts showing strobe sequence Strobe 1 64 heat elements Strobe 2 and 50 on 11 111 1 Strobe 1 64 heat elements AMO7733v1 18 21 When the 1st strobe signal is provided the corresponding heat element in the first 64 dots are heated and they are printed on the thermal paper For example as shown in Figure 10 for R1 during strobe 1 the heat element corresponding to the black highlighted dots are heated to print in the way shown in Figure 6 Similarly one complete row is printed using the six strobes Then in the similar way all rows 24 rows can be printed to print one line of data Doc ID 17729 Rev 1 UM0977 Definitions Appendix A Definitions
10. stored in the user buffer data on the basis of the touch byte e Process vehicle command vehicle type car scooter or heavy is stored in the user buffer data on the basis of the touch byte e Process number command the last 4 digits of the vehicle number entered by the user are stored Hardware layout The thermal printer adapter board for the STM3210C EVAL is built using the following components Figure 5 and 6 below show the component layout to help the user locate different components sections on the board The thermal printer adapter board for the STM3210C EVAL includes the following components e TM32F10C EVAL board FM205 HS thermal printer 129300 stepper motor driver Figure 5 Hardware layout main board top side a 3 z 77 70 SIZE 11MMX70 32MM AMO07729v1 Doc ID 17729 Rev 1 UM0977 System overview Figure 6 Hardware layout main board bottom side AMO07730v1 Doc ID 17729 Rev 1 11 21 UMO0977 System overview Hardware schematic 3 3 Figure 7 and 8 represent the schematic diagrams for the board Demonstration board connector and power supply schematics Figure 7 Ajddns samod 09 dNLVSH QV3H dl 8H Slad L1nvd 0214915 09d NV INL 08d dNLVAH QV3H dl 63d Wad SWS 9915 SWS la
11. can be seen on the paper All the data to be printed can be first saved in character array Font data to be printed are dumped using SPI row by row and then a strobe signal is provided to the thermal head When the strobe signals are given the corresponding heat elements are heated and the result is that black dots can be seen on the paper Then the stepper motor is rotated by 2 steps to write the data of the next row After writing all the 24 rows the writing of 1 line is completed Here the stepper motor is rotated by 48 steps which provides a 1 line gap between successive lines Calculations for the delay between the successive steps of the stepper motor are e Paper movement speed 0 0625 mm sec see FM205 HS datasheet available from APS Industrial Srl e Max speed for the stepper motor at 5 V supply 56 mm sec see FM205 HS datasheet This means the stepper motor of the thermal printer can move at a maximum speed of 896 steps per second So delay between steps is 1 896 i e 1 11 mS To provide some safety margin a delay of 2 mS between successive steps of the stepper motor is provided In this application all the data to be printed is first saved in a character array of size 15 This means a maximum of 15 characters are printed in each row Then the pointer to the base element of the array is passed to a function PrintData pointer ArrayBaseLocation In this function a u16 type array variable u16 PrintDataArray is updat
12. d 1V1 SIN GNA H3dVd Slad 9915 SWS 1 en vOSNOO uornoes pJ8eoq lad vals SIN 6 93d Sd IZ Olad cals SW clad 1915 SIN zad 9 lOHINOO MI OSIN ldS SIN k VOSNOO J AS g IOHLINOO 1 A Th IZ ISOW ldS SWS OlOd EldS SWA 75 4 S tH 72d 1OHINOO MN k AMO7731v1 Doc ID 17729 Rev 1 12 21 System overview UM0977 Printer connector and motor driver schematics Figure 8 HOLO3NNOO H34NIHd SH SOCSW ce 8c MN LHd Vc MIN al MW HA Vi MIN HA AS OSIN ldS lad 1V1 SW4 clad 1915 SWS Olad cals SWS 8dd 915 09d NV LAL 7915 9915 Slad 9915 ENAN MIO 8145 SW dn 3001 ISOW ldS SW4 10 AS 63d Wid SW AS 08 H3AlHO YOLOW 001 318VN3 89d YZ 1OHINOO MW 7 ve MN 92 MW 37 0 aZ 1OHINOO MW 67 NI 19 IOHINOO MW 3 8VN3 318VN3 YOLOW AM07738v1 13 21 Doc ID 17729 Rev 1
13. ed with the fonts of a complete line using the fonts available from the microcontroller division Therefore the Nth row saves the Nth row of font values of all the characters As each character is of 24 bit height this array variable is of 24 rows and the number of columns is the same as the number of characters As the maximum number of characters that the printer supports is 24 the number of columns of the array is also 24 After updating this array with font level information the pointer to the base location of this array is passed to the function FM205Int pointer ArrayBaseLocation In this function the font data is dumped using SPI3 row by row and then a strobe signal is provided to the thermal head When the strobe signal is given the corresponding heat elements are heated and the result can be seen as black dots on the paper Then the stepper motor is rotated by 2 steps to write the data of the next row After writing all the 24 rows the writing of 1 line is comple Here the stepper motor is rotated by 48 steps which provides a 1 line gap between successive lines Doc ID 17729 Rev 1 17 21 Working principle of thermal printer UM0977 Sequence of giving a strobe signal As previously described each row has 384 heat elements 24 characters 16 bit width of 1 character There are 6 strobe signals each controlling 64 heat elements The thermal printer doesn t allow the heating of more than 64 heat elements at a time So the
14. ignals for the sample drive circuit 1 DOT LINE AMO07728v1 Pin mapping of a printer module Pin mapping for the thermal printer is normally generic In Table 3 the generic pin configurations are shown with their functions Table 3 Pin mapping of thermal printer module Signal name Function Comments PCA Photo sensor cathode pin Used for paper end detection PCO Photo sensor anode collector pin Used for paper end detection PEM Photo sensor emitter pin Used for paper end detection NC Not connected Doc ID 17729 Rev 1 ky UM0977 System overview Table 3 Pin mapping of thermal printer module continued Signal name Function Comments NC Not connected VH Dot line voltage VH Dot line voltage DIN Serial data in SPI data in CLK Serial data clock SPI clock GND Ground GND Ground STB6 6th printing strobe dots 321 to 384 STB5 5th printing strobe dots 257 to 320 STB4 4th printing strobe dots 193 to 256 VDD Logic voltage 5V TM Thermister 1st terminal Used for overheat detection TM Thermister 2nd terminal Used for overheat detection STB3 3rd printing strobe dots 129 to 192 STB2 2nd printing strobe dots 65 to 128 STB1 1st printing strobe dots 1 to 64 GND Ground GND Ground LAT Serial data latch Active low DO Serial data out SPI data out VH Dot line voltage VH Dot line voltage PH1 Stepping motor 1st phase 1st pin A see
15. ower supply and connect a 5 V DC adapter to the connector provided on the daughter board ADC analog watchdog is used to monitor the temperature of the thermal head e real time clock provides the date and time of printing 4 21 Doc ID 17729 Rev 1 ky UM0977 Getting started 2 Getting started 2 1 Package The Thermal printer adapter board for the STM3210C EVAL includes the following items e Hardware content Demonstration board STEVAL IPCOOS3V 1 e Documentation User manual this document Schematics Gerber files BOM list e Firmware Pre programmed STM32 device soldered onto the demonstration board Object files are also available for the firmware 2 2 System set up The thermal printer adapter board for the STM3210C EVAL can be set up as follows Connect the 5 V DC adapter across the connector provided on the daughter board Change the jumper position of JP25 to DTB daughter board power source on the STM3210C EVAL board Add thermal paper 48mm to 52 mm to the printer head as shown in Figure 3 Keeping in mind that the printing side is the glossy side of the paper Now the user can see a welcome message on the TFT screen Then the user must enter the last 4 digits of the vehicle s registration number by pressing the corresponding numeric keys on the TFT screen Choose the vehicle type by pressing one of the keys 2 WHL 4 WHL or HEAVY After selecting the vehicle category the chosen category i
16. p detection Thermal printer FM205 HS The thermal printer mechanism is a compact high speed thermal line dot printing mechanism It can be used with a measuring instrument and analyzer a POS a communication device or a data terminal device As the FM205 HS thermal printer mechanism can be driven by battery it can be easily mounted on a portable device such as a handheld terminal Doc ID 17729 Rev 1 7 21 System overview UM0977 8 21 Paper is fed in a forward direction when the motor shaft is rotating in the normal direction clockwise as seen from the motor gear side The motor is driven by a 2 2 phase excitation constant current chopper method and feeds paper by 0 125 mm equivalent to a single dot pitch every two steps of the motor drive signal It is not possible to print while the motor is rotating in the reverse direction Excitation sequence As shown in Table 2 the printer feeds the paper in the normal direction when the motor is excited in the order of step 1 step 2 step 3 step 4 step 1 step 2 etc On the other hand to rotate the motor in the reverse direction the motor is driven in the reverse order of step 4 step 3 step 2 step 1 step 4 step 3 etc Table 2 Truth table for excitation sequence Sequence Signal name Step1 Step2 Step3 Step4 A Low High High Low High High Low Low High Low Low High B Low Low High High Figure 4 Input voltage s
17. rmal head are heated through a given command A black dot appears on the paper corresponding to the position of the heat element Each character is of size 16 dot 24 dot That is each character is 16 dots wide and 24 dots high So there are 384 dots for printing 1 character One dot is equivalent to one bit of data The thermal printer used in this application supports printing a maximum of 24 characters in each line Each line has 24 rows as the height of the character is 24 dots And as already mentioned each character is 16 bits wide Therefore the result is 16 24 384 heat elements on the thermal head which are heated in the desired manner Data is printed row by row As shown in Figure 9 for character E the first row of the character is shown as R1 which is printed first This is the case with all characters in the line This means that the 1st row of all the characters is printed first 16 bit The hex value for R1 is Ox0000 Then the stepper motor rotates two steps and R2 Ox3FFC in Figure 9 is printed Figure 9 Font E C1 C2 C4 C5 C6 C7 C8 C9 1 1 1 1 1 C1 C16 ol ol ol ol ol ol ol ol ol o ol o 0x0000 ol o 11111111 ol o ol o 0x000C oW ol ol o ol o ol o 0x000C ol o olol ol ol o ol o Ox000C ol oW olol ol ol o ol o 0x000C ol ol o ol o ol o 0x000C
18. s displayed on the TFT for some time and it then asks for the entry type Entry type can be chosen by pressing one of the options SINGLE or PASS After selecting the entry type the chosen entry type is displayed on the LCD for some time Now the user has to give the print command by pressing the PRINT key The ticket is now generated Time can be set by pressing the DATE TIME key Doc ID 17729 Rev 1 5 21 Getting started UM0977 6 21 Figure 2 STEVAL IPC003V1 mounted on the STM3210C EVAL HEAVY I AMO07726v1 Doc ID 17729 Rev 1 UMO0977 System overview 3 3 1 3 1 2 System overview Hardware design description Figure 3 Block diagram STBP120 Stepper Motor Driver 93D Connectivity Line Demo Board STM3210C EVAL Thermal Printer AMO7727v1 STM3210C EVAL board This application uses some peripherals such as SPI3 ADC etc and a few GPIOs To use these it is necessary to remove some resistors from the STM3210C EVAL board to separate them from their default function These resistors can be found in Table 7 Table 1 Pre requisites to be applied on the STM3210C EVAL Action IO required Function of IO JP22 open For PC7 and PD2 Control motor winding Remove R168 For PB1 and PB2 Strobe for printer STB4 and STB5 Remove R139 PE15 Paper end LED Remove R167 PBO Head heat up LED Remove R165 PCO ADC pin for head heat u
19. s or registered trademarks of ST in various countries Information in this document supersedes and replaces all information previously supplied The ST logo is a registered trademark of STMicroelectronics All other names are the property of their respective owners 2010 STMicroelectronics All rights reserved STMicroelectronics group of companies Australia Belgium Brazil Canada China Czech Republic Finland France Germany Hong Kong India Israel Italy Japan Malaysia Malta Morocco Philippines Singapore Spain Sweden Switzerland United Kingdom United States of America www st com ky Doc ID 17729 Rev 1 21 21
20. se grant by ST for the use of such third party products or services or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such third party products or services or any intellectual property contained therein UNLESS OTHERWISE SET FORTH IN ST S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY WITH RESPECT TO THE USE AND OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED WARRANTIES OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE AND THEIR EQUIVALENTS UNDER THE LAWS OF ANY JURISDICTION OR INFRINGEMENT OF ANY PATENT COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT UNLESS EXPRESSLY APPROVED IN WRITING BY AN AUTHORIZED ST REPRESENTATIVE ST PRODUCTS ARE NOT RECOMMENDED AUTHORIZED OR WARRANTED FOR USE IN MILITARY AIR CRAFT SPACE LIFE SAVING OR LIFE SUSTAINING APPLICATIONS NOR IN PRODUCTS OR SYSTEMS WHERE FAILURE OR MALFUNCTION MAY RESULT IN PERSONAL INJURY DEATH OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE ST PRODUCTS WHICH ARE NOT SPECIFIED AS AUTOMOTIVE GRADE MAY ONLY BE USED IN AUTOMOTIVE APPLICATIONS AT USER S OWN RISK Resale of ST products with provisions different from the statements and or technical features set forth in this document shall immediately void any warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner whatsoever any liability of ST ST and the ST logo are trademark
Download Pdf Manuals
Related Search
Related Contents
Refinate 3.0 User Manual 1 Refinate`s Main Window Functions Bedienungsanleitung Smoothie Maker - point AirPlay®ソフトウェアアップグレード手順書 Manuale utente GPS Multibrackets 7 350 073 732 241 fertilizantes - Interempresas The Minimeter User`s Manual Gardener`s Choice - Grass Trimmer - GCT-260 Guide visuel_GON_V1 Copyright © All rights reserved.
Failed to retrieve file