A device (1; 101; 201; 301; 401; 501; 601; 701) for controlling the flow of a fluid through a conduit (6; 306) from an upstream side of the device to a downstream side of the device, the device comprising: an upstream valve casing defining an inlet on the upstream side of the device; a downstream valve casing defining an outlet aperture (10; 110; 210; 310; 410; 510) on the downstream side of the device; a valve core (2; 502; 702) secured between the upstream valve casing and the downstream valve casing, wherein the upstream valve casing, the downstream valve casing and the valve core are formed as discrete parts; wherein the valve core comprises a housing (20; 120; 220; 520; 720) defining a control volume (21, 22; 121, 122; 222; 322; 422); a valve member (14, 114; 214; 314; 414; 514; 614; 714) comprising a piston and a closure member (16; 116; 216; 316; 416; 516; 616; 716) attached to the piston, wherein the valve member is movably mounted on the housing and positioned on the upstream side of the outlet aperture, wherein the valve member is arranged to move reciprocally to selectively open and close the outlet aperture, thereby controlling flow of the fluid through the outlet aperture; an input line (18; 218) defined in the valve core for introducing a fluid pressure into the control volume, wherein the valve member is acted on by the fluid pressure in the control volume to control the position of the valve member; characterized in that the device further comprises: a magnet (580; 680; 780), embedded within the piston of the valve member such that it is displaced by the movement of the valve member in the same direction as the valve member; and a position sensor (72; 572; 672; 772) arranged to determine the position of the valve member, wherein the position sensor comprises one or more multiple-axis magnetic field sensors (582; 682; 782). an upstream valve casing defining an inlet on the upstream side of the device; a downstream valve casing defining an outlet aperture (10; 110; 210; 310; 410; 510) on the downstream side of the device; a valve core (2; 502; 702) secured between the upstream valve casing and the downstream valve casing, wherein the upstream valve casing, the downstream valve casing and the valve core are formed as discrete parts; wherein the valve core comprises a housing (20; 120; 220; 520; 720) defining a control volume (21, 22; 121, 122; 222; 322; 422); a valve member (14, 114; 214; 314; 414; 514; 614; 714) comprising a piston and a closure member (16; 116; 216; 316; 416; 516; 616; 716) attached to the piston, wherein the valve member is movably mounted on the housing and positioned on the upstream side of the outlet aperture, wherein the valve member is arranged to move reciprocally to selectively open and close the outlet aperture, thereby controlling flow of the fluid through the outlet aperture; an input line (18; 218) defined in the valve core for introducing a fluid pressure into the control volume, wherein the valve member is acted on by the fluid pressure in the control volume to control the position of the valve member; characterized in that the device further comprises: a magnet (580; 680; 780), embedded within the piston of the valve member such that it is displaced by the movement of the valve member in the same direction as the valve member; and a position sensor (72; 572; 672; 772) arranged to determine the position of the valve member, wherein the position sensor comprises one or more multiple-axis magnetic field sensors (582; 682; 782). <EOS>