Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe

Un-interruptible Bench-top DC Power Supply With Display

By Ganesh Selvaraj September 5, 2022

This tutorial explains how to make your own power supply unit for all your electronics and embedded system experiments. It also has a backup battery which will be used in case of power cuts and a display. For this project Reader should have knowledge of How to start with AVR and interface LCD with AVR.

Components Required

1.  SLA 12V battery
2.  Banana Jack connectors female (2 pairs each)
3.  Screw Terminals (1 pair)
4.  SPST switch (ratings 5A or more)
5.  Adjustable Voltage Regulator LM317 x 2
6.  Voltage regulators 7805,, 7809, 7812
7.  GPCBs
8.  Step-down Transformer 16-18V/3 Amps
9.  1N4007 Diodes x 4
10.Two Relay Module

11. Capacitors

12. Resistors
13. ATmega16/8 Development board
14. 16×2 LCD
15. Heat Sinks
16. Enclosure

Features:

– Inputs:  220-240V, 50Hz AC

– Outputs: 1 X 5V and 1 X 9V (available through banana jack)

1 X Adjustable voltage (available through screw terminal)

– Adjustable Voltage Range:1.25-14.5V in Mains Mode and 1.25-10.5V in Battery Mode

– Modes: 1) Battery Mode and 2) Normal Mode (Through Mains)

– Automatic Switching and Shutdown by Microcontroller

– LCD with various indicators.

Block Diagram

Block Diagram of Un-interruptible Bench Top DC Power Supply

Fig. 1: Block Diagram of Un-interruptible Bench Top DC Power Supply

Blue lines indicate signal lines and black lines indicate power lines.
Let me explain what each block consists of and its function.
Mains Block: This consists of the transformer, bridge rectifier (4 diodes) circuit and a capacitor. This block takes in the power from a wall socket which provides 220-230V AC. The step-down transformer scales down the amplitude of the sine wave, followed by the bridge rectifier which converts it into pulsating DC which when passing through capacitor yields an unregulated DC power of 16-18V (voltage depends on transformer)

Circuit Diagram of AC Rectifier used as first stage of Un-interruptible Bench Top DC Power Supply

Fig. 2: Circuit Diagram of AC Rectifier used as first stage of Un-interruptible Bench Top DC Power Supply

Charger Circuit: This block mainly consists of an adjustable voltage regulator LM317 which along with other components works as constant voltage, current limited charger for our battery. Once the battery is fully charged, the circuit automatically supplies low current to the battery and goes into trickle charging mode.

Circuit Diagram of Charger used as second stage of Un-interruptible Bench Top DC Power Supply

Fig. 3: Circuit Diagram of Charger used as second stage of Un-interruptible Bench Top DC Power Supply

Charge Indicator: This is nothing but two resistors arranged in  the form of a voltage divider circuit. It scales down the voltage level of battery for the microcontroller to read it.

Relay 1: This is a relay module which switches between the charge indicator circuit and charger circuit depending on the command from microcontroller.

The battery’s +ve terminal is connected to the common pin. The charging circuit is connected to the Normally Open pin and charge indicating circuit is connected to the Normally Closed pin.
When the mains supply is in OFF state, the relay disconnects the charger from battery and connects it to the indicator so that the microcontroller can read the battery level and display on the LCD. When the supply is ON, the indicator circuit is disconnected and the charging circuit is connected to the battery.

Relay 2: This relay module switches between mains supply and battery supply depending on the command from microcontroller.

The battery’s +ve terminal is connected to the Normally OPEN pin while the +ve line from main power supply block is connected to the Normally CLOSE pin. The common pin of relay is connected to the DC PSU block.
When the mains are unavailable, the controller automatically switches the relay to battery mode.

Circuit Diagram of Charge Indicator used as third stage of Un-interruptible Bench Top DC Power Supply

Fig. 4: Circuit Diagram of Charge Indicator used as third stage of Un-interruptible Bench Top DC Power Supply

Note: The +12V for powering the relay is given directly from the battery. This allows the relay to function purely based on the command from microcontroller instead of availability of power.

DC PSU: This block consists of the voltage regulators and a bunch of capacitors. +5V, +9V and adjustable voltage levels are provided by the ICs 7805, 7809 and LM317 respectively.

