A voltage divider circuit constructed of appropriately selected resistors can be used to shift down from 5 volts to 3.3 volts, allowing you to use a 5-volt output from a device as the input to your 3.3-volt Raspberry Pi pin.
To be crystal clear in your understanding and learning, in this section, we are dealing with digital electronics, specifically digital input and the application of a voltage divider within a digital input circuit. For your own learning and understanding, please ensure that, after completing this chapter, you are comfortable with the basic practical differences and application of a voltage divider in both analog and digital circuits.
The following diagram is the same example we saw previously in Figure 6.8, only this time, it's been drawn within a different context; that is, showing how a 5-volt input can be shifted down to 3.3 volts:
Figure 6.11 – Using a voltage divider...