Patent ID: 8204390

Claim:
An image forming apparatus comprising: an image forming section that forms an image using toner; a discharge port for discharging waste toner from the image forming section; a cover capable of being opened and closed, the cover constituting a part of a casing of the image forming apparatus; a translucent waste-toner container having an opening for receiving the waste toner discharged from the discharge port and being attached to the casing at a position where it is exposed to ambient conditions when the cover is open; a light sensor having a light-emitting portion and a light-receiving portion whose output voltage varies according to an amount of light received, the light-emitting portion and the light-receiving portion being positioned so as to oppose each other with the opening being located therebetween; a light-blocking member that is projectable and retractable between the light-emitting portion and the light-receiving portion, the light-blocking member being retracted when the waste-toner container is attached to the image forming apparatus and projecting to block light when the waste-toner container is removed from the image forming apparatus; a storage unit that stores an output voltage from the light-receiving portion for detecting a fullness of the waste-toner container as a first threshold, an output voltage from the light-receiving portion for detecting whether or not the light-blocking member is projected as a second threshold and an output voltage of the light-receiving portion for detecting outside light entering due to the cover being opened as a third threshold; and a control unit for controlling operation of the image forming section based on the output voltage of the light-receiving portion, when the control unit has determined that the waste-toner container is full, by referencing the output voltage of the light-receiving portion and the storage unit, the control unit prohibits printing and does not permit the image forming apparatus to perform printing until the control unit detects that the light-blocking member is projected, the light-blocking member is then retracted, and the waste-toner container is not full and the control unit detects whether or not the cover is open by comparing an output voltage of the light-receiving portion when the light-emitting portion is turned off with the third threshold.