Portable printer, lid opening / closing detection method, device, and storage medium

By using a combination of one transmitter and two receivers in a portable printer, and utilizing different level thresholds to determine the printer's lid-closing status, the problem of misjudgment by optical sensors during the lid-closing process is solved, improving the printer's reliability and user experience.

CN115972787BActive Publication Date: 2026-03-17XIAMEN HANIN CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-08
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing portable printer optical sensors are susceptible to structural interference and light reflection when determining the open/closed state of the cover, leading to misjudgments, especially when the cover is not fully closed, resulting in false alarms that the cover is closed, causing problems such as the printer not feeding paper and data loss.

Method used

The printer uses one transmitter tube and two receiver tubes to monitor the level changes of the two receiver tubes to determine the printer's lid-closing status. Different thresholds are set to distinguish between the lid-opening and lid-closing states, ensuring that the lid is only considered successfully closed when it is fully closed.

Benefits of technology

It effectively avoids misjudgment of lid closing caused by range delay, light reflection from the inner wall, or structural jamming, improves the user experience of the printer, and ensures that the printer only starts printing when the lid is fully closed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115972787B_ABST
    Figure CN115972787B_ABST
Patent Text Reader

Abstract

The application discloses a portable printer, a cover opening and closing detection method and device and a storage medium. The portable printer comprises a shell body, an upper shell cover, a controller and a photoelectric detection device. The upper shell cover is connected with the shell body in an openable and closable manner, and a printing channel is formed on the cooperation surface of the upper shell cover and the shell body when they are buckled. The photoelectric detection device comprises an emitting tube, a first receiving tube and a second receiving tube arranged on the printing channel. The emitting tube and the first receiving tube are located on opposite sides of the printing channel, and the emitting tube and the second receiving tube are located on the same side of the printing channel. The controller is used to realize the following method: acquiring a first voltage level of the first receiving tube; when the first voltage level is less than a preset first threshold, monitoring a second voltage level of the second receiving tube; and when the second voltage level is less than a preset second threshold, judging that the portable printer is in a closed state. The application can more accurately judge the opening and closing state of the printer and reduce the generation of misjudgment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of printing technology, and more specifically to a portable printer, a cover opening / closing detection method, a device, and a storage medium. Background Technology

[0002] Portable printers are favored for their compact size, light weight, and portability. Detecting the printer lid's open / closed status is a common and essential function in portable printers. Currently, there are two main methods for detecting this: optical sensors and mechanical switches. Optical sensors are widely used due to their faster response time, longer detection distance, non-contact detection capabilities, and lower cost.

[0003] Existing methods for detecting printer lid opening and closing using optical sensors typically employ a through-beam detection scheme. Photoelectric pairs are positioned on either side of the printing channel, with the transmitter facing the receiver after the printer lid is closed. The printer's lid opening / closing status is determined by signal changes and a set threshold. For example, ideally, the voltage level is 3.3V when the lid is open and 0V when it's closed. With a threshold of 0.4V, a voltage level below 0.4V indicates the printer lid is closed; otherwise, it indicates the lid is open. However, when there's a difference between the threshold and the actual closing voltage (e.g., the threshold is 0.4V while the actual closing voltage should be 0V), the system may incorrectly register the lid as fully closed during the period between 0.4V and 0V. This state is generally imperceptible to the user due to its short duration. However, if affected by the printer's structure—such as light reflection from the inner walls causing premature voltage changes, or jamming during the opening and closing of the cover, resulting in the cover being stuck and the voltage level between 0 and 0.4V—the printer may not actually have closed the cover, but the system will falsely report it as fully closed. In this case, if print data is sent, the printer will fail to feed paper, leading to more serious data loss. Furthermore, the paper path is located between the top and bottom covers. As printer consumables become more diverse, different consumables have different light-blocking and reflection effects, which can also easily cause the system to misjudge the cover opening during printing, severely impacting the user experience. Summary of the Invention

[0004] In view of this, the object of the present invention is to provide a portable printer, a cover opening and closing detection method, an apparatus and a storage medium to improve the above-mentioned problems.

[0005] This invention provides a portable printer, including a housing body, an upper cover, a controller, and a photoelectric detection device;

[0006] The upper cover and the housing body are closable, and when the upper cover and the housing body are fastened together, a printing channel is formed on their mating surfaces.

