Motor-operated valve control device and motor-operated valve device

By directly measuring the drive shaft's rotation angle and using magnetic sensors, the electric valve control device addresses positioning inaccuracies caused by gear wear, ensuring precise valve operation.

WO2026126543A1PCT designated stage Publication Date: 2026-06-18FUJIKOKI CORP

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
FUJIKOKI CORP
Filing Date
2025-07-02
Publication Date
2026-06-18

Smart Images

  • Figure JP2025023827_18062026_PF_FP_ABST
    Figure JP2025023827_18062026_PF_FP_ABST
Patent Text Reader

Abstract

[Problem] To provide a motor-operated valve control device and a motor-operated valve device, by which the position of a valve element can be obtained more accurately. [Solution] A motor-operated valve device 1 comprises a motor-operated valve 2 and a control device 90. The motor-operated valve 2 includes: a valve body 10 having a valve port 14; a drive shaft 70 that moves in the direction of an axis L when rotated around the axis L; a stepping motor 84 having a rotor 51; a planetary gear mechanism 60 that transmits the rotation of the rotor 51 to the drive shaft 70; and a valve body 40 that faces the valve port 14, is in contact with the drive shaft 70, and moves in the direction of the axis L together with the drive shaft 70. The control device 90 obtains the rotation angle of the drive shaft 70.
Need to check novelty before this filing date? Find Prior Art

Description

