A new kind of self-powered sensor which can synchronously detect the salinity of water solution from 0mmol/L to 1mmol/L and generate electricity is developed. The power generation of this self-powered sensor is realized by repeatedly moving water droplets down from hydrophobic PDMS surface to generate negative charges on the surface of PDMS at first and change the capacitance between two electrodes to drive the screen charges (electrons) moving back and forth between two electrodes, subsequently. The ability for droplet to change the capacitance depends on its salinity. So the self-powered sensor can successfully detect the solution's salinity. Furthermore, both the distance between two electrodes and the thickness of PDMS film can influence the change quantity of capacitance when the water droplets are same, which benefits to the improvement of self-powered sensor's detection ability. Finally, the performance of this self-powered sensor can also be optimized by improving its current signal through modulating external load.