[0007] The photoelectric detection device is electrically connected to the controller and includes a transmitting tube, a first receiving tube, and a second receiving tube disposed on the printing channel. The transmitting tube and the first receiving tube are located on opposite sides of the printing channel, and the transmitting tube and the second receiving tube are located on the same side of the printing channel. The photoelectric detection device is configured such that when the upper cover is fastened to the housing body, the light emitted by the transmitting tube can be received by the first receiving tube, and the light emitted by the transmitting tube can be received by the second receiving tube after being reflected by the printing medium in the printing channel. The controller includes a memory and a processor. The memory stores a computer program, which can be executed by the processor to implement the following method:

[0008] Get the current first level of the first receiving tube;

[0009] When the first level is less than a preset first threshold, monitor the second level of the second receiving tube;

[0010] If the second level is less than a preset second threshold, the portable printer is determined to be in a closed state.

[0011] Preferably, the upper cover and the housing body include an upwardly inclined slope surface arranged opposite to each other, the transmitting tube and the second receiving tube are disposed on the slope surface of the upper cover or the housing body, and along the printing direction, the second receiving tube is disposed upstream of the transmitting tube.

[0012] Preferably, the first threshold is 0.4V; the second threshold is 1V.

[0013] Preferably, the method further includes:

[0014] If the second level is greater than the second threshold within a set time period, the portable printer is determined to be in the open state.

[0015] Preferably, the method further includes:

[0016] With the lid closed, monitor the first voltage level;

[0017] When the first level is greater than the first threshold, it is determined that the portable printer is in the open state.

[0018] Preferably, the controller is connected to the transmitting tube via a switching circuit; the signal output terminals of the first receiving tube and the second receiving tube are connected to the sampling port of the controller.

[0019] This invention also provides a cover opening / closing detection method, applied to the aforementioned portable printer, comprising:

[0020] Get the current first level of the first receiving tube;

[0021] When the first level is less than a preset first threshold, monitor the second level of the second receiving tube;

[0022] If the second level is less than a preset second threshold, the portable printer is determined to be in a closed state.

[0023] Preferably, the first threshold is 0.4V; the second threshold is 1V.

[0024] Preferably, it further includes:

[0025] If the second level is greater than the second threshold within a set time period, the portable printer is determined to be in the open state.

[0026] This invention also provides an opening / closing cover detection device, which includes:

[0027] The first level acquisition unit is used to acquire the current first level of the first receiving tube;

[0028] The second level monitoring unit is used to monitor the second level of the second receiving tube when the first level is less than a preset first threshold.

[0029] The lid-closing determination unit is used to determine that the portable printer is in a closed state if the second level is less than a preset second threshold.

[0030] This invention also provides a computer-readable storage medium storing a computer program that can be executed by a processor of the device in which the computer-readable storage medium is located, to implement the opening and closing cover detection method described above.

[0031] In summary, this embodiment uses one transmitter tube and two receiver tubes to jointly determine the printer's lid closing status. This avoids the problem of a single receiver tube indicating successful lid closing when the lid is not fully closed due to range delay, light reflection from the inner wall, or structural jamming at the limit position. It effectively solves the problem of false lid closing alarms caused by interference from electronic components and structural interference, thus improving the user experience. Attached Figure Description

[0032] To more clearly illustrate the technical solution of the present invention, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0033] Figure 1 This is a schematic diagram of the lid of a portable printer provided in the first embodiment of the present invention.

[0034] Figure 2 This is a schematic diagram of the portable printer with its cover open according to the first embodiment of the present invention.

[0035] Figure 3 This is a detection circuit diagram for a portable printer provided according to an embodiment of the present invention.

[0036] Figure 4 This is a schematic diagram of the controller.

[0037] Figure 5 This is a schematic diagram showing the connection between the transmitting tube and the first receiving tube.

[0038] Figure 6 This is a schematic diagram showing the connection between the transmitting tube and the second receiving tube.

[0039] Figure 7 This is a flowchart of the opening and closing cover detection method provided in the second embodiment of the present invention.

[0040] Figure 8 This is a schematic diagram of the opening and closing cover detection device provided in the third embodiment of the present invention. Detailed Implementation

