Breadboard Power Supply (BBPS) Project
Overview
In this DIY project, we will design, assemble, and test a breadboard power supply (BBPS) that provides regulated and selectable DC voltage. This BBPS will power breadboard projects with either 3.3 volts or 5 volts of regulated power. The BBPS is designed to accept input power through a DC barrel jack as the primary input or through stripped wires on secondary input terminals. It can handle input voltages ranging from 6 to 30V DC from a DC wall wart and outputs either 5V or 3.3V regulated voltage, selectable via a slide switch.
Design Procedures
Select a Voltage Regulator
First, select a voltage regulator based on the design requirements. For this project, we will use the LM317 voltage regulator. The design is based on the Texas Instruments application note and datasheet of the LM317-N. A voltage regulator is a constant voltage source that adjusts its internal resistance to any occurring changes in load resistance. It provides a constant voltage at the regulator output. Below is the link to the datasheet of the voltage regulator: LM317 Datasheet.
Figure 1. Breadboard Power Supply
Understand the LM317-N Voltage Regulator
The LM317-N is an adjustable positive voltage regulator capable of supplying in excess of 1.5A over a 1.25V to 37V output range. As per the datasheet, the LM317 has the following design features:
Typical 0.1% Load Regulation
Typical 0.01%/V Line Regulation
1.5-A Output Current
Adjustable Output Down to 1.25V
Current Limit Constant with Temperature
80-dB Ripple Rejection
Short-Circuit Protected Output
0°C to 125°C Temperature Range
Why 3.3V and 5V Selectable Power Supply?
The BBPS's selectable 3.3V and 5V outputs are particularly useful for various electronic projects:
Microcontroller Compatibility:
Many microcontrollers, such as Arduino, operate at 5V for input voltage, while their GPIO (General Purpose Input/Output) pins function at 3.3V. Having both voltage options available allows for flexible interfacing with different types of microcontrollers and boards.
Voltage Level:
When working with microcontrollers that use a 3.3V logic level, such as the Arduino MKR 1000, it is crucial to match voltage levels to avoid damage and ensure proper operation. While the BBPS provides the necessary voltage levels, it is also recommended to use a voltage level shifter when interfacing 3.3V logic level microcontrollers with 5V devices.
Typical Low-Dropout Voltage Regulator Circuit
The application note of the LM317-N provides a typical low-dropout voltage regulator application circuit diagram as shown in Figure 2. If you want a variable voltage output with a potentiometer, you can use the circuit shown in Figure 2 without any modification.
Vin: 6 to 30V DC
C1: Filter capacitor
C2: Optional capacitor to improve transient response
R1: Current set resistor
R2: Variable resistor to get different output voltages
Vout: 1.25 to 37V
However, our design requires two voltage outputs, 5V, and 3.3V instead of variable output voltages using a potentiometer. Therefore, we need to modify the circuit in Figure 2. Using the potentiometer or the variable resistor, R2, a variety of output voltages can be made possible. Similarly, we can create a voltage division circuit and a switch to replace the variable resistor functions in the above example.
Design the Voltage Regulator Circuit
Set the Output Voltage
According to the datasheet, during operation, the LM317-N generates a nominal 1.25 V reference voltage, VREF, between the output and adjustment terminal. This reference voltage is applied across the program resistor R1. Since the voltage is constant, a constant current I1 flows through the output set resistor R2, resulting in an output voltage that can be calculated using the equation shown below:
Figure 2. Typical application of LM317
Design the Voltage Regulator Circuit
For this project, we will design for two outputs, 3.3V and 5V. The resistor values can be calculated as follows:
Based on the calculation, we need 330 and 390 ohm resistors for the voltage division and 240 ohm for the current limiter resistor, R2. Next, using the recommended values from the datasheet, the following capacitors were selected as shown in figure 3.
- Filter capacitor, C1 = 100uF to filter-out input transient
- Output capacitor, C2 = 10uF to improve output impedance
- Bypass capacitor, C3 = 0.1uF to prevent ripple from being amplified.
•R1: current set resistor
•R2 and R3: voltage division to get different output voltages.
Finally, a voltage selector switch is added to the circuit and finalized the design of the regulated section as shown in figure 3.
Figure 3. Regulated section of the BBPS
Note:
My initial design did not include capacitor C2, resulting in a significantly higher percent error in the output voltage compared to this design. Therefore, I recommend adding the optional capacitor, C2.
Circuit Diagram Explanation
In this circuit, we utilize the LM317 voltage regulator to provide a stable and adjustable DC output voltage. The circuit components include an input filter capacitor (C1), an output capacitor (C2), a bypass capacitor (C3), resistors to set the output voltage, and a slide switch to select between different output voltages.
Components and Their Functions:
LM317 Voltage Regulator:
The central component of the circuit, capable of regulating the output voltage. It has three pins: input (Vin), output (Vout), and adjust (Adj).
C1: Input Filter Capacitor (100µF):
Placed between the input voltage (Vin) and ground. Filters out noise and smoothens the input voltage to the LM317.
C2: Output Capacitor (10µF): Connected between the output (Vout) and ground. Stabilizes the output voltage and reduces ripple.
C3: Bypass Capacitor (0.1µF): Connected between the adjust pin (Adj) and ground. Improves the transient response and further stabilizes the output.
Resistors (390 ohm and 330 ohm): These resistors are used to set the output voltage.
Circuit Operation:
Input Voltage: A DC input voltage ranging from 6V to 30V is applied to the circuit through the Vin pin of the LM317.
Voltage Regulation: The LM317 regulates this input voltage down to a lower, stable output voltage.
The output voltage is determined by the resistor network connected to the adjust pin (Adj) of the LM317.
Capacitor Filtering:
C1 (100µF) smoothens the input voltage, filtering out any noise.
C2 (10µF) stabilizes the output voltage, reducing any remaining ripple.
C3 (0.1µF) connected to the adjust pin, helps improve the transient response of the voltage regulator, ensuring stability during rapid load changes.
Output Voltage Selection:
The Output Selector Sliding Switch facilitates the selection between different sets of resistors to determine the desired output voltage. By toggling between resistor configurations of 390 ohms and 330 ohms, the switch alters the regulated voltage, providing options such as 3.3V and 5V outputs. This feature enables users to choose preset voltage levels based on the specific needs of the circuit or device being powered, enhancing flexibility and usability.
Unregulated section:
The unregulated section of the Breadboard Power Supply (BBPS) design incorporates various protection devices, switches, and DC input devices to ensure safe and reliable operation. This section handles the initial power input and provides protection before the voltage regulation stage.
Components and Their Functions:
DC Barrel Connector (Primary Input): The primary input for the BBPS, typically connected to an external DC power adapter. Accepts a range of input voltages (6V to 30V DC) to power the circuit.
Header Pins Terminals (Secondary Input): An alternative input method allowing direct connection of stripped wires or jumper wires from a different power source.
On/Off Switch: A toggle switch used to turn the BBPS on or off. Controls the flow of power from the input sources to the rest of the circuit.
Reverse Protection Diode: A diode placed in series with the input power line to protect the circuit from damage due to reverse polarity. Ensures that current flows in the correct direction only.
Figure 4. Unregulated section of the BBPS
Unregulated Section Circuit Diagram
The circuit diagram for the unregulated section of the BBPS is shown in Figure 4. This diagram includes all the components mentioned above, illustrating their connections and roles in protecting and controlling the power input to the breadboard power supply.
Final Design
The final Breadboard Power Supply (BBPS) combines the regulated and unregulated sections, with a n additional power-on indicator LED with a series resistor (330 ohms), as shown in Figure 5.
Components summary:
Unregulated Section:
DC Barrel Connector: Primary input.
Header Pins Terminals: Secondary input.
On/Off Switch: Controls power.
Reverse Protection Diode: Prevents reverse polarity.
PTC Resettable Fuse (500mA): Overcurrent protection.
Regulated Section:
LM317 Voltage Regulator: Provides stable output voltage.
Capacitors: Filter and stabilize (C1: 100µF, C2: 10µF, C3: 0.1µF).
Resistors: Set output voltage (390 ohm for 3.3V, 330 ohm for 5V).
Output Selector Switch:
Switches between 3.3V and 5V.
Power-On Indicator:
LED with Series Resistor (330 ohms): Indicates power status.
Figure 5. Breadboard power supply (5V/3.3V)
The final circuit design phase was completed as shown in Figure 5. This figure illustrates the combined regulated and unregulated sections, the power-on indication LED with its series resistor, and the overall layout of the BBPS. This comprehensive design ensures that the BBPS provides reliable, selectable 3.3V and 5V outputs with essential protection mechanisms.
By following this final design, you can build a robust breadboard power supply that meets the needs of various electronic projects, providing both flexibility and safety in power management.
PCB Design
The PCB design for this Breadboard Power Supply (BBPS) project was created using Eagle CAD 9.2.2 student version. This software is free for students and can be obtained from the Autodesk website.
Important Note from LM317 Application
According to the LM317 application note, it is crucial to place the current set resistor (R1) close to the output terminal of the regulator to minimize trace resistance and ensure optimal load regulation performance. For our design, R1 is a 240-ohm resistor.
Design Considerations
Placement of R1 (240 ohm): To minimize trace resistance and maximize load regulation performance, R1 is placed as close as possible to the LM317's output terminal.
PCB Design Process
Schematic Entry: The circuit schematic was entered into Eagle CAD, ensuring all connections and components matched the design requirements.
Component Placement: Components were arranged with consideration for minimizing trace lengths and avoiding crossovers. Special attention was given to placing R1 close to the LM317's output terminal.
Figure 6. PCB layout (Some layers are turned off for clarity)
Design checks
Design Rule Check (DRC): The design was checked for errors to ensure it met all design rules and constraints.
Electrical Rule Check (ERC): An Electrical Rule Check was performed to ensure all electrical connections were correctly made, components were properly connected, and there were no short circuits or open connections.
The final PCB layout, designed in Eagle CAD, is shown in Figure 6 below. This layout integrates both the regulated and unregulated sections, including the power-on indicator LED with its series resistor, ensuring a compact and efficient design.
Figure 7. PCB schematic design
PCB Finalization and Manufacturing
Steps After Completing the PCB Layout
Run ERC (Electrical Rule Check): Ensure all electrical connections are correct and there are no unintentional shorts or opens.
Note: Ignore or approve the ERC errors related to "unconnected pin NC_1 and NC_2" as these pins are for breadboard mounting only and do not require electrical connections.
Run DRC (Design Rule Check): Verify that the layout adheres to the design rules set for the PCB manufacturing process. Ensure there are no design rule violations. The DRC check should return "No errors" for the design to be considered ready for manufacturing.
Generate Gerber Files:
Export the Gerber files from Eagle CAD. These files contain all the necessary information for PCB manufacturing, including copper layers, solder mask, silkscreen, and drill files. Zip the Gerber files for easy upload to the PCB manufacturer's website.
PCB Manufacturing Options
OSH Park:
Location: USA
Turnaround Time: Quick
Price: Moderate
Quality: High
Preferred for fast turnaround times.
JLCPCB:
Location: China
Turnaround Time: Moderate
Price: Cheapest
Quality: High
Best option for the lowest price.
PCBWAY:
Location: China
Turnaround Time: Moderate
Price: Moderate
Quality: High
Ideal for larger quantities (10 PCBs for the same price).
Choosing a Manufacturer
Quick Turnaround Time: Choose OSH Park if you need the PCBs quickly.
Lowest Price: Choose JLCPCB if you need the most cost-effective option.
Larger Quantity: Choose PCBWAY if you need more PCBs for a given price.
Personal Experience
Version 1: Manufactured by OSH Park, offering quick turnaround and high quality.
Figure 8. OSH Park PCB
Version 2: Manufactured by JLCPCB, offering great quality at a lower price but with a longer turnaround time.
Figure 9. JLCPCB PCB
After completing the PCB layout, run both ERC and DRC checks. Ignore or approve the "unconnected pin NC_1 and NC_2" ERC errors. Ensure the DRC check returns "No errors". Generate a zipped Gerber file and choose a PCB manufacturer based on your turnaround time, price, and quantity requirements. OSH Park is preferred for quick turnaround, JLCPCB for the cheapest price, and PCBWAY for larger quantities. Both OSH Park and JLCPCB have been used with great results in previous versions.
Component Assembly
Required Tools:
To assemble the PCB, the following tools are necessary:
Soldering Iron: For soldering the components onto the PCB.
Solder: The material used to create electrical connections between components and the PCB.
Wire Cutters: For trimming excess leads from components after soldering.
Multimeter (Optional): For testing electrical connections and verifying the functionality of the assembled PCB.
Required Parts
The following parts are needed to assemble the PCB, except for items 15, 16, and 17 which are optional:
DC Barrel Connector (Primary Input)
Header Pins Terminals (Secondary Input)
On/Off Switch
Reverse Protection Diode
PTC Resettable Fuse (500mA)
LM317 Voltage Regulator
Capacitors:
C1: 100µF
C2: 10µF
C3: 0.1µF
Resistors:
R1: 240 ohm
R2: 390 ohm
R3: 330 ohm
Series Resistor for LED: 330 ohm
Output Selector Sliding Switch
LED (Power-On Indicator)
Parts list
Soldering Instructions
All components listed in the parts list will be soldered onto the PCB, except for the heat sink, which will be mounted on the regulator using a screw and a nut.
Follow these instructions carefully to ensure proper assembly.
Preparation:
Ensure your soldering iron is heated to the appropriate temperature.
Have all your components and tools ready and organized.
Component Placement:
Insert the components into their designated positions on the PCB according to the schematic.
Ensure the components are placed on the top face of the PCB.
Soldering Process:
Start with Small Components: Begin with the smallest components, such as resistors and small capacitors.
Move to Larger Components: Once the small components are soldered, proceed with larger ones like connectors and switches.
Capacitor Polarity: Pay special attention to capacitors C1 and C2, which are polarized. Ensure the minus sign on the capacitor aligns with the correct polarity on the PCB. The positive terminal must always be connected to a positive point on the board.
Soldering Technique:
Place the soldering iron tip on the joint where the component lead meets the PCB pad.
Feed solder into the joint until it flows smoothly and forms a solid connection.
Remove the soldering iron and let the joint cool.
Ensure all solder joints are shiny and well-formed.
Header Pins:
The 0.1" header pins will be assembled on the bottom of the PCB.
Insert the header pins from the bottom and solder them from the top face of the PCB.
Figure 10. Assembly
Mounting the Heat Sink:
Attach the heat sink to the LM317 voltage regulator using a screw and a nut.
Ensure it is securely fastened to aid in heat dissipation.
Support the PCB:
Install the two standoffs and nuts to support the PCB.
Ensure one end is mounted on the breadboard for stability.
Once all components are soldered:
Double-check all connections and ensure there are no cold solder joints or shorts.
Verify the correct placement and orientation of all polarized components.
Inspect the overall assembly to ensure everything is securely attached and correctly positioned.
By following these steps and taking the necessary precautions, you will ensure a successful assembly of the Breadboard Power Supply (BBPS) PCB.
Testing the Breadboard Power Supply (BBPS)
Now that the assembly is complete, it's time to test the BBPS to ensure it provides the correct output voltages. Follow these steps to verify the functionality of the power supply.
Testing Procedure
Power Up: Connect the DC power source (6-30VDC) to the BBPS using either the DC barrel connector or the header pins terminals.
Turn on the power supply using the On/Off switch.
Safety Check: Ensure there are no visible issues such as smoke or burning smells. If anything, unusual is noticed, immediately turn off the power and recheck the connections.
Voltage Measurement:
Use a multimeter to measure the output voltage.
Set the multimeter to the DC voltage measurement mode.
Measure 5V Output:
Slide the output selector switch to the 5V position.
Place the multimeter probes on the output terminals (positive probe on the 5V output pin and negative probe on the ground pin).
Verify that the multimeter reads approximately 5V.
Measure 3.3V Output:
Slide the output selector switch to the 3.3V position.
Place the multimeter probes on the output terminals (positive probe on the 3.3V output pin and negative probe on the ground pin).
Verify that the multimeter reads approximately 3.3V.
Results
In my case, the output voltage tests were performed successfully. Both 3.3V and 5V outputs were accurately obtained from the BBPS, as shown in the following figures:
Figure 11: Multimeter displaying the 5V output.
Figure 12: Multimeter displaying the 3.3V output.
These successful measurements confirm that the BBPS is functioning correctly and is ready for use in powering breadboard projects.
Calculating Percent Error
To ensure the accuracy of the output voltages, we can calculate the percent error for both the 3.3V and 5V outputs using the following formula:
Percent error calculation for 5V output
Percent error calculation for 3.3V output
Interpretation
0.6% Error for 5V Output: Indicates the measured voltage is very close to the expected value.
0.3% Error for 3.3V Output: Indicates an even smaller deviation from the expected value.
These low percent errors demonstrate that the BBPS is providing very accurate output voltages, ensuring reliable performance for breadboard projects.
Summary
In this DIY project, we designed, assembled, and tested a Breadboard Power Supply (BBPS) capable of providing regulated and selectable DC voltage outputs of 3.3V and 5V. The BBPS is designed to power breadboard projects with flexibility, using either a DC barrel jack or header pins for input power, and can accept an input voltage ranging from 6 to 30VDC. The output voltage is selected using a slide switch.
The Breadboard Power Supply project successfully achieved its goals:
It provides stable and selectable 3.3V and 5V outputs suitable for various electronic projects.
The design and assembly process followed best practices to ensure reliability and ease of use.
Testing confirmed the power supply's performance, with very low percent errors in output voltages.
This project not only offers a practical solution for powering breadboard projects but also serves as a valuable learning experience in designing and building regulated power supplies. By following the documented procedures, one can recreate this BBPS for their own use, enjoying the flexibility and reliability it offers for electronic prototyping and development.