In this video I show how you can use an ATtiny85’s (or any other ATtiny) ADC in differential mode which can be used to calculate the voltage drop on a device that isn’t tried directly to ground, for example, to measure the voltage drop across a shunt resistor to calculate current being drawn.
The differential mode allows for bipolar mode so you can see which input is the positive and negative, you can switch the inputs around in the ATtiny and then use the unipolar differential mode to get the full resolution of 10bits. There are also gain settings which you can enable – 1x or 20x gain.
Download ATtiny85_ADC_Differential_v1.0
[…] decided to come back to this project after learning how to use the ATtiny’s ADC in differential mode. With the ATtiny44A we can use a gain of 20x for the differential mode and if we used a 1 ohm […]