When working with an Arduino and its associated electronics, such as sensors, LCDs, and other components, providing a stable 5V power supply is crucial. While many off-the-shelf solutions exist, sometimes you need a custom, inexpensive design.
Here, we will guide you through building a simple yet effective power supply using two transistors and a Zener diode. For a improved regulation, you can use an op-amp which is explained in the tutorial Custom Op-Amp Power Supply for Arduino.This power supply will take a regulated voltage from two Li-ion batteries (3.7V each, providing 7.4V) and output 5V at 1A—perfect for powering an Arduino and its peripherals.
Overview of the Design
The power supply we will design is based on a series voltage regulator. The key components include:
- Transistors: We will use 2N2222 (NPN) and TIP31 (PNP) transistors. The 2N2222 will control the current flow, while the TIP31 will help maintain the output voltage.
- Zener Diode: A 2.4V Zener diode (e.g., BZX79C2V4) will be used to set the reference voltage.
- Resistors: Two resistors for feedback in the voltage divider network.
- Capacitors (Optional): For additional filtering if necessary.
- Batteries: Two 3.7V Li-ion batteries, totaling 7.4V.
Understanding the Operation
You want to power an Arduino and associated components (e.g., sensors, LCD) using a 7.4V DC input (from two 3.7V Li-ion batteries) and provide a stable 5V output at 1A. The circuit diagram is shown below.
The circuit works on the principle of a series voltage regulator. The Zener diode sets a reference voltage, and the resistors in the feedback loop adjust the base of the transistor to maintain the required output voltage.
Step 1: Output Voltage and Zener Diode Selection
We are designing a series voltage regulator where the Zener diode plays a key role in determining the output voltage. To calculate the required Zener voltage, let's go through the following steps.
Output Voltage Formula:
The output voltage in a series voltage regulator is governed by the formula:
Where:
- is the Zener diode voltage.
- is the base-emitter voltage of the transistor (approximately 0.7V).
- and are the resistors in the feedback loop that help set the output voltage.
We want the output voltage to be 5V, so we set .
Rearranging the formula to solve for the Zener voltage :
For simplicity, let's assume .
So, the required Zener diode voltage is 1.8V. In this case, we should select a Zener diode with a voltage close to 1.8V.
Step 2: Choosing a Zener Diode
From the calculation, you would need a Zener diode with a 1.8V Zener voltage. However, Zener diodes typically come in standard values, and a 1.8V Zener diode might not be readily available. If this is the case, you might need to adjust the feedback resistor values and opt for a 2.4V standard Zener diode, depending on availability. Here we will choose 2.4V BZX79C2V4 Zener Diode and use a 10K POT to adjust the output voltage or use R1=6.8kOhm and R2=10kOhm instead of the POT.
Step 3: Load Current Calculation
Once the Zener diode voltage is selected, we can calculate the current through the load. The load current can be calculated using Ohm’s law:
For a typical Arduino setup, let’s assume the load resistance is designed to provide 1A current, so:
Step 4: Power Dissipation
Now, let's calculate the power dissipated in the regulator. The power dissipated is the difference between the input voltage and output voltage , multiplied by the current through the load .
Given:
- (from the two 3.7V Li-ion batteries).
- (output voltage).
- (load current).
Substitute the values:
Step 5: Selecting the Transistor
For this design, you can use 2N2222 (NPN) and TIP31 (PNP) transistors, which are well-suited for low-power and medium-power applications. The TIP31 can handle the current and will help maintain the 5V output. The 2N2222 will be used for switching.
Final Thoughts
By selecting the appropriate Zener diode based on your calculations (around 1.8V), along with carefully chosen resistors and transistors, you can build an effective and low-cost power supply for your Arduino projects.
For more in-depth guidance on designing series voltage regulators, you can refer to these useful articles:
- How to Design the Simplest Series Regulator
- Simple Series Voltage Regulator Design
- How to Design Op-Amp Series Voltage Regulator
This design is simple yet effective, using only passive components and two transistors to power your Arduino, providing a reliable and cost-efficient solution for your electronics projects.