Patent ID: 8657395

Claim:
An image forming apparatus comprising: an apparatus body; a recording head to eject droplets of liquid; a sub tank to store the liquid supplied to the recording head; a carriage mounting the recording head and the sub tank; a main tank to store the liquid supplied to the sub tank; a liquid feed unit to supply the liquid from the main tank to the sub tank; a displacement member disposed at the sub tank to displace with a remaining amount of the liquid in the sub tank; a first detector disposed at the carriage to detect the displacement member; a second detector disposed at the apparatus body to detect the displacement member; a first calculation unit to detect and retain a first difference between a first-detector detection position of the displacement member at which the displacement member is detected by the first detector and a liquid full position of the displacement member at which the displacement member is detected by the second detector; a second calculation unit to calculate and retain a second difference between the first-detector detection position of the displacement member and a supply start position of the displacement member at which the liquid feed unit starts the liquid from the main tank to the sub tank; a third calculation unit to calculate, from image data to be printed, and retain a relation between main scanning position of the carriage and consumption amount of the liquid ejected from the recording head to print the image data; a determination unit to, when the first detector detects the displacement member, determine a main scanning position of the carriage at which the consumption amount of the liquid ejected from the recording head to print the image data is equal to a liquid consumption amount corresponding to the second difference, based on the relation retained by the third calculation unit; and a supply control unit to cause the liquid feed unit to start supply of the liquid from the main tank to the sub tank when the carriage arrives at the main scanning position determined by the determination unit during printing of the image data, and stop the supply of the liquid when the liquid is supplied at a supply amount corresponding to the first difference after the first detector detects the displacement member.