Professional Documents
Culture Documents
Submitted To:
Submitted By:
Mohammed Omer(16-EE-065)
Mohammed Naeem(15-EE-042)
Sec-D
Objectives:
Step up voltages
Step down voltages
Components Used :
Arduino Uno
lcd
IRF540N
Inductor(100Uh)
Capacitor (100uf)
Schottky Diode
Push buttons
10k, 100ohm Resistor
Load
12v Battery
Project Description:
Working:
Long Transmission Lines:
A buck converter is a step down dc-dc converterconsisting primarily of inductor and two
switches .generally a transistor switch and diode for controlling.
The freewheeling diode D conducts due to energy stored in the inductor; and the inductor current
continues to flow through inductor (L), capacitor (C), load and diode (D). The inductor current
falls until transistor S is switched on again in the next cycle.
Code :
#include <LiquidCrystal.h>
int duty = 0;
void read_voltages_duty_cycle(void){
adc_value = analogRead(A4);
duty = (voltages/12)*100;
}
void lcd_display(void){
lcd.setCursor(0,0);
lcd.print("Voltages:");
lcd.setCursor(11,0);
lcd.print(voltages);
lcd.print("V");
lcd.setCursor(0,1);
lcd.print("Duty Cycle:");
lcd.setCursor(11,1);
lcd.print(duty);
lcd.print("%");
int uppin=2;
int downpin=3;
int outputpin=6;
int pwmvalue=0;
void setup()
lcd.begin(16,2);
pinMode(2,INPUT_PULLUP);
pinMode(3,INPUT_PULLUP);
pinMode(9,OUTPUT);
pinMode(A1,INPUT);
void loop()
{
read_voltages_duty_cycle();
lcd_display();
if(digitalRead(2)==LOW)
pwmvalue=pwmvalue+5;
digitalWrite(2,HIGH);
if(digitalRead(3)==LOW)
pwmvalue=pwmvalue-5;
digitalWrite(3,HIGH);
delay(100);
if(pwmvalue>255)
pwmvalue=255;
else if(pwmvalue<0)
pwmvalue=0;
analogWrite(9,pwmvalue);
Schematic diagram
Figure 3: complete circuit diagram
Inductor selection:
Lc=(1-k)R/2f
Capacitor selection:
Vc= Vsk(1-k)/8LCf2
Battery chargers
Solar chargers
Power audio amplifiers
Quadcopters