CN111708299A - A control motherboard and its design method, and an intelligent electric tool - Google Patents
A control motherboard and its design method, and an intelligent electric tool Download PDFInfo
- Publication number
- CN111708299A CN111708299A CN202010571735.5A CN202010571735A CN111708299A CN 111708299 A CN111708299 A CN 111708299A CN 202010571735 A CN202010571735 A CN 202010571735A CN 111708299 A CN111708299 A CN 111708299A
- Authority
- CN
- China
- Prior art keywords
- main control
- circuit
- timing
- preset time
- control circuit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Programme-control systems
- G05B19/02—Programme-control systems electric
- G05B19/04—Programme control other than numerical control, i.e. in sequence controllers or logic controllers
- G05B19/042—Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
- G05B19/0428—Safety, monitoring
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B2219/00—Program-control systems
- G05B2219/20—Pc systems
- G05B2219/24—Pc safety
- G05B2219/24024—Safety, surveillance
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B2219/00—Program-control systems
- G05B2219/20—Pc systems
- G05B2219/24—Pc safety
- G05B2219/24125—Watchdog, check at timed intervals
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Debugging And Monitoring (AREA)
Abstract
本发明属于电子电路技术领域,提供了一种控制主板及其设计方法、智能电动工具,该控制主板包括主控电路、定时电路以及至少两个开关电路,主控电路控制其中一个开关电路导通用以选择预设时间,并每隔预设时间输出一定时信号至定时电路,定时电路接收到定时信号时进行清零,并重新计时,若在预设时间范围内未接收到定时信号,则输出复位信号至主控电路,以使主控电路进行复位,以维持控制外部设备继续工作。由此实现了主控电路在任何状态出现死机均可以被复位,使得系统持续处于有效运行状态,解决了传统技术存在着中央处理器在运行时或者睡眠时,出现死机均无法进行复位,导致系统无法继续运作的问题。
The invention belongs to the technical field of electronic circuits, and provides a control motherboard, a design method thereof, and an intelligent electric tool. The control motherboard includes a main control circuit, a timing circuit and at least two switch circuits, and the main control circuit controls one of the switch circuits to be turned on To select a preset time, and output a certain timing signal to the timing circuit every preset time, when the timing circuit receives the timing signal, it will be reset to zero, and the timing will be re-timed. If the timing signal is not received within the preset time range, it will output The reset signal is sent to the main control circuit, so that the main control circuit is reset, so as to maintain the control of the external equipment to continue to work. In this way, the main control circuit can be reset when it crashes in any state, so that the system can continue to be in an effective running state, which solves the problem that the traditional technology exists that the central processing unit cannot be reset when it crashes during operation or sleep, resulting in the system Unable to continue working.
Description
技术领域technical field
本发明属于电子电路技术领域,尤其涉及一种控制主板及其设计方法、智能电动工具。The invention belongs to the technical field of electronic circuits, and in particular relates to a control motherboard and a design method thereof, and an intelligent electric tool.
背景技术Background technique
现有的微控制单元(Microcontroller Unit,MCU)一般都是内置看门狗,或者使用外置看门狗。The existing microcontroller unit (Microcontroller Unit, MCU) generally has a built-in watchdog, or uses an external watchdog.
但是,在MCU内置看门狗并不可靠,其失效的原因包括:However, the built-in watchdog in the MCU is not reliable, and the reasons for its failure include:
(1)由于看门狗的时钟不独立,计数时钟与系统为同一分频链路,因此看门狗在系统出现问题时无法继续有效运作;(1) Since the clock of the watchdog is not independent, the counting clock and the system are the same frequency division link, so the watchdog cannot continue to operate effectively when there is a problem with the system;
(2)由于时钟可由软件设置,启动失败时,开机时钟可能处于空档,没有时钟则看门狗不能生效;(2) Since the clock can be set by software, when the startup fails, the startup clock may be in neutral, and the watchdog cannot take effect without a clock;
(3)有些看门狗需要用软件设置或启动,因此启动失败后,初始化程序没有激活,中央处理器(central processing unit,CPU)可能跳转到随机代码,使得看门狗被禁止。(3) Some watchdogs need to be set or started by software, so after the startup fails, the initialization program is not activated, and the central processing unit (CPU) may jump to random code, so that the watchdog is disabled.
如果使用外置看门狗,喂狗时间一般是固定的。为了让看门狗能够及时响应,一般都是1秒或者2秒喂一次狗;然而很多手持设备电量宝贵,为了低功耗考虑,MCU在完成当前任务后则立马进入睡眠模式,而睡眠中的MCU是无法喂狗的,因此在MCU睡眠前必须关掉外置看门狗。一旦MCU在睡眠时死机,则整板(整个系统)失效。If an external watchdog is used, the dog feeding time is generally fixed. In order for the watchdog to respond in time, the dog is usually fed every 1 or 2 seconds; however, many handheld devices have precious power. For low power consumption, the MCU immediately enters sleep mode after completing the current task, while the sleeping The MCU cannot feed the dog, so the external watchdog must be turned off before the MCU sleeps. Once the MCU crashes during sleep, the entire board (the entire system) fails.
因此,传统技术存在着中央处理器在运行时或者睡眠时,出现死机均无法进行复位,导致系统无法继续运作的问题。Therefore, in the conventional technology, there is a problem that the central processing unit cannot be reset even if it crashes during operation or sleep, resulting in the inability of the system to continue to operate.
发明内容SUMMARY OF THE INVENTION
本发明的目的在于提供一种控制主板及其设计方法、智能电动工具,旨在解决传统技术存在着中央处理器在运行时或者睡眠时,出现死机均无法进行复位,导致系统无法继续运作的问题。The purpose of the present invention is to provide a control board, a design method thereof, and an intelligent power tool, which aims to solve the problem that the central processing unit cannot be reset even if it crashes during operation or sleep, and the system cannot continue to operate. .
本发明第一方面提供了一种控制主板,用于与外部设备电性连接,所述控制主板包括:A first aspect of the present invention provides a control motherboard for electrically connecting with external devices, the control motherboard comprising:
至少两个开关电路,所述开关电路用于进行导通或者关断,并且至多只有一个所述开关电路处于导通状态;at least two switch circuits, the switch circuits are used to turn on or off, and at most only one of the switch circuits is in the on state;
主控电路,与所述外部设备及至少两个所述开关电路连接,控制其中一个所述开关电路进行导通用以选择预设时间,并每隔所述预设时间输出一定时信号,还用于根据接收到的复位信号进行复位,以维持控制所述外部设备工作;以及The main control circuit is connected to the external device and at least two of the switch circuits, controls one of the switch circuits to conduct conduction to select a preset time, and outputs a certain timing signal every preset time, and also uses for resetting according to the received reset signal to maintain control of the external device; and
定时电路,与所述主控电路及至少两个开关电路连接,用于接收到所述定时信号时进行清零,并重新计时,若在所述预设时间范围内未接收到所述定时信号,则输出所述复位信号至所述主控电路。a timing circuit, connected to the main control circuit and at least two switch circuits, for clearing and re-timing when the timing signal is received, if the timing signal is not received within the preset time range , the reset signal is output to the main control circuit.
由此实现了主控电路在任何状态出现死机均可以被复位,使得系统持续处于有效运行状态。Thereby, the main control circuit can be reset in any state when it crashes, so that the system is continuously in an effective running state.
在其中一实施例中,各个所述开关电路均包括:In one embodiment, each of the switch circuits includes:
电阻、开关管以及电容;Resistors, switches and capacitors;
所述电阻的第一端与所述开关管的输入端接地,所述电阻的第二端与所述开关管的受控端共接并与所述主控电路连接,所述开关管的输出端接所述电容的第一端,所述电容的第二端接所述定时电路。该实施例限定了开关电路选型特性,其主要采用开关管进行导通或者关断。The first end of the resistor is grounded with the input end of the switch tube, the second end of the resistor is connected to the controlled end of the switch tube and is connected to the main control circuit, and the output of the switch tube The first end of the capacitor is terminated, and the second end of the capacitor is connected to the timing circuit. This embodiment defines the type selection characteristics of the switch circuit, which mainly uses a switch tube to turn on or turn off.
在其中一实施例中,所述开关管包括场效应管或者三极管;In one embodiment, the switch tube includes a field effect transistor or a triode;
所述场效应管的栅极、源极以及漏极分别对应所述开关管的受控端、输入端以及输出端;The gate, source and drain of the field effect transistor correspond to the controlled end, the input end and the output end of the switch tube respectively;
所述三极管的基极、集电极以及发射极分别对应所述开关管的受控端、输入端以及输出端。该实施例具体限定了开关管具体为场效应管或者三极管。The base, collector and emitter of the triode correspond to the controlled end, the input end and the output end of the switch tube respectively. This embodiment specifically defines that the switch tube is a field effect transistor or a triode.
在其中一实施例中,所述主控电路包括主控芯片;In one embodiment, the main control circuit includes a main control chip;
所述主控芯片的使能管脚接所述开关电路,用于控制所述开关电路导通或者关断;所述主控芯片的复位管脚接所述定时电路,用于接收所述复位信号;所述主控芯片的输出管脚接所述定时电路,用于输出所述定时信号至所述定时电路。该实施例限定了主控电路的选型特性。The enable pin of the main control chip is connected to the switch circuit for controlling the switch circuit to be turned on or off; the reset pin of the main control chip is connected to the timing circuit for receiving the reset signal; the output pin of the main control chip is connected to the timing circuit for outputting the timing signal to the timing circuit. This embodiment defines the selection characteristics of the main control circuit.
在其中一实施例中,所述定时电路包括看门狗芯片;In one embodiment, the timing circuit includes a watchdog chip;
所述看门狗芯片的输入管脚接所述开关电路,用于设置不同的预设时间;所述看门狗芯片的输出管脚接所述主控电路,用于输出所述复位信号至所述主控电路。该实施例限定了定时电路的选型特性。The input pin of the watchdog chip is connected to the switch circuit for setting different preset times; the output pin of the watchdog chip is connected to the main control circuit for outputting the reset signal to the main control circuit. This embodiment defines the selection characteristics of the timing circuit.
在其中一实施例中,还包括电源电路;In one of the embodiments, further comprising a power supply circuit;
与所述定时电路及所述主控电路连接,用于对所述定时电路及所述主控电路进行供电。因此,采用电源电路对定时电路及主控电路进行供电,使得控制主板正常运行。It is connected to the timing circuit and the main control circuit, and is used for supplying power to the timing circuit and the main control circuit. Therefore, the power supply circuit is used to supply power to the timing circuit and the main control circuit, so that the control board can operate normally.
本发明第二方面提供了一种智能电动工具,包括:A second aspect of the present invention provides an intelligent power tool, comprising:
外部设备,所述外部设备具体为马达和传感器;和external devices, in particular motors and sensors; and
如上述所述的控制主板,所述控制主板用于控制所述外部设备进行工作。As described above, the control board is used to control the external device to work.
由此该智能电动工具中的主控电路在任何状态出现死机均可以被复位,使得马达和传感器持续处于有效运行状态。Therefore, the main control circuit in the intelligent electric tool can be reset in any state if it crashes, so that the motor and the sensor are continuously in an effective running state.
本发明第三方面提供了一种控制主板的设计方法,包括:A third aspect of the present invention provides a design method for a control motherboard, including:
采用至少两个开关电路进行导通或者关断,并且至多只有一个所述开关电路处于导通状态;At least two switch circuits are used to turn on or off, and at most only one of the switch circuits is in an on state;
采用主控电路控制其中一个所述开关电路进行导通用以设置第一预设时间,并每隔所述第一预设时间输出一定时信号;A main control circuit is used to control one of the switch circuits to be turned on to set a first preset time, and output a certain timing signal every the first preset time;
采用定时电路接收到所述定时信号时进行清零,并重新计时,若在所述第一预设时间范围内未接收到所述定时信号,则输出复位信号,以使得所述主控电路进行复位。When the timing circuit receives the timing signal, it is reset to zero, and the timing is re-timed. If the timing signal is not received within the first preset time range, a reset signal is output, so that the main control circuit can reset.
由此实现了主控电路在任何状态出现死机均可以被复位,使得系统持续处于有效运行状态。Thereby, the main control circuit can be reset in any state when it crashes, so that the system is continuously in an effective running state.
在其中一实施例中,还包括:In one embodiment, it also includes:
采用所述主控电路切换另外一个所述开关电路进行导通用以设置第二预设时间,此后每隔所述第二预设时间输出所述定时信号,其中,所述第二预设时间小于所述第一预设时间。采用所述主控电路切换另外一个所述开关电路进行导通以设置第二预设时间,每隔第二预设时间范围内输出所述定时信号,并传输所述定时信号,其中,所述第二预设时间范围小于所述第一预设时间范围。当出现复位后,缩小预设时间范围,增加控制主板的可靠性。The main control circuit is used to switch another one of the switch circuits to conduct conduction to set a second preset time, after which the timing signal is output every second preset time, wherein the second preset time is less than the first preset time. The main control circuit is used to switch another one of the switch circuits to conduct conduction to set a second preset time, output the timing signal every second preset time range, and transmit the timing signal, wherein the The second preset time range is smaller than the first preset time range. When a reset occurs, the preset time range is reduced to increase the reliability of the control board.
在其中一实施例中,还包括:In one embodiment, it also includes:
根据一天当中的不同时间段,更改所述第一预设时间,并通过所述主控电路切换另外一个所述开关电路进行导通以设置不同的预设时间。用户可根据不同时间段选择不同的定时信号发送间隔,既节能满足低功耗要求,又使得可靠性大大增加。According to different time periods in a day, the first preset time is changed, and another one of the switch circuits is switched on by the main control circuit to be turned on to set different preset times. Users can choose different timing signal sending intervals according to different time periods, which not only saves energy and meets low power consumption requirements, but also greatly increases reliability.
本发明提供的一种控制主板及其设计方法、智能电动工具,该控制主板包括主控电路、定时电路以及至少两个开关电路,主控电路控制其中一个开关电路进行导通用以选择预设时间,并每隔预设时间输出一定时信号至定时电路,定时电路接收到定时信号时进行清零,并重新计时,若在预设时间范围内未接收到定时信号,则输出复位信号至主控电路,以使主控电路进行复位,以维持控制外部设备继续工作。由此实现了主控电路在任何状态出现死机均可以被复位,使得系统持续处于有效运行状态,解决了传统技术存在着中央处理器在运行时或者睡眠时,出现死机均无法进行复位,导致系统无法继续运作的问题。The present invention provides a control board, a design method thereof, and an intelligent electric tool. The control board includes a main control circuit, a timing circuit and at least two switch circuits. The main control circuit controls one of the switch circuits to conduct conduction to select a preset time. , and output a certain timing signal to the timing circuit every preset time. When the timing circuit receives the timing signal, it will be cleared and re-timed. If the timing signal is not received within the preset time range, it will output a reset signal to the main control. circuit to reset the main control circuit to maintain the control of the external equipment to continue to work. In this way, the main control circuit can be reset in any state if it crashes, so that the system can continue to be in an effective running state, which solves the problem that in the traditional technology, the central processing unit cannot be reset if it crashes during operation or sleep, resulting in the system Unable to continue working.
附图说明Description of drawings
图1是本发明一方面提供的一种控制主板的一种模块结构示意图。FIG. 1 is a schematic structural diagram of a module of a control motherboard according to an aspect of the present invention.
图2是本发明一方面提供的一种控制主板的另一种模块结构示意图。FIG. 2 is a schematic structural diagram of another module of a control motherboard according to an aspect of the present invention.
图3是对应图1提供的一种控制主板的示例电路图。FIG. 3 is an example circuit diagram corresponding to a control motherboard provided in FIG. 1 .
图4是本发明另一方面提供的一种控制主板的设计方法的一种步骤流程示意图。FIG. 4 is a schematic flowchart of a step of a method for designing a control motherboard provided by another aspect of the present invention.
图5是本发明另一方面提供的一种控制主板的设计方法的另一种步骤流程示意图。FIG. 5 is a schematic flowchart of another step of a method for designing a control motherboard according to another aspect of the present invention.
具体实施方式Detailed ways
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention.
图1示出了本发明一方面提供的一种控制主板的一种模块结构,为了便于说明,仅示出了与本实施例相关的部分,详述如下:FIG. 1 shows a module structure of a control motherboard provided by an aspect of the present invention. For the convenience of description, only the parts related to this embodiment are shown, and the details are as follows:
一种控制主板,用于与外部设备104电性连接,该控制主板包括主控电路103、定时电路101以及至少两个开关电路102。A control mainboard is used for electrical connection with an
其中,开关电路102用于进行导通或者关断,并且至多只有一个开关电路102处于导通状态;主控电路103与外部设备104及至少两个开关电路102连接,并控制其中一个开关电路102进行导通,用以设定预设时间;预设时间设定好之后,主控电路103每隔预设时间输出一定时信号给定时电路101,定时电路101接收到定时信号时进行清零,并重新计时,若在预设时间范围内未接收到定时信号,则输出复位信号至主控电路103,以使主控电路103接收到的复位信号进行复位,以维持控制外部设备104继续工作。Among them, the
由此实现了主控电路103在任何状态出现死机均可以被复位,使得系统持续处于有效运行状态。其中,外部设备104是针对控制主板而言的,外部设备104受控制主板所驱动。在控制主板中,定时电路101与主控电路103分开设置。In this way, the
具体地,设置至少两个开关电路102,用户可根据具体需要通过控制对应的开关电路102进行导通和关闭来实现设置不同的预设时间,预设时间设置好之后,主控电路103在预设时间内输出定时信号至定时电路101即可,灵活度较高,并且控制主板的可靠性较强。Specifically, at least two
图2示出了本发明一方面提供的一种控制主板的另一种模块结构,为了便于说明,仅示出了与本实施例相关的部分,详述如下:FIG. 2 shows another module structure of a control motherboard provided by an aspect of the present invention. For the convenience of description, only the parts related to this embodiment are shown, and the details are as follows:
在图1示出的实施例的基础上,上述控制主板还包括电源电路105,电源电路105与定时电路101及主控电路103连接,用于对定时电路101及主控电路103进行供电。因此,采用电源电路105对定时电路101及主控电路103进行供电,使得控制主板正常运行。On the basis of the embodiment shown in FIG. 1 , the control board further includes a
具体地,电源电路采用具备预设电压值的直流电源实现,预设电压值的范围为5V~12V。Specifically, the power supply circuit is implemented by a DC power supply having a preset voltage value, and the preset voltage value ranges from 5V to 12V.
图3示出了对应图1提供的一种控制主板的示例电路,为了便于说明,仅示出了与本实施例相关的部分,详述如下:FIG. 3 shows an example circuit corresponding to a control board provided in FIG. 1 . For the convenience of description, only the parts related to this embodiment are shown, and the details are as follows:
图3中示出了两个开关电路102,作为本发明一实施例,上述各个开关电路102均包括电阻、开关管以及电容(其中一个开关电路102包括电阻R6、开关管Q1以及电容C2,另一个开关电路102包括电阻R7、开关管Q2以及电容C3);FIG. 3 shows two
电阻的第一端与开关管的输入端接地,电阻的第二端与开关管的受控端共接并与主控电路103连接,开关管的输出端接电容的第一端,电容的第二端接定时电路101。通过设置电容的不同容值,即可改变接收定时信号的时间。The first end of the resistor is grounded with the input end of the switch tube, the second end of the resistor is connected to the controlled end of the switch tube and is connected to the
示例性的,开关管包括场效应管或者三极管;Exemplarily, the switch tube includes a field effect transistor or a triode;
场效应管的栅极、源极以及漏极分别对应开关管的受控端、输入端以及输出端;The gate, source and drain of the FET correspond to the controlled end, the input end and the output end of the switch tube respectively;
三极管的基极、集电极以及发射极分别对应开关管的受控端、输入端以及输出端。The base, the collector and the emitter of the triode correspond to the controlled end, the input end and the output end of the switch tube respectively.
作为本发明一实施例,上述主控电路103包括主控芯片;主控芯片的使能管脚接开关电路102,一个使能管脚对应接一个开关电路102,用于控制对应的开关电路102导通或者关断;主控芯片的复位管脚接定时电路101,用于接收复位信号;主控芯片的输出管脚接定时电路101,用于输出定时信号至定时电路101。As an embodiment of the present invention, the above-mentioned
作为本发明一实施例,上述定时电路101包括看门狗芯片;看门狗芯片的输入管脚接开关电路102,用于设置预设时间;看门狗芯片的输出管脚接主控电路103,用于输出复位信号至主控电路103。在该实施例中,采用外置看门狗,实现了MCU在任何状态死机都可以被复位。As an embodiment of the present invention, the above-mentioned
示例性的,定时电路101采用看门狗芯片,需要主控电路103及时在预设时间内给出喂狗信号到定时电路101。Exemplarily, the
本发明还提供了一种智能电动工具,包括外部设备和如上述所述的控制主板;其中,外部设备具体为马达和传感器,控制主板用于控制外部设备进行工作。The present invention also provides an intelligent power tool, comprising an external device and the above-mentioned control mainboard; wherein, the external device is specifically a motor and a sensor, and the control mainboard is used to control the external device to work.
由此该智能电动工具中的主控电路103在任何状态出现死机均可以被复位,使得马达和传感器持续处于有效运行状态。智能电动工具包括智能电动滑板、智能电动滑板车、智能电动自行车、智能电动婴儿车、电动平衡车、智能电动轮椅以及电动摩托车中的任意一项,并且马达和传感器均设置于智能电动工具内部,当控制主板驱动马达转动时,则马达会带动智能电动工具移动;传感器包括测距传感器、红外传感器以及加速度传感器,测距传感器获取到智能电动工具与障碍物的距离低于阈值时,则控制主板控制智能电动工具停止移动,红外传感器用于通过红外线的方式接收指令并反馈至控制主板,加速度传感器用于获取智能电动工具移动的加速度信息。Therefore, the
需要说明的是,该智能电动工具是在上述控制主板的基础上增加了外部设备,因此关于控制主板中的定时电路101、开关电路102、主控电路103以及电源电路105的功能描述及原理说明可参照图1-图3的实施例,此处不再详细赘述。It should be noted that the intelligent power tool adds external devices on the basis of the above-mentioned control motherboard, so the function description and principle explanation of the
图4示出了本发明另一方面提供的一种控制主板的设计方法的一种步骤流程,为了便于说明,仅示出了与本实施例相关的部分,详述如下:FIG. 4 shows a step flow of a method for designing a control motherboard provided by another aspect of the present invention. For convenience of description, only the part related to this embodiment is shown, and the details are as follows:
本发明另一方面还提供了一种控制主板的设计方法,包括以下步骤:Another aspect of the present invention also provides a method for designing a control motherboard, comprising the following steps:
S100.采用至少两个开关电路进行导通或者关断,并且至多只有一个开关电路处于导通状态;S100. At least two switch circuits are used to turn on or off, and at most only one switch circuit is in the on state;
S200.采用主控电路控制其中一个开关电路进行导通用以设置第一预设时间,并每隔第一预设时间范围内输出一定时信号;S200. Use the main control circuit to control one of the switch circuits to be turned on to set a first preset time, and output a certain time signal every first preset time range;
S300.采用定时电路接收到定时信号时进行清零,并重新计时,若在第一预设时间范围内未接收到定时信号,则输出复位信号,以使得主控电路进行复位。S300. Use the timing circuit to clear the timing signal when it receives the timing signal, and re-time. If the timing signal is not received within the first preset time range, output a reset signal to make the main control circuit reset.
由此实现了主控电路在任何状态出现死机均可以被复位,使得系统持续处于有效运行状态。Thereby, the main control circuit can be reset in any state when it crashes, so that the system is continuously in an effective running state.
图5示出了本发明另一方面提供的一种控制主板的设计方法的另一种步骤流程,为了便于说明,仅示出了与本实施例相关的部分,详述如下:FIG. 5 shows another step flow of a method for designing a control motherboard provided by another aspect of the present invention. For convenience of description, only the parts related to this embodiment are shown, and the details are as follows:
作为本发明一实施例,在图4示出的设计方法的实施例的基础上,还包括以下步骤:As an embodiment of the present invention, on the basis of the embodiment of the design method shown in FIG. 4 , the following steps are further included:
S400.采用主控电路切换另外一个开关电路进行导通以设置第二预设时间,此后每隔所述第二预设时间输出定时信号,其中,第二预设时间范围小于第一预设时间范围。S400. Use the main control circuit to switch another switch circuit for conduction to set a second preset time, and then output a timing signal every second preset time, wherein the second preset time range is smaller than the first preset time scope.
由此,当出现复位后,缩小定时信号发送的预设时间范围,增加控制主板的可靠性,并且开关电路可灵活切换。Therefore, when the reset occurs, the preset time range for sending the timing signal is reduced, the reliability of the control board is increased, and the switch circuit can be switched flexibly.
当然,上述设计方法还包括:根据一天当中的不同时间段,通过主控电路切换另外一个开关电路导通用以更改第一预设时间。Of course, the above-mentioned design method further includes: according to different time periods in a day, switching another switch circuit to be turned on by the main control circuit to change the first preset time.
用户可根据不同时间段设置定时信号的间隔发送时间,例如:在24小时制的8:00-20:00时,将第一预设时间范围设置为5秒钟,在白天的工作时间段内预设时间比较短,可以使得设备针对异常情况做到及时响应;在24小时制的20:00-8:00时,将第一预设时间范围设置为5小时。在5小时的时间内设备可以睡眠,在即将到达5小时前一刻设备醒来喂狗,然后继续睡下,下一个5小时重新开始计时。这样可以节省宝贵的电池电量。The user can set the interval sending time of the timing signal according to different time periods, for example: at 8:00-20:00 in the 24-hour format, set the first preset time range to 5 seconds, during the working hours during the day The preset time is relatively short, which enables the device to respond to abnormal situations in a timely manner; at 20:00-8:00 in a 24-hour clock, the first preset time range is set to 5 hours. The device can sleep within 5 hours. The device wakes up to feed the dog just before the 5 hours, and then continues to sleep, and restarts the timer for the next 5 hours. This saves precious battery power.
因此,根据实际需求设置第一预设时间范围,既节能满足低功耗要求,又使得可靠性大大增加。Therefore, setting the first preset time range according to the actual demand not only saves energy and meets the requirement of low power consumption, but also greatly increases the reliability.
以下结合图1-图5,对上述一种控制主板及其设计方法、智能电动工具的工作原理进行描述如下:Below in conjunction with Fig. 1-Fig. 5, the above-mentioned one kind of control motherboard and its design method, the working principle of the intelligent electric tool are described as follows:
外置看门狗IC设置时间的公式如下:The formula for setting the time of the external watchdog IC is as follows:
For extended Versions SGM820B-X:For extended Versions SGM820B-X:
tWD_extended(ms)=78.3×CCWD(nF)+51(ms)t WD_extended (ms)=78.3×C CWD (nF)+51 (ms)
1)T=78.3*68+51=5.3秒。1) T=78.3*68+51=5.3 seconds.
工作时需要设置喂狗时间为5秒钟,MCU驱动68NF_ON脚拉高,220uF_ON脚拉低,使得开关管Q2导通,电容C3(68nF)接入看门狗电路。电容C2和开关管Q1的支路断开。在5秒的计时时间内,MCU会给出喂狗信号,一旦死机不给,5秒结束时刻,看门狗WDO脚会输出一个低脉冲信号,给到nMR(手动复位),然后RESET_TO_MCU脚会给到MCU一个低脉冲复位MCU。When working, you need to set the dog feeding time to 5 seconds. The MCU drives the 68NF_ON pin to pull up and the 220uF_ON pin to pull down, so that the switch Q2 is turned on, and the capacitor C3 (68nF) is connected to the watchdog circuit. The branch of the capacitor C2 and the switch Q1 is disconnected. Within 5 seconds of timing, the MCU will give a dog feeding signal. Once the machine crashes, the watchdog WDO pin will output a low pulse signal to nMR (manual reset) at the end of 5 seconds, and then the RESET_TO_MCU pin will output a low pulse signal. Give the MCU a low pulse to reset the MCU.
2)T=78.3*220*1000+51=17226.051s=4.785hour。2) T=78.3*220*1000+51=17226.051s=4.785hours.
睡眠时需要设置喂狗时间为5小时,MCU驱动220uF_ON脚拉高,68NF_ON脚拉低,使得开关管Q1导通,电容C2(220uF)接入看门狗电路。电容C3和开关管Q2的支路断开。在5小时的计时时刻前,MCU会醒来一次给出喂狗信号,一旦死机不给,5小时结束时刻,看门狗WDO脚会输出一个低脉冲信号,给到nMR(手动复位),然后RESET_TO_MCU脚会给到MCU一个低脉冲复位MCU。When sleeping, you need to set the dog feeding time to 5 hours. The MCU drives the 220uF_ON pin to pull up and the 68NF_ON pin to pull down, so that the switch Q1 is turned on, and the capacitor C2 (220uF) is connected to the watchdog circuit. The branch of the capacitor C3 and the switch Q2 is disconnected. Before the timing time of 5 hours, the MCU will wake up once and give the dog feeding signal. Once it crashes, the WDO pin of the watchdog will output a low pulse signal at the end of 5 hours to nMR (manual reset), and then The RESET_TO_MCU pin will give the MCU a low pulse to reset the MCU.
3)平时MCU工作时间段使用5秒喂狗时间,睡眠前将喂狗时间调整为5小时,然后进入睡眠。在即将到达5小时前一刻MCU醒来喂一次狗(重新计时5小时),然后马上睡下。如果在睡眠期间MCU被异常唤醒,则更改为5秒喂狗时间,并正常工作判断异常是否有必要响应和处理其他事项,处理完后再将喂狗时间改回5小时(重新开始计时5小时),进入睡眠模式。这样,无论工作模式还是睡眠模式,都有外置看门狗保驾护航,既节能满足极低功耗要求,又使得MCU以及整板工作可靠性极大增加。3) Usually, the MCU working time period uses 5 seconds to feed the dog, adjust the dog feeding time to 5 hours before going to sleep, and then go to sleep. The MCU wakes up to feed the dog a moment before 5 hours (re-timed for 5 hours), then immediately goes to sleep. If the MCU is woken up abnormally during sleep, it will be changed to the 5-second dog feeding time, and it will work normally to determine whether it is necessary to respond and deal with other matters. ) to enter sleep mode. In this way, no matter the working mode or the sleep mode, there is an external watchdog to protect it, which not only saves energy and meets the requirements of extremely low power consumption, but also greatly increases the working reliability of the MCU and the whole board.
经过5小时后,看门狗IC给出复位脉冲,同时220uF电容电压清零重新进行下一个5小时计时。5秒和5小时喂狗时间可以随意切换。After 5 hours, the watchdog IC gives a reset pulse, and at the same time, the 220uF capacitor voltage is cleared and the next 5-hour timing is performed again. The dog feeding time of 5 seconds and 5 hours can be switched at will.
4)由此可以看出,MCU无论在睡眠还是工作时都可以被外部看门狗来保护。即使出现异常,也可以把MCU拉回到正常工作模式。4) It can be seen that the MCU can be protected by an external watchdog whether it is sleeping or working. Even if an abnormality occurs, the MCU can be pulled back to the normal working mode.
综上,本发明实施例提供的一种控制主板及其设计方法、智能电动工具,该控制主板包括主控电路、定时电路以及至少两个开关电路,主控电路控制其中一个开关电路导通用以选择预设时间,并每隔预设时间输出一定时信号至定时电路,定时电路接收到定时信号时进行清零,并重新计时,若在预设时间范围内未接收到定时信号,则输出复位信号至主控电路,以使主控电路进行复位,以维持控制外部设备继续工作。由此实现了主控电路在任何状态出现死机均可以被复位,使得系统持续处于有效运行状态,解决了传统技术存在着中央处理器在运行时或者睡眠时,出现死机均无法进行复位,导致系统无法继续运作的问题。To sum up, the embodiment of the present invention provides a control motherboard, a design method thereof, and an intelligent power tool. The control motherboard includes a main control circuit, a timing circuit, and at least two switch circuits. The main control circuit controls one of the switch circuits to turn on to Select the preset time, and output a certain timing signal to the timing circuit every preset time. When the timing circuit receives the timing signal, it will be cleared and re-timed. If the timing signal is not received within the preset time range, the output will be reset. The signal is sent to the main control circuit to reset the main control circuit to maintain the control of the external equipment to continue to work. In this way, the main control circuit can be reset in any state if it crashes, so that the system can continue to be in an effective running state, which solves the problem that in the traditional technology, the central processing unit cannot be reset if it crashes during operation or sleep, resulting in the system Unable to continue working.
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention shall be included in the protection of the present invention. within the range.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010571735.5A CN111708299A (en) | 2020-06-22 | 2020-06-22 | A control motherboard and its design method, and an intelligent electric tool |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010571735.5A CN111708299A (en) | 2020-06-22 | 2020-06-22 | A control motherboard and its design method, and an intelligent electric tool |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111708299A true CN111708299A (en) | 2020-09-25 |
Family
ID=72542458
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010571735.5A Pending CN111708299A (en) | 2020-06-22 | 2020-06-22 | A control motherboard and its design method, and an intelligent electric tool |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111708299A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114741223A (en) * | 2022-04-08 | 2022-07-12 | 苏州景昱医疗器械有限公司 | Watchdog control apparatus, method and computer-readable storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5563799A (en) * | 1994-11-10 | 1996-10-08 | United Technologies Automotive, Inc. | Low cost/low current watchdog circuit for microprocessor |
CN102214124A (en) * | 2011-06-08 | 2011-10-12 | 深圳市理邦精密仪器股份有限公司 | Watchdog reset control system |
CN102615217A (en) * | 2012-03-31 | 2012-08-01 | 山东电力研究院 | Special voice control bolt cutter for high-voltage live working robot |
CN110739940A (en) * | 2019-10-21 | 2020-01-31 | 上海空间电源研究所 | kinds of sampling hold circuit |
CN212276240U (en) * | 2020-06-22 | 2021-01-01 | 深圳易马达科技有限公司 | Control mainboard, intelligent electric tool |
-
2020
- 2020-06-22 CN CN202010571735.5A patent/CN111708299A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5563799A (en) * | 1994-11-10 | 1996-10-08 | United Technologies Automotive, Inc. | Low cost/low current watchdog circuit for microprocessor |
CN102214124A (en) * | 2011-06-08 | 2011-10-12 | 深圳市理邦精密仪器股份有限公司 | Watchdog reset control system |
CN102615217A (en) * | 2012-03-31 | 2012-08-01 | 山东电力研究院 | Special voice control bolt cutter for high-voltage live working robot |
CN110739940A (en) * | 2019-10-21 | 2020-01-31 | 上海空间电源研究所 | kinds of sampling hold circuit |
CN212276240U (en) * | 2020-06-22 | 2021-01-01 | 深圳易马达科技有限公司 | Control mainboard, intelligent electric tool |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114741223A (en) * | 2022-04-08 | 2022-07-12 | 苏州景昱医疗器械有限公司 | Watchdog control apparatus, method and computer-readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN203191965U (en) | Watchdog timer circuit, power IC and watchdog monitoring system | |
US7330926B2 (en) | Interruption control system | |
CN101618720B (en) | Control method of whole car controller of hybrid electric car | |
CN101651360B (en) | Duplicate supply intelligent seamless switching method with awakening function | |
US8195966B2 (en) | Electronic device for reducing power consumption during off of computer motherboard | |
US11809348B2 (en) | Digital bus activity monitor | |
TWI482012B (en) | Computer and waking method thereof | |
EP1934675A2 (en) | Power conservation | |
CN105487638B (en) | Electronic circuit system and method for reducing power consumption | |
CN205930591U (en) | Normal electrified carbone controller power | |
CN111708299A (en) | A control motherboard and its design method, and an intelligent electric tool | |
CN212276240U (en) | Control mainboard, intelligent electric tool | |
CN111273590A (en) | A single-button operation circuit of a massager | |
CN114185447B (en) | A touch display wake-up control circuit and wake-up method | |
CN110619203B (en) | Logic watchdog implementation method based on finite-state machine | |
CN216649295U (en) | Voltage abnormity protection circuit for core module | |
CN113571003A (en) | Display device with recovery mechanism | |
CN112988436A (en) | Vehicle-mounted terminal resetting system based on CAN transceiver and vehicle-mounted terminal | |
CN210745110U (en) | Capacitive Touch Buttons and Vehicles | |
CN223108282U (en) | A power supply board and control board circuit for realizing low power consumption through communication | |
TWI817835B (en) | Power-assisted vehicle | |
TWI861680B (en) | Touch display device | |
CN115001090B (en) | Circuit for controlling remote communication power supply by singlechip, control method and vehicle | |
CN218558770U (en) | Dormancy awakening circuit of automobile electronic controller | |
CN112084133B (en) | Vehicle-mounted dual-microprocessor system and control method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
AD01 | Patent right deemed abandoned | ||
AD01 | Patent right deemed abandoned |
Effective date of abandoning: 20250704 |