Electric valve control device and electric valve device 【0001】 The present invention relates to an electric valve control device, and an electric valve device having the electric valve control device and an electric valve. 【0002】 Patent Document 1 discloses an example of a conventional electric valve. The electric valve of Patent Document 1 is controlled by an electric valve control device (control board). The electric valve has a valve body, a valve element, a stepping motor, a guide member, a drive shaft, and a gear mechanism. The valve body has a valve port. The valve element faces the valve port. The stepping motor has a magnetic rotor. The guide member has an internal thread and is attached to the valve body. The drive shaft has an external thread that is screwed into the internal thread. The gear mechanism transmits the rotation of the magnetic rotor to the drive shaft. When the drive shaft rotates about its axis, it moves in the axial direction. According to the movement of the drive shaft, the valve element approaches or moves away from the valve port. The electric valve control device has a sensor that outputs a signal according to the rotation angle of the magnetic rotor. The electric valve control device acquires the position of the valve element based on the rotation angle of the magnetic rotor. 【0003】 Japanese Unexamined Patent Application Publication No. 2020-180704 【0004】 Play is provided between the gears of the gear mechanism and between the gear mechanism and the drive shaft. When the magnetic rotor rotates in one direction and then rotates in the other direction, a section occurs in the rotation range of the magnetic rotor where the rotation of the magnetic rotor is not transmitted to the drive shaft due to the play. The electric valve control device inputs a pulse to the stepping motor in consideration of this section and positions the valve element at the target position. However, as the wear of members such as gears and screws progresses, the play increases and this section becomes larger. As a result, the electric valve control device may not be able to accurately acquire the position of the valve element. 【0005】 Therefore, an object of the present invention is to provide an electric valve control device and an electric valve device that can more accurately acquire the position of the valve element. 【0006】To achieve the above objective, an electric valve control device according to one aspect of the present invention is an electric valve control device for controlling an electric valve having a valve body having a valve port, a drive shaft that moves in the axial direction when rotated about an axis, a stepping motor having a magnet rotor, a gear mechanism that transmits the rotation of the magnet rotor to the drive shaft, and a valve body that faces the valve port in the axial direction, is in contact with or connected to the drive shaft, and moves in the axial direction together with the drive shaft, wherein the electric valve control device has a control unit that acquires the rotation angle of the drive shaft. 【0007】 In the present invention, it is preferable that the control unit acquires the rotation angle of the magnet rotor. 【0008】In the present invention, the valve body has a valve seat surrounding the valve opening, and when rotation of the magnet rotor in the closing direction is transmitted to the drive shaft, the drive shaft rotates in the valve closing direction, and the drive shaft and the valve body move closer to the valve opening, and when rotation of the magnet rotor in the opening direction is transmitted to the drive shaft, the drive shaft rotates in the valve opening direction, and the drive shaft and the valve body move away from the valve opening, and the control unit inputs a pulse to the stepping motor to rotate the magnet rotor in the closing direction and the drive shaft in the valve closing direction, and after the rotation of the magnet rotor in the closing direction is restricted, inputs a pulse to the stepping motor to rotate the magnet rotor in the opening direction. Preferably, the drive shaft is rotated in the valve opening direction, the restriction number is obtained based on the number of pulses input to the stepping motor from the time the rotation of the drive shaft in the valve closing direction is restricted until the rotation of the magnet rotor in the closing direction is restricted, the valve opening number is obtained based on the number of pulses input to the stepping motor from the time the magnet rotor starts rotating in the opening direction until the drive shaft starts rotating in the valve opening direction, and the correction number is obtained based on the number of pulses input to the stepping motor and the restriction number from the time the magnet rotor starts rotating in the opening direction until the drive shaft starts rotating in the valve opening direction. The restriction number is the number of pulses input to the stepping motor in the interval from the time the valve body contacts the valve seat until the rotation of the magnet rotor in the closing direction is restricted. The valve opening number is the number of pulses required to rotate the magnet rotor in the opening direction from a reference position where the rotation of the magnet rotor in the closing direction is restricted to a valve opening position where the valve body moves away from the valve seat. The correction number is the number of pulses input to the stepping motor in the section after the rotation direction of the magnet rotor has reversed and the rotation of the magnet rotor is not transmitted to the drive shaft. 【0009】In the present invention, it is preferable that when the rotation of the magnet rotor in the forward direction is transmitted to the drive shaft, the drive shaft rotates in a first direction, and when the rotation of the magnet rotor in the reverse direction is transmitted to the drive shaft, the drive shaft rotates in a second direction, and the control unit inputs pulses to the stepping motor to rotate the magnet rotor in the forward direction and the drive shaft in the first direction, and then inputs pulses to the stepping motor to rotate the magnet rotor in the reverse direction and the drive shaft in the second direction, and obtains a correction number based on the number of pulses input to the stepping motor from when the magnet rotor starts rotating in the reverse direction until when the drive shaft starts rotating in the second direction. The correction number is the number of pulses input to the stepping motor in the section in which the rotation of the magnet rotor is not transmitted to the drive shaft after the rotation direction of the magnet rotor has reversed. 【0010】 In the present invention, it is preferable that the valve body has a valve seat surrounding the valve opening, and when the rotation of the magnet rotor in the closing direction is transmitted to the drive shaft, the drive shaft rotates in the valve closing direction, the drive shaft and the valve body approach the valve opening, the control unit inputs pulses to the stepping motor to rotate the magnet rotor in the closing direction and the drive shaft in the valve closing direction, and obtains a restriction number based on the number of pulses input to the stepping motor from the time when the rotation of the drive shaft in the valve closing direction is restricted until the rotation of the magnet rotor in the closing direction is restricted. The restriction number is the number of pulses input to the stepping motor in the interval from when the valve body contacts the valve seat until the rotation of the magnet rotor in the closing direction is restricted. 【0011】In the present invention, it is preferable that the control unit obtains the number of valve openings based on the correction number and the restriction number. The number of valve openings is the number of pulses required to rotate the magnet rotor in the opening direction from a reference position where the rotation of the magnet rotor in the closing direction is restricted to an open position where the valve body moves away from the valve seat. 【0012】 In the present invention, it is preferable that the control unit notifies an external control device of warning information when the correction number exceeds the warning determination number. 【0013】 In the present invention, it is preferable that the electric valve has a drive magnet fixed to the drive shaft and a driven magnet that rotates about the axis, the driven magnet rotates in conjunction with the rotation of the drive magnet, the drive shaft and the drive magnet are arranged inside the valve body, the driven magnet is arranged outside the valve body, the electric valve control device is arranged outside the valve body and has a first magnetic sensor that detects the magnetism of the driven magnet, and the control unit acquires the rotation angle of the drive shaft based on the signal output by the first magnetic sensor. 【0014】 In the present invention, it is preferable that the electric valve has a detection magnet fixed to the drive shaft, the drive shaft and the detection magnet are arranged inside the valve body, the electric valve control device is arranged outside the valve body and has a first magnetic sensor that detects the magnetism of the detection magnet, and the control unit acquires the rotation angle of the drive shaft based on the signal output by the first magnetic sensor. 【0015】 In the present invention, it is preferable that the electric valve has a cylindrical case joined to the valve body, the magnet rotor is arranged inside the case, the electric valve control device is arranged outside the case and has a second magnetic sensor for detecting the magnetism of the magnet rotor, and the control unit acquires the rotation angle of the magnet rotor based on the signal output by the second magnetic sensor. 【0016】 To achieve the above objective, another embodiment of the present invention provides an electric valve device comprising the electric valve control device and the electric valve. 【0017】 According to the present invention, the control unit acquires the rotation angle of the drive shaft. The drive shaft is in contact with or connected to the valve body. Therefore, the rotation angle of the drive shaft reflects the position of the valve body more accurately than the rotation angle of the magnet rotor. Thus, by using the rotation angle of the drive shaft, the position of the valve body can be acquired more accurately. 【0018】 This is a cross-sectional view of an electric valve device according to one embodiment of the present invention. This is a cross-sectional view of the valve body assembly of the electric valve device. This is an enlarged cross-sectional view of a part of the electric valve device. This is a cross-sectional view along the line IV-IV in Figure 3. This is a diagram illustrating the magnetic pole arrangement of the drive magnet and driven magnet of the valve body assembly. This is a cross-sectional view along the line VI-VI in Figure 3. This is a diagram schematically showing the rotor and stator of the electric valve device. This is a diagram showing the connection relationship between the rotor, stator, motor driver, first magnetic sensor, second magnetic sensor and computer of the electric valve device. This is a diagram showing an example of the relationship between pulses and signals input to the motor driver. This is a diagram showing an example of the waveform of the current flowing through the stator. This is a flowchart showing an example of initialization processing performed by the electric valve control device of the electric valve device. This is a flowchart showing an example of initialization processing performed by the electric valve control device (continuation of Figure 11). This is a flowchart showing an example of valve opening degree changing processing performed by the electric valve control device. This is a cross-sectional view showing the configuration of a modified example of the electric valve device of Figure 1. 【0019】 Hereinafter, an electric valve device according to one embodiment of the present invention will be described with reference to Figures 1 to 14. The electric valve device according to this embodiment is used, for example, to control the refrigerant flow rate in a refrigeration cycle system such as an automobile air conditioner. 【0020】 As shown in Figures 1 to 3, the electric valve device 1 includes an electric valve 2 and an electric valve control device (hereinafter referred to as "control device 90"). 【0021】 The electric valve 2 comprises a valve body assembly 5 and a stator unit 8. 【0022】 The valve body assembly 5 includes a valve body 10, a can 30, a valve element 40, a drive mechanism 50, a drive magnet 76, and a driven magnet 77. 【0023】 The valve body 10 includes a main body member 11, a holder 20, and a valve body support member 25. 【0024】 The main body member 11 has a rectangular parallelepiped shape. The main body member 11 is made of a metal such as an aluminum alloy. The main body member 11 has a valve chamber 13, a valve port 14, a valve seat 15, a first passage 17, and a second passage 18. The valve port 14 is connected to the valve chamber 13. The valve port 14 is surrounded by the valve seat 15 in the valve chamber 13. The first passage 17 extends from the right side surface 11a of the main body member 11 to the valve port 14. The first passage 17 is connected to the valve chamber 13 via the valve port 14. The second passage 18 extends from the left side surface 11b of the main body member 11 to the valve chamber 13. The main body member 11 has a mounting hole 19. The mounting hole 19 is located on the upper surface 11c of the main body member 11. The inner circumferential surface of the mounting hole 19 is provided with an internal thread. The mounting hole 19 is connected to the valve chamber 13. The main body member 11 has an annular plane 19a. The annular plane 19a is located at the connection point between the mounting hole 19 and the valve chamber 13 in the main body member 11. 【0025】 The holder 20 includes a first member 21, a second member 22, and a connecting member 23. The first member 21 and the second member 22 are made of, for example, synthetic resin or a non-magnetic metal such as aluminum alloy or brass. In this specification, "non-magnetic" means the property of not becoming magnetized even when placed in a magnetic field (including the property of not becoming substantially magnetized). 【0026】 The first member 21 integrally comprises a base portion 21a and a support portion 21b. The base portion 21a and the support portion 21b each have a cylindrical shape. The outer diameter of the support portion 21b is smaller than the outer diameter of the base portion 21a. The support portion 21b is coaxially connected to the upper end of the base portion 21a. The first member 21 has a support surface 21f. The support surface 21f is an annular plane facing upward. The support surface 21f is located at the connection point between the base portion 21a and the support portion 21b in the first member 21. A male thread is provided on the outer circumferential surface of the base portion 21a. The male thread of the base portion 21a is screwed into the female thread of the mounting hole 19 of the main body member 11. The holder 20 is attached to the main body member 11 with a screw structure. 【0027】 The second member 22 has a cylindrical shape. The inner diameter of the second member 22 is smaller than the inner diameter of the support portion 21b of the first member 21. The second member 22 is coaxially joined to the upper end of the support portion 21b. The first member 21 and the second member 22 form an annular groove 24 with the outer circumferential surface of the support portion 21b as the bottom surface. 【0028】 The connecting member 23 has an annular shape. The base portion 21a of the first member 21 is positioned inside the connecting member 23, and the inner periphery of the connecting member 23 is joined to the base portion 21a. 【0029】 The valve support member 25 has a cylindrical shape. The upper part of the valve support member 25 is positioned in the mounting hole 19. The lower part of the valve support member 25 is press-fitted into the valve chamber 13. The outer circumferential surface of the valve support member 25 is provided with an annular plane 25a facing downwards. The annular plane 25a is in contact with the annular plane 19a of the main body member 11. 【0030】 The can 30 has a cylindrical shape. The can 30 is closed at the top and open at the bottom. The bottom end of the can 30 is joined to the outer edge of the connecting member 23. The can 30 is fixed to the valve body 10. The can 30 is a case that is attached to the valve body 10. The can 30 is made of a metal, such as non-magnetic stainless steel. 【0031】 The valve body 40 has a stem 41, a valve portion 42, a spring receiving portion 43, and a ball receiving portion 44. 【0032】 The stem 41 has a cylindrical shape. The stem 41 is positioned inside the valve body support member 25. The stem 41 is supported by the valve body support member 25 so as to be movable in the vertical direction (axis L direction). 【0033】 The valve portion 42 has an annular shape. The valve portion 42 is integrally formed with the stem 41 and is located at the lower end of the stem 41. The valve portion 42 protrudes radially outward from the outer circumferential surface of the stem 41. The valve portion 42 faces the valve opening 14 in the vertical direction. 【0034】The spring support portion 43 integrally comprises a main body portion 43a and a flange portion 43b. The main body portion 43a has a cylindrical shape. The outer diameter of the main body portion 43a is the same as the outer diameter of the stem 41. The main body portion 43a is coaxially joined to the upper end of the stem 41. The flange portion 43b has an annular shape. The flange portion 43b is located at the upper end of the main body portion 43a. The flange portion 43b protrudes radially outward from the outer circumferential surface of the main body portion 43a. 【0035】 The ball bearing portion 44 has a circular flat plate portion and a protrusion connected to the lower surface of the flat plate portion. A conical recess is provided on the upper surface of the flat plate portion. The protrusion is fitted into a hole provided in the main body portion 43a of the spring bearing portion 43. The ball bearing portion 44 is fixed to the spring bearing portion 43. 【0036】 As the valve portion 42 moves closer to or further away from the valve opening 14, the opening area of ​​the valve opening 14 changes steplessly (including substantially steplessly). When the valve portion 42 comes into contact with the valve seat 15, the opening area of ​​the valve opening 14 becomes 0 (fully closed). 【0037】 The drive mechanism 50 moves the valve body 40 in the vertical direction. The drive mechanism 50 includes a rotor 51, a connecting plate 52, a rotor shaft 53, a bearing member 54, a planetary gear mechanism 60, a guide member 68, a drive shaft 70, and a valve opening spring 75. 【0038】 The rotor 51 has a cylindrical shape. The outer diameter of the rotor 51 is smaller than the inner diameter of the can 30. The rotor 51 is rotatably positioned inside the can 30. A connecting plate 52 is joined to the upper end of the rotor 51. The connecting plate 52 has a disc shape and closes the upper end of the rotor 51. The connecting plate 52 rotates together with the rotor 51. The rotor shaft 53 passes through the center of the connecting plate 52. The rotor shaft 53 is rotatable relative to the connecting plate 52. The bearing member 54 rotatably supports the upper end of the rotor shaft 53. 【0039】The rotor 51 is a magnetic rotor having a plurality of N poles and a plurality of S poles. The plurality of N poles and the plurality of S poles are alternately arranged in the circumferential direction on the outer peripheral surface of the rotor 51. The plurality of N poles and the plurality of S poles extend in the vertical direction. 【0040】 The planetary gear mechanism 60 is a 3K type planetary gear mechanism. The planetary gear mechanism 60 may be, for example, a 2K-H type planetary gear mechanism. The planetary gear mechanism 60 is a speed reducer that reduces the rotation of the rotor 51. The electric valve 2 may have another type of gear mechanism that functions as a speed reducer instead of the planetary gear mechanism 60. 【0041】 The planetary gear mechanism 60 is disposed inside the rotor 51. The planetary gear mechanism 60 includes a gear case 61, a fixed ring gear 62, a sun gear 63, a plurality of planetary gears 64, a carrier 65, an output gear 66, and an output shaft 67. 【0042】 The gear case 61 has a cylindrical shape. The lower end of the gear case 61 is coaxially joined to the second member 22 of the holder 20. The fixed ring gear 62 is an internal gear. The fixed ring gear 62 is fixed to the upper end of the gear case 61. 【0043】 The sun gear 63 is integrally formed with the connecting plate 52 and is disposed on the lower surface of the connecting plate 52. The rotor shaft 53 passes through the sun gear 63. 【0044】 The carrier 65 has a disk shape. The rotor shaft 53 passes through the carrier 65. The carrier 65 is rotatable about the rotor shaft 53. The carrier 65 rotatably supports a plurality of planetary gears 64. 【0045】 The output gear 66 has a bottomed cylindrical shape. The output gear 66 is an internal gear. The upper parts of the plurality of planetary gears 64 are disposed between the fixed ring gear 62 and the sun gear 63, and the lower parts of the plurality of planetary gears 64 are disposed between the output gear 66 and the sun gear 63. 【0046】The output shaft 67 has a cylindrical shape. The upper part of the output shaft 67 is press-fitted into a hole provided at the bottom of the output gear 66. A slit 67a extending in the vertical direction is provided at the lower part of the output shaft 67. The output shaft 67 rotatably supports the lower end of the rotor shaft 53. The output shaft 67 is disposed inside the second member 22 of the holder 20. The output shaft 67 is rotatably supported by the second member 22. The output shaft 67 rotates together with the output gear 66. 【0047】 The sun gear 63 rotates together with the rotor 51. The rotation of the sun gear 63 is decelerated by the fixed ring gear 62, the plurality of planet gears 64, the carrier 65, and the output gear 66 and transmitted to the output shaft 67. 【0048】 The guide member 68 has a cylindrical shape. The guide member 68 is disposed inside the base portion 21a of the first member 21 of the holder 20. The guide member 68 is fixed to the first member 21. The guide member 68 has an internal thread 68c. The internal thread 68c is disposed on the inner peripheral surface of the guide member 68. 【0049】 The drive shaft 70 integrally has a first portion 71, a second portion 72, and a third portion 73. The drive shaft 70 is made of, for example, synthetic resin or a metal such as non-magnetic stainless steel. 【0050】 The first portion 71 has a cylindrical shape. The first portion 71 has an external thread 71c. The external thread 71c is disposed on the outer peripheral surface of the first portion 71. The external thread 71c is screwed into the internal thread 68c of the guide member 68. A conical recess is provided on the lower end surface of the first portion 71. The drive shaft 70 has a ball 74. The ball 74 is joined to the recess of the first portion 71. The ball 74 slidably contacts the recess of the flat plate portion of the ball receiver 44. 【0051】 The second portion 72 has a quadrangular prism shape. The lower end of the second portion 72 is connected to the upper end of the first portion 71. 【0052】The third portion 73 has a rectangular flat plate shape. The lower end of the third portion 73 is connected to the upper end of the second portion 72. The thickness of the third portion 73 is the same as the width of the slit 67a of the output shaft 67. The third portion 73 is positioned inside the slit 67a. The slit 67a and the third portion 73 transmit the rotation of the output shaft 67 to the drive shaft 70, while allowing the drive shaft 70 to move vertically relative to the output shaft 67. 【0053】 In this embodiment, the drive shaft 70 is in contact with the valve body 40. The drive shaft 70 may be connected to the valve body 40. The drive shaft 70 may be integrally connected to the valve body 40, or it may be connected via a coupling member so as to move vertically together with the valve body 40. 【0054】 The valve opening spring 75 is positioned between the valve body support member 25 and the flange portion 43b of the valve body 40. The valve opening spring 75 is a compression coil spring. The valve opening spring 75 pushes the valve body 40 upward (away from the valve opening 14). 【0055】 There is some play between the gears of the planetary gear mechanism 60, and between the output shaft 67 and the drive shaft 70 (between the slit 67a and the third part 73). 【0056】 The drive magnet 76 has an annular shape. The outer edge of the drive magnet 76 is circular, and the inner edge is square. The outer diameter of the drive magnet 76 is slightly smaller than the inner diameter of the support portion 21b of the first member 21 of the holder 20. The drive magnet 76 is positioned inside the support portion 21b. The drive magnet 76 has semicircular portions 761 and 762 demarcated by a diameter. In the semicircular portion 761, one north pole and one south pole are arranged sequentially from the radially inside to the radially outside, and in the semicircular portion 762, one south pole and one north pole are arranged sequentially from the radially inside to the radially outside. The second portion 72 of the drive shaft 70 is positioned inside the drive magnet 76. The drive magnet 76 is fixed to the drive shaft 70. The drive magnet 76 rotates together with the drive shaft 70. The drive magnet 76 rotates about axis L. The drive magnet 76 is a permanent magnet. 【0057】The driven magnet 77 has an annular shape. The outer edge of the driven magnet 77 is circular, and the inner edge is also circular. The outer diameter of the driven magnet 77 is slightly smaller than the inner diameter of the can 30. The inner diameter of the driven magnet 77 is the same as the outer diameter of the support portion 21b of the first member 21 of the holder 20. The support portion 21b is located inside the driven magnet 77. The inner edge of the driven magnet 77 is located in the annular groove 24. The driven magnet 77 has semicircular arc portions 771 and 772, which are divided by diameter. In the semicircular arc portion 771, one north pole and one south pole are arranged sequentially from the radial inside to the outside, and in the semicircular arc portion 772, one south pole and one north pole are arranged sequentially from the radial inside to the outside. The lower surface of the driven magnet 77 is slidably in contact with the support surface 21f of the first member 21. The driven magnet 77 is rotatably positioned between the support portion 21b and the can 30 around the axis L. The driven magnet 77 is a permanent magnet. 【0058】 Figure 5 shows the magnetic pole arrangement of the drive magnet 76 and driven magnet 77 of the electric valve 2. Figure 5A is a plan view of the drive magnet 76 and driven magnet 77. Figure 5B is a cross-sectional view along the line VB-VB in Figure 5A. The drive magnet 76 is positioned inside the driven magnet 77. The driven magnet 77 surrounds the drive magnet 76. The driven magnet 77 is radially aligned with the drive magnet 76, with the support portion 21b of the first member 21 of the holder 20 in between. The driven magnet 77 may also be positioned with a vertical gap between it and the drive magnet 76. The drive magnet 76 and the driven magnet 77 are magnetically coupled. The driven magnet 77 rotates around the axis L in conjunction with the rotation of the drive magnet 76. Furthermore, regarding the magnetic pole arrangement of the drive magnet 76 and the driven magnet 77, a different arrangement from that shown in Figure 5 may be adopted, as long as the drive magnet 76 and the driven magnet 77 are magnetically coupled and the driven magnet 77 rotates around axis L in conjunction with the rotation of the drive magnet 76. Also, the drive magnet 76 is not limited to having an annular shape. 【0059】 The stator unit 8 comprises a stator 80 and a housing 85. 【0060】 The stator 80 has a cylindrical shape. The stator 80 includes an A-phase stack 81 and a B-phase stack 82. 【0061】 The A-phase stack 81 has a plurality of claw-pole type pole teeth 81a, 81b and an A-phase coil 81c. The pole teeth 81a and 81b are arranged alternately at equal angular intervals in the circumferential direction. When current is supplied to the A-phase coil 81c, the pole teeth 81a and 81b become magnetic poles of opposite polarity. 【0062】 The B-phase stack 82 has a plurality of claw-pole type pole teeth 82a, 82b and a B-phase coil 82c. The pole teeth 82a and 82b are arranged alternately at equal angular intervals in the circumferential direction. When current is supplied to the B-phase coil 82c, the pole teeth 82a and 82b become magnetic poles of opposite polarity. The B-phase stack 82 has the same configuration as the A-phase stack 81. The A-phase stack 81 is arranged coaxially on top of the B-phase stack 82. 【0063】 A cann 30 is positioned inside the stator 80. A rotor 51 is positioned inside the cann 30. The magnetic poles of the rotor 51 and the pole teeth 81a, 81b, 82a, and 82b of the stator 80 face each other radially with the cann 30 in between. The rotor 51 and stator 80 together constitute a stepping motor 84. 【0064】 The housing 85 is made of synthetic resin. The housing 85 has a peripheral wall portion 86, an upper wall portion 87, a case portion 88, and a lid portion 89. The peripheral wall portion 86 has a cylindrical shape. The stator 80 is embedded in the peripheral wall portion 86. The upper wall portion 87 has a dome shape. The upper wall portion 87 is connected to the upper end of the peripheral wall portion 86. The case portion 88 has a rectangular tubular shape. The case portion 88 extends laterally from the peripheral wall portion 86 (in a direction perpendicular to the axis L). The lid portion 89 is joined to the tip of the case portion 88. 【0065】 In the electric valve 2, the valve port 14, holder 20, valve body support member 25, can 30, valve body 40, rotor 51, connecting plate 52, rotor shaft 53, sun gear 63, output shaft 67, guide member 68, drive shaft 70, drive magnet 76, driven magnet 77, and stator 80 each have their central axes coincide with the axis L. 【0066】The control device 90 is connected to an external control device that controls the refrigeration cycle system. The control device 90 controls the electric valve 2 based on commands received from the external control device. The control device 90 is located in the inner space of the case portion 88 of the housing 85. 【0067】 The control device 90 includes a first sensor board 91, a second sensor board 92, and a main board 93. The first sensor board 91 is positioned below the stator 80 and perpendicular to the axis L. The second sensor board 92 is positioned above the stator 80 and perpendicular to the axis L. The main board 93 is parallel to the axis L. 【0068】 A first magnetic sensor 96 is mounted on the first sensor substrate 91. The first magnetic sensor 96 and the outer surface of the driven magnet 77 face each other radially, with the can 30 and the peripheral wall portion 86 of the housing 85 in between. The first magnetic sensor 96 detects the magnetism of the driven magnet 77. The first magnetic sensor 96 outputs an analog signal indicating the rotation angle of the magnetic field generated by the driven magnet 77 (i.e., the rotation angle of the drive shaft 70). In Figure 4, the first sensor substrate 91 and the first magnetic sensor 96 are shown by dotted lines. 【0069】 A second magnetic sensor 97 is mounted on the second sensor substrate 92. The second magnetic sensor 97 consists of Hall ICs 97a and 97b. The Hall ICs 97a and 97b and the outer surface of the rotor 51 face each other radially, with the can 30 and the peripheral wall portion 86 of the housing 85 in between. The second magnetic sensor 97 detects the magnetism of the rotor 51. The second magnetic sensor 97 outputs a binary signal corresponding to the direction of the magnetic field generated by the rotor 51. In Figure 6, the second sensor substrate 92 and the Hall ICs 97a and 97b are shown by dotted lines. 【0070】 The Hall IC97a is positioned on a straight line M1 extending radially from the axis L. The Hall IC97b is positioned on a straight line M2 extending radially from the axis L. When α is the angle between adjacent north and south poles in the rotor 51, and N is a natural number, it is preferable that the angle θ between the straight line M1 and the straight line M2 satisfies the following equation: θ = Nα + (α / 2) 【0071】 In this embodiment, N = 1, α = 15 degrees, and θ = 22.5 degrees. In this configuration, when Hall IC 97a faces the center of the magnetic pole (N pole or S pole) of the rotor 51, Hall IC 97b faces the point on the outer surface of the rotor 51 between adjacent N poles and S poles. When Hall IC 97b faces the center of the magnetic pole of the rotor 51, Hall IC 97a faces the point on the outer surface of the rotor 51 between adjacent N poles and S poles. Therefore, the timing of the change in the signal of Hall IC 97a and the timing of the change in the signal of Hall IC 97b are different, and the rotation angle and rotation direction of the rotor 51 can be obtained based on these signals. 【0072】 The main board 93 is connected to the first sensor board 91, the second sensor board 92, the A-phase coil 81c, the B-phase coil 82c, and connector terminals. The main board 93 also has a motor driver 94 and a computer 95 mounted on it. The motor driver 94 and computer 95 are not shown in Figure 1. 【0073】 The motor driver 94 is connected to terminals A1 and A2 of the A-phase coil 81c and terminals B1 and B2 of the B-phase coil 82c. The motor driver 94 supplies A-phase current to the A-phase coil 81c and B-phase current to the B-phase coil 82c. 【0074】 Computer 95 is a microcontroller that integrates a CPU, memory, input / output interface, and analog-to-digital converter into a single package. Computer 95 may also include a motor driver 94. Computer 95 is the control unit. 【0075】 The computer 95 obtains the rotation angle (rotational position) of the drive shaft 70 based on the signal output by the first magnetic sensor 96. The computer 95 also obtains the rotation angle (rotational position) of the rotor 51 based on the signal output by the second magnetic sensor 97. 【0076】The control device 90 controls the stepping motor 84 using a two-phase excitation method. When the control device 90 inputs pulses P (P[1] to P[4]) to the stepping motor 84, the rotor 51 rotates. Specifically, the computer 95 inputs pulses P (pulse signals) to the motor driver 94, and the motor driver 94 supplies a current corresponding to the pulses P to the stator 80, causing the rotor 51 to rotate. In this specification, "inputting pulses P to the stepping motor 84" is synonymous with "supplying a current corresponding to the pulses P to the stator 80". The stepping motor 84 may also be controlled using a one-phase excitation method, a one-to-two-phase excitation method, a W1-to-two-phase excitation method, a 2W1-to-two-phase excitation method, or a 4W1-to-two-phase excitation method. 【0077】 The computer 95 inputs a step signal (STEP) and a direction signal (DIR) to the motor driver 94. The step signal is a pulse signal. When the motor driver 94 receives a direction signal corresponding to the closing direction (e.g., an H-level signal), inputting the step signal corresponds to inputting pulses P to the stepping motor 84 in ascending order (P[1] to P[4]). When the motor driver 94 receives a direction signal corresponding to the opening direction (e.g., an L-level signal), inputting the step signal corresponds to inputting pulses P to the stepping motor 84 in descending order (P[4] to P[1]). Figure 9 schematically shows an example of the relationship between the pulses P input to the stepping motor 84 and the step signal and direction signal input to the motor driver 94. 【0078】 The computer 95 inputs a current control signal (CTRL) to the motor driver 94. The current control signal is a signal used to set the magnitude of the current supplied to the stator 80 in the motor driver 94. 【0079】Figure 10 shows examples of waveforms for the A-phase current flowing through the A-phase coil 81c and the B-phase current flowing through the B-phase coil 82c. In Figure 10, +Ir represents the A-phase current flowing from terminal A1 to terminal A2, or the B-phase current flowing from terminal B1 to terminal B2, and -Ir represents the A-phase current flowing from terminal A2 to terminal A1, or the B-phase current flowing from terminal B2 to terminal B1. The A-phase current and B-phase current are rectangular waves that alternate between "-Ir" and "+Ir". 【0080】 When the control device 90 inputs pulses P to the stepping motor 84 in ascending order and cyclically, the rotor 51 rotates in the closing direction (clockwise in Figure 7). The rotation of the rotor 51 is transmitted to the drive shaft 70 by the planetary gear mechanism 60. The drive shaft 70 rotates in the valve closing direction. When the drive shaft 70 rotates in the valve closing direction, the drive shaft 70 moves downward due to the lead screw action. The drive shaft 70 pushes the valve body 40 downward. As the valve body 40 moves downward, the valve portion 42 approaches the valve seat 15. When the valve portion 42 contacts the valve seat 15, the valve opening 14 closes, restricting the downward movement of the valve body 40 and restricting the rotation of the drive shaft 70 in the valve closing direction. At this time, the position of the rotor 51 is the valve closed position Rc. As the rotor 51 rotates further in the closing direction, the valve body 40 is pressed against the valve seat 15, causing the gears of the planetary gear mechanism 60 and other components such as the drive shaft 70 to elastically deform in response to the torque of the stepping motor 84. When the restoring force of the elastic deformation balances with the torque, the rotation of the rotor 51 in the closing direction is restricted. At this time, the position of the rotor 51 is the reference position Rx. 【0081】When the control device 90 inputs pulses P to the stepping motor 84 in a descending, cyclical manner, the rotor 51 rotates in the opening direction (counterclockwise in Figure 7). The rotation of the rotor 51 is transmitted to the drive shaft 70 by the planetary gear mechanism 60. The drive shaft 70 rotates in the valve opening direction. When the drive shaft 70 rotates in the valve opening direction, the drive shaft 70 moves upward due to the lead screw action. The valve body 40, pushed by the valve opening spring 75, moves upward, the valve part 42 separates from the valve seat 15, and the valve port 14 opens. The position of the rotor 51 when the valve part 42 separates from the valve seat 15 is defined as the valve opening position Ro. The valve opening position Ro may be the position of the rotor 51 immediately after the valve part 42 separates from the valve seat 15, or it may be a position a distance (angle) corresponding to several pulses P from the last position of the rotor 51 when the valve part 42 was in contact with the valve seat 15. When the rotor 51 rotates further in the opening direction to the fully open position Rz, the valve portion 42 is furthest from the valve seat 15. The number of pulses P required to rotate the rotor 51 from the fully open position Rz to the reference position Rx is called the full stroke number. The full stroke number is, for example, 1500. When the refrigerant flow rate is controlled using the electric valve 2, the position of the rotor 51 is controlled within the range from the open position Ro to the fully open position Rz. 【0082】 The memory of computer 95 stores a valve opening data table. In the valve opening data table, the position of the rotor 51 is associated with the valve opening of the electric valve 2. The position of the rotor 51 is indicated by the number of pulses P input to the motor driver 94. The number of pulses P input to the motor driver 94 when the rotor 51 is in the reference position Rx is set to 0, and the number of pulses P input to the motor driver 94 when the rotor 51 is in the fully open position Rz is set to 1500. The number of pulses P and the valve opening are proportional. When the number of pulses P is 0 (when the rotor 51 is in the reference position Rx), the valve opening is 0%. When the number of pulses P is 150, the valve opening is 10%. When the number of pulses P is 750, the valve opening is 50%. When the number of pulses P is 1500 (when the rotor 51 is in the fully open position Rz), the valve opening is 100%. 【0083】Next, the initialization process performed by the control device 90 (computer 95) will be explained with reference to Figures 11 and 12. 【0084】 The control device 90 starts the initialization process when it detects, for example, a stepping motor 84 losing step or an unexpected power loss. The control device 90 also starts the initialization process when it receives an initialization command from an external control device. Before starting the initialization process, the control device 90 sets the regulation counter Cr and the valve opening counter Co to "0". 【0085】 The control device 90 inputs pulses P to the stepping motor 84 in ascending order (S110). In step S110, one pulse P is input to the stepping motor 84. 【0086】 The control device 90 acquires the rotation angle of the drive shaft 70 based on the signal output by the first magnetic sensor 96 (S120). 【0087】 The control device 90 obtains the rotation angle of the rotor 51 based on the signal output by the second magnetic sensor 97 (S130). 【0088】 The control device 90 uses the rotation angle of the rotor 51 to determine whether or not the rotation of the rotor 51 in the closing direction is restricted (S140). The control device 90 determines that the rotation of the rotor 51 in the closing direction is not restricted when the rotation angle of the rotor 51 changes in the closing direction in response to the input of pulse P to the stepping motor 84. The control device 90 determines that the rotation of the rotor 51 in the closing direction is restricted when the rotation angle of the rotor 51 does not change in the closing direction in response to the input of pulse P to the stepping motor 84. 【0089】The control device 90 uses the rotation angle of the drive shaft 70 to determine whether or not the rotation of the drive shaft 70 in the valve closing direction is restricted (S150). The control device 90 determines that the rotation of the drive shaft 70 in the valve closing direction is not restricted when the rotation angle of the drive shaft 70 changes in the valve closing direction in response to the input of pulse P to the stepping motor 84. The control device 90 determines that the rotation of the drive shaft 70 in the valve closing direction is restricted when the rotation angle of the drive shaft 70 does not change in the valve closing direction in response to the input of pulse P to the stepping motor 84. 【0090】 When the rotation of the rotor 51 in the closing direction is not restricted and the rotation of the drive shaft 70 in the valve closing direction is not restricted (N in S140, N in S150), the control device 90 continues to input pulse P to the stepping motor 84 (S110). 【0091】 When the rotation of the rotor 51 in the closing direction is not restricted and the rotation of the drive shaft 70 in the valve closing direction is restricted (N in S140, Y in S150), the control device 90 increments the restriction counter Cr by 1 (S160) and continues to input pulse P to the stepping motor 84 (S110). 【0092】 When the rotation of the rotor 51 in the closing direction is restricted (Y in S140), the control device 90 acquires the number indicated by the restriction counter Cr as the restriction number Nr (S170). When the rotation of the rotor 51 in the closing direction is restricted, the rotor 51 is in the reference position Rx. The restriction number Nr is the number of pulses P input to the stepping motor 84 in the section from when the valve body 40 contacts the valve seat 15 until the rotation of the rotor 51 in the closing direction is restricted. This section is part of the rotation range of the rotor 51. The restriction number Nr may also be a number obtained by appropriately increasing or decreasing the number indicated by the restriction counter Cr. 【0093】 The control device 90 inputs pulses P to the stepping motor 84 in descending order (S210). In step S210, one pulse P is input to the stepping motor 84. 【0094】 The control device 90 acquires the rotation angle of the drive shaft 70 based on the signal output by the first magnetic sensor 96 (S220). 【0095】The control device 90 obtains the rotation angle of the rotor 51 based on the signal output by the second magnetic sensor 97 (S230). 【0096】 The control device 90 uses the rotation angle of the drive shaft 70 to determine whether or not the drive shaft 70 has started rotating in the valve-opening direction (S240). The control device 90 determines that the drive shaft 70 has started rotating in the valve-opening direction when the rotation angle of the drive shaft 70 changes in the valve-opening direction in response to the input of a pulse P to the stepping motor 84. The control device 90 determines that the drive shaft 70 has not started rotating in the valve-opening direction when the rotation angle of the drive shaft 70 does not change in the valve-opening direction in response to the input of a pulse P to the stepping motor 84. 【0097】 The control device 90 uses the rotation angle of the rotor 51 to determine whether or not the rotor 51 has started rotating in the opening direction (S250). The control device 90 determines that the rotor 51 has started rotating in the opening direction when the rotation angle of the rotor 51 changes in the opening direction in response to the input of pulse P to the stepping motor 84. The control device 90 determines that the rotor 51 has not started rotating in the opening direction when the rotation angle of the rotor 51 does not change in the opening direction in response to the input of pulse P to the stepping motor 84. 【0098】 When the drive shaft 70 has not started rotating in the valve-opening direction and the rotor 51 has not started rotating in the opening direction (N in S240, N in S250), the control device 90 continues to input pulse P to the stepping motor 84 (S210). 【0099】 When the drive shaft 70 has not yet started rotating in the valve-opening direction and the rotor 51 has started rotating in the opening direction (N in S240, Y in S250), the control device 90 increments the valve-opening counter Co by 1 (S260) and continues to input pulse P to the stepping motor 84 (S210). 【0100】The control device 90 acquires a correction number Nh (S270) when the drive shaft 70 starts rotating in the valve opening direction (Y in S240). The correction number Nh is the number obtained by subtracting the restriction number Nr from the number indicated by the valve opening counter Co (Nh = Co - Nr). The correction number Nh is the number of pulses P input to the stepping motor 84 in the section after the rotation direction of the rotor 51 has reversed but the rotation of the rotor 51 is not transmitted to the drive shaft 70. This section is part of the rotation range of the rotor 51. The correction number Nh is the number of pulses P corresponding to the play of the drive mechanism 50. The correction number Nh may also be a number obtained by appropriately increasing or decreasing the number obtained by subtracting the restriction number Nr from the number indicated by the valve opening counter Co. 【0101】 The control device 90 obtains the valve opening number No. (S280). The valve opening number No. is the number shown by the valve opening counter Co plus a number Na (No = Co + Na). The valve opening number No. is the number of pulses P required to rotate the rotor 51 in the opening direction from the reference position Rx to the valve opening position Ro. The number Na is set appropriately according to the configuration of the electric valve 2, for example. The number Na is, for example, 1 to 10. 【0102】 The control device 90 positions the rotor 51 at the reference position Rx (S290). Specifically, if Co is the number indicated by the valve opening counter Co, the control device 90 inputs Co pulses P to the stepping motor 84 in ascending order. Then, the control device 90 sets the current valve opening to 0% and ends the initialization process. 【0103】 In step S290, the control device 90 may, after positioning the rotor 51 at the reference position Rx, input pulses P of the restoration number Ns in descending order to the stepping motor 84. The restoration number Ns is any number from 1 to the regulation number Nr. By doing so, the elastic deformation of the gears and drive shaft 70 and other components of the planetary gear mechanism 60 is reduced compared to when the rotor 51 is at the reference position Rx. As a result, the stress applied to the valve body 40 can be reduced while maintaining contact with the valve seat 15. 【0104】In step S290, the control device 90 may position the rotor 51 in the open valve position Ro. In this case, the control device 90 inputs Na pulses P to the stepping motor 84 in descending order. This positions the rotor 51 in the open valve position Ro. The control device 90 then sets the valve opening degree corresponding to the open valve position Ro as the current valve opening degree and terminates the initialization process. 【0105】 In step S140, when the control device 90 determines that the rotation of the rotor 51 in the closing direction is restricted without the drive shaft 70 rotating in the valve closing direction (Y in S140), it is estimated that the rotor 51 was at or near the reference position Rx at the start of the initialization process. In this case, the control device 90 inputs Nk pulses P in descending order and then restarts the initialization process. Nk is a number greater than the number of valve openings No. 【0106】 The control device 90 may acquire a correction number Nh when it receives a correction number acquisition command from an external control device. 【0107】For example, when the control device 90 receives a command to acquire a correction number, it determines whether the current valve opening is 50% or more. (1) When the current valve opening is 50% or more, the control device 90 inputs pulses P to the stepping motor 84 in ascending order to rotate the rotor 51 in the closing direction and the drive shaft 70 in the valve closing direction, and then inputs pulses P to the stepping motor 84 in descending order to rotate the rotor 51 in the opening direction and the drive shaft 70 in the valve opening direction. The control device 90 acquires a correction number Nh based on the number of pulses P input to the stepping motor 84 from the time the rotor 51 starts rotating in the opening direction until the time the drive shaft 70 starts rotating in the valve opening direction. In this case, the closing direction is the positive direction, the valve closing direction is the first direction, the opening direction is the reverse direction, and the valve opening direction is the second direction. (2) When the current valve opening is less than 50%, the control device 90 inputs pulses P in descending order to the stepping motor 84 to rotate the rotor 51 in the opening direction and the drive shaft 70 in the valve opening direction, and then inputs pulses P in ascending order to the stepping motor 84 to rotate the rotor 51 in the closing direction and the drive shaft 70 in the valve closing direction. The control device 90 obtains a correction number Nh based on the number of pulses P input to the stepping motor 84 from the time the rotor 51 starts rotating in the closing direction until the time the drive shaft 70 starts rotating in the valve closing direction. In this case, the opening direction is the positive direction, the valve opening direction is the first direction, the closing direction is the reverse direction, and the valve closing direction is the second direction. 【0108】 The control device 90 may obtain the regulation number Nr and the correction number Nh through separate processes, and obtain the valve opening number No based on these regulation number Nr and correction number Nh. For example, the valve opening number No may be the sum of the regulation number Nr, the correction number Nh, and the number Na (No = Nr + Nh + Na). 【0109】 Next, the valve opening change process executed by the control device 90 when it receives a valve opening change command from an external control device will be explained with reference to Figure 13. The valve opening change command includes a target valve opening. The memory of the computer 95 stores information indicating the previous rotation direction of the rotor 51. 【0110】The control device 90 receives a valve opening change command from an external control device (S310). The control device 90 obtains the number of pulses P corresponding to the target valve opening included in the valve opening change command (target number Nt) from the valve opening data table (S320). The control device 90 obtains the number of pulses P corresponding to the current valve opening (current number Np) from the valve opening data table (S330). The control device 90 obtains the difference value (absolute value) between the target number Nt and the current number Np as the control number Nc (S340). 【0111】 The control device 90 obtains the current rotation direction of the rotor 51 (S350). Specifically, when the target number Nt is less than the current number Np, the control device 90 obtains "closed direction" as the current rotation direction of the rotor 51, and when the target number Nt is equal to or greater than the current number Np, it obtains "open direction" as the current rotation direction of the rotor 51. 【0112】 The control device 90 determines whether the rotation direction of the rotor 51 has reversed (S360). Specifically, the control device 90 determines that the rotation direction of the rotor 51 has reversed if the current rotation direction of the rotor 51 is different from the previous rotation direction of the rotor 51. The control device 90 determines that the rotation direction of the rotor 51 has not reversed if the current rotation direction of the rotor 51 is the same as the previous rotation direction of the rotor 51. After the determination in step S360, the control device 90 stores the current rotation direction of the rotor 51 as the previous rotation direction of the rotor 51 in the memory of the computer 95. 【0113】 When the control device 90 determines that the rotation direction of the rotor 51 has reversed (Y in S360), it adds a correction number Nh to the control number Nc (S370). The control device 90 sets the sum of the control number Nc and the correction number Nh as the new control number Nc. When the rotation direction of the rotor 51 reverses, there is a period in which the rotation of the rotor 51 is not transmitted to the drive shaft 70. Therefore, the control device 90 can correctly position the rotor 51 at the position corresponding to the target valve opening by adding a correction number Nh, which is the number of pulses P corresponding to that period, to the control number Nc. 【0114】When the rotor 51 is currently rotating in the closing direction (Y in S380), the control device 90 inputs pulses P of control number Nc in ascending order to the stepping motor 84 to rotate the rotor 51 in the closing direction (S390). When the rotor 51 is currently rotating in the opening direction (N in S380), the control device 90 inputs pulses P of control number Nc in descending order to the stepping motor 84 to rotate the rotor 51 in the opening direction (S400). This positions the rotor 51 to a position corresponding to the target valve opening. The control device 90 then sets the target valve opening as the current valve opening and terminates the valve opening change process. 【0115】 As described above, the electric valve device 1 comprises an electric valve 2 and a control device 90. The electric valve 2 comprises a valve body 10 having a valve port 14, a drive shaft 70 that moves in the direction of axis L when rotated around axis L, a stepping motor 84 having a rotor 51, a planetary gear mechanism 60 that transmits the rotation of the rotor 51 to the drive shaft 70, and a valve body 40 that faces the valve port 14 in the direction of axis L, is in contact with the drive shaft 70, and moves in the direction of axis L together with the drive shaft 70. The control device 90 (computer 95) acquires the rotation angle of the drive shaft 70. The rotation angle of the drive shaft 70 reflects the position of the valve body 40 more accurately than the rotation angle of the rotor 51. Therefore, the control device 90 can acquire the position of the valve body 40 more accurately by using the rotation angle of the drive shaft 70. 【0116】 Furthermore, the control device 90 acquires the rotation angle of the rotor 51. In this way, the control device 90 can acquire the difference between the rotation of the rotor 51 and the rotation of the drive shaft 70, and can move the valve body 40 taking this difference into consideration. For example, the control device 90 can acquire the number of pulses P corresponding to the difference between the timing at which the rotation of the drive shaft 70 is restricted and the timing at which the rotation of the rotor 51 is restricted, and the number of pulses P corresponding to the difference between the timing at which the rotor 51 starts rotating and the timing at which the drive shaft 70 starts rotating. 【0117】Furthermore, the valve body 10 has a valve seat 15 that surrounds the valve port 14. When rotation of the rotor 51 in the closing direction is transmitted to the drive shaft 70, the drive shaft 70 rotates in the valve closing direction, and the drive shaft 70 and valve body 40 move closer to the valve port 14. When rotation of the rotor 51 in the opening direction is transmitted to the drive shaft 70, the drive shaft 70 rotates in the valve opening direction, and the drive shaft 70 and valve body 40 move away from the valve port 14. The control device 90 inputs a pulse P to the stepping motor 84 to rotate the rotor 51 in the closing direction and the drive shaft 70 in the valve closing direction, and after the rotation of the rotor 51 in the closing direction is restricted, it inputs a pulse P to the stepping motor 84 to rotate the rotor 51 in the opening direction and the drive shaft 70 in the valve opening direction. The control device 90 obtains a restriction number Nr based on the number of pulses P input to the stepping motor 84 from the time the rotation of the drive shaft 70 in the closing direction is restricted until the rotation of the rotor 51 in the closing direction is restricted. The control device 90 obtains an opening number No based on the number of pulses P input to the stepping motor 84 from the time the rotor 51 starts rotating in the opening direction until the drive shaft 70 starts rotating in the opening direction. The control device 90 obtains a correction number Nh based on the number of pulses P input to the stepping motor 84 and the restriction number Nr from the time the rotor 51 starts rotating in the opening direction until the drive shaft 70 starts rotating in the opening direction. When the valve body 40 contacts the valve seat 15 and the movement of the valve body 40 is restricted, the gears of the planetary gear mechanism 60 and components such as the drive shaft 70 undergo elastic deformation in accordance with the torque of the stepping motor 84. When the restoring force of the elastic deformation and the torque balance each other, the rotation of the rotor 51 in the closing direction is restricted. The regulation number Nr corresponds to the amount of elastic deformation of the component. By using the regulation number Nr, the control device 90 can reduce the stress applied to components such as the gears and drive shaft 70 of the planetary gear mechanism 60 while maintaining the state in which the valve body 40 is in contact with the valve seat 15. By using the valve opening number No, the control device 90 can accurately position the rotor 51 at the valve opening position Ro. The valve opening position Ro corresponds to the minimum valve opening when controlling the refrigerant flow rate using the electric valve 2.The control device 90 can accurately position the rotor 51 to a position corresponding to the target valve opening when the rotation direction of the rotor 51 is reversed by using a correction number Nh. 【0118】 As wear progresses on components such as the gears and drive shafts 70 of the planetary gear mechanism 60, the play increases, and the correction number Nh increases. Therefore, the control device 90 may be configured to notify an external control device of a warning when the correction number Nh exceeds a predetermined warning threshold. The warning threshold is set appropriately, for example, according to the system in which the electric valve device 1 is incorporated. The warning information is, for example, information indicating that there is a high possibility that the electric valve 2 will fail. In this way, the electric valve device 1 can be replaced before it fails. 【0119】 Furthermore, the electric valve 2 has a drive magnet 76 fixed to the drive shaft 70 and a driven magnet 77 that rotates about axis L, with the driven magnet 77 rotating in conjunction with the rotation of the drive magnet 76. The drive shaft 70 and the drive magnet 76 are arranged inside the valve body 10 (holder 20). The driven magnet 77 is arranged outside the valve body 10. The control device 90 is arranged outside the valve body 10 and has a first magnetic sensor 96 that detects the magnetism of the driven magnet 77. The control device 90 acquires the rotation angle of the drive shaft 70 based on the signal output by the first magnetic sensor 96. In this way, the rotation angle of the drive shaft 70 can be acquired with a relatively simple configuration. 【0120】 Furthermore, the electric valve 2 has a cylindrical can 30 joined to the valve body 10. The rotor 51 is positioned inside the can 30. The control device 90 is positioned outside the can 30 and has a second magnetic sensor 97 that detects the magnetism of the rotor 51. The control device 90 obtains the rotation angle of the rotor 51 based on the signal output by the second magnetic sensor 97. In this way, the rotation angle of the rotor 51 can be obtained with a relatively simple configuration. 【0121】The second magnetic sensor 97 is composed of Hall ICs 97a and 97b. The second magnetic sensor 97 may also be composed of only one Hall IC. In this configuration, based on the signal output by the Hall IC, it is possible to determine whether or not the rotation angle of the rotor 51 has changed in response to the input of pulse P to the stepping motor 84. Furthermore, the rotation direction of the rotor 51 can be estimated from the order of pulse P input to the stepping motor 84 (i.e., the direction signal input to the motor driver 94). 【0122】 Next, an electric valve device 1A, which is a modified version of the electric valve device 1, will be described with reference to Figure 14. 【0123】 The electric valve device 1A has the same configuration (including substantially the same configuration) as the electric valve device 1, except that it has a holder 20A, a guide member 68A, a drive shaft 70A, and a detection magnet 76A instead of the holder 20, guide member 68, drive shaft 70, drive magnet 76, and driven magnet 77. In the following description, the same reference numerals are used for components that are the same as those in the electric valve device 1, and detailed descriptions are omitted. 【0124】 The holder 20A comprises a first member 21A and a connecting member 23. The first member 21A is a single cylindrical member. The first member 21A is made of, for example, synthetic resin or a non-magnetic metal such as aluminum alloy or brass. A male thread is provided on the outer circumferential surface of the first member 21A, and this male thread is screwed into the female thread of the mounting hole 19 of the main body member 11. The first member 21A is positioned inside the connecting member 23, and the inner circumferential edge of the connecting member 23 is joined to the first member 21A. The gear case 61 of the planetary gear mechanism 60 is joined to the upper part of the first member 21A. 【0125】 The guide member 68A has a cylindrical shape. The guide member 68A is positioned inside the upper part of the first member 21A. The guide member 68A is fixed to the first member 21A. The guide member 68A has a female thread 68c. The female thread 68c is positioned at the lower part of the inner circumferential surface of the guide member 68A. The output shaft 67 is positioned inside the guide member 68A. The guide member 68A rotatably supports the output shaft 67. 【0126】 The drive shaft 70A integrally comprises a first portion 71A, a second portion 72A, and a third portion 73A. The drive shaft 70A is made of, for example, synthetic resin or a metal such as non-magnetic stainless steel. 【0127】 The first part 71A has a cylindrical shape. The first part 71A has a male thread 71c. The male thread 71c is located on the outer circumferential surface of the first part 71A. The male thread 71c is screwed into the female thread 68c of the guide member 68A. 【0128】 The second part 72A has a rectangular prism shape. The upper end of the second part 72A is connected to the lower end of the first part 71A. A conical recess is provided on the lower end surface of the second part 72A. The drive shaft 70A has a ball 74. The ball 74 is joined to the recess of the second part 72A. 【0129】 The third portion 73A has a rectangular flat plate shape. The lower end of the third portion 73A is connected to the upper end of the first portion 71A. The thickness of the third portion 73A is the same as the width of the slit 67a of the output shaft 67. The third portion 73A is positioned inside the slit 67a. The slit 67a and the third portion 73A transmit the rotation of the output shaft 67 to the drive shaft 70A, while allowing the drive shaft 70A to move vertically relative to the output shaft 67. 【0130】 The detection magnet 76A has an annular shape. The outer edge of the detection magnet 76A is circular, and the inner edge is square. The outer surface of the detection magnet 76A slides against the inner surface of the first member 21A. The first member 21A rotatably supports the detection magnet 76A (drive shaft 70A). The outer surface of the detection magnet 76A may be separated from the inner surface of the first member 21A. The second portion 72A of the drive shaft 70A is positioned inside the detection magnet 76A. The detection magnet 76A is fixed to the drive shaft 70A. The detection magnet 76A rotates together with the drive shaft 70A. The detection magnet 76A rotates about axis L. The detection magnet 76A is a permanent magnet. The detection magnet 76A has the same configuration (substantially the same configuration) as the drive magnet 76. 【0131】The first magnetic sensor 96 and the outer surface of the detection magnet 76A face each other radially, with the first member 21A and the peripheral wall portion 86 of the housing 85 in between. The first magnetic sensor 96 detects the magnetism of the detection magnet 76A. The first magnetic sensor 96 outputs an analog signal indicating the rotation angle of the magnetic field generated by the detection magnet 76A (i.e., the rotation angle of the drive shaft 70A). 【0132】 The electric valve device 1A has the same effect as the electric valve device 1. 【0133】 Furthermore, the electric valve device 1A has a detection magnet 76A fixed to the drive shaft 70A of the electric valve 2. The drive shaft 70A and the detection magnet 76A are arranged inside the valve body 10 (holder 20A). The control device 90 is arranged outside the valve body 10 and has a first magnetic sensor 96 that detects the magnetism of the detection magnet 76A. The control device 90 acquires the rotation angle of the drive shaft 70A based on the signal output by the first magnetic sensor 96. In this way, the rotation angle of the drive shaft 70A can be acquired with a relatively simple configuration. 【0134】 In this specification, terms indicating shapes such as "cylinder," "rod," and "cuboid" are also used to refer to members or parts of members that substantially have the shape of those terms. For example, "cylindrical member" includes both cylindrical members and substantially cylindrical members. Furthermore, in this specification, "the same" may include substantially the same thing. 【0135】 Although embodiments of the present invention have been described above, the present invention is not limited to the configurations of these embodiments. Additions, deletions, design modifications, and combinations of features of the embodiments, as appropriate by those skilled in the art, are also included within the scope of the present invention, as long as they do not contradict the spirit of the invention. 【0136】1, 1A...Electric valve device, 2...Electric valve, 5...Valve body assembly, 8...Stator unit, 10...Valve body, 11...Body component, 13...Valve chamber, 14...Valve port, 15...Valve seat, 20, 20A...Holder, 40...Valve body, 50...Drive mechanism, 51...Rotor, 60...Planetary gear mechanism, 67...Output shaft, 68, 68A...Guide member, 70, 70A...Drive shaft, 76...Drive magnet, 77...Driven magnet, 76A...Detection magnet, 80...Stator, 84...Stepping motor, 94...Motor driver, 95...Computer, 96...First magnetic sensor, 97...Second magnetic sensor, L...Axis

Claims

1. An electric valve control device for controlling an electric valve having a valve body having a valve port, a drive shaft that moves in the axial direction when rotated around an axis, a stepping motor having a magnetic rotor, a gear mechanism that transmits the rotation of the magnetic rotor to the drive shaft, and a valve body that faces the valve port in the axial direction, is in contact with or connected to the drive shaft, and moves in the axial direction together with the drive shaft, wherein the electric valve control device has a control unit that acquires the rotation angle of the drive shaft.

2. The electric valve control device according to claim 1, wherein the control unit acquires the rotation angle of the magnet rotor.

3. The valve body has a valve seat surrounding the valve opening, and when rotation of the magnet rotor in the closing direction is transmitted to the drive shaft, the drive shaft rotates in the valve closing direction, and the drive shaft and the valve body move closer to the valve opening, and when rotation of the magnet rotor in the opening direction is transmitted to the drive shaft, the drive shaft rotates in the valve opening direction, and the drive shaft and the valve body move away from the valve opening, and the control unit inputs pulses to the stepping motor to rotate the magnet rotor in the closing direction and the drive shaft in the valve closing direction, and after the rotation of the magnet rotor in the closing direction is restricted, inputs pulses to the stepping motor to rotate the magnet rotor in the opening direction and the drive shaft in the valve opening direction, and obtains a restriction number based on the number of pulses input to the stepping motor from the time when the rotation of the drive shaft in the valve closing direction is restricted until when the rotation of the magnet rotor in the closing direction is restricted. The electric valve control device according to claim 2, wherein the number of valve openings is obtained based on the number of pulses input to the stepping motor from the time the magnet rotor starts rotating in the opening direction until the drive shaft starts rotating in the valve opening direction, the number of corrections is obtained based on the number of pulses input to the stepping motor and the restriction number from the time the magnet rotor starts rotating in the opening direction until the drive shaft starts rotating in the valve opening direction, the restriction number is the number of pulses input to the stepping motor in the interval from when the valve body contacts the valve seat until the rotation of the magnet rotor in the closing direction is restricted, the number of valve openings is the number of pulses required to rotate the magnet rotor in the opening direction from a reference position where the rotation of the magnet rotor in the closing direction is restricted to a valve opening position where the valve body moves away from the valve seat, and the correction number is the number of pulses input to the stepping motor in the interval after the rotation direction of the magnet rotor is reversed and the rotation of the magnet rotor is not transmitted to the drive shaft.

