A self-focusing optical fiber-based refractive index sensor and a preparation method thereof, wherein the method comprises: One end of a self-focusing optical fiber (2) is fixedly connected with a first transmission optical fiber (1), a cutting process is performed at a position where the distance from a connecting end is a half of a focusing period in the self-focusing optical fiber (2), to form a cutting end, the connecting end is one end fixedly connected with the first transmission optical fiber (1) in the two ends of the self-focusing optical fiber (2), the cutting end of the self-focusing optical fiber (2) is fixedly connected with a second transmission optical fiber (3), and a micro cavity (4) is formed by micro machining one side of the middle of the fiber core of the self-focusing optical fiber (2). The refractive index sensor comprises the first transmission optical fiber (1), the second transmission optical fiber (3) and the self-focusing optical fiber (2), the self-focusing optical fiber (2) is fixed between the first transmission optical fiber (1) and the second transmission optical fiber (3), the length of the self-focusing optical fiber (2) is the half of the focusing period, the micro cavity (4) is formed in one side of the middle of the fiber core of the self-focusing optical fiber (2), and thus, the micro cavity (4) is located at the quarter of the focusing period, so that the self-focusing optical fiber (2) has the advantages of low connection loss and high contrast.
展开▼