How does using a vacuum cleaner cause static electricity?
When dust travels in the air sucked through a vacuum cleaner it impacts on the pipe walls and other internal parts. These impacts generate static charges on the particles and on the pipe walls. If these parts are made from plastics or other insulating materials they can charge up and give static shocks. Rotating parts such as carpet beaters can also charge up through rubbing action. If the suction pipe has a metal coil and is not earthed, this can charge up and give quite an energetic spark.
If there are flammable vapours (for example solvent fumes) present, these sparks could cause a fire or explosion risk. In larger vacuum cleaners (above about 1 m3) if the dust can give a flammable atmosphere, there may be a risk of fire or explosion in the dust collector.