Things used in this project

Hardware components:
A000066 iso both
Arduino UNO & Genuino UNO
×1
Ard nano
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 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

Assistant Executive (EEE Labs), 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

WiFi Messenger
Intermediate
  • 647
  • 10

Protip

Calling my son from his room using 2 ESP8266 modules, instead of shouting.

Both Physical & Cloud Cayenne Lights Switch
Intermediate
  • 67
  • 2

The cloud switches are well known, but what happens when the local internet fails and the switch cannot connect to the internet?

Smart Garden
Intermediate
  • 1,574
  • 16

Smart Garden is a plant environmental monitoring system.

Pool Buddy
Intermediate
  • 795
  • 7

Work in progress

Monitor and log water quality (pH & ORP) and temperature from everywhere.

IoT Thermometer Using Python
Intermediate
  • 575
  • 6

Full instructions

How to develop a simple, but powerful, IoT thermometer using a Zerynth-powered single-board MCU and the Zerynth App.

WiDC: Wi-Fi-Controlled FPV Robot
Intermediate
  • 5,617
  • 34

Full instructions

What about using a Wi-Fi remote-controlled robot for exploring your surroundings, reaching inaccessible places, spying and take pictures?

ProjectsCommunitiesTopicsContestsLiveAppsBetaFree StoreBlogAdd projectSign up / Login
Feedback