The invention discloses an automatic 
stud welding gun which comprises a 
welding gun 
assembly, a 
ceramic ring clamping 
assembly, a first lifting 
assembly and a second lifting assembly, the first lifting assembly comprises a first motor, a lead screw and a sliding base, an output shaft of the first motor is directly or indirectly connected to the lead screw, and the sliding base is in threaded connection to the lead screw; and the 
welding gun assembly is connected to the sliding base, the 
ceramic ring clamping assembly is movably connected to the 
welding gun assembly, and the second lifting assembly is connected to the welding gun assembly and the 
ceramic ring clamping assembly and used for driving the ceramic ring clamping assembly to move relative to the welding gun assembly. The welding gun assembly is located on the moving path of the ceramic ring clamping assembly and can enable the ceramic ring clamping assembly to be opened. According to the automatic 
stud welding gun, the strokeof the welding gun assembly is large, and 
stud welding of complex surfaces is facilitated; and the ceramic ring clamping assembly is prevented from colliding with a ceramic ring, the ceramic ring clamping assembly is effectively protected, and the service life of the ceramic ring clamping assembly is prolonged.