Control device and method, water quality monitoring device
By introducing a high-performance first control unit and a low-power second control unit into electronic products, and using analog switches to connect the two, the problem of balancing low power consumption and high performance is solved, and a flexible and efficient control scheme is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CORE VISION (BEIJING) TECH CO LTD
- Filing Date
- 2023-07-06
- Publication Date
- 2026-06-19
AI Technical Summary
Existing electronic products struggle to simultaneously achieve low power consumption and high performance, limiting their application scenarios, especially in fields requiring high precision, high reliability, and high stability.
A control device including a first control unit and a second control unit is adopted. The first control unit has a higher data processing capability than the second control unit. The connection between the two is realized through an analog switch, and data processing and transmission are performed in a low power consumption state.
It achieves a balance between low power consumption and high performance, improves the flexibility and efficiency of the control device, and is suitable for scenarios that require low power consumption and high performance.
Smart Images

Figure CN116859802B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of control technology, and in particular to a control device and method, and a water quality monitoring device. Background Technology
[0002] Currently, some electronic products typically incorporate low-power but low-performance controllers. While these products meet the low-power requirement, they struggle to simultaneously meet the high-performance requirement, preventing their application in fields demanding high precision, reliability, and stability. Conversely, some electronic products feature high-performance but high-power controllers, satisfying the high-performance requirement but consuming significantly more power. Clearly, electronic products in these technologies generally cannot simultaneously possess both low power consumption and high performance, limiting their application scenarios and failing to meet specific needs. Summary of the Invention
[0003] According to one aspect of this disclosure, a control device is provided, the control device comprising:
[0004] The first control unit includes multiple first transceiver interfaces;
[0005] The second control unit includes multiple second transceiver interfaces, and the data processing capability of the first control unit is higher than that of the second control unit.
[0006] A switching unit includes multiple analog switches. A first transceiver interface of the first control unit is connected to a corresponding second transceiver interface through an analog switch in the switching unit. The multiple analog switches in the switching unit include a first analog switch. The control terminal of the first analog switch is connected to a control pin of a first general-purpose input / output interface. A first transceiver interface of the first control unit is connected to a second transceiver interface of the second control unit through the first analog switch. Another second transceiver interface of the second control unit is connected to at least one sensor module via a bus. The sensor module is used to acquire sensing data.
[0007] The second control unit is used for:
[0008] Upon receiving an inquiry command, the sensor data is transmitted using a second transceiver interface that is connected to the first transceiver interface of the first control unit.
[0009] Wherein, the first control unit is used for:
[0010] Send an interrogation command to the second control unit to obtain data through the second control unit;
[0011] The data is processed to obtain the processing result.
[0012] In one possible implementation, the first control unit includes a system-on-a-chip, the second control unit includes a microcontroller, and both the first transceiver interface and the second transceiver interface are universal asynchronous transceiver interfaces.
[0013] In one possible implementation, the device further includes a Bluetooth component, the switching unit includes a plurality of analog switches including a second analog switch and a third analog switch, a second transceiver interface of the second control unit is connected to a first transceiver interface of the first control unit and the Bluetooth component through the second analog switch and the third analog switch, and the control terminals of the second analog switch and the third analog switch are connected to the control pin of a second general purpose input / output interface.
[0014] When the control device is in standby mode, the first control unit is in a power-off state, and the second control unit and the Bluetooth component are in a sleep state. If the wake-up timer of the second control unit reaches the wake-up cycle, or if a wake-up signal is received through the Bluetooth component, the second control unit exits the sleep state and turns on the power of the first control unit to power on the first control unit. The third analog switch is then controlled to enable the first transceiver interface of the first control unit to establish a connection with the Bluetooth component.
[0015] In one possible implementation, the device further includes a navigation module. If the wake-up timer of the second control unit reaches the wake-up period, or if a wake-up signal is received through the Bluetooth component, the second control unit is further configured to control the second analog switch to establish a connection between the second transceiver interface of the second control unit and the navigation component, and to turn on the power of the navigation module to control the navigation module to power on.
[0016] In one possible implementation, when the power-down condition is met, the second control unit is further configured to:
[0017] Turning off the power to the first control unit to power it down, controlling the second analog switch and the third analog switch to enable the second transceiver interface of the second control unit to establish a connection with the Bluetooth component, and controlling itself and the Bluetooth component to enter a sleep state.
[0018] In one possible implementation, the device further includes a mobile communication module, and the plurality of analog switches in the switching unit further includes a fourth analog switch. The mobile communication module is connected to the first control unit via a universal serial bus interface and to one end of the first analog switch via an asynchronous transceiver.
[0019] When the first control unit receives the upgrade firmware through the mobile communication module, the first control unit sends an upgrade command to the second control unit. The second control unit controls the connection state of the fourth analog switch through the third general-purpose input / output interface control pin so that a first transceiver interface of the first control unit is connected to the bus, so that the first control unit sends the upgrade firmware to each sensor module through the bus to upgrade the firmware of each sensor module.
[0020] In one possible implementation, when the second control unit determines that the first control unit cannot send or receive data through the mobile communication module, the second control unit is configured to:
[0021] Controlling the connection state of the first analog switch to establish a connection relationship between the mobile communication module and a second transceiver interface of the second control unit;
[0022] The upgrade firmware is received from the mobile communication module and sent to each sensor module through a second transceiver interface connected to the bus to upgrade the firmware of each sensor module.
[0023] In one possible implementation, the second control unit is further configured to: send a check command to the first control unit; if no feedback information is received from the first control unit within a preset time, determine that the first control unit cannot send or receive data through the mobile communication module.
[0024] In one possible implementation, the first control unit further includes at least one of the following:
[0025] At least one camera serial interface is used to connect the camera;
[0026] At least one display serial interface is used to connect to a display;
[0027] At least one multimedia card interface is provided for connecting a multimedia card;
[0028] At least one digital memory card interface is provided for connecting a digital memory card;
[0029] At least one random access memory interface is provided for connecting to random access memory;
[0030] At least one Ethernet interface is used to connect an Ethernet card;
[0031] At least one digital input / output interface is provided for connecting to the wireless LAN module;
[0032] At least one audio bus is used to connect the audio codec chip.
[0033] According to another aspect of the embodiments of this disclosure, a water quality monitoring device is provided, the water quality monitoring device including the control device described above.
[0034] According to another aspect of the embodiments of this disclosure, a control method is proposed, the control method comprising:
[0035] A first control unit including multiple first transceiver interfaces and a second control unit including multiple second transceiver interfaces are provided, wherein the data processing capability of the first control unit is higher than that of the second control unit;
[0036] A switching unit including multiple analog switches is provided. A first transceiver interface of the first control unit is connected to a corresponding second transceiver interface through the analog switches of the switching unit. The multiple analog switches in the switching unit include a first analog switch. The control terminal of the first analog switch is connected to the control pin of a first general-purpose input / output interface. A first transceiver interface of the first control unit is connected to a second transceiver interface of the second control unit through the first analog switch. Another second transceiver interface of the second control unit is connected to at least one sensor module through a bus. The sensor module is used to acquire sensing data.
[0037] Upon receiving an inquiry command, the second control unit transmits the sensing data via a second transceiver interface that is connected to the first transceiver interface of the first control unit.
[0038] The first control unit sends an inquiry command to the second control unit to obtain data through the second control unit; and processes the data to obtain a processing result.
[0039] In one possible implementation, the first control unit includes a system-on-a-chip, the second control unit includes a microcontroller, and both the first transceiver interface and the second transceiver interface are universal asynchronous transceiver interfaces.
[0040] In one possible implementation, the method further includes:
[0041] Provides Bluetooth components;
[0042] A second analog switch and a third analog switch are provided. A second transceiver interface of the second control unit is connected to a first transceiver interface of the first control unit and the Bluetooth component through the second analog switch and the third analog switch. The control terminals of the second analog switch and the third analog switch are connected to the control pins of a second general purpose input / output interface.
[0043] When the first control unit is in a power-off state and the second control unit and the Bluetooth component are in a sleep state, if the wake-up timer of the second control unit reaches the wake-up cycle, or if a wake-up signal is received through the Bluetooth component, the second control unit controls itself to exit the sleep state and turns on the power of the first control unit to power on the first control unit, and controls the third analog switch to enable the first transceiver interface of the first control unit to establish a connection with the Bluetooth component.
[0044] In one possible implementation, the method further includes:
[0045] Provide navigation modules;
[0046] If the wake-up timer of the second control unit reaches the wake-up period, or if a wake-up signal is received through the Bluetooth component, the second control unit controls the second analog switch to establish a connection between the second transceiver interface of the second control unit and the navigation component, and turns on the power of the navigation module to power on the navigation module.
[0047] In one possible implementation, the method further includes:
[0048] When the power-down conditions are met, the second control unit turns off the power of the first control unit to power down the first control unit, controls the second analog switch and the third analog switch to establish a connection between the second transceiver interface of the second control unit and the Bluetooth component, and controls itself and the Bluetooth component to enter a sleep state.
[0049] In one possible implementation, the method further includes:
[0050] A mobile communication module is provided. The switching unit includes multiple analog switches, including a fourth analog switch. The mobile communication module is connected to the first control unit via a universal serial bus interface and to one end of the first analog switch via an asynchronous transceiver.
[0051] When the first control unit receives the upgrade firmware through the mobile communication module, it sends an upgrade command to the second control unit.
[0052] The second control unit controls the connection state of the fourth analog switch through the third general-purpose input / output interface control pin, so that a first transceiver interface of the first control unit is connected to the bus, so that the first control unit sends the upgrade firmware to each sensor module through the bus to upgrade the firmware of each sensor module.
[0053] In one possible implementation, the method further includes:
[0054] When the second control unit determines that the first control unit cannot send or receive data through the mobile communication module, the second control unit controls the connection state of the first analog switch to establish a connection relationship between the mobile communication module and a second transceiver interface of the second control unit.
[0055] The mobile communication module receives the upgrade firmware and sends it to each sensor module through a second transceiver interface connected to the bus, thereby upgrading the firmware of each sensor module.
[0056] In one possible implementation, the method further includes:
[0057] The second control unit sends a check command to the first control unit. If no feedback information is received from the first control unit within a preset time, it is determined that the first control unit cannot send or receive data through the mobile communication module.
[0058] The control device of this embodiment includes a first control unit and a second control unit. The first control unit has a higher data processing capability than the second control unit. The first transceiver interface of the first control unit is connected to a corresponding second transceiver interface through an analog switch of the switching unit. When the second control unit receives the query command, it sends the sensing data through the second transceiver interface connected to the first transceiver interface of the first control unit. The first control unit sends a query command to the second control unit to obtain data through the second control unit. The data is processed to obtain a processing result. Thus, the control device of this embodiment has both low power consumption and high performance, which can improve the flexibility and efficiency of control.
[0059] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Other features and aspects of this disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description
[0060] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the specification, serve to illustrate the technical solutions of this disclosure.
[0061] Figure 1 A block diagram of a control device according to an embodiment of the present disclosure is shown.
[0062] Figure 2 A block diagram of a control device according to an embodiment of the present disclosure is shown.
[0063] Figure 3 A flowchart of a control method according to an embodiment of the present disclosure is shown.
[0064] Figure 4 A flowchart of a control method according to an embodiment of the present disclosure is shown.
[0065] Figure 5 A flowchart of a control method according to an embodiment of the present disclosure is shown. Detailed Implementation
[0066] Various exemplary embodiments, features, and aspects of this disclosure will now be described in detail with reference to the accompanying drawings. The same reference numerals in the drawings denote elements that have the same or similar functions. Although various aspects of the embodiments are shown in the drawings, they are not necessarily drawn to scale unless specifically indicated otherwise.
[0067] In the description of this disclosure, it should be understood that the terms "length", "width", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this disclosure and simplifying the description, and are not intended to indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this disclosure.
[0068] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this disclosure, "a plurality of" means two or more, unless otherwise expressly specified.
[0069] In this disclosure, unless otherwise expressly specified and limited, the terms "installation," "connection," "linking," "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this disclosure according to the specific circumstances.
[0070] The term “exemplary” as used herein means “serving as an example, embodiment, or illustration.” Any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments.
[0071] In this document, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.
[0072] Furthermore, to better illustrate this disclosure, numerous specific details are set forth in the following detailed description. Those skilled in the art will understand that this disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art have not been described in detail in order to highlight the main points of this disclosure.
[0073] Please see Figure 1 , Figure 1 A block diagram of a control device according to an embodiment of the present disclosure is shown.
[0074] like Figure 1 As shown, the control device includes:
[0075] The first control unit 10 includes a plurality of first transceiver interfaces 110;
[0076] The second control unit 20 includes multiple second transceiver interfaces 210, and the data processing capability of the first control unit 10 is higher than that of the second control unit 20.
[0077] The switching unit 30 includes multiple analog switches. The first transceiver interface 110 of the first control unit 10 is connected to a corresponding second transceiver interface 210 via the analog switches of the switching unit 30. The multiple analog switches in the switching unit 30 may include a first analog switch K1. The control terminal of the first analog switch K1 is connected to the control pin 201 of a first general purpose input / output interface. A first transceiver interface 110 of the first control unit 10 is connected to a second transceiver interface 210 of the second control unit 20 via the first analog switch K1. Another second transceiver interface 210 of the second control unit 20 is connected to at least one sensor module via a bus 410. The sensor module is used to acquire sensing data.
[0078] The second control unit 20 is configured to: upon receiving the query command, transmit the sensing data using a second transceiver interface 210 that is connected to the first transceiver interface 110 of the first control unit 10;
[0079] The first control unit 10 is used for:
[0080] Send an inquiry command to the second control unit 20 to obtain data through the second control unit 20;
[0081] The data is processed to obtain the processing result.
[0082] The control device of this embodiment includes a first control unit 10 and a second control unit 20. The data processing capability of the first control unit 10 is higher than that of the second control unit 20. The first transceiver interface 110 of the first control unit 10 is connected to the corresponding second transceiver interface 210 through the analog switch of the switching unit 30. When the second control unit 20 receives the query command, it sends the sensing data through the second transceiver interface 210 connected to the first transceiver interface 110 of the first control unit 10. The first control unit 10 sends a query command to the second control unit 20 to obtain data through the second control unit 20. The data is processed to obtain a processing result. Thus, the control device of this embodiment has both low power consumption and high performance, which can improve the flexibility and efficiency of control.
[0083] This disclosure does not limit the specific implementation of the first control unit 10 and the second control unit 20. Those skilled in the art can select appropriate processing components based on actual conditions and needs, as long as the data processing capability of the first control unit 10 is higher than that of the second control unit 20. In one example, the processing components include, but are not limited to, a single processor, discrete components, or a combination of a processor and discrete components. The processor may include a controller with instruction execution capabilities in the water quality monitoring equipment. The processor can be implemented in any suitable manner, for example, by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components. Within the processor, the executable instructions can be executed through hardware circuits such as logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers.
[0084] In one possible implementation, the first control unit 10 includes a system-on-a-chip (SoC) and the second control unit 20 includes a microcontroller. The SoC may be a custom product that integrates a microprocessor, an analog IP (Intellectual Property) core, a digital IP core, and memory (or an off-chip memory control interface) on a single chip, and the second control unit 20 may be a chip-level chip (such as a microcontroller).
[0085] This disclosure does not limit the specific implementation of each analog switch in the switching unit 30. Those skilled in the art can select appropriate analog switches according to actual conditions and needs. For example, the analog switches in this disclosure can be composed of multiple transistors. Exemplary transistors may include metal-oxide-semiconductor field-effect transistors (MOSFETs) and insulated-gate bipolar transistors (IGBTs). The transistors can be based on silicon carbide (SiC) or gallium nitride (GaN) to improve performance.
[0086] This disclosure does not limit the type or number of the first transceiver interface 110 in the first control unit 10, nor the type or number of the second transceiver interface 210 in the second control unit 20, nor the number of analog switches in the switching unit 30. Those skilled in the art can set these according to actual conditions and needs.
[0087] For example, the first transceiver interface 110 and the second transceiver interface 210 can both be general asynchronous transceiver interfaces (e.g., implemented through an asynchronous transceiver). Of course, the first transceiver interface 110 and the second transceiver interface 210 can also be other types of interfaces, which are not limited in this embodiment.
[0088] This disclosure does not limit the specific type of data obtained by the first control unit 10 from the second control unit 20, nor does it limit the specific processing method of the data. Those skilled in the art can issue query commands to obtain data transmitted from the second control unit 20 according to actual conditions and needs, and adaptively select the data processing method.
[0089] The embodiments disclosed herein do not limit the specific number of sensor modules. A sensor module may include sensor modules 1 to n, where n is an integer. The number and type of sensors in each sensor module are not limited. Those skilled in the art can set the number and type of sensors in each sensor module, as well as the number of sensor modules, according to actual conditions and needs. For example, the sensors may include temperature sensors, humidity sensors, various gas sensors such as carbon dioxide, pressure sensors, quantum dot spectral sensors, and other types of sensors.
[0090] In one optional embodiment, the control device can be applied to a water quality monitoring device. For example, the device can be an in-situ water quality monitoring device, which may include at least one of a quantum dot spectral probe, a pH probe, a dissolved oxygen probe, and a conductivity probe. Since the in-situ water quality monitoring device needs to be located in water when it is working and has multiple power-consuming components, the above-mentioned control device can be used to achieve low power consumption and extend the device's service life.
[0091] The following provides an exemplary description of possible implementations of the control device.
[0092] Please see Figure 2 , Figure 2 A block diagram of a control device according to an embodiment of the present disclosure is shown.
[0093] In one possible implementation, such as Figure 2 As shown, a first transceiver interface 110 (e.g., transceiver 1) of the first control unit 10 is connected to a second transceiver interface 210 (e.g., transceiver 1) of the second control unit 20 via the first analog switch K1. Another second transceiver interface 210 (e.g., transceiver 3) of the second control unit 20 is connected to at least one sensor module via a bus 410. The sensor module is used to acquire sensing data. For example, the transceiver 1 of the first control unit 10 is connected to the transceiver 1 of the second control unit 20 via the first analog switch K1, and the transceiver 3 of the second control unit 20 is connected to at least one sensor module (e.g., sensor module 1 to n, where n is an integer) via a bus 410.
[0094] In one possible implementation, the second control unit 20 can be used to:
[0095] Upon receiving the query command, the sensor data is transmitted using the second transceiver interface 210, which is connected to the first transceiver interface 110 of the first control unit 10.
[0096] The embodiments disclosed herein do not limit the specific number of sensor modules, nor the number and type of sensors in each sensor module. Those skilled in the art can set the number and type of sensors in each sensor module, as well as the number of sensor modules, according to actual conditions and needs. For example, the sensors may include temperature sensors, humidity sensors, various gas sensors such as carbon dioxide, pressure sensors, and other types of sensors.
[0097] Of course, the data may also include system status information of the second control unit 20, such as system working mode, working duration, communication status of each interface, battery level, device attitude, device, coordinates, etc., which are not limited in this embodiment.
[0098] For example, the communication between the first control unit 10 and the second control unit 20 may adopt a proprietary protocol. The protocol content may include instructions and data, for example. This disclosure does not limit the specific form or content of the protocol. Those skilled in the art can set it according to actual conditions and needs.
[0099] For example, the bus 410 may be an EIC 485 bus, etc., and each sensor module is connected to the bus 410 to transmit information.
[0100] For example, when both the first control unit 10 and the second control unit 20 are in operation, the first control unit 10 acts as the master and the second control unit 20 acts as the slave. The second control unit 20 connects to external devices such as sensor modules to perform data acquisition and other tasks. The first control unit 10 obtains data from the second control unit 20 and processes it accordingly, which can improve data processing efficiency. Furthermore, when the control device does not need to work, the power supply of the first control unit 10 can be turned off, and the second control unit 20 can be controlled to enter a low-power sleep mode to reduce power consumption. This allows the control device to simultaneously possess both low power consumption and high performance characteristics, thereby improving the flexibility and efficiency of control.
[0101] In one possible implementation, such as Figure 2 As shown, the device may further include a Bluetooth component 430. The multiple analog switches in the switching unit 30 may also include a second analog switch K2 and a third analog switch K3. A second transceiver interface 210 of the second control unit 20 is connected to a first transceiver interface 110 of the first control unit 10 and the Bluetooth component 430 via the second analog switch K2 and the third analog switch K3. The control terminals of the second analog switch K2 and the third analog switch K3 are connected to the control pin 202 of the second general purpose input / output interface. For example, as shown... Figure 2As shown, the transceiver 2 of the second control unit 20 is connected to the transceiver 2 of the first control unit 10 and the asynchronous transceiver 4310 of the Bluetooth component 430 via the second analog switch K2 and the third analog switch K3.
[0102] In one possible implementation, when the control device is in standby mode, the first control unit 10 is in a power-off state, and the second control unit 20 and the Bluetooth component 430 are in a sleep state. If the wake-up timer of the second control unit 20 reaches the wake-up cycle, or if a wake-up signal is received through the Bluetooth component 430, the second control unit 20 exits the sleep state and turns on the power of the first control unit 10 to power on the first control unit 10. The third analog switch K3 is controlled to enable the first transceiver interface 110 (transceiver 2) of the first control unit 10 to establish a connection with the Bluetooth component 430.
[0103] In one possible implementation, such as Figure 2 As shown, the device may further include a navigation module 420. If the wake-up timer of the second control unit 20 reaches the wake-up period, or if a wake-up signal is received through the Bluetooth component 430, the second control unit 20 is also used to control the second analog switch K2 so that the second transceiver interface 210 of the second control unit 20 establishes a connection relationship with the navigation component, and turns on the power of the navigation module 420 to control the navigation module 420 to power on.
[0104] This disclosure does not limit the specific implementation of the navigation module 420. For example, the navigation module 420 may include a Beidou satellite navigation module, a GPS navigation module or other navigation modules. This disclosure does not limit the implementation of the navigation module 420.
[0105] For example, when the system including the control device is not in operation (e.g., when data collection using the sensor module is not required), the first control unit 10 (system-on-a-chip) is in a power-off state, the second control unit 20 (e.g., a microcontroller) and the Bluetooth component 430 are in a low-power sleep state, and other peripherals (e.g., the navigation module 420) are in a power-off state. At this time, the control device can be woken up periodically or via Bluetooth (e.g., the user sends a wake-up signal to the wake-up interface of the second control unit 20 via Bluetooth); when woken up, the second control unit 20 exits the sleep state and controls the system-on-a-chip to power on via a universal input / output port (for example, the second control unit 20 can control the power supply of the system-on-a-chip to turn on and off via a universal input / output port), and controls the second analog switch K2 and the third analog switch K3 to switch channels via the second universal input / output control pin 202 (e.g., by default, the universal asynchronous transceiver 2 of the second control unit 20 is connected to the Bluetooth component 430; after switching, the second control unit 20's communication channels are switched). The Beidou satellite navigation module 420 is connected via an asynchronous transceiver 2. The first control unit 10's universal asynchronous transceiver 2 is connected to the Bluetooth component 430. The second control unit 20 can also control the power-on of the Beidou satellite navigation module 420 via the second universal input / output control pin 202 (the second universal input / output control pin 202 controls the power-on and power-off of the Beidou satellite navigation module 420). In this case, the second control unit 20 is connected to the navigation module 420 via the universal asynchronous transceiver 2 and the second analog switch K22. The first control unit 10 is connected to the Bluetooth component 430 via the universal asynchronous transceiver 2 to realize the signal transmission and control of the Bluetooth component 430.
[0106] In one possible implementation, the second control unit 20 may also be used to:
[0107] Turn off the power to the first control unit 10 to power down the first control unit 10, control the second analog switch K2 and the third analog switch K3 to enable the second transceiver interface 210 of the second control unit 20 to establish a connection with the Bluetooth component 430, and control itself and the Bluetooth component 430 to enter a sleep state.
[0108] This disclosure does not limit the specific form of the power-off condition. Those skilled in the art can set it according to actual conditions and needs. For example, the power-off condition can be the completion of a set work content, such as setting the control device to perform one or more data acquisitions, perform related calculations, and then upload them to the cloud. When the second control unit 20 controls each sensor module to acquire data and sends the acquired data to the first control unit 10, the first control unit 10 can process the data and upload the processed data or results to the cloud via the network. In this case, the second control unit 20 can control the power supply of the first control unit 10 through the input / output port. The power source is disconnected, thus powering down the first control unit 10 and restoring the first analog switch K1, the second analog switch K2, and the third analog switch K3 to their default states (e.g., the first analog switch K1 establishes a connection between the transceiver 1 of the first control unit 10 and the transceiver 1 of the second control unit 20, the second analog switch K2 and the third analog switch K3 establish a connection between the transceiver 2 of the second control unit 20 and the Bluetooth component 430, and the fourth analog switch K4 disconnects the connection between the transceiver 3 of the first control unit 10 and the bus 410). It also controls itself (the second control unit 20) and the Bluetooth component 430 to enter sleep mode and controls other peripherals to power off.
[0109] In one possible implementation, such as Figure 2 As shown, the device may further include a mobile communication module 440, and the multiple analog switches in the switching unit 30 may further include a fourth analog switch K4. The mobile communication module 440 is connected to the first control unit 10 through the universal serial bus interface 4410 of the mobile communication module 440, and is connected to one end of the first analog switch K1 through the asynchronous transceiver 4420 of the mobile communication module 440.
[0110] In one possible implementation, such as Figure 2 As shown, when the first control unit 10 receives the upgrade firmware through the mobile communication module 440, the first control unit 10 sends an upgrade command to the second control unit 20. The second control unit 20 controls the connection state of the fourth analog switch K4 through the third general-purpose input / output interface control pin 203 so that a first transceiver interface 110 (transceiver 3) of the first control unit 10 is connected to the bus 410, so that the first control unit 10 sends the upgrade firmware to each sensor module through the bus 410 to upgrade the firmware of each sensor module.
[0111] For example, in normal operating mode, the fourth analog switch K4 is in the open state, and the microcontroller unit acts as the master of the 485 protocol bus, acquiring measurement data from the sensor module. When the sensor module needs an upgrade, the upgrade firmware can be sent to the mobile communication module 440 via a server. The mobile communication module 440 then sends the firmware to the first control unit 10 via a universal serial bus interface. At this time, the first control unit 10 informs the second control unit 20 of the upgrade requirement. Upon receiving the requirement, the second control unit 20 automatically becomes a slave of the 485 protocol bus and controls the fourth analog switch K4 to close. The first control unit 10 then becomes the master of the 485 protocol bus, sending the upgrade firmware to other slaves (mainly the sensor module, and possibly other peripheral modules).
[0112] In one possible implementation, when the second control unit 20 determines that the first control unit 10 cannot send or receive data through the mobile communication module 440, the second control unit 20 may be used to:
[0113] Control the connection state of the first analog switch K1 to establish a connection relationship between the mobile communication module 440 and a second transceiver interface 210 of the second control unit 20;
[0114] The upgrade firmware is received from the mobile communication module 440 and sent to each sensor module through the second transceiver interface 210 connected to the bus 410 to upgrade the firmware of each sensor module.
[0115] Thus, in the present embodiment, if the first control unit 10 fails and cannot receive data normally, the second control unit 20 can receive the upgrade firmware from the mobile communication module 440 through the first control unit 10, and send the upgrade firmware to each sensor module through the second transceiver interface 210 connected to the bus 410, so as to upgrade the firmware of each sensor module.
[0116] This disclosure does not limit the specific implementation of the second control unit 20 verifying whether the first control unit 10 has a data transmission and reception failure. Those skilled in the art can implement it using relevant technologies according to actual conditions and needs. For example, in one possible implementation, the second control unit 20 is further configured to: send a check command to the first control unit 10, and if no feedback information is received from the first control unit 10 within a preset time, determine that the first control unit 10 cannot transmit or receive data through the mobile communication module 440.
[0117] In one possible implementation, such as Figure 2 As shown, the first control unit 10 may further include at least one of the following:
[0118] At least one camera serial interface 1101 is used to connect a camera;
[0119] At least one display serial interface 1102 is used to connect to a display;
[0120] At least one multimedia card interface 1103 is used to connect a multimedia card;
[0121] At least one digital memory card interface 1104 is used to connect a digital memory card;
[0122] At least one random access memory interface 1105 is used to connect to a random access memory;
[0123] At least one Ethernet interface 1106 is used to connect an Ethernet card;
[0124] At least one digital input / output interface 1107 is used to connect to a wireless local area network module;
[0125] At least one audio bus 1108 is used to connect to an audio codec chip.
[0126] Of course, the first control unit 10 may also have other functional components such as an analog-to-digital converter, which are not limited in this embodiment.
[0127] Various aspects of the embodiments of this disclosure enable the access of multiple peripherals with limited interface resources, and use analog switches for time-sharing resource multiplexing, thereby improving the working efficiency of the control device.
[0128] Please see Figure 3 , Figure 3 A flowchart of a control method according to an embodiment of the present disclosure is shown.
[0129] like Figure 3 As shown, the control method includes:
[0130] Step S11: A first control unit including multiple first transceiver interfaces and a second control unit including multiple second transceiver interfaces are provided, wherein the data processing capability of the first control unit is higher than that of the second control unit;
[0131] Step S12: A switching unit including multiple analog switches is provided. The first transceiver interface of the first control unit is connected to a corresponding second transceiver interface through the analog switches of the switching unit. The multiple analog switches in the switching unit include a first analog switch. The control terminal of the first analog switch is connected to the control pin of a first general-purpose input / output interface. A first transceiver interface of the first control unit is connected to a second transceiver interface of the second control unit through the first analog switch. Another second transceiver interface of the second control unit is connected to at least one sensor module through a bus. The sensor module is used to acquire sensing data.
[0132] Step S13: When the second control unit receives an inquiry command, it sends the sensing data through the second transceiver interface that is connected to the first transceiver interface of the first control unit.
[0133] Step S14: The first control unit sends an inquiry command to the second control unit to obtain data through the second control unit; and processes the data to obtain a processing result.
[0134] This disclosure provides a first control unit including multiple first transceiver interfaces and a second control unit including multiple second transceiver interfaces. The first control unit has higher data processing capabilities than the second control unit. A switching unit including multiple analog switches is provided. When the second control unit receives an interrogation command, it sends the sensing data through the second transceiver interface connected to the first control unit's first transceiver interface. The first control unit sends an interrogation command to the second control unit to obtain data through the second control unit. The data is then processed to obtain a processing result. This approach achieves a balance between low power consumption and high performance, improving control flexibility and efficiency.
[0135] In one possible implementation, the first control unit may include a system-on-a-chip, the second control unit may include a microcontroller, and both the first transceiver interface and the second transceiver interface are universal asynchronous transceiver interfaces.
[0136] Please see Figure 4 , Figure 4 A flowchart of a control method according to an embodiment of the present disclosure is shown.
[0137] In one possible implementation, such as Figure 4 As shown, the method further includes:
[0138] Step S21, provide a Bluetooth component;
[0139] Step S22: Provide a second analog switch and a third analog switch. A second transceiver interface of the second control unit is connected to a first transceiver interface of the first control unit and the Bluetooth component through the second analog switch and the third analog switch. The control terminals of the second analog switch and the third analog switch are connected to the control pins of the second general purpose input / output interface.
[0140] Step S23: When the first control unit is in a power-off state and the second control unit and the Bluetooth component are in a sleep state, if the wake-up timer of the second control unit reaches the wake-up cycle, or if a wake-up signal is received through the Bluetooth component, the second control unit controls itself to exit the sleep state, turns on the power of the first control unit to power on the first control unit, and controls the third analog switch to enable the first transceiver interface of the first control unit to establish a connection with the Bluetooth component.
[0141] In one possible implementation, the method further includes:
[0142] Step S24, provide the navigation module;
[0143] Step S25: If the wake-up timer of the second control unit reaches the wake-up period, or a wake-up signal is received through the Bluetooth component, the second control unit controls the second analog switch to establish a connection between the second transceiver interface of the second control unit and the navigation component, and turns on the power of the navigation module to power on the navigation module.
[0144] Please see Figure 5 , Figure 5 A flowchart of a control method according to an embodiment of the present disclosure is shown.
[0145] In one possible implementation, such as Figure 5 As shown, the method further includes:
[0146] Step S26: When the power-down conditions are met, the second control unit turns off the power of the first control unit to control the first control unit to power down, controls the second analog switch and the third analog switch to enable the second transceiver interface of the second control unit to establish a connection with the Bluetooth component, and controls itself and the Bluetooth component to enter a sleep state.
[0147] In one possible implementation, the method further includes:
[0148] Step S31: A mobile communication module is provided. The multiple analog switches in the switching unit further include a fourth analog switch. The mobile communication module is connected to the first control unit via a universal serial bus interface and to one end of the first analog switch via an asynchronous transceiver.
[0149] Step S32: When the first control unit receives the upgrade firmware through the mobile communication module, it sends an upgrade command to the second control unit.
[0150] Step S33: The second control unit controls the connection state of the fourth analog switch through the third general-purpose input / output interface control pin so that a first transceiver interface of the first control unit is connected to the bus, so that the first control unit sends the upgrade firmware to each sensor module through the bus to upgrade the firmware of each sensor module.
[0151] In one possible implementation, the method further includes:
[0152] Step S34: When the second control unit determines that the first control unit cannot send or receive data through the mobile communication module, the second control unit controls the connection state of the first analog switch to establish a connection relationship between the mobile communication module and a second transceiver interface of the second control unit.
[0153] Step S35: Receive the upgrade firmware using the mobile communication module, and send the upgrade firmware to each sensor module through the second transceiver interface connected to the bus, so as to upgrade the firmware of each sensor module.
[0154] In one possible implementation, the method further includes:
[0155] Step S36: The second control unit sends a check command to the first control unit. If no feedback information is received from the first control unit within a preset time, it is determined that the first control unit cannot send or receive data through the mobile communication module.
[0156] Through the above methods, the embodiments of this disclosure can obtain the following: Figure 1 and Figure 2 The control device shown is described above. For a description of each step in the control method, please refer to the previous description of the control device. It will not be repeated here.
[0157] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A control device, characterized in that, The control device includes: The first control unit includes multiple first transceiver interfaces; The second control unit includes multiple second transceiver interfaces, and the data processing capability of the first control unit is higher than that of the second control unit. A switching unit includes multiple analog switches. A first transceiver interface of the first control unit is connected to a corresponding second transceiver interface through an analog switch in the switching unit. The multiple analog switches in the switching unit include a first analog switch. The control terminal of the first analog switch is connected to a control pin of a first general-purpose input / output interface. A first transceiver interface of the first control unit is connected to a second transceiver interface of the second control unit through the first analog switch. Another second transceiver interface of the second control unit is connected to at least one sensor module via a bus. The sensor module is used to acquire sensing data. The second control unit is used for: Upon receiving an inquiry command, the sensor data is transmitted using a second transceiver interface that is connected to the first transceiver interface of the first control unit. The first control unit is used for: Send an interrogation command to the second control unit to obtain data through the second control unit; The data is processed to obtain the processing result. When both the first control unit and the second control unit are in operation, the first control unit acts as the master unit and the second control unit acts as the slave unit. The first control unit includes a system-on-a-chip (SoC), and the second control unit includes a microcontroller. Both the first and second transceiver interfaces are universal asynchronous transceiver interfaces (APIs). The device further includes a Bluetooth component. The switching unit includes multiple analog switches, including a second analog switch and a third analog switch. A second transceiver interface of the second control unit is connected to a first transceiver interface of the first control unit and the Bluetooth component via the second analog switch and the third analog switch. The control terminals of the second analog switch and the third analog switch are connected to the control pins of a second universal input / output interface. When the control device is in standby mode, the first control unit is in a power-off state, and the second control unit and the Bluetooth component are in a sleep state. If the wake-up timer of the second control unit reaches the wake-up cycle, or if a wake-up signal is received through the Bluetooth component, the second control unit exits the sleep state and turns on the power of the first control unit to power on the first control unit. The third analog switch is then controlled to enable the first transceiver interface of the first control unit to establish a connection with the Bluetooth component.
2. The apparatus according to claim 1, characterized in that, The device also includes a navigation module. If the wake-up timer of the second control unit reaches the wake-up period, or if a wake-up signal is received through the Bluetooth component, the second control unit is also used to control the second analog switch to establish a connection between the second transceiver interface of the second control unit and the navigation module, and to turn on the power of the navigation module to control the navigation module to power on.
3. The apparatus according to claim 1 or 2, characterized in that, When the power-down conditions are met, the second control unit is also used to: Turning off the power to the first control unit to power it down, controlling the second analog switch and the third analog switch to enable the second transceiver interface of the second control unit to establish a connection with the Bluetooth component, and controlling itself and the Bluetooth component to enter a sleep state.
4. The apparatus according to claim 1, characterized in that, The device further includes a mobile communication module, and the multiple analog switches in the switching unit also include a fourth analog switch. The mobile communication module is connected to the first control unit via a universal serial bus interface and to one end of the first analog switch via an asynchronous transceiver. When the first control unit receives the upgrade firmware through the mobile communication module, the first control unit sends an upgrade command to the second control unit. The second control unit controls the connection state of the fourth analog switch through the third general-purpose input / output interface control pin so that a first transceiver interface of the first control unit is connected to the bus, so that the first control unit sends the upgrade firmware to each sensor module through the bus to upgrade the firmware of each sensor module.
5. The apparatus according to claim 4, characterized in that, When the second control unit determines that the first control unit cannot send or receive data through the mobile communication module, the second control unit is configured to: Controlling the connection state of the first analog switch to establish a connection relationship between the mobile communication module and a second transceiver interface of the second control unit; The upgrade firmware is received from the mobile communication module and sent to each sensor module through a second transceiver interface connected to the bus to upgrade the firmware of each sensor module.
6. The apparatus according to claim 5, characterized in that, The second control unit is further configured to: send a check command to the first control unit; if no feedback information is received from the first control unit within a preset time, determine that the first control unit cannot send or receive data through the mobile communication module.
7. The apparatus according to claim 1, characterized in that, The first control unit further includes at least one of the following: At least one camera serial interface is used to connect the camera; At least one display serial interface is used to connect to a display; At least one multimedia card interface is provided for connecting a multimedia card; At least one digital memory card interface is provided for connecting a digital memory card; At least one random access memory interface is provided for connecting to random access memory; At least one Ethernet interface is used to connect an Ethernet card; At least one digital input / output interface is provided for connecting to the wireless LAN module; At least one audio bus is used to connect the audio codec chip.
8. A water quality monitoring device, characterized in that, The water quality monitoring equipment includes the control device as described in any one of claims 1 to 7.
9. A control method, characterized in that, The control method includes: A first control unit including multiple first transceiver interfaces and a second control unit including multiple second transceiver interfaces are provided, wherein the data processing capability of the first control unit is higher than that of the second control unit; A switching unit including multiple analog switches is provided. A first transceiver interface of the first control unit is connected to a corresponding second transceiver interface through the analog switches of the switching unit. The multiple analog switches in the switching unit include a first analog switch. The control terminal of the first analog switch is connected to the control pin of a first general-purpose input / output interface. A first transceiver interface of the first control unit is connected to a second transceiver interface of the second control unit through the first analog switch. Another second transceiver interface of the second control unit is connected to at least one sensor module through a bus. The sensor module is used to acquire sensing data. Upon receiving an inquiry command, the second control unit transmits the sensing data via a second transceiver interface that is connected to the first transceiver interface of the first control unit. The first control unit sends an interrogation command to the second control unit to obtain data through the second control unit; and processes the data to obtain a processing result. When both the first control unit and the second control unit are in operation, the first control unit acts as the master unit and the second control unit acts as the slave unit. The first control unit includes a system-on-a-chip (SoC), and the second control unit includes a microcontroller. Both the first and second transceiver interfaces are universal asynchronous transceiver interfaces (APIs). The method further includes: Provides Bluetooth components; A second analog switch and a third analog switch are provided. A second transceiver interface of the second control unit is connected to a first transceiver interface of the first control unit and the Bluetooth component through the second analog switch and the third analog switch. The control terminals of the second analog switch and the third analog switch are connected to the control pin of the second general-purpose input / output interface. When the first control unit is in a power-off state and the second control unit and the Bluetooth component are in a sleep state, if the wake-up timer of the second control unit reaches the wake-up cycle, or if a wake-up signal is received through the Bluetooth component, the second control unit controls itself to exit the sleep state and turns on the power of the first control unit to power on the first control unit, and controls the third analog switch to enable the first transceiver interface of the first control unit to establish a connection with the Bluetooth component.
10. The method according to claim 9, characterized in that, The method further includes: Provide navigation modules; If the wake-up timer of the second control unit reaches the wake-up period, or if a wake-up signal is received through the Bluetooth component, the second control unit controls the second analog switch to establish a connection between the second transceiver interface of the second control unit and the navigation module, and turns on the power of the navigation module to power on the navigation module.
11. The method according to claim 9 or 10, characterized in that, The method further includes: When the power-down conditions are met, the second control unit turns off the power of the first control unit to power down the first control unit, controls the second analog switch and the third analog switch to establish a connection between the second transceiver interface of the second control unit and the Bluetooth component, and controls itself and the Bluetooth component to enter a sleep state.