Water quality test is the first step for cleaning water which is a fundamental element for human health and the environment. The objective of this research is to develop very small, cheap, fast, accurate sensors to detect pollutants including phosphate, nitrate, mercury, and chloride in waters. This is a new testing and analysis technique, which can provide accurate sensing capability to assess the cleanness of waters at a very low cost. The proposed new technology is to manufacture graphene based sensors using the micro-manufacturing. Graphene is a monolayer of carbon atoms with outstanding electrical properties well studied material for a decade by many research groups. Since graphene sensitively responds to molecules in liquids, this property will enable the tiny sensors to detect pollutants in water with very high sensitivity and super short response time to pollutants. Even though graphene responds to the surroundings, it does not have the selectivity to the specific target. In this research, the selective membranes are synthesized and applied to the graphene based sensors to detect the target ions such as nitrate, phosphate, chloride, and mercury. The selective membranes are prepared with two different key materials including molecular imprinted polymer and ionophore. The sensor is characterized by a semiconductor analyzer, and the sensors are tested with several ion solutions to verify their selectivity. The detection limits of the sensor are 0.82, 0.26, 0.87 mg/L and 1.125 µg/L for nitrate, phosphate, chloride and mercury, selectively. In addition, the detection limit of nitrate is enhanced to 0.32 mg/L using the AAO substrate. Here, this research also includes developing perovskite solar cells as the power source of the sensors. Since solar energy is clean and independent, it is one of the important renewable energy resources. Silicon solar cells have already been commercialized and used to generate electricity in various fields because solar cells can directly generate electricity from photons, and they do not cause a problem to our environment as well. Among several types of solar cells, the perovskite solar cells have been studied by many research groups owing to low-cost fabrication, low fabrication temperature and high efficiency. This research includes the preparation of the materials and fabrication of flexible perovskite solar cells. We also characterize the surface morphology of the perovskite to check the grain size by atomic force microscopy (AFM) and scanning electron microscopy (SEM). The efficiency of solar cells is measured by the solar simulator. We study the relationship between the grain size and the CVD process time and successfully demonstrate the performance of devices. The flexible solar cells show the power conversion efficiency of 7.6 % under the AM 1.5 G. As extended research, we have tried to find the proper hole transport layer (HTL) for the device and applied two HTLs, including PEDOT:PSS and PTAA to the devices.