Adjustable Power Supply v18.08
To Do/In Progress
Code for Arduino PWM control and voltage sensing
{{{ This code produces a nice pulse width modulation for an output pin which one can visually test with an LED.
// These variables store the flash pattern
// and the current state of the LED
// 1000ms=1s
// 16.6ms= 1/60th of 1 second, or one 60hz cycle.
// 8.3ms is half of on 60hz cycle
// so 8.3ms OnTime and 8.3ms OffTime adds up to a
// full cycle square wave at %50 duty
// As long as your on and off both add up to your
// desired frequency you should be good.
int ledPin = 10; // the number of the LED pin
int ledState = LOW; // ledState used to set the LED
unsigned long previousMillis = 0; // will store last time LED was updated
long OnTime = 10; // milliseconds of on-time
long OffTime = 190; // milliseconds of off-time
void setup() {
// set the digital pin as output: pinMode(ledPin, OUTPUT);
}
void loop() {
// check to see if it's time to change the state of the LED unsigned long currentMillis = millis(); if((ledState == HIGH) && (currentMillis - previousMillis >= OnTime)) { ledState = LOW; // Turn it off previousMillis = currentMillis; // Remember the time digitalWrite(ledPin, ledState); // Update the actual LED } else if ((ledState == LOW) && (currentMillis - previousMillis >= OffTime)) { ledState = HIGH; // turn it on previousMillis = currentMillis; // Remember the time digitalWrite(ledPin, ledState); // Update the actual LED }
}
}}}
Design buck/boost converter circuit/module
Volt-second balance on the inductor means that the average voltage across it is zero
Discontinuous mode is when current through the output inductor is zero for part of the switching cycle
Investigate ways to increase frequency of AC input
Figure out ways to salvage or build transformers
Design
Possible parts: IRFP250NPower transistor (MOSFET) driven by TC1411 1A High-Speed MOSFET Driver with pulse signal originating from arduino.
Applications
Powering 3D printer
Workbench power supply
Charging batteries
Requirements
At least 360W output (12V at 30A)
Adjustable DC voltage output up to 24V
120Vac input
Research
Safety Considerations in Power Supply Design
Inductor volt-second balance, capacitor charge balance, and the small ripple approximation
Understanding Buck-Boost Power Stages
Current Sharing in Parallel Diodes
Open-source based synthetic medium-voltage grid model for distribution power supply systems
Existing Open-Source Projects
Programmable bench power supply EEZ H24005
Modules
Software
Bill of Materials
Transformer: XFRMR TOROIDAL 500VA CHAS MOUNT, Investigating ways to salvage transformers
Rectifier: RECT BRIDGE FAST 3PHASE I4-PAC-5