Skip to main content

5. Important ADC Parameters In ATmega328p

5.1 TeganganReference ReferensiVoltage (Vref)

TeganganReference ReferensiVoltage (Vref) adalahis teganganthe maksimummaximum yangvoltage menjadithat acuanserves skalaas penuhthe padafull-scale prosesreference konversiin ADC.the ADC conversion process. Vref menentukandetermines rentangthe teganganrange of input yangvoltage dapatthat dibacacan olehbe read by the ADC.

PadaOn the ATmega328p, terdapatthere tigaare pilihanthree sumberoptions teganganfor referensi:the reference voltage source:

REFS1 REFS0 SumberVref VrefSource KeteranganDescription
0 0 AREF pin MenggunakanUses teganganan eksternalexternal yangvoltage dihubungkanconnected keto the AREF pin AREF
0 1 AVcc MenggunakanUses teganganthe supply voltage (VCC), biasanyatypically 5V
1 0 (tidak digunakan)unused)
1 1 Internal 2.56V MenggunakanUses tegangana referensifixed internal tetap2.56V 2.56V,reference mengabaikanvoltage, ignoring VCC

image

PengaruhInfluence of Vref terhadapon resolusieffective efektif:resolution:

Vref ResolusiResolution per step
5V (AVcc) 5V / 1024 ≈ 4.88 mV per langkahstep
2.56V (Internal) 2.56V / 1024 ≈ 2.5 mV per langkahstep

SemakinThe kecilsmaller the Vref, semakinthe halusfiner resolusithe resolutionnamunbut rentangthe measurable input yangrange bisais dibacaalso juga lebih kecil.smaller.

5.2 Prescaler

The Prescaler adalahis pembagia frekuensifrequency clockdivider yangthat menentukandetermines kecepatanthe ADC clock darispeed from the main system clock utama sistem (F_CPU). The ADC membutuhkanrequires a clock dalamwithin rentangthe range of 50 kHz – 200 kHz untukfor hasilaccurate yang akurat.results.

PadaOn the ATmega328p (F_CPU = 16 MHz), pilihan prescaler dikonfigurasioptions melaluiare bitconfigured via the ADPS2:ADPS0 dibits registerin ADCSRA:the ADCSRA register:

ADPS2 ADPS1 ADPS0 PembagiDivider ADC Clock (padaat 16 MHz)
0 0 0 CLK/2 8 MHz
0 0 1 CLK/2 8 MHz
0 1 0 CLK/4 4 MHz
0 1 1 CLK/8 2 MHz
1 0 0 CLK/16 1 MHz
1 0 1 CLK/32 500 kHz
1 1 0 CLK/64 250 kHz
1 1 1 CLK/128 125 kHz ✅ (palingmost akurat)accurate)

Catatan:Note: The recommended ADC clock yangis direkomendasikan adalah antarabetween 50 kHz–200 kHz. PrescalerA CLK/128 padaprescaler at 16 MHz menghasilkanproduces 125 kHz — beradawell diwithin dalamthe rentangoptimal optimal.range.

5.3 Conversion Rate

Conversion Rate (kecepatanis konversi)the adalahnumber jumlah konversiof ADC yangconversions dapatthat dilakukancan be performed per detik.second. NilainyaIts bergantungvalue padadepends on the ADC clock danand jumlahthe siklusnumber of clock cycles per konversi.conversion.

PadaOn the ATmega328p:

  • Satu konversiOne ADC membutuhkanconversion requires 13 siklus ADC clock cycles (kecualiexcept konversifor pertamathe setelahfirst enableconversion after enabling = 25 siklus)cycles).
  • Conversion Rate = ADC Clock / 13
Prescaler ADC Clock Conversion Rate
CLK/64 250 kHz ≈ 19.2 kSPS
CLK/128 125 kHz ≈ 9.6 kSPS

kSPS = kilo Samples Per Second (ributhousands sampelof samples per detik)second)

5.4 PengaruhInfluence of Vref, Prescaler, danand Conversion Rate terhadapon AkurasiAccuracy

KetigaThese parameterthree iniparameters salingare berkaitaninterrelated dalamin menentukandetermining kualitasthe hasilquality konversiof ADC,ADC baikconversion dariresults, sisiin resolusi,terms akurasi,of maupunresolution, kemampuanaccuracy, mengikutiand perubahanthe sinyal.ability to track signal changes.

Parameter NilaiSmaller Lebih KecilValue NilaiLarger Lebih BesarValue
Vref ResolusiFiner lebih halusresolution (LSBsmall kecil)LSB), tetapibut rentanglimited input terbatasrange RentangWider input lebihrange, luas,but tetapicoarser resolusi lebih kasarresolution (LSBlarge besar)LSB)
Prescaler (pembagi)divider) FrekuensiHigher ADC tinggifrequencyrisikorisk ketidakakuratanof jikainaccuracy melebihiif batasexceeding spesifikasispecification limits FrekuensiLower ADC lebih rendahfrequencyoperasimore lebihstable stabiloperation jikaif berada dalam rentangwithin optimal range (50–200 kHz)
Conversion Rate SamplingSparse jarangsamplingberisikorisk kehilanganof informasilosing information (aliasing) SamplingMore lebihfrequent seringsamplingmampubetter mengikutiability perubahanto sinyaltrack dengansignal lebih baikchanges

Kesimpulan:Conclusion:

  • Vref menentukandetermines the trade-off antarabetween resolusiresolution danand rentangmeasurement pengukuran.range.
  • The Prescaler harusmust dipilihbe agarchosen frekuensiso that the ADC beradafrequency dalamstays rentangwithin the optimal untukrange menjagato akurasi.maintain accuracy.
  • The Conversion rate harusmust cukupbe tinggihigh enough (≥ 2× frekuensisignal sinyal,frequency, sesuaiaccording Teoremato the Nyquist yangTheorem akanwhich kalianyou pelajariwill padalearn praktikumin Telekomunikasithe 5th-semester 5)Telecommunications agarlab) sinyalfor dapatthe direpresentasikansignal denganto baik.be well-represented.