I always wanted a portable power supply especially made for breadboards. Since I don't find it for sale, I had to make my own. I invite you to do the same.
PCB sponsored by JLCPCB. $2 for PCBs & Free Shipping First Order: https://jlcpcb.com/
- Outputs 5V 1A.
- Plugs on any standard 400 or 830 point breadboard.
- Charger with overcharge, overdischarge and overcurrent protection.
- Battery indicator with bi-color LED (green 50-100%, yellow 20-50%, red 0-20%).
- Low ripple/noise output with suppression diode.
Step 1: Materials
- 18650 lithium-ion battery. I took mine from a broken laptop. I used one for this project to make everything as compact/light as possible but you could use two batteries in parallel to increase the capacity. If you use two batteries make sure they are 100% the same brand, model, age/wear and capacity, and they have a similar charge in the moment you connect them. Buy here: https://amzn.to/2QEHP1y
- TP4056 charger module with battery protection. There is a version without battery protection that you should not buy. Make sure you buy the one that has 6 connections, just like the picture. Buy here: https://amzn.to/2QGUeCd
- MT3608 boost converter module. It has a potentiometer to select the voltage. On this case I choose 5V. Buy here: https://amzn.to/2A2cjoC
- Self-locking button rated at 3A/125V with a hole diameter of 12mm. Buy here: https://amzn.to/2A2lIN7
- 470µF 25V electrolytic capacitor. This reduces the voltage drop when we introduce a considerable load. Buy here: https://amzn.to/2A2uOJz
- 100nF ceramic capacitor. Reduces the high frequency ripple/noise. Buy here: https://amzn.to/2Tf14AO
- 1nF ceramic capacitor. Reduces the very high frequency ripple/noise. Buy here: https://amzn.to/2Tf14AO
- Schottky diode 1A 40V. This is to protect components connected on the breadboard from high voltage spikes caused by any coil on the circuit. Buy here: https://amzn.to/2A3mjOD
- 2x8cm perfboard. Buy here: https://amzn.to/2pLoeBz
- X2 double row 2x3 2.54mm pin male headers. Some cheap arduino nanos come with these and I usually don't solder them so I took them for this project. You can buy them with 90 degrees angle that might be a better option to facilitate the installation. Buy here: https://amzn.to/2QInZTj
Note: As an Amazon Associate I earn from qualifying purchases.
Materials for battery indicator (optional):
- 3mm bi-color LED (red-green). I put diagrams and PCB gerber files for common anode and common cathode LEDs so either would work. Just make sure it has enough diffusion that when turning both LEDs at the same time would result in an even yellow color. There are many bad quality bi-color LEDs where both colors don't mix well. Buy here: https://amzn.to/2QFF8N8
- NE5532P op-amp. Buy here: https://amzn.to/2C6YOpd
- S8050 NPN transistor. Practically any NPN transistor would work, though. Buy here: https://amzn.to/2ye79EM
- Resistors (1% of 1/4W or 1/8W):
- R1: 6.2K for the negative side of the voltage divider for the op-amp 2IN+ that controls when the red LED turns ON. Buy here: https://amzn.to/2yjlIHt
- R2: 2.2K for the positive side of the voltage divider for the op-amp 2IN+ that controls when the red LED turns ON. Buy a resistor kit that includes this value and the most others: https://amzn.to/2A2gHE6
- R3: 51K for the feedback to change the reference voltage when the red LED turns ON to have a solid transition.
- R4: 2K for red LED. This value might be different depending on your LED.
- R5: 6.8K for the negative side of the voltage divider for the op-amp 1IN- that controls when the green LED turns OFF.
- R6: 2.7K for the positive side of the voltage divider for the op-amp 1IN- that controls when the green LED turns OFF. Buy here: https://amzn.to/2QJvzgr
- R7: 100K for the feedback to change the reference voltage when the green LED turns OFF to have a solid transition.
- R8: 100 for green LED. This value might be different depending on your LED.
- R9: 5.1K for the transistor input. The NPN transistor works as an inverter for the output so the feedback have the correct polarity.
- R10: 2K pull-down for the transistor input.
Note: All the resistor values for the voltage dividers and feedback are very critical to achieve the wanted result. If you change one resistor value, you might want to change other resistors to compensate. Or if you intentionally want to change the voltage where the LEDs turn ON/OFF, you can do it changing these resistors values.
- 3mm bi-color LED (red-green) common anode for the charger indicator. The charger module has two built-in LEDs: one red to indicate it's charging; and a blue one to indicate the charging process has ended. This bi-color LED could replace those LEDs if you want. Buy here: https://amzn.to/2ye9a3O
- 2.2K resistor to replace the R3 on the charger module to set the maximum charging current to around 500mA, instead of the 1A by default. Is a surface-mount resistor but since I only buy through-hole resistors I used that.
Step 2: Preparation
Before soldering anything test all components, especially the modules.
The boost converter has a potentiometer to select the output voltage. Make sure you leave it at 5V before soldering to other components because you don't want it to be set at high voltage when you first power it on with everything connected. You could blow the electrolytic capacitor or burn the op-amp on the battery indicator. To adjust the boost converter you have to connect it to the battery and a multimeter. Turn clockwise to decrease voltage; turn counter-clock wise to increase voltage.
If you plan to do some modifications to the charger module, do it now before connecting to other components. There are three modifications I did. First I replace the R3 resistor to 2.2K to set the maximum charging current to around 500mA, instead of the 1A that is by default. The reason is that the IC gets really hot when charging. I wanted to decrease the temperature reducing the charging current. Of course it takes longer to charge the battery, but in my opinion is fast enough.
The second modification was to replace the two LEDs indicators to one bi-color LED (red-green) common anode. I did this to look better and fit my design, but you don't have to do this.
And the last thing I did to the charger module is to reinforce the soldering on the sides of the micro USB connector. This connector is susceptible from braking so I recommend adding more solder between the metal shell of the connector and the PCB. I would not mess with the actual electric connections on the back, though. Be careful not to add too much solder because it could get inside the connector ruing it.
I've seen power adapters for breadboards (without batteries) that plugs on the end of the breadboard and you could take that design if that's what you want, but I usually put arduino nanos on both ends of the breadboards and I didn't want anything blocking their USB connector.
Step 3: Battery Indicator (optional)
I design a very basic battery indicator with a bi-color LED (red-green) that glows green when the battery is at 50% (3.64V) or above; turns yellow when is between 50% and 20% (3.64V - 3.50V); and red when is below 20% (3.50V). It uses an op-amp to create two schmitt triggers to prevent the LEDs from flickering on the threshold.
I wanted to be very compact so I recommend using my layout. Or even better, upload my gerber file and order my custom PCB from a website like JLCPCB.com. That way you just have to solder the components without dealing with the connections on the PCB. Right now they have a promotion where you can buy 10 small PCBs for 2 USD and free shipping for the first order.
I design the PCBs on easyEDA therefore you can load the project and even change the layout the way you want.
Bi-color LED Common Cathode: https://easyeda.com/InterlinkKnight/Battery_Indicator_Common_Cathode-721a8a8bc919430baee5ad2e87582bef
Bi-color LED Common Anode: https://easyeda.com/InterlinkKnight/Battery_Indicator_Common_Anode-2f72cd2636a848d4a0f198bf032c0701
Step 4: Assembly
First solder the 3 capacitors to the output of the boost converter. These capacitors help to reduce any ripple and noise cause by the boost converter or the loads on the output. I strongly suggest installing them. If you don't have those exact values, put similar values instead.
After testing the main circuit, cut the 2x8cm perfboard to make space for the studs that some breadboards have on their side. If you don't do this your battery bank would not be compatible with some types of breadboards, at least not without connecting the power rails backwards. Not all the breadboards have the studs on the same side, and some even have 4 studs instead of the traditional 3. If you choose to design the battery bank to be plugged on the ends of the breadboards, you might still need to make space for the studs that some breadboards have on those ends too.
Place the 2x3 male pins on a breadboard to use as a guide to solder them to the perfboard in the correct position.
Add the schottky diode (1A 40V or more) on the output. This diode protects any component connected on the power rail from high voltage spikes cause by coils like relays, motors, inductors, solenoids, etc. Make sure the negative side of the diode (white line) goes to the positive side of the output.
For the case/cover I used black cardboard. Not the best choice because is flammable but you can use whatever you want.
Step 5: Conclusion
Some important tips:
- Don't use the power bank while charging. The charging process disables a few protection features that could damage the battery, and the load could cause an overcharge situation. Also, having the overcurrent protection disabled could damage even the breadboard itself.
- The overcurrent protection reacts really quick so it cuts the power when it detects a short circuit. To reset this, turn the power OFF for around 3 seconds.
These are the results of some of my tests. It may be different to yours but you can use it as reference of what to expect:
- Charging time from empty to full (at 560mA): 4:30 hours.
- With a load of 50mA, a full battery lasted 23 hours and 17 minutes.
- With a load of 500mA, a full battery lasted 2 hours and 21 minutes. This is around 1630mAh at the output.
- I observed a maximum constant voltage drop on the output of 0.03V when connected to a 500mA load, so overall it outputs a very stable 5V. I've seen other smaller boost converters where they drop the voltage by 0.7V under 5V (4.3V) which I find unacceptable.
- Voltages for the battery indicator are set to around 50% = 3.64V, 20% = 3.50V. The feedback changes the value to +/- 0.7V. You can try different resistor values to alter the voltages where the LEDs turn ON/OFF but my recommended values are based on my tests and calculations, and they should apply for most 18650 batteries.
It's possible to use two batteries in parallel to double the capacity. I did built that version too but obviously it's bigger and heavier so is not my first choice. You decide which version to build.
That's it. If you have a question, let me know.