PWM control device, PWM device, and method for generating PWM control signal
The PWM control device automates the adjustment of PWM periods by using a counter circuit and comparator to update drive data, simplifying the control of stepping motor speed and improving efficiency.
Patent Information
- Application Number
- JP2023056783
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-03-30
- Publication Date
- 2024-10-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing methods for controlling the speed of stepping motors through pulse width modulation (PWM) require complex microcomputer interventions to adjust duty cycles and change rising and falling change points, which are cumbersome and inefficient.
A PWM control device and method that utilizes a counter circuit, register, and comparator to generate PWM control signals by counting clock cycles, updating drive data, and resetting the counter to change the modulation period without manual microcomputer intervention, allowing seamless speed adjustments.
Enables efficient and automated control of PWM periods, simplifying the process of changing the speed of stepping motors by directly modulating the clock cycles, reducing the need for manual microcomputer adjustments and enhancing operational efficiency.
Smart Images

Figure 2024143867000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a PWM controller, a PWM device, and a method for generating a PWM control signal. [Background technology]
[0002] Patent Document 1 discloses that the drive control of a stepping motor can be easily performed. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2006-212297 A Summary of the Invention [Problem to be solved by the invention]
[0004] To change the speed of a stepping motor, for example, the duty is maintained while the period is changed. Specifically, to increase the speed, the period is shortened, and to decrease the speed, the period is lengthened. In a device that uses a microcomputer to perform this control, the following three procedures are required.
[0005] The first step is to change the period setting. The second step is to change the setting of the rising edge point in order to keep the duty constant. The third step is to change the setting of the falling edge point in order to keep the duty constant. These steps are performed by the microcomputer rewriting the registers of the pulse width modulation (PWM) driver.
[0006] The present invention aims to provide a PWM controller, a PWM device and a method for generating a PWM control signal that is capable of varying the period of a controlled device, such as the speed of a stepper motor, by pulse width modulation. [Means for solving the problem]
[0007] A PWM control device according to a first aspect of the present invention includes a counter circuit configured to count the number of clocks in response to a clock signal; a comparison circuit including a register for storing a reference value associated with a modulation speed of pulse width modulation, and configured to generate a reset signal and an output update signal in response to the count value of the counter circuit matching the reference value; and a drive data generation circuit having a plurality of storage locations corresponding to at least the number of control steps of the pulse width modulation, and configured to store drive data for the pulse width modulation in the storage locations, wherein the drive data generation circuit updates an internal state of the drive data generation circuit upon receiving the output update signal to identify the drive data to be output next and output the identified drive data, and the counter circuit is reset in response to the reset signal.
[0008] A PWM device according to a second aspect of the present invention comprises a PWM control device according to the above aspect, a drive circuit connected to an output of the PWM control device, and a device connected to the drive circuit and driven by a signal from the drive circuit.
[0009] A method for generating a PWM control signal according to a third aspect of the present invention comprises counting the number of clocks using a counter circuit operating in response to a clock signal, generating a reset signal and an output update signal in response to the count value of the counter circuit matching a reference value associated with a modulation speed of pulse width modulation, and in a drive data generation circuit which stores each drive data in the control steps in sequence in a storage location corresponding to at least the number of control steps of the pulse width modulation, updating an internal state of the drive data generation circuit in response to the output update signal and outputting the drive data to be output in the updated internal state, and initializing the counter circuit in response to the reset signal, wherein the updating of the internal state includes identifying the drive data to be output next from the drive data. Effect of the Invention
[0010] According to the above aspects, a PWM control device, a PWM device, and a method for generating a PWM control signal are provided that are capable of varying the period of a controlled device by pulse width modulation. [Brief description of the drawings]
[0011] [Figure 1] FIG. 1 is a diagram illustrating a PWM control device and a PWM device according to the present embodiment. [Diagram 2] FIG. 2 is a schematic diagram of an exemplary PWM control device and a PWM device according to an embodiment of the present invention. [Diagram 3] FIG. 3 is a schematic diagram of an exemplary PWM control device and a PWM device according to an embodiment of the present invention. [Figure 4] FIG. 4 is a diagram illustrating a PWM control device according to the present embodiment and a stepping motor as an example of a drive target that can be driven by the PWM device. [Diagram 5] FIG. 5 is a diagram showing a drive circuit for driving the stepping motor shown in FIG. 4, specifically, a series bipolar drive circuit. [Figure 6] FIG. 6 is a diagram showing an example driving sequence applicable to the driving circuit shown in FIG. [Figure 7] FIG. 7 is a diagram showing a current flow in a drive circuit in a drive sequence including a dead time period. [Figure 8] FIG. 8 is a diagram showing an example driving sequence applicable to the driving circuit shown in FIG. [Figure 9] FIG. 9 is a diagram showing an example driving sequence applicable to the driving circuit shown in FIG. [Figure 10] FIG. 10 is a diagram showing a PWM control device and a dead time generating circuit of the PWM device according to this embodiment. [Figure 11] FIG. 11 is a diagram showing waveforms of main nodes in the dead time generating circuit shown in FIG. [Figure 12]FIG. 12 is a diagram illustrating the main steps of a method for generating a PWM control signal using a PWM controller according to the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0012] Hereinafter, each embodiment for carrying out the present invention will be described with reference to the drawings. In the following description, the same or similar parts are denoted by the same or similar reference numerals, and duplicated description will be omitted.
[0013] FIG. 1 is a diagram illustrating a PWM control device and a PWM device according to the present embodiment.
[0014] 1, there is shown a PWM controller 11 and a PWM device 12. In addition to the PWM controller 11, the PWM device 12 may further include a drive circuit 30 connected to the output of the PWM controller 11, and a device (object 33) connected to the drive circuit 30. An exemplary object 33 may include a stepping motor (driven object).
[0015] The PWM control device 11 can perform control of pulse width modulation (PWM). The PWM control device 11 can be provided in the form of, for example, a semiconductor device.
[0016] The PWM control device 11 includes a counter circuit 13, a comparison circuit 15, and a drive data generation circuit 17. The counter circuit 13 counts the number of clocks in response to a clock signal CLK.
[0017] The comparison circuit 15 includes a register 21 that retainably stores a reference value VREF associated with the modulation speed of the pulse width modulation. The register 21 is changed by a rewrite signal SWRT. The comparison circuit 15 generates a reset signal SRST and an output update signal SUPD in response to the count value SCNT of the counter circuit 13 matching the reference value VREF. The comparison circuit 15 may include a first comparator 25 to detect the match.
[0018] The drive data generation circuit 17 has a plurality of storage locations 23 corresponding to at least the number of control steps of the pulse width modulation. The drive data generation circuit 17 is configured to storable the drive data DDATA in the control steps of the pulse width modulation in the storage locations 23 and to output one of the drive data DDATA in response to receiving the output update signal SUPD.
[0019] The counter circuit 13 is reset in response to a reset signal SRST. The resetting can be, for example, either loading a predetermined value into the counter register 27 or resetting the counter register 27.
[0020] According to the PWM control device 11, the drive data generation circuit 17 has a storage location 23 for storing each drive data DDATA in the control step of the pulse width modulation. The comparison circuit 15 generates a reset signal SRST and an output update signal SUPD when the count value SCNT of the counter circuit 13 matches the reference value VREF. The drive data generation circuit 17 has an input 17b for receiving the output update signal SUPD, and provides the drive data DDATA to an output 17c in sequence each time the output update signal SUPD is received. The modulation speed of the pulse width modulation is changeable according to the reference value VREF. Also, the drive sequence of the pulse width modulation is associated with the arrangement of each drive data DDATA in the control step of the pulse width modulation.
[0021] The driving sequence may mainly include, for example, a one-phase excitation sequence, a two-phase excitation sequence, a one-two phase excitation sequence, or various excitation schemes having other numbers of phases.
[0022] The direction of pulse width modulation drive is determined by sequentially outputting the drive data DDATA in the array in a forward direction or sequentially outputting the drive data DDATA in a reverse direction.
[0023] The drive data generation circuit 17 can receive a direction signal SDRCT that specifies the drive direction of the pulse width modulation, and the direction signal SDRCT specifies the drive direction of the pulse width modulation.
[0024] The plurality of storage locations 23 may be provided in the form of semiconductor memory or retention circuits, as will be understood from the ensuing description.
[0025] The semiconductor memory has storage locations 23 that are specified by addresses and store the drive data DDATA. The holding circuit has storage locations 23 connected in a ring shape to hold the drive data DDATA. Specifically, the semiconductor memory sequentially provides the drive data DDATA by changing the address upon receiving the output update signal SUPD. The holding circuit sequentially provides the drive data DDATA by cyclically moving the drive data DDATA within the storage locations 23 to adjacent storage locations 23 upon receiving the output update signal SUPD.
[0026] The PWM control device 11 may include a control output circuit 31 connected to the output 17c of the drive data generation circuit 17. The control output circuit 31 provides a PWM control signal SDRV to the drive circuit 30. The drive circuit 30 receives the PWM control signal SDRV and drives the object 33 with a PWM drive signal SPWM.
[0027] A long cycle drive (e.g., a slow rotation of a stepping motor) is realized by providing a large value to the counter register 27. A short cycle drive (e.g., a fast rotation of a stepping motor) is realized by providing a small value to the counter register 27. No change in the drive data DDATA is required.
[0028] The PWM control device 11 can be integrated into the same semiconductor device as the microcomputer 10. The microcomputer 10 can set a value in the register 21 without an interrupt.
[0029] FIG. 2 is a schematic diagram of an exemplary PWM control device and a PWM device according to an embodiment of the present invention.
[0030] 2, the PWM control device 11a and the PWM device 12a are shown. In the PWM control device 11a, the storage location 23 can be configured as a semiconductor memory 41 that stores the respective drive data DDATA in the control steps of the pulse width modulation. The semiconductor memory 41 can include a memory element 40, such as a ROM, a RAM, an EPRON, an EEPROM, or a flash memory.
[0031] The semiconductor memories 41 in the storage location 23 are pointed to by respective addresses ADR. The semiconductor memories 41 can store drive data for a plurality of control sequences, and the control sequence to be used can be specified by a selection signal.
[0032] The drive data generation circuit 17 includes an address register 43 and an output circuit 45 .
[0033] The address register 43 indicates the address ADR of the semiconductor memory 41 (storage location 23) to be accessed. The address ADR is updated in response to receiving the output update signal SUPD.
[0034] Specifically, the drive data generating circuit 17 can include an address updater 47 .
[0035] The address updater 47 holds the current address value and updates the held address value in response to receiving the output update signal SUPD. The update is an increment or decrement of the address value. The increment or decrement can be performed in units of the natural number "1". The direction signal SDRCT specifies whether the update is an increment or decrement of the address value. The increment or decrement of the address value is related to the direction of the update of the control step of the pulse width modulation.
[0036] Specifically, the address of the semiconductor memory 41 is associated with the number of control steps of the pulse width modulation of the drive sequence, for example, four steps in the two-phase excitation sequence. In the two-phase excitation sequence, the semiconductor memory 41 is pointed to by four addresses (ADR1, ADR2, ADR3, ADR4). In an exemplary update, when the semiconductor memory 41 is pointed to by a current address (ADR2), increasing the address value updates the address value of the semiconductor memory 41 from address (ADR2) to address (ADR3). Also, decreasing the address value updates the address value of the semiconductor memory 41 from address (ADR2) to address (ADR1).
[0037] The drive data generation circuit 17 can include a sequence register 48 and a second comparator 49 .
[0038] The exemplary sequence register 48 holds the minimum and maximum addresses of the drive sequence being used. The sequence register 48 receives data ADD0, which indicates the minimum and maximum addresses of the drive sequence being used.
[0039] The exemplary second comparator 49 determines by comparison that the updated address value from the address updater 47 is between the minimum and maximum addresses of the sequence register 48 .
[0040] Specifically, the second comparator 49 compares the updated address value with the minimum address of the sequence register 48. If the updated address value is smaller than the minimum address, the second comparator 49 replaces the received updated address value with the maximum address and outputs the replaced address value. If the updated address value is equal to or greater than the minimum address, the second comparator 49 outputs the received updated address value as is. The second comparator 49 also compares the updated address value with the maximum address of the sequence register 48. If the updated address value is larger than the maximum address, the second comparator 49 replaces the received updated address value with the minimum address and outputs the replaced address value. These address updates allow the second comparator 49 to maintain the continuity of the steps in the control sequence.
[0041] The output circuit 45 outputs the drive data DDATA of the semiconductor memory 41 designated by the address value.
[0042] According to the PWM control device 11a, it is possible to use a plurality of PWM drive sequences depending on the number of semiconductor memories 41 and the addition or switching of memory contents.
[0043] A dead time period can be inserted between adjacent drive sequences. The dead time period can reduce the overlap of the drive current waveforms from the driver during the transition from one drive sequence to the other. This can reduce the current consumption.
[0044] The semiconductor memory 41 may include an additional memory element 40 for storing drive data DDATA that defines a dead time phase (dead time period) between adjacent drive steps. Specifically, the drive data generating circuit 17 provides drive data DDATA in the order of a normal drive step, a dead time step, and the next normal drive step. The period of the dead time step can be made shorter than the period of the normal drive step. This difference in period is realized by providing the counter circuit 13 with a different reference value for the period of the dead time step that is different from the reference value VREF for the period of the normal drive step.
[0045] According to the PWM control device 11a, when the drive data DDATA corresponding to the dead time period is stored in the semiconductor memory 41, a dead time phase can be provided to the PWM drive sequence.
[0046] 3 is a schematic diagram of an exemplary PWM control device and PWM device according to the present invention. Referring to FIG. 3, a PWM control device 11b and a PWM device 12b are shown.
[0047] In the drive data generating circuit 17 of the PWM control device 11b, the storage locations 23 are connected in series to form a series connection 24 of the storage locations 23. One end and the other end of the series connection 24 of the storage locations 23 are connected to each other to form a closed circuit. The series connection 24 can be configured so that the drive data DDATA can move in both one direction and the reverse direction in the series connection 24 in response to receiving the output update signal SUPD. Also, the series connection 24 can be configured so that the drive data DDATA moves in one direction or the reverse direction in the series connection in response to receiving the output update signal SUPD. The movement direction of the drive data DDATA in the series connection 24 can be specified by the direction signal SDRCT.
[0048] The number of storage locations 23 can be set so as to configure a dead time phase that provides a dead time period to a control step. Specifically, the drive data generation circuit 17 provides drive data DDATA in the order of a normal drive step, a dead time step, and the next normal drive step.
[0049] According to the PWM control device 11b, when the drive data DDATA corresponding to the dead time period is stored in the ring-shaped serial connection 24 of the storage location 23, a dead time phase can be provided to the PWM drive sequence.
[0050] The drive data generation circuit 17 may include a motion controller 26 that receives the output update signal SUPD and the direction signal SDRCT. The motion controller 26 controls the updating of the arrangement of the drive data DDATA in the serial connection 24 and the direction of motion in the update.
[0051] The output circuit 45 is connected to any one of the nodes in the series connection 24 to receive the drive data DDATA on one node at an input 45b, and provides the drive data DDATA from the series connection 24 to an output 45c.
[0052] According to the PWM control device 11b, a plurality of storage locations 23 can be connected in a ring shape. Depending on the number of storage locations 23 in the ring-shaped serial connection 24 and the contents stored in the storage locations 23, various PWM drive sequences can be used.
[0053] Fig. 4 is a diagram showing a stepping motor as an example of a drive target that can be driven by the PWM control device and the PWM device according to the present embodiment. Fig. 5 is a diagram showing a drive circuit, specifically a series bipolar drive circuit, for driving the stepping motor shown in Fig. 4. Fig. 6 is a diagram showing an exemplary drive sequence that can be applied to the drive circuit shown in Fig. 5.
[0054] 4, a stepping motor 51 is shown as an example of a driven object. The stepping motor 51 includes a magnet MG (permanent magnet) and a plurality of coils (in FIG. 4, A-phase coil CLA, A / -phase coil CLA / , B-phase coil CLB, and B / -phase coil CLB / ) arranged symmetrically or asymmetrically around the magnet MG. The symbol " / " means a so-called "bar" placed on the symbol.
[0055] The A-phase coil CLA has one end 51a and the other end 51b. The B-phase coil CLB has one end 51c and the other end 51d. The A / -phase coil CLA / has one end 51e and the other end 51f. The B / -phase coil CLB / has one end 51g and the other end 51h.
[0056] 5, a PWM device 50 includes two drive circuits DRVC1 and DRVC2 that drive a stepping motor 51. The drive circuits DRVC1 and DRVC2 are connected between a high potential power supply line 52 (e.g., Vcc) and a low potential power supply line 54 (e.g., 0 V).
[0057] The drive circuit DRVC1 includes drive transistors LTR1 and LTR2 connected in series between a high potential power line 52 and a low potential power line 54, and drive transistors LTR3 and LTR4 connected in series between the high potential power line 52 and the low potential power line 54. The drive transistors LTR1 and LTR2 are connected to each other at a first shared node SN1. The drive transistors LTR3 and LTR4 are connected to each other at a second shared node SN2.
[0058] The drive circuit DRVC2 further includes drive transistors RTR1 and RTR2 connected in series between the high potential power line 52 and the low potential power line 54, and drive transistors RTR3 and RTR4 connected in series between the high potential power line 52 and the low potential power line 54. The drive transistors RTR1 and RTR2 are connected to each other at a third shared node SN3. The drive transistors RTR3 and RTR4 are connected to each other at a fourth shared node SN4.
[0059] The drive circuit DRVC1 is configured to drive the A-phase coil CLA and the A / -phase coil CLA / of the stepping motor 51. Specifically, the A-phase coil CLA and the A / -phase coil CLA / are connected in series between a first shared node SN1 and a second shared node SN2 of the drive circuit DRVC1.
[0060] The drive circuit DRVC2 is configured to drive the B-phase coil CLB and the B / -phase coil CLB / of the stepping motor 51. Specifically, the B-phase coil CLB and the B / -phase coil CLB / are connected in series between the third shared node SN3 and the fourth shared node SN4 of the drive circuit DRVC2.
[0061] As a specific example of the connections, the first shared node SN1 is connected to the black terminal of the A-phase coil CLA. The yellow terminal of the A-phase coil CLA is connected to the orange terminal of the A / -phase coil CLA. The green terminal of the A / -phase coil CLA is connected to the second shared node SN2.
[0062] In addition, the third shared node SN3 is connected to the red terminal of the B-phase coil CLB. The white terminal of the B-phase coil CLB is connected to the brown terminal of the B / -phase coil CLB / . The blue terminal of the B / -phase coil CLB / is connected to the fourth shared node SN4.
[0063] Referring to Fig. 6, an exemplary driving sequence, for example, a two-phase excitation sequence, is shown. The two-phase excitation sequence has four driving steps. In Fig. 6, the driving waveforms of the A phase and the B phase are shown, while the A / phase and the B / phase have inverted waveforms of the A phase and the B phase, respectively. Thus, an exemplary series of driving data DDATA may include a 4-bit value that specifies a high (H) value or a low (L) value for the A phase, the A / phase, the B phase, and the B / phase.
[0064] The exemplary drive data DDATA is arranged in the order of (HLHL), (LHHL), (LHLH), and (HLLH).
[0065] In the drive circuit DRVC1, the PWM drive signal SPWM related to the drive data DDATA is provided to the control terminals (LCT1, LCT2, LCT3, and LCT4) of the drive transistors (LTR1, LTR2, LTR3, and LTR4) as shown in Fig. 5. In the drive circuit DRVC2, the PWM drive signal SPWM is provided to the control terminals (RCT1, RCT2, RCT3, and RCT4) of the drive transistors (RTR1, RTR2, RTR3, and RTR4).
[0066] Fig. 7 is a diagram showing the current flow of the drive circuit in a drive sequence including a dead time period. In Fig. 7, the symbols "ON" and "OFF" respectively indicate the conduction and non-conduction of the drive transistors. Drive signals (A-phase signals in Fig. 6) for driving the A-phase coil CLA and the A / -phase coil CLA / are provided to drive transistors LTR1 and LTR4, respectively. Drive signals (A-phase signals obtained by inverting the A-phase signals in Fig. 6) for driving the A / -phase coil CLA / are provided to drive transistors LTR2 and LTR3, respectively.
[0067] In S101, the current CRT1 flows in the order of the drive transistor LTR1, the A-phase coil CLA, the A / -phase coil CLA / , and the drive transistor LTR4.
[0068] At S102, no current flows through any of the drive transistors and any of the coils, indicating that there is no shoot-through current.
[0069] In S103, the current CRT2 flows through the drive transistor LTR3, the A / -phase coil CLA / , the A-phase coil CLA, and the drive transistor LTR2 in this order.
[0070] In the stepping motor 51, the direction of the magnetic poles of the magnet MG (permanent magnet) cannot be changed, but each of the A-phase coil CLA, the A / -phase coil CLA / , the B-phase coil CLB, and the B / -phase coil CLB / shows a magnetic pole direction defined according to the direction of the drive current. Accordingly, there are various drive methods for pulse width modulation.
[0071] Figures 8 and 9 are diagrams showing exemplary driving sequences applicable to the driving circuit shown in Figure 5. Referring to Figure 8, a 1-phase excitation sequence is shown, which includes four steps (excluding the dead time phase). Referring to Figure 9, a 1-2 phase excitation sequence is shown, which includes eight steps (excluding the dead time phase).
[0072] A procedure for driving the stepping motor 51 using the PWM control device 11a and the PWM device 12a will be described.
[0073] Initially, the stepping motor is set to a stopped state. In the stopped state, the drive data generating circuit 17 or the control output circuit 31 provides a PWM control signal SDRV that makes all drive transistors non-conductive. A direction signal SDRCT that specifies the rotation direction of the stepping motor 51 is set to the PWM control device 11a and the PWM device 12a. A value is set in the register 21 according to the rotation speed of the stepping motor 51. An area of the semiconductor memory 41 is selected according to the drive sequence of the stepping motor 51.
[0074] Next, the PWM control device 11a is set to a start state in which the stepping motor 51 starts to rotate. The counter circuit 13 operates in response to the clock signal CLK to generate an output control signal SUPD. The drive data generation circuit 17 increments or decrements, for example, increments, the address of the semiconductor memory 41 in response to the output control signal SUPD. The drive data generation circuit 17 reads out data from the memory element 40 specified by the address register 43, and outputs the drive data DDATA.
[0075] When changing the rotation direction of the stepping motor 51, the direction signal SDRCT is changed. In response to the change in the direction signal SDRCT, the address of the semiconductor memory 41 is set to be decremented. When increasing the rotation speed of the stepping motor 51, the value of the register 21 is changed to a smaller value. When decreasing the rotation speed of the stepping motor 51, the value of the register 21 is changed to a larger value.
[0076] 1, 2 and 3 again, when the driving data DDATA for the dead time period is not prepared, the PWM device 12 and the PWM control devices 11, 11a, 11b can further include a dead time generation circuit 55. The dead time generation circuit 55 adds a dead time period to a signal defined by the driving data DDATA to generate a PWM driving signal SPWM. According to the PWM device 12, 12a, 12b and the PWM control devices 11, 11a, 11b, the dead time can be generated by a hardware circuit.
[0077] Fig. 10 is a diagram showing a PWM control device and a dead time generation circuit of the PWM device according to the present embodiment. Referring to Fig. 10, a circuit for generating a drive signal for driving the A-phase coil CLA and the A / phase coil CLA / is shown. Fig. 11 is a diagram showing waveforms of main nodes in the dead time generation circuit shown in Fig. 10.
[0078] Each of the storage locations 23 has a bit width that allows providing a positive phase and a negative phase (an inverse phase of the positive phase) to a drive target in PWM control. The drive data DDATA has values that form a positive phase signal A1IN and a negative phase signal A2IN to a drive target (e.g., object 33). As shown in Fig. 11, the positive phase signal A1IN and the negative phase signal A2IN transition to opposite logic values at approximately the same time.
[0079] The exemplary dead time generating circuit 61 may include one or more first shift registers 62b that receive the positive-phase signal A1IN and one or more second shift registers 62c that receive the negative-phase signal A2IN. The first shift register 62b and the second shift register 62c operate in response to, for example, a clock signal CLK. The first shift register 62b and the second shift register 62c generate a first shift signal A1SFT and a second shift signal A2SFT, respectively. The first shift signal A1SFT and the second shift signal A2SFT transition to opposite logic values at approximately the same time.
[0080] The dead time generation circuit 61 can further include a transition detection circuit 63 and a mask counter circuit 64. The transition detection circuit 63 detects transitions of the positive phase signal A1IN and the negative phase signal A2IN, and provides the mask counter circuit 64 with a start signal STRT.
[0081] The exemplary transition detection circuit 63 may include a first circuit 63a, a second circuit 63b, and a third circuit 63c. The first circuit 63a generates an exclusive OR between the positive-phase signal A1IN and the first shift signal A1SFT of the first shift register 62b. This operation can detect the transition of the positive-phase signal A1IN. The second circuit 63b generates an exclusive OR between the negative-phase signal A2IN and the second shift signal A2SFT of the second shift register 62c. This operation can detect the transition of the negative-phase signal A2IN. The third circuit 63c generates an exclusive OR between the positive-phase signal A1IN and the negative-phase signal A2IN. This operation can detect that the positive-phase signal A1IN and the negative-phase signal A2IN are in opposite phase to each other.
[0082] The transition detection circuit 63 has a fourth circuit 63d that generates a start signal STRT when the output value of the first circuit 63a is "H", the output value of the second circuit 63b is "H", and the output value of the third circuit 63c is "H". The transition detection circuit 63 provides the start signal STRT that defines the start of the dead time period to the mask counter circuit 64.
[0083] The dead time generating circuit 61 may include a first gate 65b and a second gate 65c, and in this embodiment, each of the first gate 65b and the second gate 65c may include a logical AND gate. The first gate 65b is connected to the output of the mask counter circuit 64 and the output of the first shift register 62b. The second gate 65c is connected to the output of the mask counter circuit 64 and the output of the second shift register 62c. The first gate 65b and the second gate 65c generate PWM control signals SDRV (A1OUT and A2OUT), respectively.
[0084] The mask counter circuit 64 generates a mask signal MSK that defines the dead time period. Specifically, the mask counter circuit 64 receives an initial value that defines the dead time period. The mask counter circuit 64 inverts its output value in response to a start signal STRT from the transition detection circuit 63, counts the clock signal CLK by the number of this initial value, and inverts its output value again. The period from the first inversion to the next inversion is used to generate the dead time period. The second change in the output of the mask counter circuit 64 defines the end of the dead time period.
[0085] The mask signal MSK is provided to a first gate 65b and a second gate 65c. However, at two adjacent times when the first shift signal A1SFT and the second shift signal A2SFT both transition, the changes in the outputs of the first gate 65b and the second gate 65c are different.
[0086] At one time, the first gate 65b and the second gate 65c operate as follows.
[0087] Specifically, the first gate 65b generates the PWM drive signal (A1OUT) in response to the transition of the first shift signal A1SFT, regardless of the output of the mask signal MSK from the mask counter circuit 64 (for example, a logical value "L").
[0088] On the other hand, the second gate 65c delays the transition of the second shift signal A2SFT in response to the output (e.g., logic value "L") of the mask signal MSK from the mask counter circuit 64 to generate a PWM drive signal (A2OUT). This provides the first dead time period DT1.
[0089] At the other time, the first gate 65b and the second gate 65c operate as follows.
[0090] Specifically, the second gate 65c generates the PWM drive signal (A2OUT) in response to the transition of the second shift signal A2SFT, regardless of the output of the mask signal MSK from the mask counter circuit 64 (for example, a logical value "L").
[0091] On the other hand, the first gate 65b delays the transition of the first shift signal A1SFT in response to the output (e.g., logic value "L") of the mask signal MSK from the mask counter circuit 64 to generate the PWM drive signal (A1OUT). This provides the second dead time period DT2.
[0092] The positive phase signal A1IN and the negative phase signal A2IN can be generated by, for example, a logic gate 66b and a logic gate 66c that receive the start / stop signal STRT / STP. The logic gate 66b and the logic gate 66c receive a signal related to the drive data DDATA. The logic gate 66b and the logic gate 66c can include, for example, a logical AND gate.
[0093] Fig. 12 is a diagram showing the main steps of a method for generating a PWM control signal using a PWM control device according to the present invention. Referring to Fig. 12, a control flow chart 100 is shown. In the following description, where possible, reference numerals already used will be used for ease of understanding.
[0094] The control flow chart 100 may include, for example, step ST101, step ST102, step ST103, and step ST104.
[0095] In step ST101, the number of clocks is counted using the counter circuit 13 which operates in response to the clock signal CLK.
[0096] In step ST102, in response to the reference value VREF associated with the modulation speed of the pulse width modulation matching the count value of the counter circuit 13, a reset signal SRST and an output update signal SUPD are generated.
[0097] In step ST103, the drive data generation circuit 17, which stores the drive data DDATA in the storage location 23 in sequence, updates the internal state of the drive data generation circuit 17 in response to the output update signal SUPD. The update of the internal state includes specifying the drive data DDATA to be output. Also, the drive data DDATA to be output in the updated internal state is output.
[0098] In step ST104, the counter circuit 13 is initialized in response to the reset signal SRST.
[0099] In the control flow chart 100, the drive data generating circuit 17 can include a plurality of memory elements 40 designated by addresses. The drive data DDATA is updated by updating the address value.
[0100] In control flow chart 100, updating the internal state may include updating an address value that points to the address of storage location 23 that is to be next read.
[0101] In the control flow chart 100, the storage locations 23 are connected in series to form a series connection 24 of storage locations 23. One end and the other end of the series connection 24 of storage locations 23 are connected to each other, thereby forming a closed circuit that can operate in a cyclical manner.
[0102] Updating the internal state involves moving each of the drive data DDATA in one direction or the other in the serial connections 24 of the storage locations 23 .
[0103] According to the present embodiment, there is provided a PWM controller 11, 11a, 11b, a PWM device 12, 12a, 12b and a method for generating a PWM control signal, which can easily change the period of a device controlled by pulse width modulation, for example the speed of a stepper motor.
[0104] A PWM control device according to a first aspect of this embodiment includes a counter circuit configured to count the number of clocks in response to a clock signal, a comparison circuit including a register for storing a reference value associated with a modulation speed of pulse width modulation, and configured to generate a reset signal and an output update signal in response to the count value of the counter circuit matching the reference value, and a drive data generation circuit having a plurality of storage locations corresponding to at least the number of control steps of the pulse width modulation, and configured to store drive data for the pulse width modulation in the storage locations, wherein the drive data generation circuit updates an internal state of the drive data generation circuit upon receiving the output update signal to identify the drive data to be output next and output the identified drive data, and the counter circuit is reset in response to the reset signal.
[0105] In a PWM control device of a second aspect according to the first aspect, the storage locations include semiconductor memories configured to store respective drive data in the control steps of the pulse width modulation, the storage locations being pointed to by respective addresses, and the drive data generation circuit may further include an address register that points to the address of the storage location to be accessed and is updated in response to receiving the output update signal, and an output circuit that outputs the drive data of the storage location pointed to by the address register.
[0106] In the PWM control device of the third aspect according to the second aspect, the semiconductor memory can include at least one of a ROM or a RAM.
[0107] In a PWM control device of a fourth aspect according to the second or third aspect, the number of storage locations and the addresses may be set to allow configuration of a dead-time phase that imparts a dead-time period to the control step.
[0108] In a PWM control device of a fifth aspect according to any one of the first to fourth aspects, the storage locations are connected in series to form a series connection of the storage locations, one end and the other end of the series connection of the storage locations are connected to each other, the drive data in the storage locations moves in either one direction in the series connection or a reverse direction different from the one direction in response to receiving the output update signal, and the drive data generation circuit further includes an output circuit, and the output circuit may be configured to be connected to one connection point of the series connection and to output the drive data from the one connection point.
[0109] In a PWM control device of a sixth aspect according to any one of the first to fifth aspects, the number of storage locations can be set to configure a dead time phase that imparts a dead time period to a control step of the pulse width modulation.
[0110] A PWM control device of a seventh aspect according to any one of the first to sixth aspects further includes a dead time generation circuit that adds a dead time period to a PWM control signal defined by the drive data based on the drive data from the drive data generation circuit, and the dead time generation circuit is capable of receiving the PWM control signal from the drive data generation circuit.
[0111] In the PWM control device of an eighth aspect according to the seventh aspect, each of the storage locations has a bit width that enables a positive phase signal and a negative phase signal for the positive phase signal to be provided to a device to be driven in the pulse width modulation, and the dead time generation circuit can include a first shift register and a second shift register that receive the positive phase signal and the negative phase signal, respectively; a transition detection circuit configured to detect a transition of the positive phase signal and a transition of the negative phase signal based on the positive phase signal, the negative phase signal, the first shift register, and the second shift register; a mask counter that starts counting in response to a signal from the transition detection circuit and generates a mask signal that defines an end of a dead time period; a first gate connected to an output of the mask counter and an output of the first shift register; and a second gate connected to an output of the mask counter and an output of the second shift register.
[0112] A PWM device of a ninth aspect according to this embodiment may include a PWM control device according to any one of the first to eighth aspects, a drive circuit connected to an output of the PWM control device, and a device connected to the drive circuit and driven by a signal from the drive circuit.
[0113] A PWM device of a tenth aspect according to the ninth aspect, the device may include a stepper motor.
[0114] A PWM device according to an eleventh aspect of the present embodiment is directed to a method for generating a PWM control signal. The eleventh aspect may be a disclosure according to any one of the first to tenth aspects. The eleventh aspect includes a drive data generating circuit that counts the number of clocks using a counter circuit that operates in response to a clock signal, generates a reset signal and an output update signal in response to the count value of the counter circuit matching a reference value associated with a modulation speed of pulse width modulation, and sequentially stores drive data in the control steps in a storage location corresponding to at least the number of control steps of the pulse width modulation, updates an internal state of the drive data generating circuit in response to the output update signal and outputs the drive data to be output in the updated internal state, and initializes the counter circuit in response to the reset signal, and the update of the internal state may include identifying the drive data to be output next from among the drive data.
[0115] In the PWM device of the twelfth aspect according to the eleventh aspect, the drive data generation circuit includes a plurality of memories designated by addresses, and the updating of the drive data can be performed by updating address values.
[0116] In a PWM device of a thirteenth aspect according to the eleventh aspect, the storage locations are connected in series to form a series connection of the storage locations, one end and the other end of the series connection are connected to each other, and updating the internal state may include moving each of the drive data in one direction in the series connection.
[0117] The present invention is not limited to the above-described embodiment, and various modifications can be made without departing from the spirit and scope of the present invention, all of which are included in the technical concept of the present invention. [Explanation of symbols]
[0118] 10 microcomputer, 11, 11a, 11b PWM control device, 12, 12a, 12b PWM device, 13 counter circuit, 15 comparison circuit, 17 drive data generation circuit, 17b input, 17c output, 21 register, 23 storage location, 24 serial connection, 25 first comparator, 26 movement controller, 27 counter register 30...drive circuit, 31...control output circuit, 33...object, 40...memory element, 41...semiconductor memory, 43...address register, 45...output circuit, 45b...input, 45c...output, 47...address updater, 48...sequence register, 49...second comparator, 50...PWM device, 51...stepping motor, 55...dead time generator circuit, 61...dead time generation circuit, 62b...shift register, 62c...shift register, 63...transition detection circuit, 64...mask counter circuit, A1IN...positive phase signal, A1SFT...first shift signal, A2IN...negative phase signal, A2SFT...second shift signal, ADD0...data, ADR...address, CLK...clock signal, CRT1, CRT2...current, DDATA...drive data, DRVC1...first drive circuit, DRVC2...second drive circuit, DT1, DT2...dead time period, SDRCT...direction signal, SDRV...PWM control signal, SPWM...PWM drive signal, SRST...reset signal, SUPD...output control signal, SUPD...output, update signal, VREF...reference value, SWRT...write signal.
Claims
1. a counter circuit configured to count the number of clocks in response to a clock signal; a comparison circuit including a register for storing a reference value associated with a modulation rate of pulse width modulation, the comparison circuit being configured to generate a reset signal and an output update signal in response to a count value of the counter circuit matching the reference value; a drive data generating circuit having a plurality of storage locations corresponding to at least a number of control steps of the pulse width modulation, the drive data of the pulse width modulation being configured to be stored in the storage locations; Equipped with the drive data generation circuit updates an internal state of the drive data generation circuit upon receiving the output update signal, specifies the drive data to be output next, and outputs the specified drive data; the counter circuit is reset in response to the reset signal. PWM control device.
2. The storage location includes a semiconductor memory configured to store each of the drive data in the control step of the pulse width modulation; The storage locations are indicated by respective addresses, The drive data generating circuit includes: an address register which points to the address of the storage location to be accessed and which is updated in response to receiving the output update signal; an output circuit that outputs the drive data in the storage location pointed to by the address register; Further comprising:
2. The PWM control device according to claim 1.
3. The semiconductor memory includes at least one of a ROM or a RAM.
3. A PWM control device according to claim 2.
4. The number of storage locations and the addresses are set so as to configure a dead time phase that provides a dead time period to the control step.
3. A PWM control device according to claim 2.
5. the storage locations are connected in series to form a series connection of the storage locations; one end and the other end of the series connection of the storage locations are connected to each other; the drive data in the storage location moves in one direction in the series connection or in a reverse direction different from the one direction in response to receiving the output update signal; the driving data generating circuit further includes an output circuit, the output circuit being connected to one connection point of the series connection and configured to output the driving data from the one connection point; 2. The PWM control device according to claim 1.
6. The number of storage locations is set so as to configure a dead time phase that provides a dead time period to the control step of the pulse width modulation.
6. A PWM control device according to claim 5.
7. a dead time generation circuit that adds a dead time period to a PWM control signal defined by the drive data based on the drive data from the drive data generation circuit; The dead time generation circuit receives the PWM control signal from the drive data generation circuit.
2. The PWM control device according to claim 1.
8. each of said storage locations has a bit width that allows providing a positive phase signal and a negative phase signal relative to said positive phase signal to a device to be driven in said pulse width modulation; The dead time generating circuit includes: a first shift register and a second shift register for receiving the positive phase signal and the negative phase signal, respectively; a transition detection circuit configured to detect a transition of the positive phase signal and a transition of the negative phase signal based on the positive phase signal, the negative phase signal, the first shift register, and the second shift register; a mask counter that starts counting in response to a signal from the transition detection circuit and generates a mask signal that defines an end of a dead time period; a first gate connected to an output of the mask counter and an output of the first shift register; a second gate connected to an output of the mask counter and an output of the second shift register; 8. The PWM control device of claim 7, comprising:
9. A PWM control device according to any one of claims 1 to 8; a drive circuit connected to an output of the PWM controller; a device connected to the drive circuit and driven by a signal from the drive circuit; Equipped with PWM device.
10. The apparatus includes a stepper motor.
10. The PWM device according to claim 9.
11. Counting the number of clocks using a counter circuit that operates in response to a clock signal; generating a reset signal and an output update signal in response to a count value of the counter circuit matching a reference value associated with a modulation rate of pulse width modulation; a drive data generating circuit for sequentially storing each drive data in the control steps in storage locations corresponding to at least the number of control steps of the pulse width modulation, updating an internal state of the drive data generating circuit in response to the output update signal and outputting the drive data to be output in the updated internal state; initializing the counter circuit in response to the reset signal; Equipped with said updating of said internal state includes identifying the next driving data to be output from among said driving data; A method for generating a PWM control signal.
12. the drive data generating circuit includes a plurality of memories designated by addresses; The updating of the driving data is performed by updating an address value.
12. The method of claim 11.
13. the storage locations are connected in series to form a series connection of the storage locations; One end and the other end of the series connection are connected to each other, updating the internal state includes moving each of the drive data in one direction in the series connection; 12. The method of claim 11.
Citation Information
Patent Citations
Game machine
JP2006212297A
Cited By
Data driving IC and display device
WO2026192312A1
