High-Side Current Sensing With the ZXCT1010 and an ATmega328P ADC

Circuit scope and signal path

The build documented in the cxem.net write-up measures load current, load voltage and the product of the two for a DC load of up to 2 A at a 12 V supply. A Diodes Incorporated ZXCT1010 high-side current monitor senses the drop across a 0.1 Ω shunt in the positive rail and converts it to a proportional output current. A resistor converts that current back to a voltage, which an ATmega328P ADC channel digitises, while a 1 kΩ / 500 Ω divider scales the 12 V rail into a second channel. The write-up describes the build on an Arduino Nano board with a Nokia 5110 display, the scaled supply on A0 and the current signal on A1.

Shunt value and sense voltage

The parts list specifies a 0.1 Ω, 1 W, 1% shunt. At the stated 2 A maximum the sense voltage is 0.2 V (0.1 Ω × 2 A) and the shunt dissipates 0.4 W (2² × 0.1 Ω). Both are arithmetic on the stated values, and the write-up reports the same results. The ZXCT1010 accepts sense voltages up to 2.5 V, so 0.2 V sits well inside the sense range. The datasheet’s own application example works the other way round, selecting the shunt so the full-load sense voltage lands in the region of 50 mV to 500 mV: the trade-off between offset dominance at small sense voltages and shunt dissipation at large ones.

Dissipating 0.4 W in a 1 W part is a comparison against a rating, not a thermal result. Temperature rise, derating with ambient, and drift of the shunt resistance are not established by it, and no thermal measurement is reported.

Transfer function and the gain resistor

The datasheet’s scaling relation is VOUT = 0.01 × VSENSE × ROUT. The factor 0.01 A/V is the transconductance, so a 0.2 V sense voltage produces 2 mA of output current. Targeting a 5 V output at that current gives ROUT = 5 V / 2 mA = 2500 Ω.

The original text prints this result as 2500 kOhm. That is a unit error of three decades: the division yields 2500 Ω, or 2.5 kΩ, and the 2.4 kΩ resistor named in the parts list is the nearest common value to 2.5 kΩ. Only the unit label is wrong; the fitted resistor matches the corrected figure.

With the fitted 2.4 kΩ, the ideal transfer predicts 4.8 V at 2 A (2400 Ω × 2 mA) and 0.48 V at 200 mA (2400 Ω × 0.2 mA). These are conditional calculations, not measured outputs or a promise that the part delivers 4.8 V into a real load.

Common-mode range and output compliance

Two supply-dependent limits constrain that 4.8 V figure. The monitor’s VIN range is 2.5 V to 20 V, and its output is a current source, so the datasheet’s dissipation expression PD = IOUT × (VIN − VOUT) accounts for the drop between the monitored rail and the output voltage. On a 12 V rail the calculated output sits 7.2 V below the rail, ample room for the expression to stay sensible; on a 5 V rail the same output would sit at the rail and cannot be assumed reachable. Whether the part can drive 4.8 V at 2 mA depends on its guaranteed output voltage range, which the excerpts used here do not pin down; the full electrical table should be checked before that operating point is trusted. The common-mode level at the sense pins is the full load supply, 12 V here: inside the 2.5 V to 20 V window, but only 8 V below its upper limit.

Accuracy statements and their status

The datasheet lists 1% typical accuracy and 300 nA typical offset current. Both are typical figures in the feature summary rather than guaranteed limits, and nothing here supports a precision claim for an assembled meter. Offset matters most at the bottom of the intended 200 mA to 1.5 A range: at 200 mA the output current is 200 µA, so a 300 nA offset is roughly 0.15% of the signal, comparable in magnitude to the typical accuracy figure, and a reason to treat low-current readings separately from full-scale ones.

ATmega328P reference and headroom

The ATmega328P ADC offers 10-bit resolution, an input range of 0 to VCC, a selectable 1.1 V internal reference, 0.5 LSB integral non-linearity, ±2 LSB absolute accuracy, and a conversion time of 65 to 260 µs. AVCC must not differ from VCC by more than 0.3 V. The reference choice decides whether a 4.8 V output is usable at all. With AVCC as a 5 V reference, full scale is 5 V and the 2 A point sits at 96% of it, leaving about 41 codes of headroom, so any positive offset or gain error clips the reading. With the 1.1 V reference, the same 2.4 kΩ resistor reaches full scale at only about 0.46 A, so the gain resistor and the reference have to be chosen together rather than in sequence.

Resolution follows from the same numbers. One 5 V LSB is 4.88 mV, and the current channel’s sensitivity is 2.4 V/A, which is about 2 mA per code. Converter error and monitor error are separate and are not combined into one accuracy figure here; the instrumentation-amplifier front-end discussion treats the same split between sensor error and converter error. The datasheet adds two operational cautions: the first conversion after a reference change may be inaccurate and should be discarded, and the noise-canceler section describes how AVCC and AREF should be decoupled.

Divider source impedance and ADC settling

The voltage channel scales 12 V to 4 V with 1 kΩ and 500 Ω. That output fits a 5 V reference with 1 V to spare but not a 1.1 V reference, so the divider and reference are linked as above. The divider’s source impedance is 1 kΩ in parallel with 500 Ω, about 333 Ω, and the ADC sample-and-hold must charge its sampling capacitance through it within the acquisition window. Where the impedance is too high for the chosen ADC clock and settling time, readings lag or droop; a lower-impedance buffer or slower conversion is the usual remedy. The current channel mirrors this: a current source loaded by 2.4 kΩ presents a high source impedance at the pin, even though the monitor’s internal source is stiff. The 0 to 5 V analog sensor interface article covers comparable source-impedance trade-offs.

What the design establishes and what it does not

The write-up documents a coherent application of a high-side current monitor to an AVR ADC. What it does not supply is measurement evidence. There is no calibration against a reference meter, no error budget combining monitor offset, gain tolerance, divider tolerance and ADC accuracy, no thermal measurement of the shunt, and no characterisation of output swing near the rails. A reproduction should treat 4.8 V at 2 A as the nominal target, confirm the output reaches it at the chosen supply and reference, and calibrate both channels against a known load before the watt result is trusted; the electronic load characterisation article describes the kind of reference load such a check needs.


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter
Scroll to Top