Beginner here. I always get confused on how GPIO set as input on microcontrollers should be represented and simulated on a circuit.
Example
Take this simple voltage divider for example:

If I have a 3k and 1k resistor, Vin = 12v, then Vout = 3.06v which is ok because it is below the max voltage of the GPIO for ESP32 microcontroller which is 3.3v. So working with voltage is easy.
But current is tricky. The questions I want to answer with this simulation is mainly on the value of the resistors:
- Does the current exceed the max rating for the microcontroller GPIO (ESP32 in the case)?
- Is the current enough for the ADC to be able to read the voltage?
So how can I simulate the current going inside the GPIO to answer these questions?
For example why 3k and 1k and not 300 and 100 ohms? Or why not 30k and 10k instead? Or why not 1M and 3M?
Bottom line, how can I draw the circuit above to represent an input ADC GPIO readings?
Circuit: https://tinyurl.com/y8b255u9
Example
Take this simple voltage divider for example:

If I have a 3k and 1k resistor, Vin = 12v, then Vout = 3.06v which is ok because it is below the max voltage of the GPIO for ESP32 microcontroller which is 3.3v. So working with voltage is easy.
But current is tricky. The questions I want to answer with this simulation is mainly on the value of the resistors:
- Does the current exceed the max rating for the microcontroller GPIO (ESP32 in the case)?
- Is the current enough for the ADC to be able to read the voltage?
So how can I simulate the current going inside the GPIO to answer these questions?
For example why 3k and 1k and not 300 and 100 ohms? Or why not 30k and 10k instead? Or why not 1M and 3M?
Bottom line, how can I draw the circuit above to represent an input ADC GPIO readings?
Circuit: https://tinyurl.com/y8b255u9
Attachments
-
10.7 KB Views: 9
-
10 KB Views: 8

