I've made a simple measurement circuit and I wanted to make it work like that:
- user pushes a simple tactile switch and device turns on
- user can push the same button to measure again (and keep the turn off counter up)
- device turns off automatically by switching the whole circuit down
The MCU's power consumption is not the problem. there are a lot of other stuff and I wanted to turn the whole circuit off at once so the sleep modes are not considered here. here's the schematic I've used which seems to be problematic:
simulate this circuit – Schematic created using CircuitLab
The problem is, that the device turns on instantly, and stays on even when the output IO is pushed Hi. I read a value of about 4.3V on the gate of the mosfet. when I short the 47K resistor, the device turns off as expected so it seems the mosfet does not turn off completely. I've tried these values with no luck:
- Changing R4 to 10K
- Changing the diode to a 470R resistor. in this case device turns on and off rapidly
- lowering R1 to 10K.
What is the problem? is it possible to make it work without adding another component?
thanx for the time and knowledge.
circuit+R4 vs R2. What is the idea behind R2? I would remove it completely. \$\endgroup\$