A charging device includes a long electrode, a cleaning member, a timing
device, a drive source, a load measuring device, and a control device.
The drive source moves the cleaning member in the outward direction for a
first time period after the outward passage time and then reverses the
cleaning member in the homeward position. The load measuring device
measures driving load imposed on the drive source while the cleaning
member is being moved. The control device controls motion of the drive
source to turn the cleaning member from the outward direction to the
homeward direction at a predetermined objective point near the second
end, based on sum of driving loads imposed on the drive source while the
cleaning member is being moved from the first point to a second point
located along the outward direction.