Circuit Diagram of Voltage Regulators used as final stage of Un-interruptible Bench Top DC Power Supply

Fig. 5: Circuit Diagram of Voltage Regulators used as final stage of Un-interruptible Bench Top DC Power Supply

Panel Display: This is the front and outer panel block which consists of the main switch, LCD displaying the voltage level, Potentiometer Knob to adjust the voltage, Banana connectors and screw terminals.

This is how I want it to look like:

Image representing Panel Display of Un-interruptible Bench Top DC Power Supply

Fig. 6: Image representing Panel Display of Un-interruptible Bench Top DC Power Supply

The icons on the LCD indicate the following:

Image showing Icons used on display panel to show different battery statuses

Fig. 7: Image showing Icons used on display panel to show different battery statuses

Code Explanation

. Here our development board does the following tasks:
– Calculate voltage levels at variable voltage terminal and battery level using ADC
– Detecting the presence/absence of mains
– Switching supplies and charge indicator/charger by controlling relays at appropriate events.
– Displaying all the above parameters  on LCD

 

So our code algorithm goes like this:
-Initializing the I/O ports, ADC registers and LCD functions.
– Enter infinite loop
– Check the availability of mains supply using ADC pin
– if mains available, display corresponding icons on screen
– if mains unavailable, switch to battery mode and switch ON charge indicator
– Check battery level using ADC pin
– If battery level is either of >50%, <50%, <10%, then display corresponding icons on LCD.
– If battery level close to 0%, initiate automatic shutdown sequence count.

Image representing pin diagram of character LCD

Fig. 8: Image representing pin diagram of character LCD

 

Since in the last step, the mains is unavailable anyways, the power to micro-controller board, LCD and the DC PSU gets cut off and hence the unit cannot be turned ON again without providing it the supply from mains.

In case the mains become available during the shutdown process, the data on LCD goes garbage and hence we use a watchdog timer to reset the controller at the end.
The +5V line is also connected to the microcontroller board and LCD.

Circuit Diagrams

Circuit-Diagram-Uninterruptible-Bench-Top-DC-Power-Supply

Project Datasheet

https://www.engineersgarage.com/wp-content/uploads/2019/10/PROGRAM.zip



Filed Under: Circuit Design
Tagged With: avr, power supply
 

Next Article

← Previous Article
Next Article →

Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

EE TECH TOOLBOX

“ee
Tech Toolbox: Internet of Things
Explore practical strategies for minimizing attack surfaces, managing memory efficiently, and securing firmware. Download now to ensure your IoT implementations remain secure, efficient, and future-ready.

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


RSS EDABOARD.com Discussions

  • Reducing "shoot-through" in offline Full Bridge SMPS?
  • High Side current sensing
  • How to simulate power electronics converter in PSpice?
  • Voltage mode pushpull is a nonsense SMPS?
  • Layout IRN reduction in Comparator

RSS Electro-Tech-Online.com Discussions

  • Back to the old BASIC days
  • Parts required for a personal project
  • PIC KIT 3 not able to program dsPIC
  • Failure of polypropylene motor-run capacitors
  • Siemens large industrial PLC parts

Featured – RPi Python Programming (27 Part)

  • RPi Python Programming 21: The SIM900A AT commands
  • RPi Python Programming 22: Calls & SMS using a SIM900A GSM-GPRS modem
  • RPi Python Programming 23: Interfacing a NEO-6MV2 GPS module with Raspberry Pi
  • RPi Python Programming 24: I2C explained
  • RPi Python Programming 25 – Synchronous serial communication in Raspberry Pi using I2C protocol
  • RPi Python Programming 26 – Interfacing ADXL345 accelerometer sensor with Raspberry Pi

Recent Articles

  • What is AWS IoT Core and when should you use it?
  • AC-DC power supply extends voltage range to 800 V DC
  • Infineon’s inductive sensor integrates coil system driver, signal conditioning circuits and DSP
  • Arm Cortex-M23 MCU delivers 87.5 µA/MHz active mode
  • STMicroelectronics releases automotive amplifiers with in-play open-load detection

EE ENGINEERING TRAINING DAYS

engineering

Submit a Guest Post

submit a guest post
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy

Search Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe