A can body 2 spraying machine comprises a can body spinning device, a spray gun for spraying a coating onto an interior of a can body mounted on the can body spinning device and a controller configured to cause the spray gun to switch when the can body spinning device is in a correct spraying position. A sensor coupled to the can body spinning device determines when the can body spinning device has undergone a predefined rotation following commencement of spraying and, in response to such determination, causes the spray gun to be switched off. The sensor arrangement may comprise a laser sensor 8 which detects the passing of index holes 14 on a chuck pulley 6.