4. When the rotation of the magnet rotor in the forward direction is transmitted to the drive shaft, the drive shaft rotates in a first direction, and when the rotation of the magnet rotor in the reverse direction is transmitted to the drive shaft, the drive shaft rotates in a second direction; the control unit inputs pulses to the stepping motor to rotate the magnet rotor in the forward direction and the drive shaft in the first direction, and subsequently inputs pulses to the stepping motor to rotate the magnet rotor in the reverse direction and the drive shaft in the second direction; a correction number is obtained based on the number of pulses input to the stepping motor from the time the magnet rotor starts rotating in the reverse direction until the drive shaft starts rotating in the second direction; and the correction number is the number of pulses input to the stepping motor in the section after the rotation direction of the magnet rotor has reversed and the rotation of the magnet rotor is not transmitted to the drive shaft, as described in claim 2.

5. The electric valve control device according to claim 4, wherein the valve body has a valve seat surrounding the valve opening, and when the rotation of the magnet rotor in the closing direction is transmitted to the drive shaft, the drive shaft rotates in the valve closing direction, and the drive shaft and the valve body approach the valve opening, and the control unit inputs pulses to the stepping motor to rotate the magnet rotor in the closing direction and the drive shaft in the valve closing direction, and obtains a restriction number based on the number of pulses input to the stepping motor from the time when the rotation of the drive shaft in the valve closing direction is restricted until the rotation of the magnet rotor in the closing direction is restricted, and the restriction number is the number of pulses input to the stepping motor in the interval from when the valve body contacts the valve seat until the rotation of the magnet rotor in the closing direction is restricted.