[0041] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0042] Please see Figures 1 to 3The first embodiment of the present invention provides a portable printer, including a housing body 10, an upper cover 20, a photoelectric detection device, and a controller 40. The upper cover 20 is closable with the housing body 10, and when the upper cover 20 and the housing body 10 are fastened together, their mating surfaces form a printing channel 50. The photoelectric detection device includes an emitting tube 31, a first receiving tube 32, and a second receiving tube 33, which are disposed on the printing channel 50. The emitting tube 31 and the second receiving tube 33 are located on the same side of the printing channel 50, and the emitting tube 31 and the first receiving tube 32 are located on opposite sides of the printing channel 50. The photoelectric detection device is configured such that the light emitted by the emitting tube 31 can be received by the second receiving tube 33, and the light emitted by the emitting tube 31 can be received by the first receiving tube 32 after being reflected by the printing medium in the printing channel.

[0043] In this embodiment, the transmitting tube 31 and the first receiving tube 32 may be located on the upper cover 20, and the second receiving tube 33 may be located on the housing body 10. Of course, the transmitting tube 31 and the first receiving tube 32 may also be located on the housing body 10, while the second receiving tube 33 may be located on the upper cover 20. All these solutions are within the protection scope of this invention.

[0044] In this embodiment, the controller 40 can be disposed inside the housing body 10. The controller 40 is electrically connected to the transmitting tube 31 through a switching circuit 60, and is also electrically connected to the output terminals of the first receiving tube 32 and the second receiving tube 33, so as to obtain the electrical signals output by the output terminals of the first receiving tube 32 and the second receiving tube 33, and convert them into corresponding levels.

[0045] For example, such as Figures 4 to 6 As shown, Figure 4 U1 is the controller 40. Figure 5 This is a schematic diagram of the cooperation between the transmitting tube 31 and the first receiving tube 32 for cover detection. Figure 6 This is a schematic diagram showing the cooperation between the transmitting tube 31 and the second receiving tube 33 for cover detection.

[0046] like Figure 5 As shown, the controller 40 controls the switch circuit 60 to close via the MCU_Emitter1 signal, thereby causing the transmitting tube 31 to emit light. The signal terminal Adoptor1 of the first receiving tube 32 is converted into a level signal through the sampling resistor R2 and then fed back to the controller 40 via the MCU_Adoptor1 signal. The controller 40 obtains the first level detected by the first receiving tube 32.

[0047] like Figure 6As shown, the controller 40 controls the switch circuit 60 to close via the MCU_Emitter1 signal, thereby causing the transmitting tube 31 to emit light. The signal terminal Adoptor2 of the second receiving tube 33 is converted into a level signal via the sampling resistor R3 and then fed back to the controller 40 via the MCU_Adoptor2 signal. The controller 40 obtains the second level detected by the second receiving tube 33.

[0048] In this embodiment, after acquiring the first level and the second level, the controller 40 can determine the open / closed state of the portable printer based on the first level and the second level.

[0049] Specifically, in this embodiment, when the printer is in the open state, the voltage levels of both the first receiving tube 32 and the second receiving tube 33 are at their maximum values, such as 3.3V. When the printer closes its lid, the controller 40 first determines the voltage level change of the first receiving tube 32. If the voltage level of the first receiving tube 32 drops from 3.3V to below a preset first threshold (e.g., 0.4V), the controller determines that the printer is in the process of closing its lid. Then, the controller 40 begins to determine the second voltage level of the second receiving tube 33. At this time, if the second voltage level of the second receiving tube 33 drops from 3.3V to below a preset second threshold (e.g., 1.0V), the controller 40 determines that the printer is currently in the fully closed state (at this time, it is necessary to ensure that there is printing media in the printing channel). That is, the printer is considered to be in the fully closed state only when both the voltage level of the first receiving tube 32 and the voltage level of the second receiving tube 33 are below the second threshold; otherwise, the controller 40 determines that the printer is in the open state. In this way, the problem of falsely indicating successful closing can be avoided when a single receiving tube fails to close the cover due to range delay, light reflection from the inner wall, or the cover being stuck at an extreme position during the closing process.

[0050] In this embodiment, when the cover is closed, because the structure is stable and does not loosen after the cover is closed, the voltage level of the first receiving tube 32 is only related to the properties of the printing medium. By setting an appropriate first threshold (such as 0.4V), the open-cover state can be correctly distinguished. Therefore, the printer's cover opening detection can be identified solely by the first voltage level of the first receiving tube 32. As long as the voltage level of the first receiving tube 32 is higher than the first threshold, it is determined that the cover is open. Therefore, when the cover is closed, the second receiving tube 33 can be used for printing medium detection to ensure the normal printing operation of the printer.

[0051] It should be noted that in the above embodiments, the selection of each threshold can be set according to the actual situation, and the present invention does not impose specific limitations.

