Method and device for controlling silicon controlled rectifier in electric appliance, and electric appliance
By using the external pins of the main control chip to trigger a timer in electrical equipment, the problem of delayed zero-crossing signal processing during FLASH erasure and writing in microcontrollers is solved, thus achieving stable power output and accurate thyristor conduction angle in electrical equipment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- MR SEMICON LTD
- Filing Date
- 2022-06-15
- Publication Date
- 2026-05-29
AI Technical Summary
When the microcontroller performs FLASH erasure and write operations, it causes a delay in detecting the zero-crossing signal, affecting the accuracy of the thyristor conduction time and resulting in poor stability of the AC electrical output power.
The system receives zero-crossing detection signals from the external pins of the main control chip in the electrical equipment, triggering a timer to start counting. The timer outputs control signals based on the count value to control the conduction time of the thyristor, enabling parallel processing of other tasks without the need for chip software intervention.
It ensures timely processing of zero-crossing signals, meets the real-time requirements of the thyristor conduction angle, improves the accuracy of the thyristor conduction angle, ensures stable power output of electrical equipment, and saves time for chip interruption and interrupt exit.
Smart Images

Figure CN115047802B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electrical equipment technology, and in particular to a control method and device for a thyristor in an electrical device, and the electrical device itself. Background Technology
[0002] Currently, microcontrollers can store power-down data through internal FLASH memory without the need for external EEPROM. However, microcontrollers sometimes need to perform real-time tasks, such as controlling the conduction time of the thyristor by detecting zero-crossing signals in real time. In developing this application, the inventors discovered that when the microcontroller is performing FLASH erasure and writing, it needs to wait for the erasure and writing process to complete before it can execute other tasks. This can delay the detection of the zero-crossing signal or reduce the accuracy of the thyristor's conduction time, resulting in poor stability of the AC electrical output power.
[0003] It should be noted that the information disclosed in this background section is only for understanding the background technology of the present application concept, and therefore may include information that does not constitute prior art. Summary of the Invention
[0004] This application aims to at least partially solve one of the technical problems in the related art. Therefore, the first objective of this application is to propose a control method for a thyristor in an electrical device. After detecting an AC zero-crossing signal, the method automatically controls the conduction time of the thyristor through hardware, without requiring software intervention from the chip. This allows the microcontroller to execute the task of processing the zero-crossing signal and other tasks in parallel, ensuring the timeliness of the zero-crossing signal processing and thus ensuring that the thyristor conducts on time, thereby enabling the electrical device to output power stably.
[0005] The second objective of this application is to provide a control device for a thyristor in an electrical device.
[0006] The third objective of this application is to provide an electrical device.
[0007] To achieve the above objectives, the first aspect of this application proposes a control method for a thyristor in an electrical device, comprising: receiving a zero-crossing detection signal through an external pin of a main control chip in the electrical device; triggering a timer of the main control chip to start timing by the zero-crossing detection signal; and outputting a control signal according to the timing value to control the thyristor.
[0008] According to the control method for thyristors in electrical equipment proposed in this application, the timing function of the timer is automatically triggered by the external pin of the chip. This eliminates the need to wait for the chip to complete its current task before processing the zero-crossing signal, avoiding the problem of the chip being unable to process the zero-crossing signal in a timely manner when performing long-term tasks. This ensures the timeliness of zero-crossing signal processing and meets the real-time requirements for controlling the thyristor conduction angle, thereby enabling the electrical equipment to output power stably. Furthermore, through a pre-configured timing program, the thyristor conduction angle is automatically controlled based on the timing value after the timing program is triggered. This eliminates the need for the chip to continuously and intermittently participate in processing the zero-crossing signal through an external interrupt program. Therefore, the processing of the zero-crossing signal does not require software intervention from the chip, saving the time spent entering and exiting interrupts. This avoids the thyristor conduction angle error caused by this time consumption, improves the accuracy of the thyristor conduction angle, and allows the chip to execute other tasks in parallel while processing the zero-crossing signal.
[0009] According to one embodiment of this application, when the external pin is a timer input pin, the timer input pin responds to the zero-crossing detection signal and directly triggers the timer to start counting.
[0010] According to one embodiment of this application, when the external pin is an I / O input pin, the I / O input pin responds to the zero-crossing detection signal and triggers the timer to start counting through an interrupt program.
[0011] According to one embodiment of this application, before triggering the timer to start counting via an interrupt routine, the method further includes:
[0012] The zero-crossing detection signal is filtered.
[0013] According to one embodiment of this application, the timer is triggered to start counting on the rising and falling edges of the zero-crossing detection signal.
[0014] According to one embodiment of this application, the timer outputs a control signal based on a timing value, including:
[0015] In each cycle, if the timing value is less than a first preset value, the timer outputs a low level until the timing value reaches the first preset value, at which point the timer outputs a high level.
[0016] According to one embodiment of this application, in each cycle, if the timing value reaches a preset cycle value, the timer outputs a low level.
[0017] According to one embodiment of this application, the first preset value is greater than or equal to 0 and less than the preset period value, wherein the preset period value is less than or equal to 10ms.
[0018] According to one embodiment of this application, the first preset value and the preset period value are configured by the main control chip.
[0019] According to one embodiment of this application, the timer counts the time.
[0020] To achieve the above objectives, a second aspect of this application provides a control device for a thyristor in an electrical device, comprising: a zero-crossing detection circuit for detecting zero crossings of the power supply to the electrical device and outputting a zero-crossing detection signal; and a main control chip, the main control chip including external pins and a timer, the external pins being connected to the zero-crossing detection circuit to receive the zero-crossing detection signal and triggering the timer to start timing by the zero-crossing detection signal, the timer outputting a control signal based on the timing value to control the thyristor.
[0021] To achieve the above objectives, a third aspect of this application provides an electrical device, characterized in that it includes a control device for a thyristor as described in the above-described electrical device.
[0022] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0023] Figure 1 This is a schematic flowchart of a control method for a thyristor in an electrical device according to an embodiment of this application.
[0024] Figure 2 This is a timing diagram of the timer output waveform of one embodiment of this application.
[0025] Figure 3 This is a structural block diagram of the control device 20 of the thyristor in an electrical device according to an embodiment of this application.
[0026] Figure 4 This is a circuit topology diagram of a thyristor control device 20 according to an embodiment of this application.
[0027] Figure 5 This is a structural block diagram of an electrical device 10 according to an embodiment of this application. Detailed Implementation
[0028] The embodiments of this application are described in detail below. Examples of the embodiments described below are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0029] The following description, with reference to the accompanying drawings, describes a method and apparatus for controlling a thyristor in an electrical device according to an embodiment of this application, and the electrical device itself.
[0030] Please see Figure 1 The control method for the thyristor in the electrical equipment in the embodiments of this application includes the following steps 100 to 300.
[0031] S100 receives zero-crossing detection signals through the external pins of the main control chip in the electrical equipment.
[0032] The electrical equipment is an AC electrical device, and can be household appliances such as air conditioners, refrigerators, and washing machines. The electrical equipment contains a main control chip, which can be a microcontroller unit (MCU) and has multiple external pins.
[0033] The zero-crossing detection signal is obtained by shaping the AC signal through hardware circuitry. Please refer to [link / reference]. Figure 2 The AC signal is the AC signal from the external electrical device, such as 220V / 50Hz AC mains power. After shaping, the AC signal is used to obtain the zero-crossing detection signal S2. S2 is a pulse signal. When the AC signal S1 changes from the negative half-cycle to the positive half-cycle, the zero-crossing detection signal S2 forms a rising edge Trig_up. When the AC signal S1 changes from the positive half-cycle to the negative half-cycle, the zero-crossing detection signal S2 forms a falling edge Trig_down.
[0034] After obtaining the zero-crossing detection signal S2 through the hardware circuit, S2 is input to the external pin of the main control chip, and then input to the main control chip through the external pin for signal processing of S2.
[0035] S200, the zero-crossing detection signal S2 triggers the timer of the main control chip to start counting.
[0036] The main control chip is equipped with a timer, which can be configured to start timing when triggered by a signal. The timing method controls another output pin of the timer to control the turn-on and turn-off of the thyristor.
[0037] S300, the timer outputs a control signal based on the timing value to control the thyristor.
[0038] The timing value is the real-time timing value of the timer. Based on its own real-time timing value, the timer determines which control signal to output to the SCR. There are two types of control signals: control signal A and control signal B. The SCR is controlled accordingly based on the different control signals output by the timer, while also allowing the main control chip to process other tasks in parallel. When the timer outputs control signal A, the SCR conducts; when the timer changes from outputting control signal A to outputting control signal B, the SCR continues to conduct and turns off when the next half-cycle of the AC signal arrives, thus controlling the conduction angle of the SCR. As a power device, the SCR can control the operating power of electrical equipment by switching itself on and off.
[0039] From the moment the timer is triggered and starts automatically, the timing process is pre-configured. Once triggered and started, the MCU's CPU performs timing, time value judgment, and control signal output according to the configured mode. During this process, the CPU does not need to continuously and intermittently participate in the processing of the S2 signal through an interrupt program, thus enabling the CPU to execute other tasks in parallel while processing the S2 signal.
[0040] Taking an external pin as a timer input pin as an example, in some embodiments, when the external pin is a timer input pin, the timer input pin responds to the zero-crossing detection signal and directly triggers the timer to start counting.
[0041] The main control chip can include multiple external pins, including a timer input pin. When the external pin receiving the zero-crossing detection signal S2 is a timer input pin, the timer can be directly triggered to start counting via hardware. Specifically, the main control chip can be an MR88F001DI / 044PT MCU, which has PC3 / UART2_TX / GTIM3_CH and PC0 / BRRP0 / GTIM2_CH pins. Both PC3 and PC0 pins can be used as timer input pins, and upon receiving S2, the timer can be directly triggered to start counting via hardware.
[0042] Assume the MCU's CPU is currently executing a FLASH erase task, a long-running task requiring approximately 5ms to complete. During the FLASH erase process, the MCU receives a zero-crossing detection signal S2. If a timer is started via an external interrupt at this time, the CPU needs to pause the current task and execute the interrupt service routine to start the timer. Then, it needs to start the timer's interrupt, and the CPU continues executing the current task. When the timer reaches its set value and requires outputting control signal A, the CPU needs to pause the current task again and enter the timer's interrupt service routine, causing the timer output pin to output control signal A to the SCR. After a software delay, the timer output pin outputs control signal B to the SCR. These steps are repeated every cycle, resulting in the CPU continuously and intermittently processing the zero-crossing detection signal.
[0043] When the timer is triggered by hardware, the MCU does not need to start the timer's timing process through software; instead, the timing process is directly started via the pin. In other words, after receiving S2, the MCU does not need to enter an external interrupt service routine to start the timer, thus eliminating the need to pause the current task or trigger a timer interrupt. When the timer reaches the set value, the current task does not need to be paused again, and there is no subsequent software delay. Therefore, the task of processing the zero-crossing detection signal does not initially enter the CPU's task queue through software, avoiding waiting for the current task to complete or triggering an interrupt. Furthermore, the process of processing the zero-crossing detection signal by the timer according to a preset program also does not require the CPU to enter an interrupt routine. Therefore, it is entirely automated by hardware without software intervention, allowing the CPU to process currently running tasks and new zero-crossing detection signal processing tasks in parallel.
[0044] Therefore, according to the control method for thyristors in electrical equipment proposed in this application embodiment, the timing function of the timer is automatically triggered by the timer input pin of the chip. This eliminates the need to wait for the chip to complete its current task before processing the zero-crossing signal, avoiding the problem of the chip being unable to process the zero-crossing signal in a timely manner when performing long-term tasks. This ensures the timeliness of zero-crossing signal processing and meets the real-time requirements for controlling the thyristor conduction angle, thereby enabling the electrical equipment to output power stably. Furthermore, through a pre-configured timing program, the thyristor conduction angle is automatically controlled based on the timing value after the timing program is triggered. This eliminates the need for the chip to continuously and intermittently participate in processing the zero-crossing signal through an external interrupt program. Therefore, the processing of the zero-crossing signal does not require software intervention from the chip, saving the time spent entering and exiting interrupts, avoiding the thyristor conduction angle error caused by this time consumption, improving the accuracy of the thyristor conduction angle, and enabling the chip to execute other tasks in parallel while processing the zero-crossing signal.
[0045] Taking an external pin as an I / O input pin as an example, in some embodiments, when the external pin is an I / O input pin, the I / O input pin responds to the zero-crossing detection signal and triggers the timer to start counting through the interrupt program.
[0046] The main control chip may include I / O input pins among its multiple external pins. If the main control chip does not have a timer input pin, the zero-crossing detection signal S2 can be received through the I / O input pin. When the external pin receiving the zero-crossing detection signal S2 is an I / O input pin, the timer can be started by triggering an interrupt.
[0047] The difference between receiving S2 via I / O input pins and receiving S2 via timer input pins is that receiving S2 via I / O input pins requires the CPU to use code instructions in the interrupt service routine on the rising or falling edge to start the timer. Therefore, CPU intervention is required when the timer starts. Since some MCUs cannot execute other programs while the CPU is performing FLASH erasure, the CPU must wait for the FLASH erasure to be completed before executing other programs. Therefore, when the CPU enters the interrupt service routine after detecting the rising or falling edge interrupt of the I / O port, in addition to starting the timer, it also starts the FLASH erasure task and starts the timer. However, since the timer's timing program is pre-configured, once it is triggered and starts timing, the CPU performs timing, timing value judgment, and control signal output according to the configured mode. Therefore, after starting timing, there is no need to start the timer interrupt, and there is no need to continuously and intermittently participate in the processing of the zero-crossing detection signal through interrupts. Instead, it can directly execute according to the set mode, so the CPU can execute other tasks. Aside from the difference in how the timer is started, the timing method itself is the same whether S2 is received through the I / O input pin or the timer input pin.
[0048] Therefore, by triggering the timer's timing function through an interrupt on the chip's I / O input pin, there's no need to wait for the chip to complete its current task before processing the zero-crossing signal. This avoids the problem of the chip struggling to process the zero-crossing signal in a timely manner when performing long-duration tasks, ensuring the timeliness of zero-crossing signal processing and meeting the real-time requirements for controlling the thyristor conduction angle. This allows electrical equipment to output power stably. Furthermore, through a pre-configured timing program, the thyristor conduction angle is automatically controlled based on the timing value after the program is triggered. Once the timing program is started, the chip does not need to continuously and intermittently participate in processing the zero-crossing signal through an external interrupt program. Therefore, subsequent zero-crossing signal processing does not require software intervention from the chip, saving the time spent entering and exiting interrupts. This avoids the thyristor conduction angle error caused by this time consumption, improves the accuracy of the thyristor conduction angle, and allows the chip to execute other tasks in parallel while processing the zero-crossing signal.
[0049] In some embodiments, before the timer is triggered to start counting by an interrupt routine, the control method further includes filtering the zero-crossing detection signal S2.
[0050] Since the waveform of the zero-crossing detection signal S2 may have glitches, and these glitches may continuously trigger the timer, causing the timer timing cycle to be incorrect, S2 can be filtered first. For example, S2 can be filtered first through a filtering circuit, and then the filtered signal can be input to the MCU's I / O input pin.
[0051] In some embodiments, a timer is triggered to start counting on the rising and falling edges of the zero-crossing detection signal S2.
[0052] Please see Figure 2 Since the rising edge Trig_up and falling edge Trig_down of the zero-crossing detection signal S2 both correspond to the zero point position of the AC signal S1, the timer is triggered to start counting at Trig_up and Trig_down of S2.
[0053] In some embodiments, the timer in step 300 outputs a control signal based on the timing value. Specifically, it may include: in each cycle, if the timing value is less than a first preset value, the timer outputs a low level until the timing value reaches the first preset value, at which point the timer outputs a high level.
[0054] Continue reading Figure 2 W1 represents the output waveform of the timer. Control signal A is high, and control signal B is low. From the moment the timer starts counting, the timer outputs a low level to the SCR, thus turning the SCR off. The timing value gradually increases after the timer starts counting until it reaches the first preset value. At this point, the timer starts outputting a high level to the SCR, thus turning the SCR on.
[0055] Understandably, the first preset value is used to control the turn-on delay time T of the thyristor. delay Starting from the rising edge or falling edge, the elapsed time until the timing value reaches the first preset value is T in the W1 waveform. delay After T delay Then, the timer starts outputting a high level. If the first preset value is zero, it means that the thyristor is triggered to conduct at the zero-crossing point of the AC signal.
[0056] In some embodiments, if the timing value reaches a preset period value in each cycle, the timer outputs a low level.
[0057] Continue reading Figure 2 When the timing value reaches the first preset value, the timing continues until the preset period value is reached. At this point, the timer resumes outputting a low level to the thyristor, and the thyristor continues to conduct during this half-cycle until the start of the next half-cycle. It can be understood that the preset period value is greater than the first preset value, used to control the trigger conduction time T of the thyristor. on When the timing value is greater than or equal to the first preset value and less than the preset period value, the timer maintains a high output level, and the thyristor is triggered to conduct. This period is the T value in the W1 waveform. on After T onAfterwards, the timer stops and outputs a low level, and the SCR continues to conduct during this half-cycle until the start of the next half-cycle, at which point it turns off. If the first preset value is 0, it means that the SCR will conduct continuously from the zero-crossing point until the next zero-crossing point. Furthermore, the timer uses a single-pulse output mode, with only one continuous high-level output period per cycle; that is, there is only one T pulse per cycle. on .
[0058] Understandably, when the timer value reaches the preset period value, the timer value can be cleared to zero, so that the timer can start counting from zero the next time it is triggered.
[0059] In some embodiments, the first preset value is greater than or equal to 0 and less than the preset period value, and the preset period value is less than or equal to 10ms.
[0060] Assuming the AC signal is 50Hz, the high and low levels of the zero-crossing detection signal can both be set to 10ms, meaning the time interval between the rising edge and two adjacent falling edges is 10ms. Therefore, the timer period is also 10ms. The preset period value and the first preset value can be determined based on the trigger conduction time parameters from various thyristor manufacturers. The trigger conduction time T... on If the length is too short, it will be difficult to trigger the thyristor to conduct; if it is too long, it will consume system current.
[0061] In some embodiments, the first preset value and the preset period value are configured by the main control chip.
[0062] When it is necessary to change the trigger conduction time T of the thyristor on This can be achieved by adjusting the first preset value and the preset period value. Specifically, the smaller the first preset value and the larger the preset period value, the longer T will be. on The larger.
[0063] In some embodiments, the timer counts the time.
[0064] Whether the zero-crossing detection signal is received through the timer input pin or the I / O input pin, the timing process after the timer starts is the same, so the timing under both pins can be achieved by counting.
[0065] Continue reading Figure 2 The rising edge (Trig_up) and falling edge (Trig_down) of the zero-crossing detection signal trigger the timer to start counting from zero. W2 is the timer's counting waveform, and the count value reflects the timing value. CCR is the count value corresponding to the first preset value, and ARR is the count value corresponding to the preset period value. 0 ≤ CCR <ARR≤10ms。
[0066] When the timer count value has not reached CCR, it indicates that the timing value has not reached the first preset value, and the current state is within the conduction delay time T. delay During the period, T delay =CCR-0, at this time the timer output is low and the SCR is in the off state.
[0067] When the timer count gradually increases and reaches CCR, it indicates that the timing value has reached the first preset value, and T has already elapsed. delay The period and the trigger conduction time T on During the period, T on =ARR-CCR, at this time the timer outputs a high level, and the SCR is T on The high-level time triggers conduction.
[0068] When the timer count continues to increase and reaches an ARR higher than CCR, it indicates that the timing value has reached the preset period value, and T has already elapsed. on During the specified period, the timer stops and outputs a low level, the thyristor remains on until the next half-cycle arrives, at which point it turns off and the count value is cleared. Counting will resume only when the next rising or falling edge appears.
[0069] During each timer cycle, the timer outputs high and low levels according to CCR and ARR. The CPU does not need to interrupt or intervene; it can run directly. If it is necessary to adjust the conduction time of the SCR, then the CPU needs to intervene to adjust the value of CCR, or simultaneously adjust the values of CCR and ARR, thereby increasing or decreasing the trigger conduction time of the SCR.
[0070] Additionally, please see Figure 3 This application also proposes a control device 20 for a thyristor in an electrical device. The control device 20 includes a zero-crossing detection circuit 21 and a main control chip 22.
[0071] The zero-crossing detection circuit 21 is used to perform zero-crossing detection on the power supply of electrical equipment and output a zero-crossing detection signal.
[0072] The main control chip 22 includes an external pin 23 and a timer 24. The external pin 23 is connected to the zero-crossing detection circuit 21 to receive the zero-crossing detection signal and trigger the timer 24 to start timing. The timer 24 outputs a control signal according to the timing value to control the thyristor 25.
[0073] According to the control device for a thyristor in an electrical device proposed in this application, the timing function of the timer is automatically triggered by the external pin of the chip. This eliminates the need to wait for the chip to complete its current task before processing the zero-crossing signal, avoiding the problem of the chip being unable to process the zero-crossing signal in a timely manner when performing long-term tasks. This ensures the timeliness of zero-crossing signal processing and meets the real-time requirements for controlling the thyristor conduction angle, thereby enabling the electrical device to output power stably. Furthermore, through a pre-configured timing program, the thyristor conduction angle is automatically controlled based on the timing value after the timing program is triggered. This eliminates the need for the chip to continuously and intermittently participate in processing the zero-crossing signal through an external interrupt program. Therefore, the processing of the zero-crossing signal does not require software intervention from the chip, saving the time spent entering and exiting interrupts and avoiding thyristor conduction angle errors caused by this time consumption. This improves the accuracy of the thyristor conduction angle and allows the chip to execute other tasks in parallel while processing the zero-crossing signal.
[0074] In some embodiments, when external pin 23 is a timer input pin, the timer input pin responds to the zero-crossing detection signal and directly triggers timer 24 to start timing via hardware.
[0075] In some embodiments, when external pin 23 is an I / O input pin, the I / O input pin responds to the zero-crossing detection signal, and the main control chip 22 triggers timer 24 to start timing through an interrupt program.
[0076] In some embodiments, the control device 20 further includes a filtering circuit connected to the I / O input pin, which is used to filter the zero-crossing detection signal before the main control chip 22 triggers the timer 24 to start timing through an interrupt program.
[0077] In some embodiments, timer 24 begins timing on the rising and falling edges of the zero-crossing detection signal.
[0078] In some embodiments, the control signal can be a level signal. In each cycle, if the timing value is less than a first preset value, the timer 24 outputs a low level until the timing value reaches the first preset value, at which point the timer 24 outputs a high level.
[0079] In some embodiments, if the timing value reaches a preset period value in each cycle, the timer 24 outputs a low level.
[0080] In some embodiments, the first preset value is greater than or equal to 0 and less than the preset period value, and the preset period value is less than or equal to 10ms.
[0081] In some embodiments, the first preset value and the preset period value are configured by the main control chip 22.
[0082] In some embodiments, timer 24 counts.
[0083] In some embodiments, please refer to Figure 4 The control device 20 also includes an AC power source AC, a rectifier bridge, a switching chip 26, a transformer 27, a voltage regulator capacitor C1, a first resistor R1, a second resistor R2, a third resistor R3, and a load 28.
[0084] An AC source outputs an AC signal, such as 220V / 50Hz, which is then rectified by a rectifier bridge to produce a full-wave rectifier. The resulting DC signal is then supplied to transformer 27. The secondary coil of transformer 27 outputs a stepped-down DC signal. A voltage-regulating capacitor C1 is connected in parallel to the secondary coil of transformer 27. Both ends of the voltage-regulating capacitor C1 are connected to the main control chip 22. The capacitor C1 provides an input voltage to the main control chip 22, such as a +5V input voltage.
[0085] The rectifier bridge may include a first diode D1, a second diode D2, a third diode D3, and a fourth diode D4. The cathode of diode D1 is connected to the cathode of diode D2, the anode of diode D2 is connected to the cathode of diode D3, the anode of diode D3 is connected to the anode of diode D4, and the cathode of diode D4 is connected to the anode of diode D1.
[0086] The connection point of the first diode D1 and the fourth diode D4 is connected to one of the output terminals of the AC source. The connection point of the second diode D2 and the third diode D3 is connected to the other output terminal of the AC source. The connection point of diodes D1 and D2 is connected to the first terminal of the switching chip 26, and the connection point of diodes D3 and D4 is connected to the second terminal of the switching chip 26. The first terminal of the switching chip 26 is also connected to one end of the primary coil, and the third terminal of the switching chip 26 is connected to the other end of the primary coil. The voltage reduction function is achieved through the switching chip 26 and the transformer 27.
[0087] In addition, the connection between diodes D1 and D2 is also connected to one end of the first resistor R1 and one end of the AC power source. The other end of the first resistor R1 is connected to one end of the second resistor R2, and the connection between the first resistor R1 and the second resistor R2 is connected to the external pin 23 of the main control chip 22. The other end of the second resistor R2 is connected to one end of the voltage regulator capacitor C1, and the connection between the second resistor R2 and the voltage regulator capacitor C1 is grounded. Thus, through the resistor voltage divider mode, the AC signal is attenuated and introduced into the external pin 23 of the main control chip 22. The external pin 23 can have a built-in diode connected to the power supply and a diode connected to ground, which is used to shape the attenuated AC signal into a high and low level pulse signal (i.e., S2). This is equivalent to the zero-crossing detection circuit 21 being used through resistors R1 and R2 and the internal diodes of the pin.
[0088] One output pin of the main control chip 22 is connected to one end of the third resistor R3, and the other end of the third resistor R3 is connected to the first end of the silicon controlled rectifier (SCR) 25. The main control chip 22 sends the timer's output waveform W1 (i.e., the trigger signal of the SCR) to the SCR 25 through the third resistor R3 to control the on / off state of the SCR 25. Simultaneously, one end of the load 28 is connected to one end of the AC power source, the other end of the load 28 is connected to the second end of the SCR 25, and the third end of the SCR 25 is connected to the other end of the AC power source. This allows the operating power of the load 28 to be controlled by switching the SCR 25 on and off.
[0089] Additionally, please see Figure 5 This application also proposes an electrical device 10, which includes the control device 20 of the thyristor in the electrical device described in the above embodiments.
[0090] According to the electrical device proposed in the embodiments of this application, the timing function of the timer is automatically triggered by the external pin of the chip. This eliminates the need to wait for the chip to complete its current task before processing the zero-crossing signal, avoiding the problem of the chip being unable to process the zero-crossing signal in a timely manner when performing long-term tasks. This ensures the timeliness of zero-crossing signal processing and meets the real-time requirements for controlling the thyristor conduction angle, thereby enabling the electrical device to output power stably. Furthermore, through a pre-configured timing program, the thyristor conduction angle is automatically controlled based on the timing value after the timing program is triggered. This eliminates the need for the chip to continuously and intermittently participate in processing the zero-crossing signal through an external interrupt program. Therefore, the processing of the zero-crossing signal does not require software intervention from the chip, saving the time spent entering and exiting interrupts. This avoids the thyristor conduction angle error caused by this time consumption, improving the accuracy of the thyristor conduction angle and allowing the chip to execute other tasks in parallel while processing the zero-crossing signal.
[0091] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0092] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0093] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0094] 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 at least one of that feature. In the description of this application, "a plurality of" means at least two, such as two, three, etc., unless otherwise expressly specified. Relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another entity or operation and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0095] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of apparatus, electronic devices, and computer-readable storage media are basically similar to the method embodiments, and therefore the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0096] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application are included within the scope of protection of this application.
Claims
1. A method for controlling a thyristor in an electrical device, characterized in that, include: The zero-crossing detection signal is received through the external pins of the main control chip in the electrical device; The zero-crossing detection signal triggers the timer of the main control chip to start counting; The timer outputs a control signal based on the timing value to control the thyristor; When the external pin is a timer input pin, the timer input pin responds to the zero-crossing detection signal and directly triggers the timer to start counting in hardware. The timer is triggered to start counting on the rising and falling edges of the zero-crossing detection signal; The timer outputs control signals based on the timing value, including: In each cycle, if the timing value is less than a first preset value, the timer outputs a low level until the timing value reaches the first preset value, at which point the timer outputs a high level. In each cycle, if the timing value reaches a preset cycle value, the timer outputs a low level; The control signals include: control signal A and control signal B. The thyristor is controlled according to different control signals output by the timer, while the main control chip processes other tasks in parallel.
2. The method according to claim 1, characterized in that, The first preset value is greater than or equal to 0 and less than the preset period value, and the preset period value is less than or equal to 10ms.
3. The method according to claim 1, characterized in that, The first preset value and the preset period value are configured by the main control chip.
4. The method according to claim 1, characterized in that, The timer keeps count by counting.
5. A control device for a thyristor in an electrical device, used to execute the control method for a thyristor in an electrical device according to any one of claims 1-4, characterized in that, include: A zero-crossing detection circuit is used to perform zero-crossing detection on the power supply of the electrical equipment and output a zero-crossing detection signal. The main control chip includes external pins and a timer. The external pins are connected to the zero-crossing detection circuit to receive the zero-crossing detection signal and trigger the timer to start timing. The timer outputs a control signal based on the timing value to control the thyristor.
6. An electrical appliance, characterized in that, Includes the control device according to claim 5.