An image forming apparatus, comprising:
- a density sensing portion including a sensor that applies light toward an outer circumferential surface of an image carrier and receives reflected light from the image carrier, the density sensing portion outputting a sensing value related to a toner density of a toner image formed on the outer circumferential surface of the image carrier;
- a cleaning portion including a brush that moves in an intersecting direction intersecting with the light applied by the sensor, the cleaning portion performing cleaning of a sensing surface of the sensor by use of the brush;
- and
- a control portion that controls an operation of the cleaning portion,
- wherein
- the density sensing portion includes:
- a substrate;
- and
- a sensor package that is secured to a surface of the substrate opposed to the image carrier so as to protrude toward the image carrier and holds the sensor,
- the cleaning portion includes:
- a slide member that holds the brush;
- a cleaning drive part that drives the slide member to move in the intersecting direction;
- and
- the brush that is secured to the slide member so as to protrude toward the sensor and has a length long enough to contact the sensing surface and not long enough to contact the substrate,
- the control portion performs control so that, when the cleaning portion performs the cleaning of the sensing surface, the brush is moved to a cleaning position where the brush contacts the sensing surface, and when the cleaning portion does not perform the cleaning of the sensing surface, the brush is moved to a retracted position where the brush does not contact the sensor package and the substrate,
- the density sensing portion includes a connector that is secured to the surface of the substrate opposed to the image carrier at a distance from the sensor package and is electrically connected to the sensor, and
- the retracted position of the brush is arranged between the sensor package and the connector.