Epyon
Well-known member
More an electronics question. I'm using a ATTiny45 to supervise a project running around a T3.2. When the ATTiny receives a reset signal from the Teensy (asserting a digital input) it cuts power to the project by turning a p-channel mosfet switch (FDN360p) off. The ATTiny gets its power from the power supply directly so it's not affected. It's possible to turn the mosfet on manually by setting a jumper connecting the gate to ground, if the jumper is in the other position the digital output of the ATTiny pulls it down to ground (digitalwrite low) to put it on. The voltage drop over the ATTiny input should still be well below the gate turn-on voltage (around 2V for the FND360P)). See attached circuit diagram.
If I use the ATTiny to pull the gate down to ground by connecting the gate to the digital output pin, the mosfet won't turn on. The digital pin of the ATTiny is instead pulled up to VCC, but no current runs through R2. Moreover it seems the whole ATTiny stops functioning. If I program another pin to switch together with the pin connected to the gate, it also stops. If I remove the jumper, or set in the other direction (connecting the gate to ground directly) the pins start switching again. The VCC to the ATTiny stays stable at 5V.
If I build the circuit with R2 but without the mosfet on a breadboard, it functions fine. So I must be missing something here with the mosfet?
If I use the ATTiny to pull the gate down to ground by connecting the gate to the digital output pin, the mosfet won't turn on. The digital pin of the ATTiny is instead pulled up to VCC, but no current runs through R2. Moreover it seems the whole ATTiny stops functioning. If I program another pin to switch together with the pin connected to the gate, it also stops. If I remove the jumper, or set in the other direction (connecting the gate to ground directly) the pins start switching again. The VCC to the ATTiny stays stable at 5V.
If I build the circuit with R2 but without the mosfet on a breadboard, it functions fine. So I must be missing something here with the mosfet?
Last edited: