Voltage dividers

A common problem in electrical engineering is the use of a resistor divider to create a circuit which derives a second (lower) voltage from a known voltage. This can be for a reference voltage to an ADC (as on the Arduino) , to set the voltage on an adjustable regulator (where the regulator seeks to maintain an output voltage adequate to produce a set voltage at a feedback node), or to calculate the gain on an amplifier circuit, among other possibilities. The canonical voltage divider circuit Usually, we know Vin and Vout, but R1 and R2 are unknowns. We usually pick one of them (based on what's on hand, in the parts library, time of day, dog's birthday, roll of a 20-sided die, etc), then calculate the other. Almost always, that results in a value which is not readily available, so we pick the closest value, calculate the error, decide it's too much, and pick another resistor value and start over. Error in the output voltage has a number of possible sources:...