Constant current drive circuit, printing chip and printing equipment

CN224624925UActive Publication Date: 2026-08-11ZHONGSHAN POLONO ELECTRONIC TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2025-08-26
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

然而,恒流源芯片价格高、占用PCB面积,且需要额外布线,不利于低成本、小型化设计

Benefits of technology

[0018]本申请实施例提供一种恒流驱动电路、打印芯片和打印设备,无需通过专用的恒流芯片,仅通过对主控芯片MCU的普通I/O口的相关配置,就可以获取当前纸张材质对应的理想光耦电流并进行实时地、闭环补偿调节,输出相应的恒定理想电流,克服因外界因素引起的误差;可兼容不同材质的纸张,仅占用MCU的普通I/O,节省了PCB面积,降低了成本。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN224624925U_ABST
    Figure CN224624925U_ABST
Patent Text Reader

Abstract

This invention discloses a constant current driving circuit, a printing chip, and a printing device. The circuit includes a main controller, a photoelectric sensor, and an analog-to-digital converter (ADC). The ADC acquires the current signal output from the photodetector in the photoelectric sensor and sends it to the main controller. The main controller calculates the ideal current value for driving the light-emitting diode (LED) in the photoelectric sensor based on the current signal and generates a corresponding driving signal to output to the LED by configuring the output state of its I / O pins, so that it operates under the ideal current. This invention achieves closed-loop feedback control of the light-emitting side current of the photoelectric sensor, overcomes errors caused by external factors, is compatible with different paper materials, and does not require an additional dedicated constant current chip circuit. It significantly improves the accuracy and stability of the photoelectric detection system while also reducing costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of printer technology, and more particularly to a constant current drive circuit, a printing chip, and a printing device. Background Technology

[0002] Label printers often use optocouplers to detect the spacing between adjacent paper labels. Different paper materials have significantly different reflectivity / transmittance, and if the optocoupler drive current is fixed, problems such as misjudgment and misalignment can easily occur. The traditional solution is to use a dedicated constant current source chip, adjusting the output current through the MCU's DAC or communication interface. However, constant current source chips are expensive, occupy PCB space, and require additional wiring, which is detrimental to low-cost, miniaturized designs. Utility Model Content

[0003] To address the shortcomings of existing technologies, the main objective of this invention is to provide a constant current drive circuit that enables the main controller to determine the ideal current corresponding to the current paper material based on the signal output by the analog-to-digital converter, thereby configuring the relevant I / O port output status in real time and using closed-loop compensation to ensure that the output current is the ideal current value.

[0004] To achieve the above-mentioned main objectives, this utility model discloses a constant current driving circuit, which includes: a main controller, a photoelectric sensor, and an analog-to-digital converter;

[0005] The photoelectric sensor includes a light-emitting diode and a light receiver. The light-emitting diode is located on the input side of the photoelectric sensor, and the light receiver is located on the output side of the photoelectric sensor.

[0006] The input terminal of the analog-to-digital converter is electrically connected to the output terminal of the photodetector, and is used to acquire the current signal at the output terminal of the photodetector.

[0007] The main controller has an input terminal and an output terminal. The output terminal includes at least one configurable I / O port. The input terminal of the main controller is electrically connected to the output terminal of the analog-to-digital converter and is used to acquire the current signal collected by the analog-to-digital converter from the input terminal. The output terminal of the main controller is electrically connected to the input terminal of the photoelectric sensor. The main controller configures the I / O port according to the current signal to output a drive current to the input terminal of the photoelectric sensor.

[0008] In one embodiment, the constant current drive circuit further includes a first resistor and a first capacitor. The input terminal of the first resistor is electrically connected to the voltage VCC of the main controller, and the output terminal is electrically connected to the input terminal of the first capacitor. The input terminal of the first capacitor is electrically connected to the analog-to-digital converter, and the output terminal of the first capacitor is grounded.

[0009] In one embodiment, the I / O port includes a first I / O port, the first I / O port outputting a PWM signal, supporting PWM output with a duty cycle in the range of 1% to 100%.

