Agricultural robots are flexible to obtain ambient information across large areas of farmland. However, it needs to face two major challenges: data compression and filtering noise. To address these challenges, an encoder for ambient data compression, named Tiny-Encoder, was presented to compress and filter raw ambient information, which can be applied to agricultural robots. Tiny-Encoder is based on the operation of convolutions and pooling, and it has a small number of layers and filters. With the aim of evaluating the performance of Tiny-Encoder, different three types of ambient information (including temperature, humidity, and light) were selected to show the performance of compressing raw data and filtering noise. In the task of compressing raw data, Tiny-Encoder obtained higher accuracy (less than the maximum error of sensors ±0.5°C or ±3.5% RH) and more appropriate size (the largest size is 205 KB) than the other two auto-encoders based convolutional operations with different compressed features (including 20, 60, and 200 features). As for filtering noise, Tiny-Encoder has comparable performance with three conventional filtering approaches (including median filtering, Gaussian filtering, and Savitzky-Golay filtering). With large kernel size (i.e., 5), Tiny-Encoder has the best performance among these four filtering approaches: the coefficients of variation with the large kernel (i.e., 5) were 8.6189% (temperature), 10.2684% (humidity), 57.3576% (light), respectively. Overall, Tiny-Encoder can be used for ambient information compression applied to microcontrollers in agricultural information acquisition robots. Keywords: agricultural information, robot, ambient information, data compression, embedded machine learning methods DOI: 10.25165/j.ijabe.20221504.6911 Citation: Wang Y T, Li M Z, Ji R H, Wang M J, Zhang Y, Zheng L H. Novel encoder for ambient data compression applied to microcontrollers in agricultural robots. Int J Agric & Biol Eng, 2022; 15(4): 197–204.