Overview:

In this project, I evaluated the ATmega328P’s ADC by measuring offset and gain errors across different prescaler settings. To ensure reliable testing, I designed a Finite State Machine (FSM) that automated sampling and data transfer, improving repeatability. The results quantified how ADC clock prescaler configurations impact accuracy, providing valuable insights for real-time embedded designs where both temporal and behavioral precision are critical.

Preview:



Technical implementation:

Software Architecture:

FSM Diagram

System Configuration:

Hardware

Description:


ADC Output (sampled):

ADC Output
ADC Offset Error (LSB)
ADC Gain Error (LSB)

The ADC output graphs show the performance of the ATmega328P’s ADC under different clock prescaler settings. The offset error stabilizes around -1.3 LSB as the prescaler increases, while the gain error shows a linear increase with higher prescaler values. This indicates a trade-off between sampling speed and accuracy, where lower prescaler settings yield faster sampling but higher offset errors, and higher settings provide more accurate results at the cost of slower sampling rates.


Insights: