Things used in this project

Hardware components:
A000066 iso both
Arduino Arduino UNO & Genuino UNO
×1
Ard nano
Arduino Arduino Nano R3
×1
XL 6009 DC DC Boost
×1
Omron b3f 1000 image 75px
SparkFun Pushbutton switch 12mm
×1
160 20
16 MHz Crystal
×1
Terminal Block Connector
×1
On semiconductor lm317tg
Linear Regulator with Adjustable Output
×1
Stmicroelectronics l7805cv image
Linear Regulator (7805)
×1
Fairchild semiconductor 1n4004. image
1N4007 – High Voltage, High Current Rated Diode
×1
Adafruit industries ada62 image 75px
USB-A to B Cable
×1
Bourns 3296w 1 103lf image 75px
Multi-Turn Precision Potentiometer- 10k ohms (25 Turn)
×1
OP07 Instrumentation OpAmp
×1
Generic Socket Box
×1
FR4 Proto Board
×1
11026 02
Jumper wires (generic)
×1
Te connectivity 4 103741 0 image 75px
Male Header 40 Position 1 Row (0.1")
×1
Mfr 25frf52 10k sml
Resistor 10k ohm
×1
Mfr 25fbf52 22k1 sml
Resistor 22.1k ohm
×1
Mfr 25frf52 1k sml
Resistor 1k ohm
×1
Arduino Latching Relay 5v 2A
×1
SparkFun MCP 4131 Digital Potentiometer 10k
×1
Arduino Copper Tape
×1
Arduino LM358 Opamp
×1
Arduino 1306 OLED
×1
Software apps and online services:
Ide web
Arduino Arduino IDE
Hand tools and fabrication machines:
09507 01
Soldering iron (generic)
Hy gluegun
Hot glue gun (generic)
Mini Drill Motor

Schematics

High Level Sch
Drawn on Whiteboard !
Sch lb6fxnwwjt
Check this link for full Sch
https://circuits.io/circuits/4762970-arduino-based-programmable-power-supply
Full sch 07mw2tnfi9
Current Sense Module
3 current sensing module sujue9ulps
Step Voltage & Adj Regulator Module
2  step voltage and adjustable regulator module cdn6lkxrqn
Multi Voltages of the System
Volt aeubr5qrud

Code

Arduino Programmable Portable Power SupplyArduino
Ver 1.0.1 with Pin out info in comments
// Pin Reset, D0 & D1 for uploading Sketch

// Pin D9,D10,D11,D12,D13 for controlling OLED Display

// ADC A0 Pin for Sensing V_boost
// ADC A2 Pin for Sensing V_batt (LiPo)
// ADC A3 Pin for Sensing I_Output (Load)
// ADC A4 Pin for Sensing V_USB (Charging)
// ADC A5 Pin for Sensing V_Output (Load)


// Latch Relay's 2 Coils Driving Pin  D4 &D5
#define RC1 4
#define RC2 5

// User Input Switchs connected to Pin D2 & D3
#define SW1 2
#define SW2 3

// Pin D6,D7,D8 for Digital Pot Control Pins
#define CS_PIN 6
#define CLK_PIN 7
#define DATA_PIN 8



volatile uint8_t Switch1 = 1;
volatile uint8_t Switch2 = 1;

float V_Out = 0.0;
float I_Out = 0.0;
float V_Bat = 0.0;
float V_Bst = 0.0;
float V_Chg = 0.0;
uint32_t time = 0;


#include "U8glib.h"
// OLED Display Control Pins
//SSD1306 oled waveshare(clk,din,cs,d/c,res);
// THIS FOR WAVESHARE
U8GLIB_SSD1306_128X64 u8g(10, 9,11, 13,12); 


void setup(void) {

  // flip screen, if required
  analogReference(INTERNAL);
  u8g.setRot180();
  button_init();
  relay_init();
  init_timer1();
  digipot_init();
  


}

void loop(void) {
  
 update_display();
 calc_VI();
 if (Switch1==0)
 {
   rc1_latch();
   Switch1=1;
   increment_digipot();
 }
 if (Switch2==0)
 {
    rc2_latch();
   Switch2=1;
   decrement_digipot();
 }
 
delay(100); 
}
Code Ver 1.0.1 BetaC/C++
No preview (download only).
Code Ver 1.0.2 BetaC/C++
Bug Fix for Text/Box Alignments
Bug Fix for Overload Trip

Few more bugs will be fixed on next release
No preview (download only).

Credits

Inductor color code   copy
Shahariar

Electrical Engineering, Power Plant O&M, Renewable Energy Expert, Electronics & Embedded System Hobbyist !

Contact

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Similar projects you might like

Direction Indicators for Bikes
Intermediate
  • 64
  • 3

Full instructions

Riding bike is a little dangerous. With the Direction Indicators for a bike, car's know if you want to turn right or left. Make biking safe!

Third Eye for The Blind
Intermediate
  • 518
  • 8

Full instructions

An innovative wearable technology for visually impaired peoples.

The Trump Button
Intermediate
  • 526
  • 4

Full instructions

The famous connected button to order your favorite drink using Sigfox network.

DIY Fidget LED Display
Intermediate
  • 779
  • 6

Work in progress

Fidget spinners...the simple spinning toy that came out of nowhere. I thought it'd be cool give it some flare and make it a POV display.

Controlling 2 motors with Bean+ and TB6612FNG
Intermediate
  • 17
  • 1

Full instructions

This project aims to demonstrate the operation of the TB6612FNG drive together with the Bean+ to control two DC motors trough an iPhone app.

Scrumtato: Make Daily Stand-Ups Agile Again
Intermediate
  • 768
  • 10

Scrumtato is an ATtiny85-based gadget to keep overly passionate developers from excessively talking during daily stand-up meetings.

ProjectsCommunitiesTopicsContestsLiveAppsBetaFree StoreBlogAdd projectSign up / Login