Power for uP

Discussion in 'The Projects Forum' started by Konstabel, Jan 31, 2008.

  1. Konstabel

    Thread Starter Active Member

    Jan 31, 2008
    52
    0
    Hi!

    I am doing an embedded design project and need some help with the following please.

    I have an on switch (push n/o) that when pushed applies Vcc to the micro and switches on. With code I then have a pin pulled high, fed to a pnp transistor to keep the micro on when the switch is released. See attached schematic.

    I have done some calculations with Ib = 15mA (hard on current) and found the values as shown in the schematic. Rb = 227ohm and Re = 2.7ohm. But when I simulate it (circiutmaker), I get a value of 8,xV where I want the 4,5V. For my calculations I also used a beta of 10 (Ic/Ib as found on the data sheet).

    Are my calculations wrong, or where am I going wrong?

    Thanks
     
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    You are trying to use the PNP as a voltage regulator with no feedback network to adjust for a varying load. Even a bitty AT Tiny will present a dynamic load that a fixed output will not regulate satisfactorily. You might pursue the subject of linear regulators to learn more about the subject.

    The easy way out is to use a three terminal regulator, like a 7805 (or the TO-92 form, the 78L05. For just a few pennies, they do a good job of regulation.
     
  3. Konstabel

    Thread Starter Active Member

    Jan 31, 2008
    52
    0
    No I am not using the PNP as a regulator, just as a switch. But thanks for the answer.

    I have managed to work something out though that I believe will be able to supply 5V to the micro as I would prefer, be able to switch the circuit on and keep it on via a pin that is set high from the micro.

    See my sketch I have made.

    When the circuit is off and the switch is pressed the pnp switches on and the micro is supplied with 5V from the 7805. The micro then set the pin high which in turn switches the npn and when the switch is released keeps the pnp conducting.
     
  4. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Well, when I first saw your post, I got to fiddling ;)

    Have a look at the attached. It uses a P-channel MOSfet, an NPN transistor and a Zener diode to provide regulation and a means of turning the supply on and off via your uP.

    I think you misread the datasheet for the 2N4403. Minimum current gain is 30, and can go up as high as 300! Gain varies from batch to batch, and even within a lot.
     
  5. KMoffett

    AAC Fanatic!

    Dec 19, 2007
    2,574
    230
    Konstable,

    In your schematic Q1's base is driven high or low buy the µC. If your µC defaults to a high impedance input when powered down, the base could float and pick up noise, be partially turned-on, and turn on Q2. Add a 10K between Q1's base and emitter.

    Ken
     
  6. Konstabel

    Thread Starter Active Member

    Jan 31, 2008
    52
    0
    SgtWookie,

    To get the value of beta = 10, I used the formula beta = Ic/Ib with Ic = 150mA, Ib = 15mA (given on the sheet). I have asked in another thread what the difference is between beta and hfe (the values I believe you gave me).

    Which one should I be using then in this application?
     
  7. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    hFE, but the values given are an approximate range.

    After some fiddling around, I managed to simulate it using your original 2n4403 transistor, a 306 ohm load simulating your uP, and biasing resistors for the base, and a 9v supply.

    With Ib 55.36uA, Ib=15.02mA, which means for this particular model at this particular setting, hFE=271. As you can imagine, even the slightest change in the input biasing throws the output V off considerably. Trying to run a uP without voltage regulation would cause the output voltage of the transistor to swing wildly.

    The circuit I posted last isn't fancy, and the regulation portion is rudimentary, but it is a viable circuit. The one you posted with the 7805 looks OK, too - if you actually have the wires that cross near ground connected (I can't tell since there is no junction shown.)
     
  8. studiot

    AAC Fanatic!

    Nov 9, 2007
    5,005
    513
    It was made clear in the other thread that the current gain is a fixed parameter of the transistor. It is this gain which forces the collector current (that is what a transistor does). Thus Ic = gain times Ib until saturation at which point Ic cannot increase further. You can however pump in more current to Ib.

    You cannot use the equation 'backwards' to tell the transistor what gain to employ.
     
Loading...