Control device and method of intelligent cabinet
By introducing storage space status detection units and lock drive units into smart cabinets, combined with photocouplers and photoresistors, independent lighting control and door lock status detection are achieved for each storage space, solving the energy consumption and safety hazard problems of smart cabinets and improving usage safety and management efficiency.
Patent Information
- Application Number
- CN202510920405.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-04
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2045-07-04
AI Technical Summary
The overall lighting design of existing smart cabinets results in high energy consumption, poses a safety hazard of high-risk materials being accessed by non-designated users, and cannot achieve precise opening and closing control of storage space.
A processing unit is combined with a storage space status detection unit and a lock drive unit. Through the cooperation of a photoelectric coupler and a photoresistor, independent lighting control and door lock status detection are achieved for each storage space, reducing lighting energy consumption and improving safety.
It achieves precise opening and closing control of each storage space in the smart cabinet, reduces lighting energy consumption, improves usage safety and management efficiency, and avoids misoperation of high-risk materials.
Smart Images

Figure CN120414284B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of smart cabinets, and particularly relates to a control device and method for a smart cabinet. Background Art
[0002] Existing smart cabinets for power supply systems feature internal storage for supplies and external touchscreens. Users can log in to the smart system by scanning a QR code or using facial recognition, then open the cabinet to collect power supplies or perform operations within the cabinet's internal storage. To ensure a clear view of the power supplies within the cabinet, light strips are installed on each partition. The existing smart cabinets utilize integrated lighting throughout, with door locks controlling the opening and closing of the cabinet doors.
[0003] For example, patent CN116845734A provides an intelligent control cabinet that is easy to maintain, including a cabinet body, which is connected to a cabinet door via hinges, and the cabinet door and the cabinet body are both fixed with locks, and the cabinet door and the cabinet body can be locked by the locks, and the cabinet door is installed with a breathable mesh window; it also includes: strip plates fixed in the cabinet body at equal intervals, and mounting plates are provided on the sides of the strip plates, and the mounting plates are arranged in the cabinet body at equal intervals, and vertical plates are fixed to the upper end surface of the mounting plates, and a second magnet is also fixed to the rear end surface of the mounting plates. This intelligent control cabinet that is easy to maintain adopts a retractable and rotatable structure, which can expose the terminal interface when plugging and repairing in the future, thereby facilitating the connection and removal of the terminal wires and making it more convenient for later maintenance. It fills a market gap and has good market application prospects. In combination with an automatic lighting mechanism, it can provide supplementary light in dim environments, making it easier for staff to operate.
[0004] In practice, smart cabinets store a wide variety of electrical supplies, each of which is managed, operated, and used by a specific user. Mixing of supplies is prohibited. Furthermore, because smart cabinets feature integrated lighting, unused internal spaces are also illuminated, resulting in redundant lighting. In short, existing smart cabinets utilize a single, integrated cabinet body, which not only consumes significant energy but also poses a safety hazard by exposing some supplies (such as precision sensors) to unauthorized access.
[0005] Based on this, how to achieve precise opening and closing control of the internal storage space in the smart cabinet and reduce the lighting energy consumption of the smart cabinet is a technical problem that needs to be solved urgently in this field. Summary of the Invention
[0006] In response to the above-mentioned shortcomings in the prior art, the present invention provides a control device and method for a smart cabinet. The control device includes a processing unit, a lighting control unit electrically connected to the processing unit, a storage space state detection unit, and a lock drive unit. The storage space state detection unit includes a detection subunit including a photoelectric coupler and a compensation subunit including a photoresistor. The photoelectric coupler is electrically connected to the door lock, and the detection subunit and the compensation subunit are arranged in parallel. The detection subunit is used to determine a first state of the door lock based on the state of the photoelectric coupler, and the compensation subunit is used to output a second state of the door lock based on the obtained resistance value of the photoresistor. The processing unit is used to obtain request information for opening the storage space and output a lock drive signal and a lighting drive signal based on the request information and the first and second states of the corresponding door lock. The lock drive unit is used to control the state of the corresponding door lock based on the received lock drive signal. The lighting control unit is used to control the lighting intensity of the corresponding light source based on the received lighting drive signal. The present invention provides a processing unit and combines it with the storage space state detection unit to achieve linkage with the lighting control unit and the lock drive unit, thereby accurately controlling the opening and closing of each internal storage space in the smart cabinet, reducing the lighting energy consumption of the smart cabinet and improving the safety of the smart cabinet.
[0007] In a first aspect, the present invention provides a control device for a smart cabinet, wherein the smart cabinet includes a plurality of storage spaces, each storage space being provided with a corresponding door lock and a light source;
[0008] The control device includes a processing unit, and a lighting control unit, a storage space state detection unit and a lock driving unit electrically connected to the processing unit;
[0009] a storage space state detection unit, comprising a detection subunit including a photoelectric coupler and a compensation subunit including a photoresistor, the photoelectric coupler being electrically connected to the door lock, and the detection subunit and the compensation subunit being arranged in parallel, the detection subunit being configured to determine a first state of the door lock based on a state of the photoelectric coupler, and the compensation subunit being configured to provide a second state of the door lock based on an acquired resistance value of the photoresistor;
[0010] a processing unit, configured to obtain request information for opening the storage space, and provide a lock drive signal and a lighting drive signal according to the request information and the first state and the second state of the corresponding door lock;
[0011] a lock driving unit, configured to control a state of a corresponding door lock based on a received lock driving signal;
[0012] The lighting control unit is used to control the lighting intensity of the corresponding light source component based on the received lighting drive signal.
[0013] Furthermore, the device further includes a power supply unit electrically connected to the lighting control unit, the storage space status detection unit, and the lock drive unit, wherein the power supply unit includes a first power supply sub-unit, a second power supply sub-unit, and a third power supply sub-unit, and the output voltages of the first power supply sub-unit, the second power supply sub-unit, and the third power supply sub-unit are different;
[0014] The first power supply sub-unit is connected to the lighting control unit and the storage space state detection unit respectively, and the second power supply sub-unit and the third power supply sub-unit are both connected to the storage space state detection unit.
[0015] Furthermore, it also includes a communication unit electrically connected to the processing unit, the communication unit includes a transceiver chip, the power pin of the transceiver chip is connected to the power supply unit, the input pin and output pin of the transceiver chip are connected to the processing unit, and the differential signal pin of the transceiver chip is connected in sequence to an impedance matching resistor and one end of a bidirectional transient voltage suppression diode, and the other end of the bidirectional transient voltage suppression diode is grounded.
[0016] Furthermore, it also includes a configuration unit electrically connected to the processing unit, the configuration unit includes a dip switch containing multiple sub-switches, and each interface of the dip switch is connected to each universal interface of the processing unit through a configuration resistor. By controlling the switching state of each sub-switches, the MODBUS device address and communication baud rate of the processing unit are configured.
[0017] Furthermore, there are multiple storage space status detection units, and each door lock corresponds to a storage space status detection unit;
[0018] The anode of the photocoupler in each detection sub-unit is connected to the second power supply unit through the first protection resistor, the cathode is electrically connected to the door lock and then grounded, the emitter is grounded, and the collector is connected to the third power supply unit through the second protection resistor;
[0019] The compensation subunit also includes a fixed resistor, a bias resistor, a feedback resistor, and an operational amplifier;
[0020] One end of the photoresistor is connected to the second power supply unit, and the other end is connected in series with a fixed resistor to form a voltage divider circuit, and the free end of the fixed resistor is grounded;
[0021] The positive input terminal of the operational amplifier is connected to a voltage divider point, the negative input terminal is grounded via a bias resistor, and the negative input terminal is also connected to the output terminal of the operational amplifier via a feedback resistor. The output terminal of the operational amplifier is connected to the processing unit; wherein the voltage divider point is a common connection point of the photoresistor and the fixed resistor.
[0022] Furthermore, there are multiple lighting control units, each of which includes a relay driver and a lighting relay connected in sequence, wherein the lighting relay includes a lighting electromagnetic coil and a lighting contact;
[0023] A relay driver is connected to the processing unit and is used to receive a lighting drive signal and drive the lighting relay to switch on and off;
[0024] The multiple output pins of the relay driver are connected to the lighting electromagnetic coil and the power pin of the relay driver in sequence. The power pin is connected to the first power supply unit, and the lighting contact is connected to the light source component.
[0025] Furthermore, there are multiple lock drive units, each of which is connected to each door lock of the smart cabinet;
[0026] The lock drive unit includes a single-channel dual-power bus transceiver and an NMOS tube. The driving side pin of the single-channel dual-power bus transceiver is connected to the gate of the NMOS tube. The non-driving side power pin and the driving side power pin of the single-channel dual-power bus transceiver are respectively connected to the third power supply sub-unit and the second power supply sub-unit. The source of the NMOS tube is grounded, and the drain is connected to the first power supply sub-unit through a freewheeling diode; the drain of the NMOS tube is connected in series with the door lock of the smart cabinet and the first power supply sub-unit.
[0027] Furthermore, obtaining request information for opening the storage space and providing a lock drive signal and a lighting drive signal according to the request information and the first state and the second state of the corresponding door lock specifically include:
[0028] Perform data analysis on the request information and perform feature extraction to obtain request features;
[0029] Compare the requested features with the feature information in the pre-built feature information database to obtain feature similarity data;
[0030] Compare the feature similarity data with the preset similarity threshold and give the judgment result;
[0031] According to the judgment result, a lock driving signal and a lighting driving signal are given in combination with the first state and the second state of the corresponding door lock.
[0032] Furthermore, the lock drive signal and the lighting drive signal are both level signals;
[0033] According to the judgment result, in combination with the first state and the second state of the corresponding door lock, a lock driving signal and a lighting driving signal are given, specifically including:
[0034] If the judgment result of the request information is successful, the switch state of the door lock is determined based on the analysis of the first state and the second state of the corresponding door lock, and the amplitude of the level signal is determined according to the switch state of the door lock, and the lock drive signal and the lighting drive signal are given.
[0035] In a second aspect, the present invention further provides a method for controlling a smart cabinet, using any one of the above-mentioned smart cabinet control devices, comprising:
[0036] Get the request information for opening the storage space;
[0037] Based on the request information, obtaining a first state and a second state of the corresponding door lock, and providing a lock drive signal and a lighting drive signal;
[0038] Control the state of the corresponding door lock based on the lock drive signal;
[0039] The illumination intensity of the corresponding light source element is controlled based on the illumination driving signal.
[0040] The present invention provides a control device and method for a smart cabinet, which has at least the following beneficial effects:
[0041] (1) By setting up a processing unit to judge the request information and give the corresponding lighting drive signal and lock drive signal, the use safety of the smart cabinet is improved. On this basis, the storage space status detection unit is combined with the lighting control unit and the lock drive unit to realize the linkage, accurately control the opening and closing of each internal storage space in the smart cabinet, and reduce the lighting energy consumption of the smart cabinet.
[0042] (2) By combining a single power supply with a multi-stage power supply circuit, the common-mode interference caused by ground loop noise interference and potential difference between multiple power modules can be eliminated.
[0043] (3) By setting up a storage space status detection unit and a lock drive unit, the status detection and opening and closing status control of the door locks of each storage space in the smart cabinet can be realized.
[0044] (4) By configuring a compensation subunit for the detection subunit, the compensation subunit compensates according to the change of the ambient light intensity, thereby reducing the impact of the change of the ambient light intensity on the detection subunit and improving the accuracy of the storage space status detection unit. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 A structural block diagram of a control device for a smart cabinet provided by an embodiment of the present invention;
[0046] Figure 2 A circuit diagram of a first power supply subunit provided in an embodiment of the present invention;
[0047] Figure 3 A circuit diagram of a second power supply unit provided in an embodiment of the present invention;
[0048] Figure 4 A circuit diagram of a third power supply subunit provided in an embodiment of the present invention;
[0049] Figure 5 A circuit diagram of a communication unit provided in an embodiment of the present invention;
[0050] Figure 6 A circuit diagram of a configuration unit provided in an embodiment of the present invention;
[0051] Figure 7 A circuit diagram of a storage space status detection unit provided in an embodiment of the present invention;
[0052] Figure 8 A circuit diagram of a lighting control subunit provided in an embodiment of the present invention;
[0053] Figure 9 A circuit diagram of a lock drive subunit provided in an embodiment of the present invention;
[0054] Figure 10 This is a flow chart of the lighting control method for a smart cabinet provided by an embodiment of the present invention.
[0055] Among them, 10, processing unit; 20, lighting control unit; 30, lock drive unit; 40, storage space status detection unit; 41, detection subunit; 42, compensation subunit; 50, power supply unit; 51, first power supply subunit; 52, second power supply subunit; 53, third power supply subunit; 60, communication unit; 70, configuration unit. DETAILED DESCRIPTION
[0056] To better understand the above technical solution, the following will be described in detail with reference to the accompanying drawings and specific implementation methods. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0057] The terms used in the embodiments of the present invention are for the purpose of describing specific embodiments only and are not intended to limit the present invention. The singular forms "a," "an," "the," and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, and unless the context clearly indicates otherwise, "a plurality" generally includes at least two.
[0058] It should also be noted that the terms "include," "comprises," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a product or device comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such product or device. In the absence of further limitations, an element defined by the phrase "comprises a..." does not exclude the presence of other identical elements in the product or device comprising the element.
[0059] Current power supply system smart cabinets feature touchscreens on the outside. Users can access the cabinets by scanning a QR code or using facial recognition to collect power supplies or operate internal storage spaces. To facilitate access and operation, the cabinets feature a globally fixed brightness design. Light strips are installed within the cabinets, and the lighting is controlled by the cabinet door's status.
[0060] The current global fixed brightness design has the following adaptability issues: 1. The spatial illumination is output indiscriminately, which cannot meet special storage needs (such as the need to protect optical components in a darkroom from light decay); 2. It lacks environmental perception capabilities and cannot automatically adjust according to natural light illumination (such as the need to compensate for rainy days in the tool area), resulting in a certain amount of energy waste.
[0061] Furthermore, in practice, smart cabinets store a wide variety of electrical supplies, each of which is managed, operated, and used by a specific user, preventing mixing. Existing smart cabinets utilize a single, integrated access model, which can easily lead to safety hazards such as high-risk materials (such as precision sensors) being accessed by unauthorized users. This can also create management loopholes, such as the unusual use of valuable consumables, making traceability difficult when multiple users are involved. Improving the convenience and safety of smart cabinets is a pressing issue.
[0062] like Figure 1 As shown, an embodiment of the present invention provides a control device for a smart cabinet, including a processing unit, and a lighting control unit, a storage space status detection unit and a lock drive unit electrically connected to the processing unit; the storage space status detection unit includes a detection subunit including a photoelectric coupler and a compensation subunit including a photoresistor, the photoelectric coupler is electrically connected to the door lock, and the detection subunit and the compensation subunit are arranged in parallel, the detection subunit is used to determine the first state of the door lock based on the state of the photoelectric coupler, and the compensation subunit is used to give the second state of the door lock based on the obtained resistance value of the photoresistor; the processing unit is used to obtain request information for opening the storage space, and give a lock drive signal and a lighting drive signal according to the request information and the first state and second state of the corresponding door lock; the lock drive unit is used to control the state of the corresponding door lock based on the received lock drive signal; the lighting control unit is used to control the lighting intensity of the corresponding light source based on the received lighting drive signal.
[0063] The first state is the initial state of the door lock opened and closed given by the detection subunit, and the second state is the verification state of the door lock opened and closed given by the compensation subunit.
[0064] The present invention realizes the linkage of the lighting control unit and the lock drive unit by setting up a processing unit and combining it with a storage space status detection unit, accurately controls the opening and closing of each internal storage space in the smart cabinet, and improves the safety of the smart cabinet while reducing the lighting energy consumption of the smart cabinet.
[0065] In actual application scenarios, the smart cabinet includes multiple storage spaces, each of which is relatively independent and equipped with a corresponding door lock and light source. When a storage space needs to be opened, the processing unit outputs a lock drive signal and a lighting drive signal. The lock drive unit controls the opening of the door lock corresponding to the storage space based on the received lock drive signal, and the lighting control unit controls the opening of the light source in the storage space based on the received lighting drive signal to illuminate the storage space. In this way, the opening and closing of each storage space in the smart cabinet can be precisely controlled, and the energy consumption of the smart cabinet lighting can be reduced.
[0066] The processing unit judges the received request information and outputs the corresponding lock drive signal and lighting drive signal to complete the switching and lighting of the storage space in the smart cabinet, realizing the independent opening and closing and lighting of different storage spaces. While ensuring the safety of electrical materials, it also reduces the lighting energy consumption each time the smart cabinet is opened, thereby improving the energy utilization efficiency of the smart cabinet.
[0067] In one specific example, the processing unit is an I / O control board, the component in a smart cabinet responsible for controlling door locks and lighting. It runs the Zephyr real-time operating system. The I / O control board sends commands via the MODBUS protocol (the physical layer is RS485) to turn on or off the smart cabinet's LED lighting and door locks. It also uses the MODBUS protocol to read the door lock status.
[0068] It is understood that the microcontroller is the core of the IO control board, and all of the IO control board's logic is implemented through programming in the microcontroller. This programming enables MODBUS communication (for example, the IO control board functions as a MODBUS slave device) and generates lock and lighting drive signals. The microcontroller incorporates the Zephyr real-time operating system. Furthermore, the processing unit's input / output pins (GPIO ports) not connected to any circuits can also be connected to a clock source circuit. This clock source circuit can include a master clock crystal oscillator and / or a real-time clock crystal oscillator (RTC). The master clock crystal oscillator has a frequency of 12 MHz, and the real-time clock crystal oscillator has a frequency of 32.768 kHz. The processing unit can also include a processing element connected to the microcontroller, such as the K210, to better meet identity recognition requirements.
[0069] like Figure 2-Figure 4As shown, the control device of the above-mentioned smart cabinet further includes a power supply unit connected to the lighting control unit, the storage space status detection unit, and the lock drive unit. The power supply unit is used to provide different output voltages. The power supply unit includes a first power supply sub-unit, a second power supply sub-unit, and a third power supply sub-unit. The output voltages of the first power supply sub-unit, the second power supply sub-unit, and the third power supply sub-unit are different.
[0070] The first power supply sub-unit is connected to the lighting control unit and the storage space state detection unit respectively, and the second power supply sub-unit and the third power supply sub-unit are both connected to the storage space state detection unit.
[0071] The power supply unit is responsible for providing power to the entire control device. Because different units within the control device have varying circuit designs and electronic components, they require different voltages for normal operation. The power supply unit provides different output voltages to match the corresponding units, ensuring reliable operation of the logic circuits within each unit. In the example provided by this invention, the output voltages provided by the power supply unit can be 12V, 5V, and 3.3V, respectively.
[0072] In this example, the power supply voltage output by the first power supply unit is 12V, which mainly provides 12V power to the 5V power supply unit (i.e., the second power supply unit), the lock drive unit, and the lighting control unit. Figure 2 The first power supply subunit includes a power input interface (DC_IN), a unidirectional transient voltage suppression diode (D2), a fuse (F1), an electrolytic capacitor (C10), and a ceramic capacitor (C12). The unidirectional transient voltage suppression diode (D2) is located between the power input interface (DC_IN) and ground (GND) to prevent reverse current flow and protect the circuit. The fuse (F1) is located after the unidirectional transient voltage suppression diode (D2), between the power input interface (DC_IN) and the +12V output, providing overcurrent protection. The electrolytic capacitor (C10) is connected after the fuse (F1) and before the +12V output to filter and smooth the output voltage, reducing voltage fluctuations and ripple. The ceramic capacitor (C12) is connected in parallel after C10, at the +12V output, to filter high-frequency noise, further smooth the output voltage, and improve the stability of the power supply. The first power supply subunit serves as a DC power input circuit, used to convert the DC voltage (DC_IN) into a stable +12V output voltage.
[0073] The second power supply unit outputs a 5V power supply voltage, which mainly provides a 5V DC power supply to the 3.3V power supply unit (i.e., the third power supply unit) and the storage space status detection unit. Figure 3The second power supply subunit includes an input section, a buck converter (U2), an inductor (L4), a diode (D4), and an output section. The input section includes a +12V power supply and input filter capacitor C15. Buck converter U2, model LMR140505DDAR, includes pins such as VIN, EN, BOOT, SW, FB, RT / SYNC, SS, GND, and EXP. VIN and EN are connected to the +12V power supply, providing input voltage for buck converter U2; RT / SYNC is connected to resistor R8, which is used to set the switching frequency of buck converter U2 or synchronize with an external clock; SS is connected to capacitor C16 for soft-start control; GND is grounded, and EXP is left floating; SW is connected to inductor L4 and diode D4 for switching control; FB is connected to the output section for feedback control to ensure output voltage stability; and BOOT is connected to the internal circuitry for starting and operating the internal buck converter U2. D4 is U2's freewheeling Schottky diode, model SB1045L, with a peak reverse voltage of 45V, an average rectified output current of up to 10A, and a forward voltage drop of 0.5V. Inductor L4, connected between U2's SW pin and the output, stores and releases energy to smooth the output current. The output section includes first, second, and third output filter capacitors C17, C18, and C28, connected in parallel at the output, for further filtering and reducing ripple and noise in the output voltage. The output section also includes first and second feedback resistors R87 and R88, connected between the output and U2's FB pin for voltage division. The output section also includes unidirectional transient voltage suppressor diode D5, current-limiting resistor R9, and Zener diode D6, connected between the output and ground. D5 is a 5V power supply unidirectional transient voltage suppressor (TVS) diode (SMBJ5.0A).
[0074] In this example, the second power supply unit provides a maximum of 5V at 5A, sufficient to provide 5V power to the entire IO control board. Input filtering (C15), output filtering (C17, C18, C28), and feedback control (R87, R88) ensure output voltage stability and reduce ripple and noise.
[0075] The power supply voltage output by the third power supply unit is 3.3V, which mainly provides 3.3V DC power supply for the storage space status detection unit. Figure 4As shown, the third power supply subunit includes an input section, a buck converter U3, and an output section. The input section includes a +5V power supply and input filter capacitors (C24, C27) to reduce ripple and noise in the input voltage. Buck converter U3 is a low-dropout linear regulator (LDO) model SPX1117-3.3, with VI, VO, and GND pins. VI is connected to the +5V power supply, VO is the output pin, outputting the converted +3.3V voltage, and GND is connected to ground. The output section includes output filter capacitors (C32, C39), an indicator module, and a Schottky diode (D7). The output filter capacitors (C32, C39) are connected in parallel at the output end for further filtering and reducing ripple and noise in the output voltage. The indicator module includes a series-connected indicator light D8 and an indicator resistor R10 to indicate whether the output voltage is present. The Schottky diode (D7) is connected between the output end and ground to prevent reverse current and protect the circuit. The third power supply subunit converts the +5V input voltage into a stable +3.3V output voltage.
[0076] In a specific embodiment, the control device of the above-mentioned smart cabinet also includes a communication unit connected to the processing unit, the communication unit includes a transceiver chip, the power pin of the transceiver chip is connected to the power supply unit, the input pin and output pin of the transceiver chip are connected to the processing unit, and the differential signal pin of the transceiver chip is connected in sequence to an impedance matching resistor and one end of a bidirectional transient voltage suppression diode, and the other end of the bidirectional transient voltage suppression diode is grounded.
[0077] The communication unit is mainly used to convert the TTL serial communication of the microcontroller into RS485 half-duplex serial communication. The circuit is as follows Figure 5 As shown. The communication unit includes an operational amplifier (U12), communication diodes (D11, D12, D13), communication protection resistors (R11, R12, R13), communication voltage divider resistors (R14, R15), communication stabilization resistors (R16), communication filter capacitors (C22, C23) and a transistor (D1). The operational amplifier U12 is used for signal amplification. The input terminal (A) and input terminal (B) of the operational amplifier are respectively connected to different signal sources. The output terminal is connected to the subsequent circuit for outputting the amplified signal. The communication diode D11 is connected to the RO terminal of the operational amplifier through the communication protection resistor R11, and the communication diode D12 is connected to the DE terminal of the operational amplifier and the DE terminal of the operational amplifier through the communication protection resistor R12. The communication diode D13 is connected to the DI terminal of the operational amplifier through the communication protection resistor R13. The communication diode protects the operational amplifier from input signals exceeding its operating voltage range and preventing reverse voltage damage. The communication protection resistor, connected after the communication diode, limits current and protects subsequent circuitry. The communication voltage divider resistors (R14 and R15) divide the voltage to provide the bias voltage required by the operational amplifier. The communication stabilization resistor (R16) is connected between the output terminal (terminal B) of the operational amplifier and ground to stabilize the output signal. The communication filter capacitors (C22 and C23) are connected to the power supply pin (VCC) of the operational amplifier for filtering, smoothing the power supply voltage and reducing the impact of power supply noise on the operational amplifier. Transistor D1 is connected between the output terminal (terminal B) of the operational amplifier and the load (JP) to further amplify the signal or drive the load. The base of transistor D1 is connected to the output terminal (terminal A) of the operational amplifier through the communication voltage divider resistors R14 and R15 to control the transistor's conduction state. Multiple points in the communication unit circuit are connected to ground to provide a reference voltage and stabilize the circuit.
[0078] U12 is an RS485 half-duplex transceiver chip, model SP3485EN, powered by 3.3V. It is connected to the MCU's USART2 serial port. USART2 RX corresponds to MCU pin PA3, and USART2 TX corresponds to MCU pin PA2. MCU pin PA1 controls the transceiver direction. R15 is an impedance matching resistor for the RS485 bus. D1 is a bidirectional transient voltage suppression (TVS) diode specifically designed for RS485. It protects RS-485 circuits with asymmetrical operating voltages (-7V to 12V) from damage caused by electrostatic discharge (ESD), electrical fast transients (EFT), and lightning-induced surges. TVS diode D1 is connected between the output of the operational amplifier and the load (JP) to protect the circuit from transient voltage spikes such as electrostatic discharge (ESD) or power surges. When the voltage exceeds the breakdown voltage of the TVS diode, it conducts, diverting the overvoltage to ground, thereby protecting subsequent circuits. The three red LEDs D11, D12, and D13 are used to indicate the RS485 communication status.
[0079] In a specific embodiment, the control device of the above-mentioned smart cabinet also includes a configuration unit connected to the processing unit, the configuration unit includes a dip switch containing multiple sub-switches, and each interface of the dip switch is connected to each universal interface of the processing unit through a configuration resistor. By controlling the switching state of each sub-switches, the MODBUS device address and communication baud rate of the processing unit are configured.
[0080] The configuration unit is mainly used to configure the parameters of MODBUS communication. The configuration unit is specifically responsible for configuring the MODBUS device address and RS485 communication baud rate. Figure 6 As shown in the figure, SW1 is a 4-position DIP switch. It is connected to the microcontroller's general-purpose input / output (GPIO) ports PB8, PB9, PB4, and PB3 via resistors R41, R4, R42, and R43. Switches 1 and 2 configure the IO board's MODBUS device address, while switches 3 and 4 configure the communication baud rate. In this example, see Tables 1 and 2 for the specific MODBUS device address and communication baud rate configurations.
[0081] Table 1 MODBUS device address configuration
[0082]
[0083] Table 2 Communication baud rate configuration
[0084]
[0085] The storage space status detection unit is responsible for detecting the current status of the door lock corresponding to each storage space (whether the door is open or closed). Specifically, the storage space status detection unit includes multiple detection subunits, each of which is equipped with a compensation subunit connected in parallel. Each detection subunit includes a photocoupler, whose anode is connected to the second power supply subunit via a first protection resistor, its cathode is electrically connected to a door lock of the smart cabinet and then to ground, its emitter is grounded, and its collector is connected to the third power supply subunit via a second protection resistor. Each detection subunit is used to detect the open or closed status of a storage space door lock.
[0086] The compensation subunit includes a photoresistor, a fixed resistor, a bias resistor, a feedback resistor and an operational amplifier; one end of the photoresistor is connected to the second power supply subunit, and the other end is connected in series with the fixed resistor to form a voltage divider circuit, and the free end of the fixed resistor is grounded; the positive input end of the operational amplifier is connected to the voltage divider point, the negative input end is grounded via the bias resistor, and the negative input end is also connected to the output end of the operational amplifier via the feedback resistor, and the output end of the operational amplifier is connected to the processing unit; wherein the voltage divider point is the common connection point of the photoresistor and the fixed resistor.
[0087] Reference Figure 7Each detection subunit has one side connected to the second power supply subunit, receiving a 5V voltage from the second power supply subunit, and the other side connected to the third power supply subunit, receiving a 3.3V voltage from the third power supply subunit. Each detection subunit includes a photocoupler U6, which consists of a light emitting section and a light receiving section. The light emitting section includes an anode and a cathode, and the light receiving section includes an emitter and a collector. The detection subunit uses the photocoupler U6 for signal isolation. In this example, the photocoupler model is EL3H7-G. The anode (i.e., port 1) of the photocoupler U6 is connected to the second power supply subunit via a first protection resistor (R41, R42, or R4n). The cathode (i.e., port 2) is electrically connected to a door lock (D11, D12, or D1n) of the smart cabinet and then grounded. The emitter (i.e., port 3) is grounded, and the collector (i.e., port 4) is connected to the third power supply subunit via a second protection resistor R61. Each detection subunit is used to detect the open / closed state of a storage space door lock. The light emitting diode D31 is connected in series with the third protection resistor R71 and then in parallel with the second protection resistor R61. In this example, the light emitting diode D31 is a red light emitting diode used to display the door lock status of a certain storage space.
[0088] If the smart cabinet's door lock is closed, the cathode (port 2) of optocoupler U6 is grounded, and the anode (port 1) is connected to the power supply. Current flows through the first protection resistor and the diode (cathode and anode) of optocoupler U6, causing the diode to conduct and emit light. The phototransistor receives the light signal and turns on, with the collector (port 4) connecting to ground through the second protection resistor to form a low level.
[0089] If the smart cabinet's door lock is open, the cathode (port 2) of optocoupler U6 forms a high potential with ground. Because the anode (port 1) of optocoupler U6 is connected to the power supply and the cathode (port 2) is floating, the diode loses its conduction condition and enters the cutoff state. Without light, the phototransistor is cut off, and its collector (port 4) outputs a high level.
[0090] The circuit provided by the detection subunit uses a photoelectric coupler to achieve signal isolation to ensure that the detection signal is not interfered with. At the same time, it realizes door lock status detection through simple level changes. It has the characteristics of simple circuit, high reliability and strong anti-interference ability.
[0091] In this example, the resistance value of the first protection resistor is 1 kΩ, the resistance value of the second protection resistor is 4.7 kΩ, and the resistance value of the third protection resistor is 1 kΩ. It is understandable that when the specifications of the door locks used in each storage space are the same, the parameter settings of each detection subunit are also the same. In the example provided by the present invention, only one detection subunit in one case is described. Depending on the number of storage spaces in the smart cabinet, multiple detection subunits can be connected in parallel to realize the detection of the door lock status of each storage space in the smart cabinet. For door locks of different specifications, the configuration parameters in the detection subunit can also be adaptively adjusted, and there is no limitation on this.
[0092] Since the light intensity in the environment changes frequently, the change in light intensity will affect the working accuracy of the photoelectric coupler, causing the signal output by the photoelectric coupler to be inaccurate, resulting in inaccurate judgment of the door lock status.
[0093] Based on this, in an embodiment of the present invention, a compensation subunit is configured for each detection subunit. The compensation subunit is connected in parallel with the detection subunit and is used to adjust the sensitivity of the photoelectric coupler to light according to changes in light intensity in the environment to ensure the accuracy of the photoelectric coupler. That is, the detection subunit gives the initial state (first state) of the door lock opening and closing, and then combines it with the verification state (second state) of the door lock opening and closing given by the supplementary subunit to realize the state detection of each storage space.
[0094] Each compensation subunit includes a photoresistor, a fixed resistor, a bias resistor, a feedback resistor, and an operational amplifier. One end of the photoresistor is connected to the second power supply subunit, and the other end is connected in series with the fixed resistor, forming a voltage divider circuit. The free end of the fixed resistor is grounded. The positive input of the operational amplifier is connected to the voltage divider point, while the negative input is grounded via the bias resistor. The negative input is also connected to the output of the operational amplifier via the feedback resistor. The output of the operational amplifier is connected to the processing unit. The voltage divider point is the common connection point between the photoresistor and the fixed resistor.
[0095] In a specific embodiment, referring to Figure 7 The compensation subunit includes a photoresistor R101, a fixed resistor R201, a bias resistor R401, a feedback resistor R301, and an operational amplifier. One end of the photoresistor R101 is connected to the second power supply subunit, and the other end is connected in series with the fixed resistor R201, forming a voltage divider circuit. The free end of the fixed resistor is grounded. The positive input of the operational amplifier is connected to the voltage divider point, while the negative input is connected to ground via the bias resistor R401. The negative input is also connected to the output of the operational amplifier via the feedback resistor R301. The output of the operational amplifier is connected to the processing unit. The voltage divider point is the common connection point between the photoresistor R101 and the fixed resistor R201.
[0096] The photoresistor in the compensation subunit detects changes in ambient light and adjusts its resistance according to light intensity. The operational amplifier amplifies and processes the weak signal output by the photoresistor, converting the photoresistor's resistance change into a voltage change and amplifying it to a level suitable for processing. A fixed resistor connected in series with the photoresistor forms a voltage divider circuit, providing a bias voltage for the photoresistor. A feedback resistor, connected between the output and inverting input of the operational amplifier, sets the amplifier's gain. The bias resistor provides a bias current to the negative input of the operational amplifier, setting the appropriate bias point so that the output of the operational amplifier is at a suitable intermediate level when no input signal is present.
[0097] In actual usage scenarios, for a certain storage space, when the door lock is closed, the photocoupler in the detection subunit is turned on, and the first state obtained by the processing unit is a low level. At the same time, the photoresistor in the compensation subunit has a higher resistance value and a lower voltage at the voltage divider point because the door lock is closed and the photoresistor is in a relatively dark environment. The operational amplifier amplifies and processes the low-level signal at the voltage divider point and outputs it to the processing unit. When the door lock is opened, the photocoupler is cut off, and the first state obtained by the processing unit becomes a high level. However, the photoresistor has a lower resistance value and the voltage at the voltage divider point increases due to the increased light exposure after the door lock is opened. The operational amplifier also processes and outputs the corresponding signal. The processing unit receives the output signal of the photocoupler, obtains the first state, and combines the received output signal of the compensation subunit to obtain the second state. The first state and the second state are combined to determine the current door lock state of the storage space. When judging whether the door lock is in the open state, the door lock is only opened when both signals are as expected, that is, the first state is high and the second state is also high. When judging whether the door lock is in the closed state, due to the possible lag of light changes, the closed state of the door lock can be determined only by judging that the first state is low.
[0098] It is understandable that when the ambient light changes, the door lock mechanically fails, the photoelectric coupler component ages, etc., the possibility of misjudgment will greatly increase, and the compensation subunit will feed back the change in ambient light to the processing unit.
[0099] Mechanical failures can also cause a door lock to not close properly or become stuck when opened, leading to misjudgments. For example, if the door lock is actually closed but strong light persists due to a mechanical failure, the optocoupler may output an open signal. However, the light intensity detected by the photoresistor in the compensation subunit may be between normal open and closed, causing the operational amplifier to output an intermediate signal. Based on pre-set logic, the system identifies signal anomalies, deems a possible mechanical failure, and issues an alarm or prompt, thus preventing misjudgments of the door lock status caused by the sole use of the optocoupler in the detection subunit.
[0100] When the photoelectric coupler component ages and its sensitivity to light decreases, the compensation subunit can be used as an auxiliary detection method to compensate for the detection error caused by the aging of the photoelectric coupler. For example, the microcontroller gives priority to referring to the signal of the compensation subunit or performs weighted calculation on the signals of the detection subunit and the compensation subunit.
[0101] The lighting control unit is responsible for controlling the lighting of each storage space in the smart cabinet. Specifically, the lighting control unit includes multiple lighting control subunits, each of which includes a relay driver and a lighting relay connected in sequence, wherein the lighting relay includes a lighting electromagnetic coil and lighting contacts;
[0102] A relay driver is connected to the processing unit and is used to receive a lighting drive signal and drive the lighting relay to switch on and off;
[0103] The multiple output pins of the relay driver are connected to the lighting electromagnetic coil and the power pin of the relay driver in sequence. The power pin is connected to the first power supply unit, and the lighting contact is connected to the light source component.
[0104] Reference Figure 8 The lighting control unit includes a relay driver (U5), lighting protection resistors (R17, R18), a lighting relay (K1), an LED (D21), a lighting protection diode (D41), and a lighting current-limiting resistor (R31). Pins I1 and O1 of the relay driver U5 are connected to different circuit components, respectively, for receiving input signals and controlling outputs. Lighting protection resistor R17, connected between the input signal and the relay driver U5, limits current and protects the relay driver U5. Lighting protection resistor R18, connected between the power supply and ground, provides a stable voltage or current. LED D21, connected after the lighting current-limiting resistor R31, indicates the circuit's operating status. When the circuit is operating, D21 illuminates, indicating that the circuit is active. The lighting relay K1 is connected between the relay driver U5 and the load (J11) to control high-current loads, such as lighting fixtures. When the relay driver U5 outputs a signal, the lighting relay K1 activates, connecting the load and thus turning the lighting fixture on and off. The lighting protection diode D41 is connected in parallel with the lighting electromagnetic coil to protect the lighting relay from the reverse electromotive force, preventing the reverse voltage generated when the relay coil is de-energized from damaging the lighting protection diode (D41). The lighting control unit circuit is powered by a +12V power supply to provide the required voltage for each component.
[0105] The relay driver is a Darlington transistor array U5, which is used to drive the lighting relay. The Darlington transistor array U5 has a total of seven channels, meaning it can simultaneously control seven light source components to control the storage space lighting. A relay driver is used based on actual circumstances. The relay driver's multiple input pins are connected to signal input circuits, and the multiple output pins corresponding to the multiple input pins are sequentially connected to the lighting electromagnetic coil and the power pin of the relay driver. The power pin is connected to the output circuit of the first power supply subunit, and the lighting contacts are provided on the light source component. The lighting control subunit also includes a lighting protection diode (D41) and a status display subunit. Both the lighting protection diode (D41) and the status display subunit are connected in parallel with the lighting relay. The status display subunit includes a lighting current-limiting resistor (R31) and a light-emitting diode (D21) connected in series. The cathode of the rectifier diode is connected to the power pin of the relay driver, and the anode of the light-emitting diode (D21) is connected to the power pin of the relay driver via the lighting current-limiting resistor. In this example, the light-emitting diode is a red LED. In other examples, light-emitting diodes of other colors can be used to display the lighting status of the storage space. The multiple input pins of the relay driver are connected in series with the lighting protection resistor (R17) and then connected to the signal input circuit. They are also connected to the lighting protection resistor (R18) and then grounded. The power pin (common pin) of the relay driver is connected to the output circuit of the first power supply, which has a voltage of 12V. The resistance values of the lighting current limiting resistor (R31) and the lighting protection resistor R17 are both 4.7kΩ, and the resistance value of the lighting protection resistor R18 is 20kΩ.
[0106] This example uses one circuit of a relay driver, ULN2003A, as an example. Lighting relay K1 is used to cut off and on the power supply to the light source. Lighting relay K1's model is SLA-12VDC-SL-C. The lighting solenoid coil voltage is 12V, and the maximum switching current is 30A. D21 is the lighting relay's rectifier diode, a 1N4007 current-discharging diode for the solenoid coil. The microcontroller controls the state of general-purpose input / output (GPIO) port PB10 to switch lighting relay K1 on and off, thereby controlling the lighting in the storage space. The solenoid coils and contacts of the lighting relays in each lighting control subunit work together. When the solenoid coils are energized, they attract the contacts, connecting the circuit to the contacts. When the solenoid coils are de-energized, the circuit to which the contacts belong is disconnected. This coordination between the solenoid coils and contacts switches the circuit to and from the contacts.
[0107] The lock drive unit is responsible for generating a lock drive signal to open or close the door locks of each storage space in the smart cabinet.
[0108] Specifically, the lock drive unit includes lock drive subunits, each of which is connected to each door lock of the smart cabinet;
[0109] The lock drive subunit includes a single-channel dual-power bus transceiver and an NMOS tube. The driving side pin of the single-channel dual-power bus transceiver is connected to the gate of the NMOS tube. The non-driving side power pin and the driving side power pin of the single-channel dual-power bus transceiver are respectively connected to the third power supply subunit and the second power supply subunit. The source of the NMOS tube is grounded, and the drain is connected to the first power supply subunit through a freewheeling diode; the drain of the NMOS tube is connected in series with the door lock of the smart cabinet and the first power supply subunit.
[0110] The lock drive unit includes at least one lock drive sub-unit, each of which is connected to a respective door lock of the smart cabinet. The lock drive sub-unit includes a single-channel dual-power bus transceiver and an NMOS transistor. The driving-side pin of the single-channel dual-power bus transceiver is connected to the gate of the NMOS transistor. The non-driving-side power pin and the driving-side power pin of the single-channel dual-power bus transceiver are respectively connected to the third power supply sub-unit and the second power supply sub-unit. The source of the NMOS transistor is grounded, and the drain is connected to the first power supply sub-unit via a freewheeling diode. The drain of the NMOS transistor is connected in series with the door lock of the smart cabinet and the first power supply sub-unit.
[0111] Specific as Figure 9As shown in FIG, the lock drive subunit includes a single-channel dual-power bus transceiver (U14), an NMOS transistor (Q1), a first resistor (R57), a second resistor (R45), a third resistor (R22), a fourth resistor (R23), a driving current limiting resistor (R24), a voltage-stabilizing diode (D19), and a light-emitting diode (D20). The non-driving side pin of the single-channel dual-power bus transceiver U14 is grounded via the first resistor (R57), and the resistance of the first resistor is 20kΩ. The direction control pin of the single-channel dual-power bus transceiver U14 is connected to the transmission line of the third power supply subunit via the second resistor (R45). The non-driving side power pin (VCCA) and the driving side power pin (VCCB) of the single-channel dual-power bus transceiver U14 are respectively connected to the output lines of the third power supply subunit and the second power supply subunit. The non-driving side power pin and the driving side power pin of the single-channel dual-power bus transceiver U14 are respectively connected to a first filter circuit and a second filter circuit. The first filter circuit includes a first grounding capacitor, and the second filter circuit includes multiple second grounding capacitors connected in parallel. The drive-side pin of the single-channel dual-power bus transceiver U14 is connected to the gate of the NMOS transistor Q1 via a third resistor (R22), and the gate of the NMOS transistor (Q1) is grounded via a fourth resistor (R23). The lock drive subunit also includes a lock drive status display branch, both connected in parallel with the voltage-stabilizing diode (D19). The lock drive status display branch includes a drive current-limiting resistor (R24) and a light-emitting diode (D20) connected in series. The anode of the light-emitting diode is connected to the output circuit of the first power supply subunit via the drive current-limiting resistor (R24), and the cathode of the light-emitting diode (D20) is connected to the drain of the NMOS transistor Q1. The lock drive subunit is mainly used to switch the open and closed states of the door locks corresponding to each storage space of the smart cabinet. Each lock drive subunit is generally used to drive the door lock of one storage space, so multiple lock drive subunits can be provided in parallel according to actual needs.
[0112] This example describes a single-channel lock driver subunit. U14 is a single-bit dual-supply bus transceiver (SN74LVC1T450BV) with configurable voltage-level translation and three-state outputs. It converts the input 3.3V signal into a 5V signal, reducing the on-resistance of the NMOS transistor. By pulling the transceiver's fifth pin, DIR, high through resistor R45, the signal direction is A to B, with the A side supply voltage at 3.3V and the B side supply voltage at 5V. Q1 is an N-type metal oxide semiconductor (NMOS) transistor (IRLR8726TRPBF) that amplifies U14's output signal to drive a large load. This NMOS transistor has a drain-source voltage of 30V, a maximum continuous drain current of 86A, and an on-resistance of 5.8mΩ at a gate voltage of 10V. D19 is a freewheeling diode, specifically a 1N4007 current bleeder diode for the electromagnetic lock coil, protecting the NMOS transistor from the high voltage generated when the coil is de-energized. R57, connected between PA6 and ground, provides pull-down or current limiting. R22, connected between U14 and the base of the NMOS transistor (Q1), limits the current flowing into the base. R23, connected between Q1's emitter and ground, provides a return path for the base current. R24, connected between the +12V power supply and LED D20, limits the current. The lock driver subunit uses multiple power supply voltages, with +3.3V and +5V supplied to different power supply pins (VCCA and VCCB) of U14, respectively, to ensure normal operation of U14 at different voltages.
[0113] Furthermore, obtaining request information for opening the storage space and providing a lock drive signal and a lighting drive signal according to the request information and the first state and the second state of the corresponding door lock specifically include:
[0114] Perform data analysis on the request information and perform feature extraction to obtain request features;
[0115] Compare the requested features with the feature information in the pre-built feature information database to obtain feature similarity data;
[0116] Compare the feature similarity data with the preset similarity threshold and give the judgment result;
[0117] According to the judgment result, a lock driving signal and a lighting driving signal are given in combination with the first state and the second state of the corresponding door lock.
[0118] The lock driving signal is a high level signal or a low level signal, and the lighting driving signal is a high level signal or a low level signal.
[0119] Furthermore, according to the judgment result, in combination with the first state and the second state of the corresponding door lock, a lock driving signal and a lighting driving signal are given, specifically including:
[0120] If the judgment result of the request information is successful, the switch state of the door lock is determined based on the analysis of the first state and the second state of the corresponding door lock, and the amplitude of the level signal is determined according to the switch state of the door lock, and the lock drive signal and the lighting drive signal are given.
[0121] Combined with the aforementioned description of the synergy between the compensation subunit, the detection subunit, and the processing unit, it can be understood that ambient lighting and various fault conditions significantly influence the determination of the door lock's open state. When the first state indicates the door lock is closed, the door lock's switch state is determined to be closed. When the first state indicates the door lock is open, the second state obtained by the compensation subunit is used to determine whether the door lock is confirmed to be open. If both the first and second states indicate the door lock is open, the door lock is determined to be open.
[0122] In the embodiments provided by the present invention, the request information is a data string transmitted by an external device of the processing unit. The external device may be a fingerprint recognition sensor, a camera, a keyboard, or a touch screen. Depending on the external device, the received fingerprint information, facial image, password information, etc. may be used as the request information. Specifically, the fingerprint recognition sensor typically captures a fingerprint image and converts it into a digital data string. This data may include features such as the location, direction, and frequency of the fingerprint's ridges and valleys. The facial recognition camera captures a facial image and converts it into a digital data string. This data may include information such as the location of facial feature points and facial geometric features. The iris recognition sensor captures an iris image and converts it into a digital data string. This data may include information such as the texture features and color distribution of the iris.
[0123] Based on the received request information, the processing unit performs feature extraction to obtain the corresponding requested features. For example, operations such as image enhancement and feature extraction are performed on the fingerprint information to improve recognition accuracy. For facial images, steps such as image cropping and normalization are performed to prepare for facial recognition. Information comparison is then performed for different requested features. For example, the fingerprint features extracted from the request information are compared with the stored fingerprint template, and the similarity is calculated to obtain feature similarity data. For another example, the input password is compared with the stored password, and the similarity between the two strings is calculated to obtain feature similarity data.
[0124] Different similarity thresholds are set for different types of request information. For example, for fingerprint and face recognition, the similarity threshold is 80%. If the feature similarity data exceeds the similarity threshold, the verification is considered successful, and the result is judged as a successful request. For password verification, the similarity threshold is set to 100%, that is, the verification is considered successful if the entered password exactly matches the stored password.
[0125] If any verification method (fingerprint, face, or password) succeeds, the request is considered successful. Based on the correspondence between the request information and the storage space, the corresponding lock and lighting drive signals are generated. This means the corresponding high-level signals are output to control the corresponding door lock and light source to open. If the request fails, the corresponding lock and lighting drive signals are not generated.
[0126] It's important to understand that the microcontroller outputs control signals through its GPIO (general-purpose input / output) pins. For example, pin PA6 can be used to control the lock drive signal, and pin PA5 can be used to control the lighting drive signal. The drive signals are controlled by setting the levels of the GPIO pins. For example, setting PA6 high activates the corresponding lock drive subunit, while setting PA5 high activates the corresponding lighting control subunit.
[0127] Reference Figure 10 , an embodiment of the present invention provides a lighting control method for a smart cabinet, comprising:
[0128] Get the request information for opening the storage space;
[0129] Based on the request information, obtaining a first state and a second state of the corresponding door lock, and providing a lock drive signal and a lighting drive signal;
[0130] Control the state of the corresponding door lock based on the lock drive signal;
[0131] The illumination intensity of the corresponding light source element is controlled based on the illumination driving signal.
[0132] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the described method steps can refer to the corresponding process in the aforementioned device embodiment, and will not be repeated here.
[0133] Although preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they are aware of the basic inventive concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the invention. Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the invention. Thus, the present invention is intended to include such changes and modifications as fall within the scope of the claims and their equivalents.
Claims
1. A control device for a smart cabinet, characterized in that: The smart cabinet includes multiple storage spaces, each of which is provided with a corresponding door lock and light source; the control device includes a processing unit, and a lighting control unit electrically connected to the processing unit, a storage space state detection unit, and a lock drive unit; a storage space state detection unit, comprising a detection subunit including a photoelectric coupler and a compensation subunit including a photoresistor, the photoelectric coupler being electrically connected to the door lock, and the detection subunit and the compensation subunit being arranged in parallel, the detection subunit being configured to determine a first state of the door lock based on a state of the photoelectric coupler, and the compensation subunit being configured to provide a second state of the door lock based on an acquired resistance value of the photoresistor; The first state is the initial state of the door lock open and closed given by the detection subunit, and the second state is the verification state of the door lock open and closed given by the compensation subunit; a processing unit, configured to obtain request information for opening the storage space, and provide a lock drive signal and a lighting drive signal according to the request information and the first state and the second state of the corresponding door lock; a lock driving unit, configured to control a state of a corresponding door lock based on a received lock driving signal; an illumination control unit, configured to control the illumination intensity of the corresponding light source component based on the received illumination drive signal; The control device further includes a power supply unit electrically connected to the lighting control unit, the storage space status detection unit, and the lock drive unit, the power supply unit including a second power supply sub-unit and a third power supply sub-unit, and the second power supply sub-unit and the third power supply sub-unit have different output voltages; There are multiple storage space status detection units, and each door lock corresponds to a storage space status detection unit; the anode of the photocoupler in each detection sub-unit is connected to the second power supply sub-unit through a first protection resistor, the cathode is electrically connected to the door lock and then grounded, the emitter is grounded, and the collector is connected to the third power supply sub-unit through a second protection resistor; the compensation sub-unit also includes a fixed resistor, a bias resistor, a feedback resistor and an operational amplifier, one end of the photoresistor is connected to the second power supply sub-unit, and the other end is connected in series with the fixed resistor to form a voltage divider circuit, and the free end of the fixed resistor is grounded; the positive input terminal of the operational amplifier is connected to the voltage divider point, the negative input terminal is grounded via the bias resistor, and the negative input terminal is also connected to the output terminal of the operational amplifier via the feedback resistor, and the output terminal of the operational amplifier is connected to the processing unit; wherein, the voltage divider point is the common connection point of the photoresistor and the fixed resistor.
2. The control device of the smart cabinet according to claim 1, characterized in that: The power supply unit further includes a first power supply subunit, and the output voltages of the first power supply subunit, the second power supply subunit, and the third power supply subunit are different; The first power supply sub-unit is connected to the lighting control unit and the storage space state detection unit respectively.
3. The control device of the smart cabinet according to claim 2, characterized in that: Also included is a communication unit electrically connected to the processing unit; The communication unit includes a transceiver chip, the power pin of the transceiver chip is connected to the power supply unit, the input pin and output pin of the transceiver chip are connected to the processing unit, the differential signal pin of the transceiver chip is connected in sequence to an impedance matching resistor and one end of a bidirectional transient voltage suppression diode, and the other end of the bidirectional transient voltage suppression diode is grounded.
4. The control device of the smart cabinet according to claim 3, characterized in that: Also included is a configuration unit electrically connected to the processing unit; The configuration unit includes a dip switch with multiple sub-switches. Each interface of the dip switch is connected to each universal interface of the processing unit through a configuration resistor. By controlling the switch state of each sub-switches, the MODBUS device address and communication baud rate of the processing unit are configured.
5. The control device of the smart cabinet according to claim 2, characterized in that: There are multiple lighting control units, each of which includes a relay driver and a lighting relay connected in sequence, wherein the lighting relay includes a lighting electromagnetic coil and a lighting contact; A relay driver is connected to the processing unit and is used to receive a lighting drive signal and drive the lighting relay to switch on and off; The multiple output pins of the relay driver are connected to the lighting electromagnetic coil and the power pin of the relay driver in sequence. The power pin is connected to the first power supply unit, and the lighting contact is connected to the light source component.
6. The control device of the smart cabinet according to claim 2, characterized in that: There are multiple lock drive units, each of which is connected to each door lock of the smart cabinet; The lock drive unit includes a single-channel dual-power bus transceiver and an NMOS tube. The driving side pin of the single-channel dual-power bus transceiver is connected to the gate of the NMOS tube. The non-driving side power pin and the driving side power pin of the single-channel dual-power bus transceiver are respectively connected to the third power supply sub-unit and the second power supply sub-unit. The source of the NMOS tube is grounded, and the drain is connected to the first power supply sub-unit through a freewheeling diode; the drain of the NMOS tube is connected in series with the door lock of the smart cabinet and the first power supply sub-unit.
7. The control device of the smart cabinet according to claim 1, characterized in that: Obtaining a request to open the storage space and providing a lock drive signal and a lighting drive signal based on the request and the first and second states of the corresponding door lock, specifically including: Perform data analysis on the request information and perform feature extraction to obtain request features; Compare the requested features with the feature information in the pre-built feature information database to obtain feature similarity data; Compare the feature similarity data with the preset similarity threshold and give the judgment result; According to the judgment result, a lock driving signal and a lighting driving signal are given in combination with the first state and the second state of the corresponding door lock.
8. The control device of the smart cabinet according to claim 7, characterized in that: The lock drive signal and the lighting drive signal are both level signals; According to the judgment result, in combination with the first state and the second state of the corresponding door lock, a lock driving signal and a lighting driving signal are given, specifically including: If the judgment result of the request information is successful, the switch state of the door lock is determined based on the analysis of the first state and the second state of the corresponding door lock, and the amplitude of the level signal is determined according to the switch state of the door lock, and the lock drive signal and the lighting drive signal are given.
9. A method for controlling a smart cabinet, characterized in that: A control device for a smart cabinet according to any one of claims 1 to 8, comprising: Get the request information for opening the storage space; Based on the request information, obtaining a first state and a second state of the corresponding door lock, and providing a lock drive signal and a lighting drive signal; Control the state of the corresponding door lock based on the lock drive signal; The illumination intensity of the corresponding light source element is controlled based on the illumination driving signal.
Citation Information
Patent Citations
Novel intelligent control system for power distribution cabinet
CN107658760A
Five-prevention lock for preventing maintainers from mistakenly entering electrified intervals
CN111473804A