Internet of Things (IoT) has been widely used in many smart applications such as smart cities, smart agriculture, healthcare, industry, etc. In addition, the importance of IoT-based architectures has increased with the emergence of innovative technologies such as 5G networks and quantum computing. Electrochemical sensors (ECS) have recently been used in IoT-based architectures thanks to their easy integration into smart systems in many fields such as pharmaceutical, food, medical diagnosis, clinical, genetic analysis, wearable, forensic identification, and monitoring of environmental variables. However, Although IoT-based systems have ensured the availability of sensor data in traditional architecture, there are many challenges, such as low latency, availability, real-time data traceability, and security. In addition, new challenges regarding security and privacy have emerged in the system as the ever-growing smart connected IoT devices generate a significant amount of heterogeneous data. Given these challenges, in this paper, we propose PPFchain, a new federated learning-enabled blockchain-based framework to ensure the security and privacy of sensor-IoT-based architectures using sampled ECS data. PPFchain has a lightweight, low-cost, high-performance architecture in the IoT-based blockchain network. In the architecture, we used the federated model and cryptographic primitives for user and data privacy in off-chain fog nodes considering performance. Moreover, we compared with traditional blockchain models using various performance metrics for system performance in a distributed architecture, such as an event and storage-based smart contract. In addition, the results show that the PPFchain provides accuracy, efficiency, and enhanced security.