I'm here because I'm experiencing a very strange behavior with a Soft Latching power circuit found on YouTube.
Yesterday, after finishing my circuit and code, it was working weirdly: the LED would light up, then turn off, and then light up again instantly for 6 seconds. A few dozen minutes later, it was impossible to keep the LED on.
I decided to take my circuit to a friend's place. We started by testing a few terminals with a multimeter and, voila, it worked perfectly—the LED stayed on for 6 seconds. I went back home, set up in my living room, reconnected the battery, and everything was fine. I disconnected the battery and, 3-4 hours later, went back to my office, connected the battery, and it didn't work anymore.
Could it be interference from my big PC? I don't understand...
I added a led to OUTPUT 1 to simulate a process with my ATTiny85.
I removed the C1 because the internal capacitor of my mosfets is enought. (And because it worked good depending where i am...) And I changed the resistors with the exact value i need (calculated with CISS)
Here is an image of the circuit i found.
Here is my setup (sorry, I did my best):
And a video (with my old version (long câbles)):
My code:
int stay = 2;
int led = 1;
void setup() {
// Serial.begin(9600);
pinMode(stay, OUTPUT);
pinMode(led, OUTPUT);
digitalWrite(stay, 1);
digitalWrite(led, 1);
}
void loop() {
delay(6000);
digitalWrite(stay, 0);
}
My specifications:
- Lipo 3.7v
- ATTiny85
- P-channel MOSFET TO-2305:
- Condition: VDS=VGS, ID=-250uA
- Min: -0.45V
- Max: -1.5V
- Ciss: 1200
- N-channel MOSFET TO-2302:
- Condition: VDS=VGS, ID=-250uA
- Min: 0.4V
- Max: 1V
- Ciss: 300
- R1: 820 ohms
- R2: 3.3k ohms
Thanks for your help.