The invention relates to a pressure sensor which is applicable to grain pressure testing and belongs to the field of sensors. The pressure sensor comprises a bottom plate, side plates, sleeves, springs, a sliding resistor, pin shafts, a guiding rod and a top plate, wherein the bottom plate and the side plates are welded into a whole and form a cube which is provided with an opening formed in the upper surface, the sleeves are fixed on the upper surface of the bottom plate, each spring is installed outside one sleeve, the pin shafts and the guiding rod are fixed on the lower surface of the top plate, the pin shafts are matched with the sleeves, the top plate can move upwards and downwards, and the sliding resistor is fixed between the bottom plate and the top plate. The springs are deformed after the pressure of grain acts on the top plate of the sensor, the top plate moves downward to drive the guiding rod to move downward, the resistance value of the sliding resistor is changed, a voltage signal is changed, and therefore pressure sensing can be achieved. According to the pressure sensor, the theory of large deformation of the springs is utilized, the bearing area is large, and the grain granular mixtures can uniformly and effectively act on the bearing surface of the sensor. The pressure sensor has the advantages of being simple in structure, good in stability, high in reliability, good in durability and low in cost.