2.1.1 Using the Supply Voltage as a Reference

There are times when using the microcontroller’s supply as a voltage reference is required. However, if not done correctly, this supply can introduce errors into the measurement.

The biggest pitfall with using the supply voltage is power-supply ripple and noise. The following list contains some techniques for minimizing the noise of the power supply:

  • On noisy power supplies, use a ferrite bead in series with the power input
    • The ferrite bead helps to eliminate switching noise on the power supply
  • Use a linear regulator instead of a switching regulator
    • Switching regulators generate a lot of electrical noise. The noise is not usually an issue with digital devices. However, analog circuits are particularly vulnerable.
  • Enable slew-rate controls on the I/O
    • Some microcontrollers can slow the transition time of the I/O, which reduces the amplitude of current spikes when switching
    • Alternatively, adding small resistors in series with the I/O can slow the transition time
Note: Some of the information from Tips for Measuring Single-Ended Signals also applies here (e.g., decoupling).