Adjustable Power Supply v18.08: Difference between revisions

From Open Source Ecology
Jump to navigation Jump to search
Line 1: Line 1:
=To Do/In Progress=
// These variables store the flash pattern
// These variables store the flash pattern
// and the current state of the LED
// and the current state of the LED
// 1000ms=1s
// 1000ms=1s
// 16.6ms= 1/60th of 1 second, or one 60hz cycle.
// 16.6ms= 1/60th of 1 second, or one 60hz cycle.
// 8.3ms is half of on 60hz cycle
// 8.3ms is half of on 60hz cycle
// so 8.3ms OnTime and 8.3ms OffTime adds up to a  
// so 8.3ms OnTime and 8.3ms OffTime adds up to a  
// full cycle square wave at %50 duty
// full cycle square wave at %50 duty
// As long as your on and off both add up to your
// As long as your on and off both add up to your
// desired frequency you should be good.
// desired frequency you should be good.


   
   
int ledPin =  10;      // the number of the LED pin
int ledPin =  10;      // the number of the LED pin
int ledState = LOW;// ledState used to set the LED
int ledState = LOW;// ledState used to set the LED
long Freq = 1000;
 
long Freq = 16.6;
 
unsigned long previousMillis = 0;        // will store last time LED was updated
unsigned long previousMillis = 0;        // will store last time LED was updated
long OnTime = 10;          // milliseconds of on-time
 
long OnTime = 8.3;          // milliseconds of on-time
 
long OffTime = Freq - OnTime;          // milliseconds of off-time
long OffTime = Freq - OnTime;          // milliseconds of off-time
   
   
void setup()  
void setup()  
{
{
   // set the digital pin as output:
   // set the digital pin as output:
   pinMode(ledPin, OUTPUT);       
   pinMode(ledPin, OUTPUT);       
}
}
   
   
void loop()
void loop()
{
{
   // check to see if it's time to change the state of the LED
   // check to see if it's time to change the state of the LED
   unsigned long currentMillis = millis();
   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
  }
}
   
   
   if((ledState == HIGH) && (currentMillis - previousMillis >= OnTime))
   if((ledState == HIGH) && (currentMillis - previousMillis >= OnTime))

Revision as of 06:23, 1 September 2018

// 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

long Freq = 16.6;

unsigned long previousMillis = 0; // will store last time LED was updated

long OnTime = 8.3; // milliseconds of on-time

long OffTime = Freq - OnTime; // 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
 }

}

 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

Buck Converter Design

Open-source based synthetic medium-voltage grid model for distribution power supply systems

Existing Open-Source Projects

Programmable bench power supply EEZ H24005

Bench Power Supply

Modules

edit

Arduino Power Subcircuit

Software

Git Repository

Bill of Materials

Transformer: XFRMR TOROIDAL 500VA CHAS MOUNT, Investigating ways to salvage transformers

Rectifier: RECT BRIDGE FAST 3PHASE I4-PAC-5