A method of manufacturing a sensor including a generating unit that generates a predetermined object to be detected, a detecting unit that detects the object to be detected generated by the generating unit, a substrate at which the generating unit and the detecting unit are provided, a member that exerts influence on the object to be detected by being operated in a region to be detected that is a space between the generating unit and the detecting unit, and a cylindrical housing that houses the generating unit and the detecting unit provided at the substrate and the member, the method comprising:
- forming the substrate that includes a first portion provided with the generating unit and a second portion provided with the detecting unit, the first portion and the second portion being integrated;
- causing one surface of a plate member to adhere to the first portion on one surface of the substrate;
- providing the generating unit at the first portion on the other surface of the substrate, and providing the detecting unit at the second portion on the other surface of the substrate;
- causing a shape of the substrate to become a curved shape or a bent shape in which the surface of the first portion at which the generating unit is provided and the surface of the second portion at which the detecting unit is provided face each other;
- forming the housing including a first housing that operably supports the member and a second housing to which a part of the substrate serving as the second portion is fixed;
- forming two support portions on the second portion such that the two support portions face each other across the second portion;
- causing a shape of each of the two support portions to have:
- an arc-shaped inner peripheral portion that is in contact with a circular outer periphery of the first portion;
- and an arc-shaped outer peripheral portion that is along a cylindrical inner peripheral surface of the first housing;
- fixing the second portion to the second housing;
- and
- causing the other surface of the plate member to adhere to the first housing.