This article presents performance enhancement of Si3N4-gate ion-sensitive field-effect transistor based pH sensor using machine learning (ML) techniques. A robust SPICE macromodel is developed using experimental data, which incorporates intrinsic temperature and temporal characteristics of the device, which is further used in sensor readout circuit (ROIC), which shows a nonideal temperature and time dependence in the voltage output. To make the device robust to the critical drifts, we exploit six state-of-the-art ML models, which are trained using the data generated from ROIC for a wide range of pH, temperature, and temporal conditions. Thorough comparison between ML models shows random forest outperforms other models for drift compensation task. This work also shows a preliminary time series classification task. The ML models are implemented on a Xilinx PYNQ-Z1 field-programmable gate array (FPGA) board to validate the performance in power and memory-restricted environment, crucial for IoT applications. A parameter, implementation factor is defined to evaluate best ML model for IoT deployment using FPGA/MCU hardware implementation. The significantly lower power consumption of FPGA board as compared to CPU with no noticeable performance drop is a pointer to the future of robust pH sensors used in industrial and remote IoT applications.