Voltage Dividers for Logic Level Shifting
I’m building a project for an ESP32 microcontroller (which works with 3.3v logic), and my project needs to get information from a 5v sensor.
Connecting the 5v directly to a GPIO (General Purpose Input/Output) pin would probably damage the chip. To prevent this, we can use a voltage divider to lower the voltage.
Voltage dividers
A voltage divider is a simple circuit that given an input voltage, it produces a lower output voltage. A simple representation looks like this: