[go: up one dir, main page]

CN109849536B - Motor phase method, device, storage medium and printer - Google Patents

Motor phase method, device, storage medium and printer Download PDF

Info

Publication number
CN109849536B
CN109849536B CN201910100882.1A CN201910100882A CN109849536B CN 109849536 B CN109849536 B CN 109849536B CN 201910100882 A CN201910100882 A CN 201910100882A CN 109849536 B CN109849536 B CN 109849536B
Authority
CN
China
Prior art keywords
motor
resistor
motor driving
driving chip
phase
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910100882.1A
Other languages
Chinese (zh)
Other versions
CN109849536A (en
Inventor
不公告发明人
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiamen Hanyin Co ltd
Original Assignee
Xiamen Hanyin Electronic Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xiamen Hanyin Electronic Technology Co Ltd filed Critical Xiamen Hanyin Electronic Technology Co Ltd
Priority to CN201910100882.1A priority Critical patent/CN109849536B/en
Publication of CN109849536A publication Critical patent/CN109849536A/en
Application granted granted Critical
Publication of CN109849536B publication Critical patent/CN109849536B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Control Of Stepping Motors (AREA)

Abstract

The invention discloses a motor phase method, a motor phase device, a storage medium and a printer, wherein the printer comprises a controller, a motor driving chip, a stepping motor and a motor driving power supply; the driving motor chip is respectively electrically connected with the stepping motor and the motor driving power supply; the controller comprises a memory and a processor, the memory and the driving motor chip are both connected with the processor, a computer program is stored in the memory, and the computer program can be executed by the processor to perform the following steps: inquiring the current paper feeding and printing task state; when judging that no paper feeding printing task exists currently, keeping a motor driving power supply to supply power for a motor driving chip, and controlling an input phase signal of the motor driving chip to be unchanged to enable the motor driving chip to enter a phase locking state; in the phase locking state, the motor driving chip is controlled to output a predetermined direct current to the stepping motor to lock the phase of the stepping motor. The paper feeding error can be effectively eliminated.

Description

Motor phase method, device, storage medium and printer
Technical Field
The invention relates to the field of intelligent equipment, in particular to a motor phase method, a motor phase device, a storage medium and a printer.
Background
In application, the thermal printer has high requirement on the positioning precision of label paper or black label paper, especially for consumables with small label length or black label interval, in order to ensure the positioning accuracy, the accurate phase control of the motor needs to be ensured, namely, the phase can be locked when the motor is still.
The existing motor phase control technology of the printer is realized by controlling a phase signal of a stepping motor driver, and the purpose of stopping rotation is achieved by disconnecting motor driving current when paper feeding of the stepping motor is finished every time. When a stator coil loop of a stepping motor is in a high-resistance state, a motor stator magnetic pole only has a minute vector magnetic field, and cannot generate enough magnetic force to lock a motor rotor so that the rotor has enough holding torque to lock a phase, and the application of a rotating torque to the motor rotor easily causes the phase of the rotor to change, for example: after the machine prints one label, the printer controller records the phase when the motor stops, and the accuracy of the motor phase is ensured by controlling the corresponding phase signal when the motor is restarted; the paper tearing action is carried out during the stalling, the motor rotor does not have holding torque during the outage, the rubber covered roller is dragged by the paper and rotates a certain angle, but the main control cannot know the length of how many steps the paper is dragged, the paper is still held at the original position, the motor control phase record of the main control has deviation with the actual phase of the motor, when the motor is started next time, the deviation can lead to the fact before the phase synchronization of the two, the stepping motor can lose step, the main control paper feeding distance record and the actual paper feeding distance generate errors, the motor loses step and can lead to the starting printing effect to have the problems of compression, white lines, deformation, dislocation and the like, the paper feeding error leads to the next label printing position to correspondingly deviate, and meanwhile, the label is inaccurately positioned.
Disclosure of Invention
The motor phase method, the motor phase device, the storage medium and the printer provided by the embodiment of the invention can effectively prevent the motor rotor from being rotated when the motor rotor is static due to the tearing of paper, eliminate paper feeding errors and effectively solve the problems of starting printing position deviation, inaccurate label positioning and the like.
The embodiment of the invention provides a printer, which comprises a controller, a motor driving chip, a first transmission mechanism, a stepping motor, a paper feeding rubber roller and a motor driving power supply, wherein the motor driving chip is arranged on the controller; the stepping motor is in transmission connection with the paper feeding rubber roller through a first transmission mechanism, and the driving motor chip is electrically connected with the stepping motor and the motor driving power supply respectively; the controller comprises a memory and a processor, wherein the memory and the driving motor chip are connected with the processor, and a computer program is stored in the memory and can be executed by the processor to realize the following steps:
inquiring the current paper feeding and printing task state;
when judging that no paper feeding printing task exists currently, keeping a motor driving power supply to supply power for a motor driving chip, and controlling an input phase signal of the motor driving chip to be unchanged to enable the motor driving chip to enter a phase locking state;
and in the phase locking state, controlling a motor driving chip to output a preset direct current to the stepping motor so as to lock the phase of the stepping motor.
Preferably, the predetermined direct current is smaller than a motor drive current in a paper-feeding printing state.
Preferably, the device further comprises a regulation feedback resistance circuit; the control input end of the adjusting feedback resistance circuit is connected with the control output end of the controller, and the output end of the adjusting feedback resistance circuit is connected with the motor driving chip;
in the phase locking state, controlling the motor driving chip to output a predetermined direct current to the stepping motor to lock the phase of the stepping motor, specifically:
and a preset direct current is obtained by adjusting the resistance value of a feedback resistor formed by the feedback resistor control circuit.
Preferably, the regulation feedback resistance circuit comprises a first MOS transistor Q1, a second MOS transistor Q2, a first resistor R1, a second resistor R2, a third resistor R3, a fourth resistor R4 and a fifth resistor R5; wherein:
the G pole of the first MOS transistor Q1 is connected with the control output end of the controller;
a first end of the first resistor R1 is connected to a G pole of the first MOS transistor Q1; a second end of the first resistor R1 is grounded; a first end of the first resistor R1 is connected to a G pole of the second MOS transistor Q2;
a first end of the second resistor R2 is connected to the D pole of the first MOS transistor Q1, and a second end of the second resistor R2 is connected to the input end of the motor driving chip;
a first end of the third resistor R3 is connected to the D pole of the second MOS transistor Q2, and a second end of the third resistor R3 is connected to the input end of the motor driver chip;
a first end of the fourth resistor R4 is grounded, and a second end of the fourth resistor R4 is connected to an input end of the motor driving chip;
the first end of the fifth resistor R5 is grounded, and the second end of the fifth resistor R5 is connected to the input end of the motor driving chip.
Preferably, the device further comprises a reference voltage regulating circuit; the control input end of the reference voltage regulating resistor circuit is connected with the control output end of the controller, and the output end of the reference voltage regulating circuit is connected with the motor driving chip;
in the phase locking state, controlling the motor driving chip to output a predetermined direct current to the stepping motor to lock the phase of the stepping motor, specifically:
and a preset direct current is obtained by adjusting the reference voltage value of the reference voltage control circuit.
Preferably, the reference voltage regulating circuit comprises a third MOS transistor Q3, a sixth resistor R6, a seventh resistor R7, an eighth resistor R8 and a ninth resistor R9; wherein:
a first end of the sixth resistor R6 is connected to a voltage output end of a motor driving chip, and a second end of the sixth resistor R6 is connected to a first end of the seventh resistor R7 and a first end of the eighth resistor R8 and then connected to a voltage input end of the motor driving chip;
a second end of the ninth resistor R9 is grounded; a second end of the eighth resistor R8 is connected to the D pole of the third MOS transistor Q3;
a first end of the ninth resistor R9 is connected to the G pole of the third MOS transistor Q3, and a second end of the ninth resistor R9 is grounded;
and the G pole of the third MOS tube Q3 is connected with the control output end of the controller.
Preferably, the controller is connected with the motor driving chip through an I2C interface;
in the phase locking state, controlling the motor driving chip to output a predetermined direct current to the stepping motor to lock the phase of the stepping motor, specifically:
configuring a torque DAC register and a feedback gain register of the motor driving chip through an I2C interface to change a register value and change a driving current feedback quantity so as to obtain a preset direct current; wherein I2C on the processor acts as the master.
Preferably, the controller is connected with the motor driving chip 2 through an SPI interface;
in the phase locking state, controlling the motor driving chip to output a predetermined direct current to the stepping motor to lock the phase of the stepping motor, specifically:
and configuring a torque DAC register and a feedback gain register of the motor driving chip through an SPI (serial peripheral interface) interface so as to change the register value and change the feedback quantity of the driving current, thereby obtaining the preset direct current.
In a second aspect, an embodiment of the present invention provides a motor phase control method, including:
inquiring the current paper feeding and printing task state;
when judging that no paper feeding printing task exists currently, keeping a motor driving power supply to supply power for a motor driving chip, and controlling an input phase signal of the motor driving chip to be unchanged to enable the motor driving chip to enter a phase locking state;
and in the phase locking state, controlling a motor driving chip to output a preset direct current to the stepping motor so as to lock the phase of the stepping motor.
In a third aspect, an embodiment of the present invention provides a motor phase control apparatus, including:
the inquiry unit is used for inquiring the current paper feeding and printing task state;
the judging unit is used for keeping the motor driving power supply to supply power to the motor driving chip and controlling the input phase signal of the motor driving chip to be unchanged when judging that no paper feeding printing task exists currently, so that the motor driving chip enters a phase locking state;
and the control unit is used for controlling the motor driving chip to output preset direct current to the stepping motor in a phase locking state so as to lock the phase of the stepping motor.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium includes a stored computer program, and when the computer program runs, the apparatus where the computer-readable storage medium is located is controlled to execute the printing paper tilt correction method according to any one of the above embodiments.
In the above embodiment, after the stepping motor is stopped each time, the controller controls the motor driving power supply to maintain power supply to the motor driving chip, the controller provides a fixed phase control signal to the motor driving chip, and the controller controls the motor driving chip to output a predetermined direct current to lock the phase of the motor rotor in a state where the phase control signal is not changed; once the rotor of the stepping motor is locked in phase, the transmission mechanism is relatively static, the paper feeding rubber roller cannot rotate under the clamping action of the transmission mechanism, the motor rotor can be effectively prevented from being rotated when the motor rotor is static due to the fact that paper is pulled, paper feeding errors are eliminated, and the problems of starting printing position deviation, inaccurate label positioning and the like are effectively solved.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a printer according to a first embodiment of the present invention.
Fig. 2 is a first flowchart of a motor phase lock control method according to a first embodiment of the invention.
Fig. 3 is a circuit structure diagram of a motor phase lock control method according to an embodiment of the present invention.
Fig. 4 is a second flowchart of a motor phase lock control method according to a second embodiment of the invention.
Fig. 5 is a schematic structural diagram of a motor phase-lock control device according to a third embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1 and 2, a printer according to a first embodiment of the present invention includes a controller 1, a motor driving chip 2, a first transmission mechanism 4, a stepping motor 5, a paper feeding roller 6, and a motor driving power supply 3; the stepping motor 5 is in transmission connection with the paper feeding rubber roller 6 through a first transmission mechanism 4, and the driving motor chip 2 is electrically connected with the stepping motor 5 and the motor driving power supply 3 respectively.
In this embodiment, the paper feeding roller 6 is used for feeding paper, and the paper feeding roller 6 is a roller-shaped product which is made by taking metal or other materials as a core and coating rubber outside the core through vulcanization.
In this embodiment, the first transmission mechanism 4 is preferably a gear transmission mechanism, which may include one or more gears connected together in a certain connection relationship to transmit the torque obtained from the stepping motor 5 to the feed roller 6, so as to rotate the feed roller 6 in a predetermined direction. Of course, it should be noted that, in other embodiments, the transmission mechanism is set according to actual conditions, as long as the stepping motor 5 can drive the paper feeding roller 6 to rotate through the transmission mechanism, and the present invention is not limited in particular.
In this embodiment, the specific structure of the first transmission mechanism 4 and the connection manner with the stepping motor 5 may refer to various conventional portable thermal printers, especially photo printers, such as a Canon photo printer CP1200 or CP1300, and the description of the present invention is omitted here.
In this embodiment, the driving motor chip 2 is DRV8711, but it should be noted that in other embodiments, the type of the driving motor chip 2 may also be set according to the actual situation, and the invention is not limited in detail herein.
In this embodiment, the controller 1 includes a memory and a processor, the memory and the driving motor chip 2 are both connected to the processor, and the memory stores a computer program, and the computer program can be executed by the processor to implement the following steps:
and inquiring the current paper feeding printing task state.
When judging that no paper feeding printing task exists currently, the motor driving power supply 3 is kept to supply power for the motor driving chip 2, and the input phase signal of the motor driving chip 2 is controlled to be unchanged, so that the motor driving chip 2 enters a phase locking state.
In the phase-locked state, the motor driving chip 2 is controlled to output a predetermined direct current to the stepping motor 5 to lock the phase of the stepping motor 5.
In this embodiment, after the printer is started, the controller 1 enters a paper feeding print job waiting state, and if the controller 1 determines that there is a paper feeding print job currently, it enters a normal paper feeding mode, and sets motor driving parameters according to a normal paper feeding requirement, thereby completing the paper feeding print job. When the paper feeding printing task is finished, the paper feeding printing task waiting state is returned again, at this time, if the controller 1 judges that no paper feeding printing task exists currently, the motor driving power supply 3 is kept to supply power for the motor driving chip 2, the input phase signal of the motor driving chip 2 is controlled to be unchanged, and the motor driving chip 2 enters a phase locking state. In the phase-locked state, the controller 1 controls the motor driving chip 2 to output a predetermined dc current to the stepping motor 5, the dc current passing through the motor stator coil so that the magnetic poles of the motor stator generate a constant vector magnetic field opposite to the magnetic poles of the motor rotor 7, thereby firmly attracting the motor rotor 7 and the motor stator magnetic poles to each other, and at this time, the motor stator locks the motor rotor 7 by magnetic force so that the motor rotor 7 has a holding torque, i.e., an anti-rotation torque (n.m), thereby fixing the motor rotor 7.
As shown in fig. 3, in the present embodiment, after the motor rotor 7 is phase-locked, a predetermined direct current can be obtained by:
in one embodiment, the circuit further comprises a regulation feedback resistance circuit 11; the control input end of the adjusting feedback resistance circuit 11 is connected with the control output end of the processor 1, and the output end of the adjusting feedback resistance circuit 11 is connected with the motor driving chip 2;
in the phase-locked state, the motor driving chip 2 is controlled to output a predetermined dc current to the stepping motor 5 to lock the phase of the stepping motor 5, specifically:
the predetermined direct current is obtained by adjusting the resistance value of the feedback resistor formed by the feedback resistor control circuit 11.
Specifically, the regulation feedback resistance circuit 11 includes a first MOS transistor Q1, a second MOS transistor Q2, a first resistor R1, a second resistor R2, a third resistor R3, a fourth resistor R4, and a fifth resistor R5; wherein:
the G pole of the first MOS transistor Q1 is connected with the control output end of the controller 1; a first end of the first resistor R1 is connected to a G pole of the first MOS transistor Q1; a second end of the first resistor R1 is grounded; a first end of the first resistor R1 is connected to a G pole of the second MOS transistor Q2; a first end of the second resistor R2 is connected to the D pole of the first MOS transistor Q1, and a second end of the second resistor R2 is connected to the input end of the motor driver chip 2; a first end of the third resistor R3 is connected to the D pole of the second MOS transistor Q2, and a second end of the third resistor R3 is connected to the input end of the motor driver chip 2; a first end of the fourth resistor R4 is grounded, and a second end of the fourth resistor R4 is connected to the input end of the motor driving chip 2; the first terminal of the fifth resistor R5 is grounded, and the second terminal of the fifth resistor R5 is connected to the input terminal of the motor driver chip 2.
Referring to fig. 3, in this embodiment, the first MOS transistor Q1 and the second MOS transistor Q2 are N-channel fets, and the first resistor R1 is a gate-source resistor of the first MOS transistor Q1 and the second MOS transistor Q2, and is configured to prevent the gate-source of the first MOS transistor Q1 from floating and being damaged. The third resistor R3 and the fifth resistor R5 are respectively a basic feedback resistor of the output current of the motor driving chip 2, the feedback adjustment resistor signal RFB _ CTRL is at a high level in a normal printing paper feeding state, the first MOS transistor Q1 and the second MOS transistor Q2 are turned on, the second resistor R2 and the third resistor R3 are connected in parallel to serve as an a-phase feedback resistor, the fourth resistor R4 and the fifth resistor R5 are connected in parallel to serve as a B-phase reverse feeding resistor, and at this time, the motor driving current is I1; when one-time printing is finished, the stepping motor 5 stops rotating, the feedback adjusting resistance signal RFB _ CTRL output by the controller 1 is at a low level, at this time, the drain and source electrodes of the first MOS transistor Q1 and the second MOS transistor Q2 are closed, and the third resistor R3 and the fifth resistor R5 are connected in parallel to serve as an AB-phase feedback resistor, so that a motor driving current I2 is obtained. Since the motor drive current is negative feedback control, when the third resistor R3 and the fifth resistor R5 are connected in parallel as an AB-phase feedback resistor, the resistance value becomes large so that the drive current becomes small (I ═ Vref/R, when R increases, I decreases), thereby obtaining a predetermined direct current.
In another embodiment, a regulated reference voltage circuit 12 is also included; the control input end of the reference voltage regulating resistor circuit 12 is connected with the control output end of the controller 1, and the output end of the reference voltage regulating circuit 12 is connected with the motor driving chip 2;
in the phase-locked state, the motor driving chip 2 is controlled to output a predetermined dc current to the stepping motor 5 to lock the phase of the stepping motor 5, specifically:
by adjusting the reference voltage value of the reference voltage control circuit 12, a predetermined direct current is obtained. Specifically, the third MOS transistor Q3 is controlled by the reference voltage adjusting signal VREF _ CTRL to change the voltage division structure of the reference voltage, a constant voltage is converted by a pulse width modulation signal (PWM signal) as the reference voltage of the motor driving chip, and a voltage value is generated by analog-to-digital conversion (DAC) as the reference voltage of the motor driving chip.
Specifically, the regulated reference voltage circuit 12 includes a third MOS transistor Q3, a sixth resistor R6, a seventh resistor R7, an eighth resistor R8, and a ninth resistor R9; wherein:
a first end of the sixth resistor R6 is connected to a voltage output end of the motor driver chip 2, and a second end of the sixth resistor R6 is connected to a first end of the seventh resistor R7 and a first end of the eighth resistor R8 and then connected to a voltage input end of the motor driver chip 2; a second end of the ninth resistor R9 is grounded; a second end of the eighth resistor R8 is connected to the D pole of the third MOS transistor Q3; a first end of the ninth resistor R9 is connected to the G pole of the third MOS transistor Q3, and a second end of the ninth resistor R9 is grounded; and the G pole of the third MOS tube Q3 is connected with the control output end of the controller 1.
Referring to fig. 3, in the reference voltage control circuit of the motor driver chip 2 in the present embodiment, the sixth resistor R6 and the seventh resistor R7 are high-side and low-side voltage dividing resistors of the reference voltage, the eighth resistor R8 is a low-side second voltage dividing resistor, and the ninth resistor R9 is a gate-source resistor of the third MOS transistor; when the reference voltage adjusting signal is at a high level, the third MOS transistor Q3 is turned on, and after the third MOS transistor Q3 is turned on, the seventh resistor R7 and the eighth resistor R8 are connected in parallel, so that the reference voltage is decreased, and the motor driving current is decreased proportionally with the decrease of the reference voltage, thereby obtaining a predetermined direct current.
In another embodiment, referring to fig. 3, 14 is an I2C control circuit, and the controller 1 and the motor driving chip 2 are connected through an I2C interface.
In the phase-locked state, the motor driving chip 2 is controlled to output a predetermined dc current to the stepping motor 5 to lock the phase of the stepping motor 5, specifically:
configuring a torque DAC register and a feedback gain register of the motor driving chip 2 through an I2C interface to change a register value and change a driving current feedback quantity so as to obtain a preset direct current; wherein I2C on the controller 1 acts as the master.
In another embodiment, referring to fig. 3, 14 is an SPI control circuit, the controller is connected to the motor driving chip 2 through an SPI interface,
in the phase-locked state, the motor driving chip 2 is controlled to output a predetermined direct current to the stepping motor to lock the phase of the stepping motor, specifically:
the torque DAC register and the feedback gain register of the motor driving chip 2 are configured through the SPI interface, so that the feedback quantity of the driving current is changed by changing the register value, and the preset direct current is obtained.
In the embodiment, the motor driving power supply 3 supplies power to the motor driving chip 2 of the stepping motor 5, after the stepping motor 5 stops each time, the controller 1 provides a fixed phase control signal for the motor driving chip 2, and in a state that the phase control signal is not changed, the controller 1 controls the motor driving chip 2 to output a predetermined direct current (the current value is an adjustable driving current) so as to lock the phase of the motor rotor; once the rotor of the stepping motor 5 is locked in phase, the transmission mechanism is relatively static, the paper feeding rubber roller 6 cannot rotate under the clamping action of the transmission mechanism, the motor rotor can be effectively prevented from being rotated when the motor rotor is static due to the fact that paper is torn, and paper feeding errors are eliminated. The problems of offset of starting printing positions, inaccurate label positioning and the like are effectively solved. Once the motor rotor is locked in phase, the transmission mechanism is relatively static, the paper feeding rubber roller 6 cannot rotate under the clamping action of the transmission mechanism, the paper can be pulled only by overcoming a considerable resistance under the pressure of the thermal printing head and the paper feeding rubber roller 6, the resistance of the paper on the paper feeding rubber roller is changed from rolling friction into sliding friction, and the paper tearing resistance is greatly improved.
In a preferred embodiment of the present invention based on the first embodiment, the predetermined dc current is smaller than a motor driving current in a paper-feeding printing state. When the step motor 5 is controlled in phase locking, the direct current value applied to the step motor avoids the over-temperature of the step motor 5, and simultaneously ensures that the rotor of the step motor 5 has enough anti-rotation torque.
In this embodiment, the printer further includes necessary components for realizing printing, for example, at least a print head, a paper discharge mechanism, and the like. Of course, more components, structures or circuits may be included, and reference may be made to the existing printer specifically, which is not described herein again.
Second embodiment of the invention:
referring to fig. 4, the second embodiment of the present invention further provides a motor phase control method, including:
s100, inquiring the current paper feeding and printing task state;
s200, when judging that no paper feeding printing task exists currently, keeping a motor driving power supply to supply power to a motor driving chip, and controlling an input phase signal of the motor driving chip to be unchanged to enable the motor driving chip to enter a phase locking state;
and S300, controlling a motor driving chip to output a preset direct current to the stepping motor in a phase locking state so as to lock the phase of the stepping motor.
In the embodiment, a power supply source is driven by a motor to supply power to a stepping motor driving chip, after the motor stops every time, a controller provides a fixed phase control signal for the motor driving chip, and under the condition that the phase control signal is not changed, the controller controls the stepping motor driving chip to output a preset current value (the current value is adjustable driving current) so as to lock the phase of a motor rotor; once the rotor of the stepping motor is locked in phase, the transmission mechanism is relatively static, the paper feeding rubber roller cannot rotate under the clamping action of the transmission mechanism, the motor rotor can be effectively prevented from being rotated when the motor rotor is static due to the fact that paper is torn, and paper feeding errors are eliminated. The problems of offset of starting printing positions, inaccurate label positioning and the like are effectively solved. Once the motor rotor is locked in phase, the transmission mechanism is relatively static, the paper feeding rubber roller cannot rotate under the clamping action of the transmission mechanism, the paper can be pulled only by overcoming a certain resistance under the pressure of the thermal printing head and the paper feeding rubber roller, the resistance of the paper on the paper feeding rubber roller is changed from rolling friction into sliding friction, and the paper tearing resistance is greatly improved.
Preferably, the predetermined direct current is smaller than a motor drive current in a paper-feeding printing state.
Preferably, the device further comprises a regulation feedback resistance circuit; the control input end of the adjusting feedback resistance circuit is connected with the control output end of the controller, and the output end of the adjusting feedback resistance circuit is connected with the motor driving chip;
in the phase locking state, controlling the motor driving chip to output a predetermined direct current to the stepping motor to lock the phase of the stepping motor, specifically:
and a preset direct current is obtained by adjusting the resistance value of a feedback resistor formed by the feedback resistor control circuit.
Preferably, the device further comprises a reference voltage regulating circuit; the control input end of the reference voltage regulating resistor circuit is connected with the control output end of the controller, and the output end of the reference voltage regulating circuit is connected with the motor driving chip;
in the phase locking state, controlling the motor driving chip to output a predetermined direct current to the stepping motor to lock the phase of the stepping motor, specifically:
and a preset direct current is obtained by adjusting the reference voltage value of the reference voltage control circuit.
Preferably, the controller is connected with the motor driving chip through an I2C interface;
in the phase locking state, controlling the motor driving chip to output a predetermined direct current to the stepping motor to lock the phase of the stepping motor, specifically:
configuring a torque DAC register and a feedback gain register of the motor driving chip through an I2C interface to change a register value and change a driving current feedback quantity so as to obtain a preset direct current; wherein I2C on the processor acts as the master.
Preferably, the controller is connected with the motor driving chip 2 through an SPI interface;
in the phase locking state, controlling the motor driving chip to output a predetermined direct current to the stepping motor to lock the phase of the stepping motor, specifically:
and configuring a torque DAC register and a feedback gain register of the motor driving chip through an SPI (serial peripheral interface) interface so as to change the register value and change the feedback quantity of the driving current, thereby obtaining the preset direct current.
Third embodiment of the invention:
referring to fig. 5, a third embodiment of the present invention provides a motor phase control apparatus including:
the inquiring unit 10 is used for inquiring the current paper feeding and printing task state;
the judging unit 20 is configured to, when it is judged that there is no paper feeding print job currently, keep the motor driving power supply to supply power to the motor driving chip, and control the input phase signal of the motor driving chip to be unchanged, so that the motor driving chip enters a phase locking state;
and a control unit 30 for controlling the motor driving chip to output a predetermined direct current to the stepping motor in a phase locking state to lock a phase of the stepping motor.
An embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium includes a stored computer program, and when the computer program runs, the apparatus where the computer-readable storage medium is located is controlled to execute the printing paper tilt correction method according to any one of the above embodiments.
Illustratively, the computer program may be divided into one or more units, which are stored in the memory and executed by the processor to accomplish the invention. The one or more units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program in the printer.
The printer may include, but is not limited to, a processor, memory. Those skilled in the art will appreciate that the schematic diagram is merely an example of a printer and is not meant to be limiting, and may include more or fewer components than those shown, or some components in combination, or different components, e.g., the printer may also include input and output devices, network access devices, buses, etc.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, the control center of the printer, connecting the various parts of the overall printer using various interfaces and lines.
The memory may be used to store the computer programs and/or modules, and the processor may implement the various functions of the printer by running or executing the computer programs and/or modules stored in the memory, as well as by invoking data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
Wherein the printer integrated unit, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer-readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
It should be noted that the above-described device embodiments are merely illustrative, where the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. In addition, in the drawings of the embodiment of the apparatus provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, and may be specifically implemented as one or more communication buses or signal lines. One of ordinary skill in the art can understand and implement it without inventive effort.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.

Claims (10)

1. A printer comprises a controller, a motor driving chip, a first transmission mechanism, a stepping motor, a paper feeding rubber roller and a motor driving power supply; the stepping motor is in transmission connection with the paper feeding rubber roller through a first transmission mechanism, and the driving motor chip is electrically connected with the stepping motor and the motor driving power supply respectively;
the controller is characterized by comprising a memory and a processor, wherein the memory and the driving motor chip are connected with the processor, a computer program is stored in the memory, and the computer program can be executed by the processor to realize the following steps:
inquiring the current paper feeding and printing task state;
when judging that no paper feeding printing task exists currently, keeping a motor driving power supply to supply power for a motor driving chip, and controlling an input phase signal of the motor driving chip to be unchanged to enable the motor driving chip to enter a phase locking state;
in a phase locking state, controlling a motor driving chip to output a preset direct current to the stepping motor so as to lock the phase of the stepping motor;
the printer also includes a regulating feedback resistance circuit; the control input end of the adjusting feedback resistance circuit is connected with the control output end of the controller, and the output end of the adjusting feedback resistance circuit is connected with the motor driving chip;
in the phase locking state, controlling a motor driving chip to output a predetermined direct current to the stepping motor to lock the phase of the stepping motor, specifically:
and a preset direct current is obtained by adjusting the resistance value of a feedback resistor formed by the feedback resistor control circuit.
2. The printer of claim 1, the predetermined direct current being less than a motor drive current peak value in a paper-feed printing state.
3. The printer of claim 1, wherein the regulation feedback resistor circuit comprises a first MOS transistor Q1, a second MOS transistor Q2, a first resistor R1, a second resistor R2, a third resistor R3, a fourth resistor R4, and a fifth resistor R5; wherein:
the G pole of the first MOS transistor Q1 is connected with the control output end of the controller;
a first end of the first resistor R1 is connected to a G pole of the first MOS transistor Q1; a second end of the first resistor R1 is grounded; a first end of the first resistor R1 is connected to a G pole of the second MOS transistor Q2;
a first end of the second resistor R2 is connected to the D pole of the first MOS transistor Q1, and a second end of the second resistor R2 is connected to the input end of the motor driving chip;
a first end of the third resistor R3 is connected to the D pole of the second MOS transistor Q2, and a second end of the third resistor R3 is connected to the input end of the motor driver chip;
a first end of the fourth resistor R4 is grounded, and a second end of the fourth resistor R4 is connected to an input end of the motor driving chip;
the first end of the fifth resistor R5 is grounded, and the second end of the fifth resistor R5 is connected to the input end of the motor driving chip.
4. The printer of claim 1, further comprising a regulated reference voltage circuit; the control input end of the reference voltage regulating resistor circuit is connected with the control output end of the controller, and the output end of the reference voltage regulating circuit is connected with the motor driving chip;
in the phase locking state, controlling the motor driving chip to output a predetermined direct current to the stepping motor to lock the phase of the stepping motor, specifically:
and a preset direct current is obtained by adjusting the reference voltage value of the reference voltage control circuit.
5. The printer according to claim 4, wherein the regulated reference voltage circuit comprises a third MOS transistor Q3, a sixth resistor R6, a seventh resistor R7, an eighth resistor R8, and a ninth resistor R9; wherein:
a first end of the sixth resistor R6 is connected to a voltage output end of a motor driving chip, and a second end of the sixth resistor R6 is connected to a first end of the seventh resistor R7 and a first end of the eighth resistor R8 and then connected to a voltage input end of the motor driving chip;
a second end of the ninth resistor R9 is grounded; a second end of the eighth resistor R8 is connected to the D pole of the third MOS transistor Q3;
a first end of the ninth resistor R9 is connected to the G pole of the third MOS transistor Q3, and a second end of the ninth resistor R9 is grounded;
and the G pole of the third MOS tube Q3 is connected with the control output end of the controller.
6. The printer of claim 1, wherein said controller interfaces with said motor drive chip via an I2C interface;
in the phase locking state, controlling the motor driving chip to output a predetermined direct current to the stepping motor to lock the phase of the stepping motor, specifically:
configuring a torque DAC register and a feedback gain register of the motor driving chip through an I2C interface to change a driving current feedback quantity by changing register values of the torque DAC register and the feedback gain register so as to obtain a preset direct current; wherein I2C on the processor acts as the master.
7. The printer of claim 1, wherein said controller is connected to said motor driver chip via an SPI interface;
in the phase locking state, controlling the motor driving chip to output a predetermined direct current to the stepping motor to lock the phase of the stepping motor, specifically:
and configuring a torque DAC register and a feedback gain register of the motor driving chip through the SPI interface so as to change the driving current feedback quantity by changing the register values of the torque DAC register and the feedback gain register, thereby obtaining the preset direct current.
8. A method of controlling a phase of a motor, comprising:
inquiring the current paper feeding and printing task state;
when judging that no paper feeding printing task exists currently, keeping a motor driving power supply to supply power for a motor driving chip, and controlling an input phase signal of the motor driving chip to be unchanged to enable the motor driving chip to enter a phase locking state;
in a phase locking state, controlling a motor driving chip to output a preset direct current to a stepping motor so as to lock the phase of the stepping motor;
in the phase locking state, controlling a motor driving chip to output a predetermined direct current to the stepping motor to lock the phase of the stepping motor, specifically:
the predetermined direct current is obtained by adjusting the resistance value of the feedback resistor formed by the feedback resistor control circuit.
9. A motor phase control apparatus, comprising:
the inquiry unit is used for inquiring the current paper feeding and printing task state;
the judging unit is used for keeping the motor driving power supply to supply power to the motor driving chip and controlling the input phase signal of the motor driving chip to be unchanged when judging that no paper feeding printing task exists currently, so that the motor driving chip enters a phase locking state;
the control unit is used for controlling the motor driving chip to output preset direct current to the stepping motor in a phase locking state so as to lock the phase of the stepping motor;
the control unit is specifically configured to obtain a predetermined direct current by adjusting a feedback resistance value formed by the feedback resistance control circuit.
10. A computer-readable storage medium, comprising a stored computer program, wherein the computer program, when executed, controls an apparatus in which the computer-readable storage medium is located to perform the motor phase control method of claim 8.
CN201910100882.1A 2019-01-31 2019-01-31 Motor phase method, device, storage medium and printer Active CN109849536B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910100882.1A CN109849536B (en) 2019-01-31 2019-01-31 Motor phase method, device, storage medium and printer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910100882.1A CN109849536B (en) 2019-01-31 2019-01-31 Motor phase method, device, storage medium and printer

Publications (2)

Publication Number Publication Date
CN109849536A CN109849536A (en) 2019-06-07
CN109849536B true CN109849536B (en) 2022-01-28

Family

ID=66897327

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910100882.1A Active CN109849536B (en) 2019-01-31 2019-01-31 Motor phase method, device, storage medium and printer

Country Status (1)

Country Link
CN (1) CN109849536B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113386475B (en) * 2021-04-30 2022-10-11 深圳市博思得科技发展有限公司 Paper feeding precision calibration method and calibration system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1891884A (en) * 2005-06-22 2007-01-10 艾塞林-蒂博公司 Needling device for consolidating a fibre fleece
CN101301797A (en) * 2007-05-08 2008-11-12 上海鼎龙机械有限公司 Print groover with die-cutting portion equipped with rubber cushion roller speed-chasing mechanism
CN101659150A (en) * 2008-08-25 2010-03-03 佳能株式会社 Printing apparatus and method for detecting origin of conveying roller
JP2014113042A (en) * 2014-01-06 2014-06-19 Ricoh Co Ltd Motor control device, motor control system, and image forming apparatus
CN103885305A (en) * 2012-12-21 2014-06-25 日本冲信息株式会社 Driving apparatus, image forming apparatus, driving method and image forming method
CN106585115A (en) * 2016-12-27 2017-04-26 艾体威尔电子技术(北京)有限公司 Method of using one hardware to realize thermosensitive printer driving
JP2018022968A (en) * 2016-08-02 2018-02-08 セイコーエプソン株式会社 Printing apparatus and printing apparatus control method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AUPP087797A0 (en) * 1997-12-12 1998-01-08 Silverbrook Research Pty Ltd A device and method (IR16)
CN2593276Y (en) * 2002-01-10 2003-12-17 何闻乐 Portable intelligent bar code integrating machine
CN201673240U (en) * 2010-05-17 2010-12-15 上海松宝科技发展有限公司 Electric machine combination property automatic test system
CN108382077B (en) * 2018-03-29 2023-11-07 厦门汉印电子技术有限公司 Positioning mechanism for rubber roller position change and portable printer thereof

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1891884A (en) * 2005-06-22 2007-01-10 艾塞林-蒂博公司 Needling device for consolidating a fibre fleece
CN101301797A (en) * 2007-05-08 2008-11-12 上海鼎龙机械有限公司 Print groover with die-cutting portion equipped with rubber cushion roller speed-chasing mechanism
CN101659150A (en) * 2008-08-25 2010-03-03 佳能株式会社 Printing apparatus and method for detecting origin of conveying roller
CN103885305A (en) * 2012-12-21 2014-06-25 日本冲信息株式会社 Driving apparatus, image forming apparatus, driving method and image forming method
JP2014113042A (en) * 2014-01-06 2014-06-19 Ricoh Co Ltd Motor control device, motor control system, and image forming apparatus
JP2018022968A (en) * 2016-08-02 2018-02-08 セイコーエプソン株式会社 Printing apparatus and printing apparatus control method
CN106585115A (en) * 2016-12-27 2017-04-26 艾体威尔电子技术(北京)有限公司 Method of using one hardware to realize thermosensitive printer driving

Also Published As

Publication number Publication date
CN109849536A (en) 2019-06-07

Similar Documents

Publication Publication Date Title
US7560893B2 (en) Dual mode stepper motor
EP0452497A1 (en) Carriage controller of a printer
CN109849536B (en) Motor phase method, device, storage medium and printer
JP7210672B2 (en) Motor control device and image forming device
JP2006149141A (en) Motor drive control method and motor drive control device
US6933699B2 (en) Motor drive circuit and method with frequency setting and correcting functions
US6236814B1 (en) Printing control apparatus capable of carrying out printing control in accordance with a printing density
JPH0746895A (en) Stepping motor drive circuit
US10879819B2 (en) Driving circuit and driving method for DC motor
KR20190033154A (en) Image forming apparatus and method for image forming thereof
US8471517B2 (en) Motor controlling apparatus and motor controlling method thereof
JP2008161028A (en) Motor drive control method and sheet postprocessing device controlled therewith
JP3808826B2 (en) Motor control device
JPH06261576A (en) Motor control device
JP2508213B2 (en) Ribbon winding unit driving device for thermal transfer printer
JP3675236B2 (en) Paper feeder
JP7188214B2 (en) Twin drive and motor control method
JPH0199495A (en) Driving device of stepping motor
JP7012507B2 (en) DC motor drive circuit, drive method and electronic equipment using it
JP3182325B2 (en) Stepping motor drive circuit
JPS59138480A (en) Paper feed controller for printer
JPS59214676A (en) Control system for step motor of paper feeder
JP2023133673A (en) Motor controller and image forming apparatus
CN117400644A (en) Printing speed control method and related device
KR940007485B1 (en) Current control circuit of stepping motor

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 361000 room 305A, Aung Yip house, Pioneer Park, torch high tech Zone, Xiamen, Fujian

Patentee after: Xiamen Hanyin Co.,Ltd.

Country or region after: China

Address before: 361000 room 305A, Aung Yip house, Pioneer Park, torch high tech Zone, Xiamen, Fujian

Patentee before: XIAMEN HANIN ELECTRONIC TECHNOLOGY Co.,Ltd.

Country or region before: China