[0010] In one embodiment, the I / O port further includes at least one second I / O port, which supports only two output states: high impedance or fixed high level.

[0011] In one embodiment, the constant current drive circuit further includes a diode, and the output terminal of the first I / O port is electrically connected to the anode of the diode.

[0012] In one embodiment, the first I / O port and the second I / O port of the main controller are connected in parallel and then connected to the input terminal of the photoelectric sensor.

[0013] In one embodiment, the constant current driving circuit further includes a second resistor and a second capacitor. The output terminal of the second resistor is electrically connected to the input terminal of the photoelectric sensor, the input terminal of the second capacitor is electrically connected to the cathode of the diode, the output terminal of the second capacitor is grounded, the output terminal of the first I / O port is electrically connected to the input terminal of the second resistor via the diode, and the output terminal of the second I / O port is electrically connected to the input terminal of the second resistor.

[0014] In one embodiment, the anode of the light-emitting diode is electrically connected to the output terminal of the second resistor, and the cathode of the light-emitting diode is grounded.

[0015] Secondly, this application also proposes a printing chip, including a processor of any of the aforementioned constant current driving circuits, for adjusting the driving current of the photoelectric sensor in real time according to different paper materials.

[0016] Thirdly, this application also provides a printing device including any of the aforementioned constant current drive circuits.

[0017] The technical solution of this utility model has at least the following beneficial effects:

[0018] This application provides a constant current drive circuit, a printing chip, and a printing device. Without the need for a dedicated constant current chip, it can obtain the ideal optocoupler current corresponding to the current paper material and perform real-time, closed-loop compensation and adjustment by configuring the general I / O ports of the main control chip MCU, thereby outputting a corresponding constant ideal current and overcoming errors caused by external factors. It is compatible with different paper materials, occupies only the general I / O ports of the MCU, saves PCB area, and reduces costs. Attached Figure Description

[0019] Figure 1This is a schematic diagram illustrating the scenario of printing paper for this application;

[0020] Figure 2 This is a schematic diagram of the structure of a constant current drive circuit provided in one embodiment of this application;

[0021] Figure 3 A circuit diagram of a constant current drive circuit provided in one embodiment of this application;

[0022] Figure 4 This is a signal diagram corresponding to the output of the main controller port in a constant current drive circuit provided in one embodiment of this application. Detailed Implementation

[0023] To better understand the technical solutions in this specification, the embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0024] It should be understood that the described embodiments are merely some, not all, of the embodiments in this specification. All other embodiments obtained by those skilled in the art based on the embodiments in this specification without inventive effort are within the scope of protection of this specification.

[0025] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this specification. The singular forms “a,” “the,” and “the” used in the embodiments of this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0026] Figure 1 This is a schematic diagram illustrating a scenario where paper is printed for this application, such as... Figure 1 As shown, the printing paper is designed with gaps between the sheets. These gaps are non-printable areas with higher light transmittance, serving as indicators of the start and end printing positions. Different paper materials exhibit significant differences in light reflectivity / transmittance. If the optocoupler drive current is fixed, issues such as misjudgment and misalignment can easily occur. Traditional solutions involve using a dedicated constant current source chip, adjusting the output current via the MCU's DAC (Digital to Analog Converter) or a communication interface. However, constant current source chips are expensive, occupy PCB space, and require additional wiring, hindering low-cost and miniaturized designs.

[0027] Based on the above issues, Figure 2 This is a schematic diagram of the structure of a constant current drive circuit provided in one embodiment of this application, as shown below. Figure 2As shown, this application embodiment provides a constant current driving circuit, including: a main controller 100, a photoelectric sensor 200, and an analog-to-digital converter 300; the photoelectric sensor 200 includes a light-emitting diode D_LED and a photodetector Q1, the light-emitting diode D_LED is located on the input side of the photoelectric sensor 200, and the photodetector Q1 is located on the output side of the photoelectric sensor 200; the input terminal of the analog-to-digital converter (ADC) is electrically connected to the output terminal of the photodetector Q1, and is used to collect the current signal at the output terminal of the photodetector Q1; the input terminal of the main controller 100 is electrically connected to the output terminal of the analog-to-digital converter ADC, and is used to acquire the current signal collected by the analog-to-digital converter ADC, and configure the output drive current of the I / O pin according to the current signal; the output terminal of the main controller 100 is used to output the drive current to the photoelectric sensor 200.