[0052] In summary, this embodiment uses one transmitter tube and two receiver tubes to jointly determine the printer's lid closing status. This avoids the problem of a single receiver tube indicating successful lid closing when the lid is not fully closed due to range delay, light reflection from the inner wall, or structural jamming at the limit position. It effectively solves the problem of false lid closing alarms caused by interference from electronic components and structural interference, thus improving the user experience.

[0053] To facilitate understanding of the present invention, some preferred embodiments of the present invention will be described in further detail below.

[0054] Based on the above embodiments, in a preferred embodiment of the present invention, the portable printer further includes an indicator light, which is disposed on the housing body 10 or the upper cover 20 and electrically connected to the controller 40;

[0055] The indicator light can be used to provide a visual alert when the portable printer is in an open state or out of paper condition.

[0056] The indicator light can be an LED light. When the controller 40 determines that the portable printer is in an open state or out of paper state, it can control the indicator light to flash or stay on to alert the user.

[0057] Based on the above embodiments, in a preferred embodiment of the present invention, one end of the upper cover 20 is connected to the housing body; the other end of the upper cover 20 forms a protrusion 21 facing the housing body 10, and the first side 22 of the protrusion 21 forms the printing channel 50 and the paper outlet with the housing body 10 when fastened; a first groove 24 is formed between the second side 23 of the protrusion 21 and the first side 22 and one end of the upper cover 10; the housing body 10 forms a second groove 11 corresponding to the first groove 24, and the first groove 11 and the second groove 24 cooperate to form a paper storage compartment 12 for accommodating printing media.

[0058] like Figure 1 and Figure 2 As shown, in this embodiment, the protrusion 21 can be used to house the emission tube 31 and printhead assembly, and other related printing components. The housing body 10 has a ramp-like structure to form an upwardly inclined printing channel 50 with the first side 22 of the protrusion 21. The printing channel 50 connects to the paper storage compartment 12, which is composed of a first groove 11 on the upper cover 20 and a second groove 24 on the housing body 10. This allows for a larger space in the paper storage compartment 12, enabling the placement of larger paper rolls, reducing the frequency of paper roll replacements, and improving the user experience.

[0059] Based on the above embodiments, in a preferred embodiment of the present invention, the upper cover 20 and the housing body 10 include an upwardly inclined slope, the transmitting tube 31 and the second receiving tube 33 are disposed on the slope of the upper cover 20 or the housing body 10, and along the printing direction, the second receiving tube 33 is disposed upstream of the transmitting tube 31.

[0060] Among them, such as Figure 1 and Figure 2 As shown, both the protrusion 21 and the housing body 10 form an upward inclined slope. The transmitting tube 31 and the second receiving tube 33 are arranged on the slope of the protrusion 21 and along the printing direction. The second receiving tube 33 is located upstream of the transmitting tube 31, that is, the printing medium will first pass through the second receiving tube 33 and then through the transmitting tube 31, and finally be output from the printing outlet.

[0061] In this embodiment, the beam emitted by the transmitting tube 31 propagates to the slope surface of the housing body 10 and is reflected on the slope surface. During the gradual closing process, the reflection point of the beam gradually moves down along the slope surface of the housing body 10 and is reflected to the second receiving tube 33 when the cover is fully closed. This avoids the light emitted by the transmitting tube 31 being received by the second receiving tube 33 in advance when the cover is not fully closed, thus preventing misjudgment.

[0062] Please see Figure 7 The second embodiment of the present invention also provides a cover opening and closing detection method, applied to a portable printer as described in any of the above embodiments, comprising:

[0063] S201, Obtain the current first level of the first receiving tube;

[0064] S202, when the first level is less than a preset first threshold, monitor the second level of the second receiving tube;

[0065] S203, if the second level is less than the preset second threshold, it is determined that the portable printer is in the closed state.

[0066] Specifically, the first threshold is 0.4V; the second threshold is 1V.

[0067] This also includes:

[0068] If the second level is greater than the second threshold within a set time period, the portable printer is determined to be in the open state.

[0069] In this embodiment, if the second level is always greater than the second threshold within a set time, it indicates that the printer may not be in a fully closed state due to jamming or structural interference. At this time, a reminder needs to be issued so that the user can confirm the open / closed state or troubleshoot the problem.

[0070] Please see Figure 8 The third embodiment of the present invention also provides an opening and closing cover detection device, comprising:

[0071] The first level acquisition unit 310 is used to acquire the current first level of the first receiving tube;

