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:

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.

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).


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:

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:

Regulated Section:

Output Selector Switch: 

Power-On Indicator:

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



Choosing a Manufacturer

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:

Required Parts

The following parts are needed to assemble the PCB, except for items 15, 16, and 17 which are optional:

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:

Soldering Process:

Soldering Technique:

Header Pins:

Figure 10. Assembly

Mounting the Heat Sink:

Support the PCB:

Once all components are soldered:

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:

Measure 5V Output:

Measure 3.3V Output:

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:

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.