Code spraying control method, corresponding code spraying module and code spraying machine
Through the ARM+FPGA dual controller solution and image slicing cache technology, the problem of real-time and response delay in the printing process of existing roller-type inkjet printing equipment is solved, and the ink cartridge detection and power supply control are avoided Electrical damage has achieved efficient and stable printing operations and user experience improvement.
Patent Information
- Application Number
- CN202411682076.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-11-14
- Filing Date
- 2025-01-06
- Publication Date
- 2025-02-14
AI Technical Summary
During the printing process, existing roller-type inkjet printing equipment are prone to conflict with the application layer operation task with high real-time requirements, resulting in blocking and stuttering of the equipment printing control software and unable to respond to user operations normally. In addition, when the equipment loads and prints large images, the printing response delay will occur, which will affect production efficiency, and the lack of an ink cartridge protection mechanism, which can easily lead to electrical damage to the ink cartridge and the equipment.
The dual controller solution of ARM+FPGA is adopted to separate the upper layer interaction and the underlying printing drive control, and efficient and fast image transmission is achieved through image slicing and preloading cache technology to avoid the transmission time affecting the printing operation. At the same time, the ink cartridge is designed in the chamber detection unit. By detecting the temperature of the ink cartridge or the communication status of the encryption chip, it is determined whether the ink cartridge is in the ink cartridge, and the ink cartridge is powered to prevent electrical damage caused by live plugging and unplugging.
It realizes zero lag in the upper APP system during the equipment printing process, responds to user interaction normally, improves printing response speed and user experience, and uses ink cartridge detection and power supply control to avoid electrical damage to the ink cartridge and equipment, and ensures Normal human-computer interaction and epidermal code of livestock carcasses.
Smart Images

