Problem using transistor to self power and switch off ATMega328


hi all,
this first post on arduino forums. i've been coming here for years , can find topic helps me solve problems - big thank community in general creating such useful resource.

i've had search through forums, , on occasion can find similar posts, seemingly none directly relate. beginner though, due own lack of knowledge transistors , atmega328 chip.

i'm working on custom bike lights friend. i'd use 1 switch: turn atmega328 on; cycle through different modes; , switch off again. when circuit off should use no power.

i'm using npn transistor control path ground atmega328 , uln2803 drives leds. dpst switch both acts standard button http://arduino.cc/en/tutorial/button#.uywxdyvqjs4, , powers base of transistor. idea when pressed, atmega328 can switch on, , send self-sustaining current digital pin same transistor. button can used switch modes, final mode switching arduino off.

the problem i'm seeing when atmega328 should off, transistor still powering atmega. i've included schematic below.


am using transistor correctly? approach possible? if not, approach recommend?

if you're in position recommend charging circuit (schematic or pre-made) , battery, please do, i'll (hopefully) needing too.

need know specs (hfe (gain)) of transistor. use npn pnp ok if base current correct. problem see pnp turns on when base grounded (through current limiting resistor) have no pullup (10k) resistor keep off when not on. upload transistor datasheet.


Arduino Forum > Using Arduino > Project Guidance > Problem using transistor to self power and switch off ATMega328


arduino

Comments

Popular posts from this blog

VIDIOC_S_FMT error 16, Device or resource busy - Raspberry Pi Forums

using a laptop skeleton to build a pi laptop - Raspberry Pi Forums

Forum for Joomla? - Joomla! Forum - community, help and support