Chapter 8

Resistor Divider Networks

This module provides functions to calculate values from resistor divider networks.

8.1  Usage

To use the resistor divider network functions, use this:

  #include <resistor-network.h>

8.2  Functions

uint16_t divider_network_lower_resistor(uint16_t v_ad_max, uint16_t v_ad_counts, uint16_t r_upper)   function

This function calculates the resistance of the lower resistor of a resistor divider network, given the maximum A/D counts v_ad_max, the measured A/D counts v_ad_counts for the divider network, and the known resistance r_upper in ohms of the upper resistor. It uses the equation

R\subrm{lower} = R\subrm{upper}
                   \times \frac{V\subrm{measured}}
                               {V\subrm{max} - V\subrm{measured}}

to arrive at the result.

uint16_t divider_network_voltage(uint16_t v_ad_counts, uint16_t r_upper, uint16_t r_lower)   function

This function calculates the voltage feeding into a resistor network given the measured A/D counts v_ad_counts, and the the known resistances in ohms of the upper resistor r_upper and the lower resistor r_lower. It uses the equation

V\subrm{network} = V\subrm{measured}
                     \times \frac{R\subrm{upper} + R\subrm{lower}}

to arrive at the result.