[0072] The second level monitoring unit 320 is used to monitor the second level of the second receiving tube when the first level is less than a preset first threshold.

[0073] The lid-closing determination unit 330 is used to determine that the portable printer is in a closed state if the second level is less than a preset second threshold.

[0074] The fourth embodiment of the present invention also provides a computer-readable storage medium storing a computer program, which can be executed by a processor of the device in which the computer-readable storage medium is located to implement the opening and closing detection method as described above.

[0075] In the several embodiments provided in this invention, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus and method embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0076] In addition, the functional modules in the various embodiments of the present invention can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0077] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, electronic device, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks. It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. In the absence of further restrictions, an element defined by the phrase "comprising a..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0078] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A portable printer comprising a housing body, an upper housing cover, a controller and a photoelectric detection device; the upper housing cover is hingedly connected to the housing body, and a printing channel is formed between the mating surfaces of the upper housing cover and the housing body when they are fastened together; The photoelectric detection device is electrically connected with the controller, and comprises an emitting tube, a first receiving tube and a second receiving tube arranged on the printing channel. The emitting tube and the first receiving tube are located on opposite sides of the printing channel, and the emitting tube and the second receiving tube are located on the same side of the printing channel. When the upper shell cover is buckled with the shell body, the light emitted by the emitting tube can be received by the first receiving tube, and the light emitted by the emitting tube can be received by the second receiving tube after being reflected by the printing medium in the printing channel. the upper housing cover and the housing body comprise oppositely arranged inclined upward slope surfaces, the emitting tube and the second receiving tube are arranged on the slope surfaces of the upper housing cover or the housing body, and along the printing direction, the second receiving tube is arranged upstream of the emitting tube; during the process of gradually closing the cover, the reflection point of the light beam emitted by the emitting tube gradually moves downward along the slope surface of the housing body, and when the cover is completely closed, the reflection point is reflected into the second receiving tube; the controller comprises a memory and a processor, the memory stores a computer program which can be executed by the processor to implement the following method: obtaining a current first level of the first receiving tube; when the first level is less than a preset first threshold, monitoring a second level of the second receiving tube; if the second level is less than a preset second threshold, determining that the portable printer is in a closed cover state; wherein the first threshold is 0.4V; the second threshold is 1V; when the cover is open, the average of the first receiving tube and the second receiving tube is the maximum value; when the printer is closed, the controller first determines the change of the level of the first receiving tube, if the level of the first receiving tube decreases from the maximum value to below the preset first threshold, it is determined that the printer is in the process of closing the cover, and then the controller starts to determine the second level of the second receiving tube; at this time, if the second level of the second receiving tube decreases from the maximum value to below the preset second threshold, the controller determines that the printer is in a completely closed state.

2. The portable printer of claim 1, wherein, the method further comprises: if the second level is greater than the second threshold within a set time, it is determined that the portable printer is in an open cover state.

3. The portable printer of claim 1, wherein, the method further comprises: monitoring the first level in the closed cover state; when the first level is greater than the first threshold, it is determined that the portable printer is in an open cover state.

4. The portable printer of claim 1, wherein, the controller is connected to the emitting tube through a switching circuit; the signal output ends of the first receiving tube and the second receiving tube are connected to the sampling port of the controller.

5. A lid opening / closing detection method applied to the portable printer according to any one of claims 1 to 4, characterized by comprises: obtaining a current first level of the first receiving tube; when the first level is less than a preset first threshold, monitoring a second level of the second receiving tube; if the second level is less than a preset second threshold, determining that the portable printer is in a closed cover state.

6. The lid opening / closing detection method according to claim 5, characterized by, further comprises: if the second level is greater than the second threshold within a set time, it is determined that the portable printer is in an open cover state.

7. An open / close lid detection device applied to the portable printer according to any one of claims 1 to 4, characterized by comprises: a first level obtaining unit for obtaining a current first level of the first receiving tube; a second level monitoring unit for monitoring a second level of the second receiving tube when the first level is less than a preset first threshold; a closed cover determining unit for determining that the portable printer is in a closed cover state if the second level is less than a preset second threshold.

8. A computer-readable storage medium, characterized in that, The computer program is stored in the computer readable storage medium, and can be executed by a processor of a device where the computer readable storage medium is located to implement the cover opening and closing detection method according to any one of claims 5 to 6.

Citation Information

Patent Citations

  • Portable printer, state detection method and device and storage medium

    CN111873640A