Power Supply For Microcontroller Projects

There are inexpensive power supply modules on the market that can be plugged directly into a microcontroller circuit. The circuit we have in mind power_supplyhas an excellent price to performance ratio. In other words, although based on a relatively simple design, the power supply module offers enhanced features at a modest investment. In addition to the well-regulated DC5V output, an enhanced switching option is offered here to shutdown the power supply module when the power supply input is no longer required for the connected microcontroller circuitry. The advantage of the switching principle applied is that practical circuit is within easy reach. The disadvantage should also be mentioned, however: since the switching circuit calls for a ‘power on/off instruction’ from the microcontroller, one I/O port of the microcontroller (ofcourse with a few code lines) should be reserved for the task.

The power supply module with an electronic on/off switch, whose diagram is shown below, is highly suitable for almost all little robotic projects. All that needs to be is to attach the module in the main circuit board of the microcontroller unit. The power supply module circuit can be conveniently built on a small prototyping board, and all components (including the power button)can be soldered on to the circuit board. When all constructive work is completed, connect a 9Vbattery to the circuit and press the power button S1. Now, the direct voltage output of the battery is applied to the capacitor C1 via the mosfet T1. Whether the MOSFET is on or not depends on the potential at its gate terminal. When S1 is pressed, the gate becomes negative with respect to thesource and T1 comes on. The DC5V output is now available across C2. Shortly afterwards, if the I/O port of the microcontroller enables T1 with a logic-high level signal via the ‘PWR_ON’ input,DC5V supply remains on even when S1 is released. When PWR_ON input is made low by the microcontroller, the power supply module (and the microcontroller circuit) switches itself off again.

Note that, for this electronic on/off switching option, the microcontroller should hold a suitable code so that immediately after the microcontroller has been switched on, a ‘logic-high’ (5V) level signal should be supplied by the microcontroller to the PWR_ON input of the power supply module. Later, in case of a no-activity detection of the main circuit (ie the robotic vehicle) for a finite duration (for example 60 secs), the microcontroller should give a ‘logic-low’ (0V) level signal to the PWR_ON input of the power supply. Only one I/O port of the microcontroller is required for this intelligence!

5v Power Supply Circuit
Power Supply Circuit

[success]This Circuit was tested at TechNode PROTOLABZ[/success]