Maker Pro
Maker Pro

Total amateur question.

ferulebezel

Dec 11, 2012
8
Joined
Dec 11, 2012
Messages
8
I'm doing a little project with a PRJC teensy AVR devboard. I'd like to use a transistor to short a switch to the power to the to the +5 volt pin. Said transistor would be controlled by a pin from the chip and used to power down the board when it's task is finished.

The problem is that I was trained and worked as a tech 30 years ago and have been a bookseller since. I never learned circuit design. Just how to find and replace broken and burned components.

I have no idea what type of transistor to use and what size resistors (if any) I need to add to the circuit.

This is most likely going to be a one off project so I don't really need an education in circuit design, Just a simple "use this transistor and these resistors in these places." type answer.

Thanks.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,505
Joined
Jan 21, 2010
Messages
25,505
So you want to use a pin on the microcontroller to turn power on and off?

Or is it that you are going to press a momentary contact button to provide power, then you want the microcontroller to turn on the transistor to keep the chip powered up until you decide to put it back to sleep?
 

ferulebezel

Dec 11, 2012
8
Joined
Dec 11, 2012
Messages
8
So you want to use a pin on the microcontroller to turn power on and off?

Or is it that you are going to press a momentary contact button to provide power, then you want the microcontroller to turn on the transistor to keep the chip powered up until you decide to put it back to sleep?

It's the second option. But I don't want it to just go into a sleep mode. I want a real power off.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,505
Joined
Jan 21, 2010
Messages
25,505
Here is a fairly complex (but very flexible) way of doing it.
 

CocaCola

Apr 7, 2012
3,635
Joined
Apr 7, 2012
Messages
3,635
With new micros unless absolute zero drain is required it's generally preferred to simply put the chip into deep sleep and to use a momentary button as an external interrupt to bring it out of sleep...
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,505
Joined
Jan 21, 2010
Messages
25,505
True.

You can use the uC to turn power on and off to other more power hungry parts of the circuit so they're only powered when necessary.

There's a somewhat dated, but still relevant section of The Art of Electronics where this is done to extend projected life of batteries to some design goal.
 

ferulebezel

Dec 11, 2012
8
Joined
Dec 11, 2012
Messages
8
With new micros unless absolute zero drain is required it's generally preferred to simply put the chip into deep sleep and to use a momentary button as an external interrupt to bring it out of sleep...

This board has an LED attached to one of the pins in a manner where when the pin is low it lights. I assume this is a manufacturing error (and that's why I got it cheap). I think if I put the chip to sleep that there will still be current flowing through that LED.
 

CocaCola

Apr 7, 2012
3,635
Joined
Apr 7, 2012
Messages
3,635
So toggle that pin to input before you put the chip to sleep, or simply remove the LED from the board...

It's all a matter of how power saving you want to go, there are other parasitic devices in most circuits beyond just the micro, all things have to be considered...

I have made devices with PIC chips that run off 2 or 3 AAA batteries and even using cheap zinc–carbon batteries they have a working shelf life in excess of 6+ months...

If you are using a regulator you have to also consider the quiescent current of the regulator as well, some of them go it's a near deep sleep when draw is very low (micro in sleep) others are not very power friendly...
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
This board has an LED attached to one of the pins in a manner where when the pin is low it lights. I assume this is a manufacturing error (and that's why I got it cheap). I think if I put the chip to sleep that there will still be current flowing through that LED.
So set the pin to high when you go to sleep!

Bob
 

ferulebezel

Dec 11, 2012
8
Joined
Dec 11, 2012
Messages
8
So you want to use a pin on the microcontroller to turn power on and off?

Or is it that you are going to press a momentary contact button to provide power, then you want the microcontroller to turn on the transistor to keep the chip powered up until you decide to put it back to sleep?

The second. And there are reasons I don't want to use sleep modes, the on-board LED for one, but most importantly, the lack of a good sleep tutorial. The ones I've been able to find assume too much pre-existing knowledge.
 
Top