[0028] Specifically, such as Figure 1 As shown, the light transmittance of label paper varies among different consumable materials. Furthermore, even within the same consumable material, the light transmittance at the peelable label location and the light transmittance between two peelable labels differ. This means that when a user replaces a consumable material with a new one, this difference in light transmittance may affect the positioning accuracy.

[0029] For example, the maximum output current of each I / O port in the main controller 100 is 20mA. When the printer is powered on, the main controller 100 outputs a current value, assuming this current value is 2mA. This current is output to the input side of the photoelectric sensor 200, i.e., the light-emitting diode D_LED, driving the light-emitting diode D_LED to light up. At this time, the printed label paper moves at the printer's paper output port, and the output side of the photoelectric sensor 200, i.e., the photodetector Q1, reads the current signal transmitted through the paper by the light-emitting diode D_LED. This current signal is read by the analog-to-digital converter (ADC), which converts the current signal into a value that the main controller 100 can read and then sends it to the main controller 100. In the first scenario, assuming that 4 seconds have passed, the main controller 100 cannot read the relevant value from the ADC, indicating that the brightness of the light-emitting diode D_LED cannot transmit through the paper. At this time, the photodetector Q1 does not receive the relevant current signal, meaning that the ADC cannot read the relevant value either. In the first scenario, the output current needs to be increased beyond the 2mA current value. In the second scenario, assuming the same 4-second period has passed, if the main controller 100 only reads the same value, it indicates that the output current configured in the main controller 100 is too high. The photodetector Q1, i.e., the NPN transistor, reaches its threshold and only outputs a single current signal. Therefore, it cannot distinguish the position of the peelable label and the gap between two peelable labels, making accurate positioning impossible. The main controller 100 needs to reduce its output current. In the third scenario, also assuming the same 4-second period has passed, if the main controller 100 reads two different values ​​from the analog-to-digital converter (ADC), it indicates that the current output of the main controller 100 is appropriate, meaning the brightness of the LED (D_LED) is suitable. The smaller value corresponds to the position of the peelable label, and the larger value corresponds to the gap between the two peelable labels. The above-mentioned drive current adjustment is achieved through closed-loop compensation. While the consumable labels are still in use, this ideal drive current will remain unchanged until new consumable labels are replaced.

[0030] In one optional implementation, the constant current drive circuit further includes a first resistor R1 and a first capacitor C1. The input terminal of the first resistor R1 is electrically connected to the voltage VCC of the main controller 100, and the output terminal is electrically connected to the input terminal of the first capacitor C1. The input terminal of the first capacitor C1 is electrically connected to the analog-to-digital converter ADC, and the output terminal is grounded.

[0031] Furthermore, the first resistor R1 is pulled up to the power supply voltage VCC, and the first capacitor C1 filters the signal output from the NPN transistor before outputting it to the analog-to-digital converter (ADC), thus eliminating interference signals.

[0032] In one optional implementation, the constant current drive circuit further includes a diode D1, with the output terminal of the first I / O port PB4 electrically connected to the anode of the diode D1, and the cathode of the diode D1 electrically connected to the input terminal of the second resistor R2.

[0033] Among them, diode D1 is a Schottky diode, which is used to rectify the output current of the first I / O port PB4 to make the output current more stable, and at the same time it can prevent the current from flowing in reverse.

[0034] In one optional embodiment, the constant current drive circuit further includes a second resistor R2 and a second capacitor C2. The output terminal of the second resistor R2 is electrically connected to the input terminal of the photoelectric sensor, the input terminal of the second capacitor C2 is electrically connected to the cathode of the diode D1, and the output terminal of the second capacitor C2 is grounded. The second capacitor C2 filters the signal output from the first I / O port PB4 to eliminate interference signals; the second resistor R2 is a current-limiting resistor to prevent excessive current from burning out the light-emitting diode D_LED on the input side of the photoelectric sensor 200, thus protecting the light-emitting diode.

[0035] In one optional implementation, the main controller has two configurable I / O ports, specifically including a first I / O port PB4 and a second I / O port PB5. The first I / O port PB4 and the second I / O port PB5 are connected in parallel and electrically connected to the input terminal of the photoelectric sensor 200 to drive the light-emitting diode D_LED to work.

[0036] In another alternative implementation, the second I / O port of the main controller can also be multiple I / O ports. For example, in this embodiment, PB5 to PB7 are all set as the second I / O ports. The specific number of the second I / O ports can be increased or decreased according to the actual situation, and this utility model does not limit this.

[0037] Among them, such as Figure 3 As shown, the first I / O port PB4 outputs a PWM control signal, supporting a duty cycle range of 1% to 100%, with a current adjustment step of 1%. This meets the requirements of different paper materials, enabling precise printing and improving print quality. Other I / O ports besides PB4 only have two states: high impedance and fixed high level. Figure 2As shown, when the required current range is 0–80mA, the four configurable I / O ports of the main controller (PB4, PB5, PB6, PB7) can be used to adjust the ideal current. Assuming VCC = 3.3V, the forward voltage drop of the LED D_LED is approximately 1.2V, and the forward voltage drop of diode D1 is approximately 0.4V. The voltage at node A is approximately VCC - Vd = 2.9V, then the voltage across the second resistor R2 is VR2 = Va - Vf = 1.7V. Selecting the second resistor R2 = 85Ω, the maximum current of a single I / O port of the main controller is Imax = VR2 / R2 ≈ 20mA. That is, any I / O port of the MCU can provide approximately 20mA of drive capability when the push-pull output is high.

[0038] When the required current is between 0 and 20 mA, only PB4 outputs the duty cycle D, and PB5 to PB7 are configured in a high-impedance state. The corresponding total current (main controller output current) I = D × 20 mA (D ranges from 0% to 100%). When the required current is between 20 and 40 mA, the second I / O port PB5 is configured to a high level (continuously outputting 20 mA), the first I / O port PB4 outputs the duty cycle D, and the second I / O ports PB6 and PB7 are configured in a high-impedance state. The corresponding total current (main controller output current) I = D × 20 mA. The current I = 20mA + D × 20mA; when the required current is between 40 and 60mA, the second I / O ports PB5 and PB6 are set to high level, PB4 outputs duty cycle D, and the second I / O port PB7 is configured to high impedance. At this time, the corresponding total current (main controller output current) I = 40mA + D × 20mA; when the required current is between 60 and 80mA, the second I / O ports PB5, PB6, and PB7 are set to high level, PB4 outputs duty cycle D, and the total current I = 60mA + D × 20mA.

[0039] For example, when the consumable label paper is made of ordinary coated paper, the ideal current I_target = 15mA. At this time, the first I / O port PB4 outputs a 75% duty cycle, and the second I / O ports PB5 to PB7 are in a high-impedance state. When the consumable label paper is made of PET bright silver paper, the ideal current I_target = 35mA. At this time, the first I / O port PB4 outputs a 75% duty cycle, the second I / O port PB5 is set to a high level, and the second I / O ports PB6 to PB7 are in a high-impedance state. When the consumable label paper is made of transparent PVC, the ideal current I_target = 55mA. At this time, the first I / O port PB4 outputs a 75% duty cycle, the second I / O ports PB5 and PB6 are set to a high level, and the second I / O port PB7 is in a high-impedance state.

