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

Pen Stand: Gaming Enabled
Intermediate
  • 58
  • 4

Full instructions

Do you have a pen stand that just sits there and does nothing? Can we make it play a game/flash LEDs every time you use it? Let's find out!

Arduino on Internal Oscillator Crystal as Clock Source
Intermediate
  • 1,064
  • 74

Protip

Want to make an Arduino having only an ATmega328 chip and nothing else? Not even the crystal oscillator!

Self Balancing Robot Using Mpu6050 Accelerometer
Intermediate
  • 240
  • 8

Protip

this is self balancing robot on two wheels using mpu6050 accelerometer based on arduino..

Reducing Arduino Power Consumption
Intermediate
  • 1,211
  • 98

Protip

One the most important feature of portable electronics should be long battery life. We can reduce the current drawn by several ways.

Dancing Autobot
Intermediate
  • 173
  • 3

Protip

this is our project..and new thats called autobot with dancing like michael jackson....

Node-Red and MQTT for Your IoT Projects
Intermediate
  • 143
  • 3

Work in progress

The idea is to create an environment running an MQTT Server, Mosquitto, and Node-Red, and start developing projects with connected sensors.

Sign up / LoginProjectsCommunitiesTopicsContestsLiveAppsBetaFree StoreBlog