6. The electric valve control device according to claim 5, wherein the control unit obtains the number of valve openings based on the correction number and the restriction number, and the number of valve openings is the number of pulses required to rotate the magnet rotor in the opening direction from a reference position where the rotation of the magnet rotor in the closing direction is restricted to a valve opening position where the valve body moves away from the valve seat.

7. The electric valve control device according to claim 3 or 4, wherein the control unit notifies an external control device of warning information when the correction number exceeds the warning determination number.

8. The electric valve control device according to claim 1, wherein the electric valve comprises a drive magnet fixed to the drive shaft and a driven magnet that rotates about the axis, the driven magnet rotates in conjunction with the rotation of the drive magnet, the drive shaft and the drive magnet are arranged inside the valve body, the driven magnet is arranged outside the valve body, the electric valve control device is arranged outside the valve body and has a first magnetic sensor that detects the magnetism of the driven magnet, and the control unit acquires the rotation angle of the drive shaft based on the signal output by the first magnetic sensor.

9. The electric valve control device according to claim 1, wherein the electric valve has a detection magnet fixed to the drive shaft, the drive shaft and the detection magnet are arranged inside the valve body, the electric valve control device is arranged outside the valve body and has a first magnetic sensor that detects the magnetism of the detection magnet, and the control unit acquires the rotation angle of the drive shaft based on the signal output by the first magnetic sensor.

10. The electric valve control device according to claim 2, wherein the electric valve has a cylindrical case joined to the valve body, the magnet rotor is disposed inside the case, the electric valve control device is disposed outside the case and has a second magnetic sensor for detecting the magnetism of the magnet rotor, and the control unit acquires the rotation angle of the magnet rotor based on the signal output by the second magnetic sensor.

11. An electric valve device having the electric valve control device described in claim 1 and the electric valve.