[0040] In an alternative implementation, when a larger current is required, it can be achieved by extending, for example... Figure 2The other I / O ports PB1-PB3 shown are connected in parallel with the first I / O port PB4 and the second I / O ports PB5-PB7 to node A in the same manner, which can further obtain a current range of 0-140mA or greater, as long as the total output current of the MCU does not exceed the chip's specified value. Similarly, if a larger current is required, a main control chip with more configurable ports can be used, and the second I / O port can be configured to the same or different output currents according to actual needs, which can meet the needs of multiple ideal current values. This utility model does not impose any limitations on this.

[0041] This application also proposes a printing chip, including a processor of any of the above-mentioned constant current driving circuits, for adjusting the driving current of the photoelectric sensor in real time according to different paper materials.

[0042] This application also provides a printing device including any of the above-described constant current drive circuits.

[0043] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0044] In the description of the embodiments of this utility model, the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this specification. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Furthermore, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0045] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this specification includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which the embodiments of this specification pertain.

[0046] Furthermore, the functional units in the various embodiments of this specification can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in a combination of hardware and software functional units.

[0047] The above description is merely a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of protection of this specification.

Claims

1. A constant current drive circuit, characterized in that, include: Main controller, photoelectric sensor, analog-to-digital converter; The photoelectric sensor includes a light-emitting diode and a light receiver. The light-emitting diode is located on the input side of the photoelectric sensor, and the light receiver is located on the output side of the photoelectric sensor. The input terminal of the analog-to-digital converter is electrically connected to the output terminal of the photodetector, and is used to acquire the current signal at the output terminal of the photodetector. The main controller has an input terminal and an output terminal. The output terminal includes at least one configurable I / O port. The input terminal of the main controller is electrically connected to the output terminal of the analog-to-digital converter and is used to acquire the current signal collected by the analog-to-digital converter from the input terminal. The output terminal of the main controller is electrically connected to the input terminal of the photoelectric sensor. The main controller configures the I / O port according to the current signal to output a drive current to the input terminal of the photoelectric sensor.

2. The constant current drive circuit according to claim 1, characterized in that: The constant current drive circuit further includes a first resistor and a first capacitor. The input terminal of the first resistor is electrically connected to the voltage VCC of the main controller, and the output terminal is electrically connected to the input terminal of the first capacitor. The input terminal of the first capacitor is electrically connected to the analog-to-digital converter, and the output terminal of the first capacitor is grounded.

3. The constant current drive circuit according to claim 1, characterized in that: The I / O port includes a first I / O port, which outputs a PWM signal and supports PWM output with a duty cycle in the range of 1% to 100%.

4. The constant current drive circuit according to claim 3, characterized in that: The I / O port also includes at least one second I / O port, which supports only two output states: high impedance or fixed high level.

5. The constant current drive circuit according to claim 3 or 4, characterized in that: The constant current drive circuit also includes a diode, and the output terminal of the first I / O port is electrically connected to the anode of the diode.

6. The constant current drive circuit according to claim 5, characterized in that: The first I / O port and the second I / O port of the main controller are connected in parallel and then connected to the input terminal of the photoelectric sensor.

7. The constant current drive circuit according to claim 6, characterized in that: The constant current drive circuit further includes a second resistor and a second capacitor. The output terminal of the second resistor is electrically connected to the input terminal of the photoelectric sensor, the input terminal of the second capacitor is electrically connected to the cathode of the diode, the output terminal of the second capacitor is grounded, the output terminal of the first I / O port is electrically connected to the input terminal of the second resistor via the diode, and the output terminal of the second I / O port is electrically connected to the input terminal of the second resistor.

8. The constant current drive circuit according to claim 7, characterized in that: The anode of the light-emitting diode is electrically connected to the output terminal of the second resistor, and the cathode of the light-emitting diode is grounded.

9. A printed chip, characterized in that: The processor includes the constant current drive circuit as described in any one of claims 1-8, and is used to adjust the drive current of the photoelectric sensor in real time according to the paper material.

10. A printing device, characterized in that: Includes the constant current drive circuit as described in any one of claims 1-8.