microcontroller power supply circuit

Precision MicroController Power Supply Unit

Lots of projects use the microcontroller (uC) as the ‘brain’ – for example as an intelligent controller in the prototype of a flying machine. Although there are a number of solutions for powering a microcontroller-based system, each type has its advantages and disadvantages, and you need to choose the one that suits the project concerned. Presented here is one ‘universal’ power supply unit for today’s microcontroller projects.

The circuit is a compact power supply capable of providing +5 and +3.3V regulated outputs as VCCs (VCC1 and VCC2), and a stable +2.5V regulated output as a ‘clean’ reference voltage (VREF) for optional analog circuits linked up with the microcontroller unit. Since an input switching circuit is added for internal/external dc power supply selection, you can attach a ‘built-in’ 9V battery pack with the main power supply circuitry for implementing an ‘automatic power backup’ feature.

microcontroller  power supply circuit

(circuit diagram of the uC power supply unit)

Major Components List

  • LM7805 : Fixed positive voltage regulator
  • LM1117-3.3 : 800mA low-dropout linear regulator
  • LM431: 3-terminal adjustable shunt regulator with temperature stability
  • FDN340P : P-Channel logic level MOSFET–2A, 20 V
  • 1N5817 : Schottky barrier rectifier 1A, 20V

Add-On Power Distribution Switch

Advanced hobbyists may like this add-on circuit of the current limiting power distribution switch designed around MIC2009A. This add-on is a high-side power switch optimized for general purpose power distribution and control in microcontroller-based circuits. Datasheet and support documentation can be found on Micrel’s website.

The MIC2009A limits the current from the +5V dc input (VIN) to the +5V dc output (VOUT) with the help of the resistor connected at its pin 5 (ILIM). As soon as the output load start sourcing more than 150mA the +5V dc output voltage is automatically controlled by the MIC2009A to limit the load current to this pre-setted level.

MIC2009A power distribution switch

(circuit diagram of the power distribution switch)

The prototype was tested with MIC2009A-2YM6, available in 6-pin SOT-23 package. In this chip, an active-low at its pin 3 (EN) will enable the power switch (by default, pin 3 is low – see R2). But if you are using MIC2009A-1YM6, beware, an active-high signal is required for the purpose.


Join the conversation!

Error! Please fill all fields.
  • Emmykwul22016

    Hi! Pls HY1906 MOSFET used in 1000W DC to Ac inverter… Is there any equivalent that can be used in its place pls I need reply thank you

  • Rene Jams

    re: precision:: the specific connection of Zener-TLxxx-PNP seems to dramatically improve the OUTP-MON-SINK 3-terminal — Have a nice day everyone! ~~

  • breakthedawn

    Another reverse diode example

  • breakthedawn

    If on secondry side voltage is higher than on primary side then current flows thru V-reg and destroys it. It happens easily if supplied circuit has bigger capacitors. On primary side voltage drops quickly if circuit is switched off or short circuited to ground. Secondary side keeps voltage much longer bc of capacitors so there is a reverse current thru the v-reg. U were just lucky so far.
    Reverse diode is a basic rule in designing v-regs of that kind.

    • Rene Jams

      this is not the joke — we had two incidents when the power returened after blackout ::

      (a) the local water provider´s pump generated an oscillating pressure (due “properly” delayed switch ON-s) into tubes (hyraulic “resonator”) so our water filters seal flew off – very funny – especially if no-one’d been at home . . .

      (b) our kitchen range (AEG Electrolux) started flicker like a christmas tree (with all its relays randomly strobing) — i like admired it some half a second before snapping OFF the main fuse (5m away)

      — “life is a laugh” as our sergeant said after recording 20 minutes harsh swearing onto tape and then repetedly listening it X}X}X}

    • Rene Jams

      /!\/!\/!\ you’re right people even engineers don’t much pay attention to a fire safety /!\/!\/!\ especially in 24-7-365.2425 ON case (power blackouts × the NRG company´s !!!good will/custom!!! to keep your line(s) at ±10% – but they’ll have no responsibilities of any kind if they deside to increase that error !!! ← this is certainly what all engineers take into account when designing their devises !!!!!!!!!!!!!)
      ►►►► what i’m on about is that the components have a factory systematic error — i’ve measured some TL431-s whose “initial”(unadjusted/min.) voltage drop was deviating from 1.85 to 2.75 – e.g. you must buy hundreds of ´em to be able to pick your 2.5V one – same for 3-terminal regulators they do deviate in specified usually ±5% range – e.g. your 5V will be somewhere from 4.75V to 5.25V ◄◄◄◄

    • breakthedawn

      T.K. don’t take it personally. I meant it in a good way.
      You know, the circuit is not really safe. Imagine if V-Reg fails due to a faulty DC input and there is a LiPo backup battery connected. Circuit would burn down quickly and maybe the house around it as well. I don’t want to talk about casualties but a reverse diode is a few cent compared to a new house or a life. A replacable fuse is a good idea too bc battery packs can discharge really quickly in case of circuit failure.
      By the way, an additional hint in ur article would be good about an appropriate heatsink for the 7805 otherwise the 7805 will shut down quickly if current flow is a bit higher.
      In article you write 12V max input DC and 5 V output. If user draws 300 mA (1A max) then 7805 heats up to much more than 125 °C bc of 2.1 Watt heat dissipation. thermal resistance to junction-air is around 65k/W which means that 7805 heats up to around 140°C+ambient temp which is much above specification. 78xx doesn’t kill itself due to thermal protection but it shuts down. A breadboard gets damaged (plastic melts) around the pins and maybe you hear screams of poor users who burned their fingers 😉

    • tkhareendran

      @breakthedawn: When it’s dawn, try to brush-up (do not break it)your knowledge on basic electronics. Incase of an independent v-reg design, you are right just as the text book. Have a look at real world examples including the v-reg circuit sections of Arduino,PIC, and ST microcontroller circuits/boards!

  • T.K.Hareendran

    @breakthedawn: Neither suggested nor required (refer NSC datasheet for more)!

    Further, here the output buffer capacitor (C2) is always the part of a “closed” circuit (see the circuit). Nothing wrong here, and prototype of my design is working well since its inception.

  • breakthedawn

    7805 circuit needs a reverse diode between in and out pins otherwise it could get damaged by revers currents.

  • Rene Jams

    (non-loaded , non-jumpy ref. F;X – hmm) + error ranges for realistic loads – for real life multiply by 10x and more near max. power

    • Rene Jams

      left here = about.quote.”the “Precision” range … not referenced/specified”

      the 1-st Spice sim. shows the grid’s interrelations
      the 2-nd Spice simulation specifies the error ranges e.g. precision ranges

      ps! i do realize this is a simple project no time to waste for – so i wasted the time you didn’t had (extending the post)

      + it came clear the TL431 behaves jumpy when some of it’s PN junctions swap polarity (so it requires specioal attention — in this case a pre conditioner supply)

    • T.K.Hareendran

      Please be stay on topic. I can’t understand what you left here!

  • Rene Jams

    ((nothing 2doN Sundays)) Xi didn’t waste too much time on it (?Jumpy Ref – muhahaa)

  • Rene Jams

    actually i wrote notes 1,2,3,4 no a note 1234 ??? what is shown is note no.4 … short-form restore :: note.1 : ?FET.fullON.gateVoltage; note.2 : ? 47uF:stability + direct coupling high-current regulators; note.3 : factory deviation of xx431 + connecting it in parallel with high current load . . . ? the “Precision” range (for 5V,3.3V,2.5V) not referenced ???

  • Rene Jams

    PMPSU.about :: although the on-chip regulators are – in most cases – reliable , there are a few notes i’d like to make about this particular design : [>1234<] the LM7805 needs a "high current" connection scheme (p.22 – not too good in practise for highly deviating load current) for load currents exceeding (700)800mA (where the cooling becomes an obvious issue) // i'm still studing the topic so take these notes with some precation