Diaphragm oxygen & nitrogen compressor is a kind of displacement compressors driven by electromotor. The main characteristic of diaphragm compressor is that there are two chambers in each compressor head: a hydraulic oil chamber and a gas chamber. When the machine is started, the electromotor drives crankshaft making rotational movements. The crankshaft is connected with a piston by a connecting rod, which can transform the rotational movement of crankshaft into the reciprocating movement of piston. When the piston is pulled to the down end, the hydraulic oil will flow back to the oil cylinder. The pressure differential will make the diaphragms have a downward elastic deformation. The volume of gas chamber will be enlarged. The gas suction valve will open automatically. In this way, the gas is sucked in. When the con-rod pushes the piston moving to the top end, the piston will further push the hydraulic oil to make the diaphragms have an upward elastic deformation. The volume of gas chamber will be reduced and the gas can be compressed. The gas discharge valve will open automatically when the gas pressure is up to a certain value. In a word, as a result of the diaphragms' periodical elastic deformation, the gas is automatically sucked, compressed and discharged periodically.