An electric cylinder device that supplies a hydraulic fluid to a supply target, the electric cylinder device comprising:
- a reservoir tank configured to store the hydraulic fluid;
- an electric cylinder configured to supply the hydraulic fluid to the supply target by moving a piston in a cylinder according to driving of an electric motor;
- and
- a control device configured to control the electric motor, wherein
- the electric cylinder includes a hydraulic chamber defined in the cylinder by the cylinder and the piston, an input port via which the reservoir tank and the hydraulic chamber communicate with each other, and an output port configured to discharge the hydraulic fluid in the hydraulic chamber toward the supply target,
- a direction in which a volume of the hydraulic chamber is reduced among moving directions of the piston is defined as a forward direction, and a direction opposite to the forward direction among the moving directions is defined as a backward direction,
- the control device drives the electric motor by using, when moving the piston, a position where the piston is moved to an end in the backward direction as an end-point position and an origin position, which is a position obtained by moving the piston from the end-point position in the forward direction by a prescribed movement amount,
- the electric cylinder includes an elastic body configured to apply, to the piston, a force to press the piston in the forward direction when the piston is located at the end-point position,
- the electric cylinder is configured such that a hydraulic pressure of the hydraulic chamber is increased by opening the input port when the piston is located at the origin position, and closing the input port by the piston when the piston moves in the forward direction from the origin position,
- the control device executes an end-point movement process of moving the piston to the end-point position to set a relative position of the piston with respect to the input port,
- in the end-point movement process, the control device drives the electric motor such that a rotation speed of the electric motor becomes a target rotation speed to move the piston in the backward direction, and when a current value of a current flowing through the electric motor increases more than a determination value, the control device determines that the piston reaches the end-point position and ends the driving of the electric motor, and
- the determination value is a value obtained by increasing, by an increase amount, the current value of the current flowing through the electric motor when the rotation speed of the electric motor follows the target rotation speed with the current value as a reference.