Figure CN119427974A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a coding control method and a corresponding coding module and a coding machine. Background Art
[0002] Figure 1 The figure is the appearance structure diagram of the existing roller inkjet printing device. The main body of the inkjet printer includes a nozzle 1, a roller 2 and a magnetic encoder 3. When the roller 2 rolls along the printing surface, it drives the magnetic encoder 3 to generate a synchronous signal to drive the nozzle 1 to print the image. The inkjet printer is mainly used for printing the skin of livestock carcasses, and the printing surface is the skin of livestock carcasses, such as the skin of pig carcasses.
[0003] Figure 2 This is a schematic diagram of the scheme of the existing roller inkjet printing device. The existing roller inkjet printing device adopts a single controller design. During the printing process, the ARM main control needs to be responsible for image generation, image processing, real-time detection of roller encoder drive signals, generation of specific pulse signals for nozzle drive, and user interaction. The scheme of the existing roller inkjet printing device has many shortcomings.
[0004] First, the existing handheld roller inkjet printing equipment adopts a single processor solution. During the printing process, the printing control software is prone to conflicts between image processing printing tasks with high real-time requirements and application layer running tasks. In severe cases, the device printing control software will be blocked and unable to respond to normal user operations.
[0005] Secondly, existing printing equipment will experience a printing response delay when loading and printing large images. It takes more than 1 second from the time the user presses the print switch to the time the equipment starts printing, which can easily affect production efficiency under high-speed operations.
[0006] In addition, the existing printing equipment is not equipped with an ink cartridge protection mechanism, which can easily cause permanent electrical damage to the ink cartridge and the printing equipment when the ink cartridge is plugged in and out while powered, affecting the printing operation and causing economic losses.
[0007] The Chinese patent application "High-resolution inkjet printer system based on embedded Linux" with application number CN201910836078.X and application date 2019-09-05 discloses a high-resolution inkjet printer system based on embedded Linux. It includes a host computer unit and a slave computer unit; the host computer unit is based on an ARM processor and is equipped with an embedded Linux operating system. The host computer unit includes a host computer printing control module, a data editing module, a parameter setting module, a system tool module and a status display module; the slave computer unit is based on FPGA and includes an SPI control module, a data processing module, an SDRAM control module, a slave computer printing control module and an exception handling module. However, the invention is to improve the printing speed of variable data by adopting a method of updating variable data with a fixed address, which is not universal, because many occasions are for printing pictures instead of variable data.
[0008] The Chinese patent application "An FPGA control system of an inkjet printer and its control method" with application number CN201510789581.6 and application date 2015-11-17 discloses an FPGA control system of an inkjet printer and its control method, which includes a FIFO unit, a state machine unit, a printing control register, a printing state register, a data buffer, a data conversion module, a substrate detection and a production line speed detection module. The FPGA system interacts with the CPU main control system through a parallel bus interface, and is also connected to the back-end driver of the inkjet printer through a serial communication interface. However, this application mainly focuses on the FPGA part, and focuses on the response of the FPGA to the printing speed.
[0009] Most of the inkjet printers in the prior art are only involved in barcode and variable data inkjet printing, with small image size but high speed requirements, or large image size but low real-time requirements for inkjet printing, such as inkjet printers, etc. In the field of livestock carcass inkjet printing, the image size is large, the image length is about 1 meter, there are variable QR codes, and various seals are integrated for printing, and at the same time, it must match the production speed of the production line, and there are high requirements for image processing speed and real-time inkjet printing.
[0010] In addition, existing inkjet printers prohibit plugging and unplugging ink cartridges while powered on, so as to avoid harm to the ink cartridges or the inkjet printer. Summary of the invention
[0011] The purpose of the present invention is to provide a coding control method supporting dynamic plugging and unplugging of ink cartridges, a corresponding coding module, and a coding machine, which can improve the user experience of the coding machine while avoiding damage to the ink cartridge or the coding module.
[0012] In order to realize the present invention, the present invention provides a coding control method, the method comprising: The ink cartridge in-bin detection step is to detect whether the ink cartridge is in the ink bin of the inkjet coding module, that is, whether the contact of the ink cartridge is in electrical contact with the contact of the ink bin. If so, it is determined that the ink cartridge is in the ink bin; if not, it is determined that the ink cartridge is not in the ink bin. The ink cartridge power supply control step is to turn off the ink cartridge power supply if the ink cartridge is not in the ink bin.
[0013] Furthermore, the ink cartridge in-warehouse detection step includes measuring the temperature of the ink cartridge by a temperature measuring circuit matching the temperature measuring signal contacts of the ink cartridge; if the temperature is within a normal range, it is determined that the contacts of the ink cartridge are in electrical contact with the contacts of the ink warehouse; if the temperature is not within the normal range, it is determined that the contacts of the ink cartridge are not in electrical contact with the contacts of the ink warehouse.
[0014] Furthermore, the ink cartridge in-warehouse detection step includes communicating with an encryption chip provided on the ink cartridge. If the communication is successful, it is determined that the contacts of the ink cartridge and the contacts of the ink warehouse are in electrical contact. If the communication fails, it is determined that the contacts of the ink cartridge and the contacts of the ink warehouse are not in electrical contact.
[0015] The present invention also provides a coding module, including an ink cartridge and an ink storage tank adapted therewith, and an ink cartridge in-storage detection unit, wherein the ink cartridge in-storage detection unit detects whether the ink cartridge is in the ink storage tank, that is, whether the contacts of the ink cartridge are in electrical contact with the contacts of the ink storage tank.
[0016] Furthermore, the ink cartridge in-warehouse detection unit includes a temperature measurement circuit adapted to the temperature measurement signal contacts of the ink cartridge, one end of the sampling detection voltage divider resistor of the temperature measurement circuit is connected to a power supply, and the other end is connected to the temperature measurement signal contacts and an ADC pin of an ARM controller, so as to convert the voltage information collected by the ADC into temperature. If the temperature is within a normal range, it is determined that the contacts of the ink cartridge and the contacts of the ink warehouse are in electrical contact; if the temperature is not within a normal range, it is determined that the contacts of the ink cartridge and the contacts of the ink warehouse are not in electrical contact.
[0017] Furthermore, the ink cartridge in-warehouse detection unit includes an IIC communication circuit that communicates with the encryption chip of the ink cartridge. If the IIC communication is successful, it is determined that the contacts of the ink cartridge and the contacts of the ink warehouse are in electrical contact. If the IIC communication fails, it is determined that the contacts of the ink cartridge and the contacts of the ink warehouse are not in electrical contact.
[0018] Furthermore, the model of the ink cartridge is IUT309.
[0019] The present invention also provides a coding module using the coding control method.
[0020] The present invention also provides a coding module, comprising a plurality of ink cartridges and an ink tank compatible therewith, wherein the ink cartridge has an integrated thermistor at the front end of the nozzle, and the coding module further comprises an ink cartridge in-tank detection unit, wherein the ink cartridge in-tank detection unit comprises thermistors of the plurality of ink cartridges connected in parallel and connected in series with an external sampling voltage-dividing resistor, an ADC circuit is connected to the sampling voltage-dividing resistor, a voltage value of the sampling voltage-dividing resistor is collected, and the in-tank status of the plurality of ink cartridges is judged according to the voltage value.
[0021] Furthermore, the ADC circuit has a 10-bit resolution, and the voltage value of the sampling voltage divider resistor is three times the resistance value of the thermistor at room temperature.
[0022] The present invention also provides a coding control method using the above-mentioned coding module, wherein the ink tank accommodates two ink cartridges, and the method includes: the coding module determines the number of ink cartridges in the ink tank according to the ADC circuit sampling value.
[0023] Furthermore, at normal temperature, the relationship between the ADC circuit sampling value and the number of ink cartridges is that if the ADC circuit sampling value is close to 1023, it is judged that there is no ink cartridge in the ink tank; if the ADC circuit sampling value is close to 256, it is judged that there is one ink cartridge in the ink tank; if the ADC circuit sampling value is close to 146, it is judged that there are two ink cartridges in the ink tank.
[0024] Furthermore, at normal temperature, the relationship between the ADC circuit sampling value and the number of ink cartridges is: if the ADC circuit sampling value is ≥634, it is judged that there is no ink cartridge in the ink tank; if 634>the ADC circuit sampling value>201, it is judged that there is one ink cartridge in the ink tank; if the ADC circuit sampling value is ≤201, it is judged that there are two ink cartridges in the ink tank.
[0025] Furthermore, if there are two ink cartridges in the ink tank, the driving power of the ink cartridges is turned on, otherwise the driving power of the ink cartridges is turned off.
[0026] Furthermore, the present invention also provides an inkjet printer including the above-mentioned inkjet control method or inkjet module.
[0027] After adopting the technical solution of the present invention, the status and number of ink cartridges in the ink tank of the inkjet printer can be detected, and circuit failures caused by live plugging and unplugging when the machine is turned on can be avoided, thereby ensuring normal human-computer interaction, facilitating the coding of the skin of livestock carcasses, and ensuring the safety of meat products. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 This is an appearance structure diagram of an existing roller-type inkjet printing device; Figure 2 It is a schematic diagram of the scheme of the existing roller-type inkjet printing equipment; Figure 3 It is the overall scheme principle diagram of the coding equipment of the present invention; Figure 4 It is the encoder detection and printing control process of the FPGA control unit; Figure 5 Schematic diagram of image slicing and preloading cache technology; Figure 6 Flowchart of image slicing and preloading cache technology; Figure 7 Generate a flow chart for the empty and full states of the FIFO buffer; Figure 8 It is the IUT309 ink cartridge temperature detection circuit; Fig. 9 This is the flow chart of ink cartridge in-warehouse detection; Fig.10 This is the connection diagram between the ink cartridge with encryption chip and the ARM main control; Fig.11 The schematic diagram of the circuit of the multi-ink cartridge in-warehouse detection solution based on single-channel ADC of the present invention. DETAILED DESCRIPTION
[0029] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0030] Figure 3 The overall scheme of the inkjet device of the present invention adopts ARM+FPGA as the device processor, and mainly includes three parts: ARM control unit, FPGA control unit, ink cartridge drive and ink cartridge detection unit.
[0031] The ARM control unit is mainly responsible for: 1) User interaction: printing image selection, printing parameter setting, printing start and stop, etc.; 2) Image generation: Generate an image file of the corresponding format and size from the image selected by the user; 3) Image transmission: The generated image is transmitted to the FPGA controller via the SPI high-speed interface.
[0032] The FPGA control unit is mainly responsible for: 1) Image reception: After decoding the SPI received data, the image data is cached into the FIFO buffer, and the buffer empty and full status signals are output to the ARM; 2) FIFO buffer: dynamically stores printing image data; 3) Image processing: converting standard image data into corresponding nozzle control signal data; 4) Encoder detection: detect the roller encoder pulse signal; 5) Printhead drive: Generate a printhead drive signal based on the detected roller encoder pulse signal, and transmit the printhead drive signal to the ink cartridge drive module.
[0033] The ink cartridge drive and ink cartridge detection unit is mainly responsible for: 1) Ink cartridge drive: amplify the power output of the nozzle drive signal transmitted by FPGA and adjust the voltage to adapt to the printing environment; 2) Ink cartridge detection: The temperature of the ink cartridge nozzle is detected through the IUT309 ink cartridge's unique thermal sensor, and the ink cartridge in-warehouse detection is achieved through a specific algorithm; or the ink cartridge in-warehouse detection is achieved through the communication status of the encryption chip set on the ink cartridge.
[0034] The implementation of the present invention is specifically described below in conjunction with the overall solution of the present invention.
[0035] like Figure 3 As shown, the present invention adopts a technical solution of separating upper-layer interaction from underlying printing drive control. The ARM side is responsible for producing images in response to user operations, and the FPGA side is responsible for detecting the real-time signal of the encoder and performing specific drive control on the ink cartridge based on the image data in the cache.
[0036] Figure 4 It is the encoder detection and printing control process of the FPGA control unit.
[0037] Step 1: Start printing. The ARM control unit is responsible for transmitting image information to the FPGA control unit and sending a printing enable signal.
[0038] Step 2: The FPGA control unit caches the received image information and re-encodes the image information.
[0039] Step 3: The FPGA control unit detects the encoder pulse signal and outputs a printing drive signal for one line of image if a valid signal is received, otherwise it continues to wait for the encoder signal.
[0040] Step 4: After receiving the printing drive signal, the ink cartridge driver module controls the ink cartridge to print a line of data.
[0041] Step 5: The FPGA control unit detects whether all images in the FIFO buffer have been printed. If so, the printing is terminated. Otherwise, step 3 is repeated.
[0042] During the entire printing process, the ARM control unit does not participate in the specific encoder detection and printing drive control. The APP upper-level system run by the ARM control unit will not enter a blocked state during the printing process. The APP upper-level system has zero lag during the printing process of the device and responds normally to user interactive operations, as well as printing control operations such as printing interruption and printing termination.
[0043] In the above process, although the ARM control unit and the FPGA control unit have achieved functional separation, when the ARM control unit transmits image information to the FPGA control unit, the size of the transmitted image information will affect the printing response. The best way is to transmit and print at the same time to avoid affecting the printing operation due to long transmission time. To this end, the present invention adopts image slicing and pre-loading cache technology to achieve efficient and fast image transmission without affecting printing, and achieve millisecond-level printing response without delay.
[0044] Figure 5 This is the principle diagram of image slicing and preloading cache technology. Take the printing of a 400KB image as an example to illustrate the principle. The ARM control unit divides the 400KB large image into 400 / 4=100 small images. If the last image is less than 4K, it will be filled with blanks; the FPGA control unit is designed with a 32KB data FIFO cache for image storage. The FPGA control unit detects the usage of the FIFO cache in real time and updates the FIFO empty and full status. The interfaces between the ARM control unit and the FPGA control unit are mainly: FIFO empty and full status signal: The FPGA control unit provides the ARM control unit with the empty and full status information of its own FIFO buffer capacity; SPI interface: the interface for the ARM control unit to transmit image information to the FPGA control unit; Printing enable signal: The interface through which the ARM control unit controls the FPGA control unit to perform image printing.
[0045] Figure 6 This is a flowchart of the image slicing and preloading cache technology. The following is a detailed description of the process.
[0046] Step 1: The ARM control unit generates a printing image with a size of 400KB. The 400KB large image is divided into 400 / 4=100 small images, and the image is sliced. Each slice is 4KB in size. If the last slice, that is, the 100th slice, is less than 4KB, it is filled with blanks.
[0047] Step 2: The ARM control unit cyclically detects the empty and full status of the FIFO buffer of the FPGA control unit. If it is empty, 4K slices are transmitted in sequence through the SPI interface, and the sequence number of the image slice is increased by 1 each time until the FIFO buffer status is full, that is, 8 slices are loaded to realize the preloading of the image.
[0048] Step 3: After the ARM control unit detects that the user starts printing, it sends a printing enable signal to the FPGA control unit.
[0049] Step 4: After the FPGA control unit detects the printing enable signal, it prints according to the encoder signal, consumes the cached data in the FIFO, and updates the empty and full status of the FIFO cache.
[0050] Step 5: The ARM control unit loops step 2 according to the empty and full status signals of the FIFO until all 100 image slices are transmitted.
[0051] Step 6: After all 100 image slices are transmitted, if the ARM control unit detects the FIFO empty signal, the printing is completed.
[0052] Figure 7 Generate a flow chart for the empty and full status of the FIFO buffer. The empty and full status of the FIFO buffer is determined by the FPGA control unit. The FPGA control unit receives the image data transmitted by the ARM control unit, the size of the image data is a slice, and then caches the received image data into the FIFO buffer, detects the empty and full status of the FIFO buffer, and finally outputs the empty and full status of the FIFO buffer. If the FIFO buffer can accommodate one or more slices, the empty and full status can be set to empty, and when 8 slices are loaded, it is set to full.
[0053] In the above process, the ARM control unit slices the image to be printed in advance, and then transmits 4K slices each time. The FPGA control unit does not need to load the entire image before printing, and the ARM controller does not need to stop and wait for the transmission of all printed images to be completed. For a 50Mhz SPI interface, each transmission of 4K slices takes less than 1 millisecond. It only takes 3 to 5 milliseconds for the ARM control unit to preload the FIFO of the FPGA control unit, which can achieve millisecond-level loading and printing response, greatly improving high-speed operation efficiency and user experience.
[0054] In the above embodiment, an ARM+FPGA dual controller solution is adopted, but it should be understood that any two separate controllers can achieve the separation of upper-layer interaction and underlying printing control, and can solve the problem of interaction jamming and delayed response.
[0055] The slice size and FIFO buffer size will vary depending on the component selection. The slice size can be 1K, 2K, 4K, 8K, etc., and the FIFO buffer size can be 8K, 16K, 32K, etc. It can be optimized and adjusted according to the upper-level software system's requirements for response time and inkjet speed.
[0056] The main application field of the present invention is the spray coding of the skin of livestock carcasses, such as the spray coding of the skin of pig carcasses. The content of the spray coding includes the animal quarantine inspection stamp, the meat quality inspection stamp, the traceability code and the traceability QR code and other information. The width of the printed image is certain, but the overall width is relatively long, generally between 70cm and 120cm, and the printing is carried out along the length direction of the carcass. If the spray printing image is loaded as a whole, a large storage space is required, and the loading speed is slow, which affects the efficiency of the spray coding. After adopting the technical solution of the present invention, the spray printing image is loaded very quickly, and it does not need to occupy too much memory space. The spray coding response speed is also very fast, and it can be sprayed immediately after clicking.
[0057] In the existing thermal foaming ink cartridge inkjet printer, the thermal foaming ink cartridge is generally prohibited from being plugged in and out while powered on to avoid burning the host or the ink cartridge. However, the inkjet printer of the present invention also includes an ink cartridge detection circuit.
[0058] The existing thermal foaming ink cartridges will be designed with a nozzle temperature measurement at the front end of the nozzle, and the temperature of the nozzle is obtained through the gold finger contacts of the ink cartridge, such as the 1-inch ink cartridges of IUT308 and IUT309, and the 0.5-inch ink cartridges of IUT300S and HP45A. The present invention adopts the ink cartridge in-warehouse detection technology, which relies on the temperature measurement function of the ink cartridge nozzle. Here, the IUT309 ink cartridge is taken as an example.
[0059] The IUT309 ink cartridge integrates a thermistor temperature sensor at the front end of the printhead. The voltage information is collected by the external ADC and converted into resistance data. The printhead temperature can be preliminarily calculated based on the resistance-temperature conversion formula provided by the original manufacturer of the ink cartridge. The following is the resistance-temperature conversion formula of the IUT309 ink cartridge.
[0060] ,in: T TSR : Thermistor temperature measured at the print head; R TSR : Thermistor resistance value to be measured; R 0TSR : Thermistor reference resistance value, generally 144Ω; T0: thermistor reference temperature, the experimental measurement value is 31.6℃; α: Thermal coefficient of thermistor, generally 3665ppm / K.
[0061] Figure 8This is the IUT309 ink cartridge temperature detection circuit. The ink cartridge driver board contacts the ink cartridge gold finger 11 through the ink tank contact, and a 470Ω 1% sampling detection voltage divider resistor 12 is added to the temperature measurement signal contact. One end of the sampling detection voltage divider resistor 12 is connected to the power supply, and the other end is connected to the ADC pin of the ARM controller for voltage measurement.
[0062] Fig. 9 This is the ink cartridge in-bin detection flow chart. When the ink cartridge is placed in the ink bin, the driver board contacts touch the temperature sensor contacts. Figure 8 Circuit, ARM controller can calculate a normal nozzle temperature range according to the resistance-temperature conversion formula. When the ink cartridge is not in the ink tank, the circuit is in an open circuit state and the default input resistance is infinite. At this time, the ARM controller detects that the resistance is not within a reasonable range, and it can be determined that the ink cartridge is not in the tank. The inkjet control power supply needs to be turned off to prevent the ink cartridge from accidentally touching the contacts when loading, causing electrical damage.
[0063] The ink cartridge in-tank detection process is as follows: first, the ARM controller reads the voltage value of the ADC port of its ADC pin, converts the ADC port voltage value into a resistance value, and then determines whether the resistance is out of range. If so, it is determined that the ink cartridge is not in the ink tank and the ink cartridge drive power is turned off. If not, it is determined that the ink cartridge is in the ink tank, the ink cartridge drive power is turned on, and the nozzle temperature is calculated.
[0064] During normal use, turn on the ink cartridge driver power before each printing, and turn off the ink cartridge driver power immediately after completion to prevent the ink cartridge from being pulled out while it is powered on.
[0065] The above-mentioned design solution can solve the problem of live loading and unloading of ink cartridges when the device is turned on, and protect the ink cartridges and the device from electrical damage caused by incorrect loading and unloading.
[0066] For ink cartridges with encryption chips, the printer can determine whether the ink cartridge is in the ink tank by reading the encryption chip on the ink cartridge. If the encryption chip information is read, it is considered that the ink cartridge is in the ink tank. If the encryption chip information is not read, it is determined that the ink cartridge is not in the ink tank. If the ink cartridge is not in the ink tank, turn off the ink cartridge drive power supply. If the ink cartridge is in the ink tank, turn on the ink cartridge drive power supply.
[0067] Fig.10 The figure is a connection diagram between the ink cartridge with encryption chip and the ARM main control. The ARM main control and the encryption chip communicate through the IIC bus. Through the IIC bus, if the ARM main control and the encryption chip communicate successfully, it is determined that the ink cartridge is in the ink tank, otherwise it is determined that the ink cartridge is not in the ink tank.
[0068] The above are all cases where there is only one ink cartridge in the ink tank. If there are two or more ink cartridges in the ink tank, each ink cartridge can be detected separately according to the above solution. However, this requires two or more ADCs, which consumes more hardware resources. How to detect the situation where two or more ink cartridges are in the tank at the same time with only one ADC is described in detail below.
[0069] Fig.11 The schematic diagram of the circuit for detecting multiple ink cartridges in the ink tank based on a single-channel ADC of the present invention. Taking the detection of two IUT309 ink cartridges in the ink tank as an example, the IUT309 ink cartridge integrates a thermistor at the front end of the nozzle. There are two ink cartridges in the ink tank of the inkjet printer, namely, ink cartridge A and ink cartridge B. The resistance of the thermistor 22 integrated in the nozzle of ink cartridge A is R TSR1 The resistance of the integrated thermistor 23 of the ink cartridge B nozzle is R TSR2 , the resistance value of the voltage-dividing resistor 21 detected by ADC sampling is R0, the thermistor 22 and the thermistor 23 are connected in parallel and in series with the voltage-dividing resistor 21, and the ADC samples and detects the voltage across the voltage-dividing resistor 21.
[0070] Assuming that the ADC reference voltage is VCC, according to the voltage division principle, the resistance calculation formula of parallel resistors and the ADC conversion formula, the ADC sampling value output formula is as follows:
[0071] in, ADC_Value: ADC sampling value; R TSR1 : Resistance value of the integrated thermistor 22; R TSR2 : Resistance value of the integrated thermistor 23; : Resistance value of two ink cartridges in parallel; n: ADC resolution; R0: ADC sampling detection voltage divider resistor 21 resistance.
[0072] Assume that the ink cartridge reference thermistor at room temperature is R 0TSR , the ADC has a 10-bit resolution. Substituting it into the above formula, the simplified formula is as follows:
[0073] Among them, ADC_Value: ADC sampling value; R 0TSR : Resistance values of the integrated thermistors 22 and 23 at room temperature; N: Number of ink cartridges in the warehouse.
[0074] Further simplifying the formula, assuming that the ADC sampling detection voltage divider resistor R0 is 3 times R 0TSR The relationship between the ADC sampling value and the ink cartridge in the warehouse at room temperature is simplified to the following formula: ADC_Value=1 / (3N+1)*1023 ADC_Value: ADC sampling value; N: Number of ink cartridges in the warehouse.
[0075] According to the above simplified formula, we can get: 1. When there is no ink cartridge in the magazine, the ADC sampling value is close to 1023; 2. When there is only one ink cartridge in the magazine, the ADC sampling value is close to 256; 3. When both ink cartridges are in the warehouse, the ADC sampling value is close to 146.
[0076] The average value of the two adjacent calculated values is taken as the ink cartridge judgment threshold to obtain Table 1.
[0077] Table 1 Threshold range for judging the ink cartridge in the warehouse
[0078] According to the above principle, the in-warehouse detection steps are: Step 1: The controller initializes the ADC peripheral and starts ADC detection.
[0079] Step 2: The master controller reads the sampled value of the ADC port.
[0080] Step 3: According to the threshold range of Table 1, determine which threshold range the ADC sampling value is in. If there is no ink cartridge or only one ink cartridge in the bin, turn off the ink cartridge drive power supply. If both ink cartridges are in the bin, turn on the ink cartridge drive power supply and prepare for printing.
[0081] This solution can be extended to multiple ink cartridges in the warehouse detection according to this principle, and is suitable for ink cartridges in the warehouse detection with such characteristic resistors, realizing the function of a single-channel ADC to simultaneously detect and judge the presence of multiple ink cartridges in the warehouse.
[0082] Finally, it should be noted that the above embodiments are intended to illustrate rather than limit the technical solutions of the present invention, and a person skilled in the art may modify or make equivalent substitutions to the present invention, and any modification or partial substitution that does not depart from the spirit and scope of the present invention shall be included in the scope of protection of the claims of the present invention.
Claims
1. A coding control method, characterized in that: The method comprises, The ink cartridge in-bin detection step is to detect whether the ink cartridge is in the ink bin of the inkjet coding module, that is, whether the contact of the ink cartridge is in electrical contact with the contact of the ink bin. If so, it is determined that the ink cartridge is in the ink bin; if not, it is determined that the ink cartridge is not in the ink bin. The ink cartridge power supply control step is to turn off the ink cartridge power supply if the ink cartridge is not in the ink bin.
2. The coding control method according to claim 1, characterized in that: The ink cartridge in-warehouse detection step includes measuring the temperature of the ink cartridge by a temperature measuring circuit matching the temperature measuring signal contacts of the ink cartridge. If the temperature is within a normal range, it is determined that the contacts of the ink cartridge are in electrical contact with the contacts of the ink warehouse. If the temperature is not within the normal range, it is determined that the contacts of the ink cartridge are not in electrical contact with the contacts of the ink warehouse.
3. The coding control method according to claim 1, characterized in that: The ink cartridge in-warehouse detection step includes communicating with an encryption chip provided on the ink cartridge. If the communication is successful, it is determined that the contacts of the ink cartridge are in electrical contact with the contacts of the ink warehouse. If the communication fails, it is determined that the contacts of the ink cartridge are not in electrical contact with the contacts of the ink warehouse.
4. A coding module, comprising an ink cartridge and an ink tank adapted thereto, characterized in that: The inkjet coding module also includes an ink cartridge in-warehouse detection unit, which detects whether the contacts of the ink cartridge and the contacts of the ink warehouse are in electrical contact. If they are in electrical contact, it is determined that the ink cartridge is in the ink warehouse, otherwise, it is determined that the ink warehouse is empty.
5. The inkjet coding module according to claim 4, characterized in that: The ink cartridge in-warehouse detection unit includes a temperature measurement circuit adapted to the temperature measurement signal contacts of the ink cartridge, one end of the sampling detection voltage divider resistor of the temperature measurement circuit is connected to a power supply, and the other end is connected to the temperature measurement signal contacts and an ADC pin of an ARM controller, so as to convert the voltage information collected by the ADC into temperature. If the temperature is within a normal range, it is determined that the contacts of the ink cartridge and the contacts of the ink warehouse are in electrical contact; if the temperature is not within a normal range, it is determined that the contacts of the ink cartridge and the contacts of the ink warehouse are not in electrical contact.
6. The inkjet coding module according to claim 4, characterized in that: The ink cartridge in-warehouse detection unit includes an IIC communication circuit that communicates with the encryption chip of the ink cartridge. If the IIC communication is successful, it is determined that the contacts of the ink cartridge and the contacts of the ink warehouse are in electrical contact. If the IIC communication fails, it is determined that the contacts of the ink cartridge and the contacts of the ink warehouse are not in electrical contact.
7. The inkjet coding module according to claim 5, characterized in that: The model of the ink cartridge is IUT309.
8. A coding module, characterized in that: The coding module includes the coding control method according to any one of claims 1 to 3.
9. A coding module, comprising a plurality of ink cartridges and ink tanks adapted thereto, wherein the ink cartridges have a thermistor integrated at the front end of the nozzle, characterized in that: The inkjet coding module also includes an ink cartridge presence detection unit, which includes thermistors of the plurality of ink cartridges connected in parallel and connected in series with an external sampling voltage-dividing resistor, an ADC circuit is connected to the sampling voltage-dividing resistor, collects the voltage value of the sampling voltage-dividing resistor, and determines the presence status of the plurality of ink cartridges according to the voltage value.
10. The inkjet coding module according to claim 9, characterized in that: The ADC circuit has a 10-bit resolution, and the voltage value of the sampling voltage-dividing resistor is three times the resistance value of the thermistor at room temperature.
11. A coding control method applied to the coding module as claimed in claim 10, characterized in that: The ink reservoir accommodates two ink cartridges, and the method includes the inkjet coding module determining the number of ink cartridges in the ink reservoir according to the ADC circuit sampling value.
12. The coding control method according to claim 11, characterized in that: At normal temperature, the relationship between the ADC circuit sampling value and the number of ink cartridges is that if the ADC circuit sampling value is close to 1023, it is determined that there is no ink cartridge in the ink tank; If the ADC circuit sampling value is close to 256, it is determined that there is one ink cartridge in the ink tank; if the ADC circuit sampling value is close to 146, it is determined that there are two ink cartridges in the ink tank.
13. The inkjet control method according to claim 11, characterized in that: At normal temperature, the relationship between the ADC circuit sampling value and the number of ink cartridges is: if the ADC circuit sampling value ≥634, it is judged that there is no ink cartridge in the ink tank; if 634>the ADC circuit sampling value>201, it is judged that there is one ink cartridge in the ink tank; if the ADC circuit sampling value ≤201, it is judged that there are two ink cartridges in the ink tank.
14. The coding control method according to any one of claims 11 to 13, characterized in that: If there are two ink cartridges in the ink tank, the driving power of the ink cartridges is turned on; otherwise, the driving power of the ink cartridges is turned off.
15. A printer, characterized in that: The inkjet printer includes the inkjet control method as described in any one of claims 1 to 3 and 11 to 14, or includes the inkjet module as described in any one of claims 4 to 10.
Citation Information
Patent Citations
An FPGA control system and control method for an inkjet printer
CN105468310B
High-resolution inkjet printer system based on embedded Linux
CN110561911A
Ink-jet output device using temp sensor element to identify kind of ink cartridge
CN1502471A
Ink cartridge chip and ink cartridge
CN201120774Y
Ink horn and printing apparatus
CN207291318U