A sensor, comprising: a first detection element; and a controller, the first detection element including, a base body, a first support portion fixed to the base body, a first movable member supported by the first support portion, a first gap being provided between the base body and the first movable member, a first detection electrode fixed to the base body, and a first counter detection electrode fixed to the base body, the first movable member including a first movable portion, the first movable portion including a first beam, a first conductive extending portion, and a first connecting portion, the first beam including a first beam end portion, a first beam other end portion, and a first beam intermediate portion provided between the first beam end portion and the first beam other end portion, a second direction from the first beam end portion to the first beam other end portion crossing a first direction from the base body to the first support portion, the first conductive extending portion including a first extending portion, a first extending other portion, and a first extending intermediate portion provided between the first extending portion and the first extending other portion, a direction from the first extending portion to the first extending other portion being along the second direction, the first connecting portion connecting the first extending intermediate portion with the first beam intermediate portion, characterised in that the first extending portion is between the first detection electrode and the first counter detection electrode in a third direction, the third direction crossing a plane including the first direction and the second direction, in that the controller includes a first differential circuit, and in that the first differential circuit is configured to output a signal according to a difference between a capacitance between the first detection electrode and the first extending portion, and a capacitance between the first counter detection electrode and the first extending portion. a first detection element; and a controller, the first detection element including, a base body, a first support portion fixed to the base body, a first movable member supported by the first support portion, a first gap being provided between the base body and the first movable member, a first detection electrode fixed to the base body, and a first counter detection electrode fixed to the base body, a base body, a first support portion fixed to the base body, a first movable member supported by the first support portion, a first gap being provided between the base body and the first movable member, a first detection electrode fixed to the base body, and a first counter detection electrode fixed to the base body, the first movable member including a first movable portion, the first movable portion including a first beam, a first conductive extending portion, and a first connecting portion, the first beam including a first beam end portion, a first beam other end portion, and a first beam intermediate portion provided between the first beam end portion and the first beam other end portion, a second direction from the first beam end portion to the first beam other end portion crossing a first direction from the base body to the first support portion, the first conductive extending portion including a first extending portion, a first extending other portion, and a first extending intermediate portion provided between the first extending portion and the first extending other portion, a direction from the first extending portion to the first extending other portion being along the second direction, the first connecting portion connecting the first extending intermediate portion with the first beam intermediate portion, characterised in that the first extending portion is between the first detection electrode and the first counter detection electrode in a third direction, the third direction crossing a plane including the first direction and the second direction, in that the controller includes a first differential circuit, and in that the first differential circuit is configured to output a signal according to a difference between a capacitance between the first detection electrode and the first extending portion, and a capacitance between the first counter detection electrode and the first extending portion.