Author Topic: Power Latching Circuit Issue  (Read 562 times)

0 Members and 1 Guest are viewing this topic.

Offline .netNinjaTopic starter

  • Newbie
  • Posts: 2
  • Country: us
Power Latching Circuit Issue
« on: May 15, 2023, 06:21:45 pm »
I'm working on designing a circuit to latch power to an ATTINY85 when a button is pressed, then turn the power off when the button is held, but for some reason. The below schematic is not working. Does anyone have any ideas? When I load it Proteus, the 7805 is automatically providing 5v without a button press. I've attached the schematic to this post. Keep in mind I'm kind of a beginner to electrical engineering. I've done a lot with microcontrollers, just now diving into the world of electrical engineering.
« Last Edit: May 15, 2023, 06:28:18 pm by .netNinja »
 

Offline AnalogTodd

  • Regular Contributor
  • *
  • Posts: 90
  • Country: us
Re: Power Latching Circuit Issue
« Reply #1 on: May 15, 2023, 07:51:14 pm »
The first thing I see is that there is nothing to turn off the two bipolar devices you have in your circuit. All it takes is a small amount of leakage current into the bases of those devices and they will turn on, nothing is there to hold them off. Try adding some resistance to ground from the bases of those devices, something like a few hundred k should work.
Lived in the home of the gurus for many years.
 

Offline .netNinjaTopic starter

  • Newbie
  • Posts: 2
  • Country: us
Re: Power Latching Circuit Issue
« Reply #2 on: May 16, 2023, 02:41:44 pm »
Okay, I'll try that. Am I over complicating a simple on/off latching circuit or am I going down the right path?
 

Offline AnalogTodd

  • Regular Contributor
  • *
  • Posts: 90
  • Country: us
Re: Power Latching Circuit Issue
« Reply #3 on: May 16, 2023, 04:40:35 pm »
It all depends on what you want to accomplish. I tend to go simple with things--a switch for on/off is all I often do, but then again I am usually trying to maximize battery life for small circuits.

As for what you have done in the circuit, my only question would be what you are hoping to accomplish with Q3/C2? That's really not going to do anything in the circuit.
Lived in the home of the gurus for many years.
 
The following users thanked this post: .netNinja

Offline Eraldo

  • Regular Contributor
  • *
  • Posts: 65
  • Country: it
Re: Power Latching Circuit Issue
« Reply #4 on: May 16, 2023, 06:47:54 pm »
Dave already did a video on the matter. It's quite a simple circuit to build

https://youtu.be/Foc9R0dC2iI
 
The following users thanked this post: .netNinja

Offline Kim Christensen

  • Super Contributor
  • ***
  • Posts: 1327
  • Country: ca
Re: Power Latching Circuit Issue
« Reply #5 on: May 16, 2023, 10:46:05 pm »
Take a look at this circuit. When PB1 is pressed, it turns on Q1 which powers up the 5V regulator (It also turns on Q3). This boots up the MCU which then in software makes U1-PD6 high, which turns on Q2, which lights the LED and keeps Q1 on. The MCU does this quick enough that the user can then remove his finger from the button and the circuit can stay powered.
But now after a time, when the user again presses PB1, this turns Q3 on which the MCU can sense via it's PD7 pin and the software can then make PD6 go low and power itself off once the user releases the button. The nice thing about this is that the MCU can turn itself off under software control with no user intervention if you want it to.

 
The following users thanked this post: .netNinja


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf