## 1 Introduction  
In the last decade, many researchers focused on the detection and measurement of the low concentration of sugar such as glucose, fructose, and sucrose [1]. Sugars are found in the blood, food, and beverages. Numerous methods have been used to measure glucose, fructose, and sucrose levels, including colorimetric [2], infrared [3], Raman [4], and electrochemistry spectroscopy [5]. Other analytical methods such as gas chromatography and mass spectroscopy were considered to investigate sugar levels in human and natural products with a limit in the range of mM to uM [6]. The optical method is an interesting technique to evaluate chemical and biochemical properties [7]. Hence, the detection and measurement of low concentrations of glucose, fructose, and sucrose were carried out using a laser interferometer [8] Ultraviolet-visible (UV-Vis) absorption spectroscopy, fluorescence spectroscopy, the optical polarization properties of medium and heterodyne polarimetry [9; 10], reflected THz radiation [11], and a surface plasmon resonance sensor [12; 13; 14]. Recently, glucose biosensors have been presented based on enzymatic catalysts in three versions of enzymatic glucose biosensors [15].  
The limitation of these sugar biosensors depends on the performance of these sensors--that is, the inherent instability [16] and the sensitivity of these type of biosensors depends on pH, the temperature of samples, and concentration of oxygen [17; 18].  
The ratio of signal to noise and immobilization of sugar to the sensing layer are the significant parameters to design the application of glucose, fructose, and sucrose sensors [19; 20]. Therefore, the nanoparticles (Au, Ag, Fe\({}_{2}\)O\({}_{3}\), and ZnO) and conductive polymer (polypyrrole) were used to increase and improve the ratio of signal to noise and immobilization in sugar sensors. Polypyrrole has the potential of electron transfer, because the electron transfer between sugar and the sensing layer is slow [1]. Hence, the coupling of nanoparticles and polypyrrole can improve the electron transfer in the procedure of sugar detection (sensor) [1; 16], and it can also enhance the selectivity and sensitivity of the sensor.  
Moreover, the surface plasmon resonance (SPR) sensor is a versatile and accurate method to detect the chemical materials and sugars. The SPR phenomenon occurs at the interface of two mediums with opposite dielectric signs. Normally, the gold layer is used for the SPR sensors, and the sensing layer has been coated on the surface of the gold layer to improve the sensitivity and selectivity of the sensor. Recently, the nanocomposite layers have been used for the sensing layer. The gold nanoparticle, carbon-based nanostructure [1], and magnetic nanoparticles were used to improve the sensitivity of the sugar sensor. Magnetic nanoparticles have some advantages, such as high catalytic efficiency, good stability, and monodispersion [2]. Hence, many researchers used the magnetic nanoparticles such as ZnFe\({}_{2}\)O\({}_{4}\)[2], Fe\({}_{3}\)O\({}_{4}\)[21], and polypyrrole-chitosan/Fe\({}_{2}\)O\({}_{3}\) nanocomposite [16] to detect glucose and other sugars; the detection limit was in the range of 1 to 3 uM, and the ratio of signal to noise was about 3. Consequently, the magnetic nanoparticles are a considerable nanostructure to design the sugar sensor.  
In this study, a polypyrrole-chitosan-BaFe\({}_{2}\)O\({}_{4}\) (PPy-Chi-BaFe\({}_{2}\)O\({}_{4}\)) nanocomposite layer was prepared using the electrochemical method. The prepared layer was characterized using the field emission scanning electron microscopy (FE-SEM), the X-ray diffraction (XRD), and the Fourier transform infrared spectroscopy (FT-IR). The characterized layer was used to detect the glucose, fructose, and sucrose using the surface plasmon resonance technique.