I am working on a project using the Attiny13 and a simple push button. Since I power the whole circuit with a 3.7V 18650 battery, I have to use a voltage divider to make it safe for the Attiny whenever the push button is pressed (the Attiny can only handle 3.3V on the input pins, but the battery voltage can go up to 4.2V).
For the divider however, I use a 100kΩ and a 300kΩ resistor to create a voltage of 1.88V (when the battery is nearly empty) and 3.15V (when the battery is full). Here is my schematic:
I am wondering why there is only a voltage of around 0.4V at the Attiny's input pin when I press the button. I guess that the pull-down resistor is too small (at least compared with the two from the voltage divider) and if the button is pressed, all the current (and so the voltage) are going to GND instead of flowing through the Attiny. So, in order to make the circuit work as it should I have to either change the pull-down resistor to a bigger value or change to two resistors from the voltage divider to a much lower value (like 10Ω and 30Ω).
So my questions are:
- Is my theory why this circuit behaves "weird" right?
- If yes, should I use a pull-down resistor with a higher value OR a voltage divider with lower resistance?
- What is the biggest possible pull-down resistor in this scenario?