Showing posts with label Projects. Show all posts
Showing posts with label Projects. Show all posts

Tuesday, January 7, 2014

Circuits on Matrixboard
Soldering part
Compelled By: [Kshitij Wagle(me) & Samir Pokhrel (BEX/069)]




Traffic Light Program( C ):



 #include<reg51.h>
sbit R1=P1^2;
sbit Y1=P1^1;
sbit G1=P1^0;
sbit R2=P1^3;
sbit Y2=P1^4;
sbit G2=P1^5;
sbit R3=P2^2;
sbit Y3=P2^3;
sbit G3=P2^4;
sbit R4=P2^7;
sbit Y4=P2^6;
sbit G4=P2^5;


void msdelay(unsigned int t)
{
int i,j;
int k=100*t;
for(i=0;i<k;i++)
for(j=0;j<1275;j++);
}

void clear()
{
R1=0;
R2=0;
R3=0;
R4=0;
Y1=0;
Y2=0;
Y3=0;
Y4=0;
G1=0;
G2=0;
G3=0;
G4=0;
}


void phase1()
{
R1=1;
R2=1;
G3=1;
R4=1;
msdelay(25);
Y3=1;
Y1=1;
msdelay(5);
}

void phase2()
{
G1=1;
R2=1;
R3=1;
R4=1;
msdelay(25);
Y2=1;
Y1=1;
Y4=1;
msdelay(5);
}

void phase3()
{
R1=1;
G2=1;
R3=1;
G4=1;
msdelay(25);
Y2=1;
Y4=1;
msdelay(5);
}

void phase4()
{
R1=1;
G2=1;
R3=1;
R4=1;
msdelay(25);
Y1=1;
Y2=1;
Y3=1;
msdelay(5);
}

void phase5()
{
G1=1;
R2=1;
G3=1;
R4=1;
msdelay(25);
Y1=1;
Y3=1;
Y4=1;
msdelay(5);
}

void phase6()
{
R1=1;
R2=1;
R3=1;
G4=1;
msdelay(25);
Y3=1;
Y4=1;
msdelay(5);
}


void main()
{
P1=0x00;
P2=0x00;
while(1)
  {
 phase1();
 clear();
 phase2();
 clear();
 phase3();
 clear();
 phase4();
 clear();
 phase5();
 clear();
 phase6();
 clear();
  }

}


Thursday, November 7, 2013

__________________________________________________

Description

--------------------------------------------------------------------------------

The LP2951 regulator is manufactured by National Semiconductors. The choice of values is from an application note "Battery Charging", written by Chester Simpson.Diode D1 can be any diode from the 1N00x series, whichever is conveniently available. It functions as a blocking diode, to prevent a back flow of current from the battery into the LP2951 when the input voltage is disconnected.Charging current is about 100+mA, which is the internally-limited maximum current of the LP2951. For those wondering, this is compatible with just about any single-cell li-ion battery since li-ion can generally accept a charging current of up to about 1c (i.e. charging current in mA equivalent to their capacity in mAh, so a 1100mAh li-ion cell can be charged at up to 1100mA and so on). A lower charging current just brings about a correspondingly longer charge time. IMHO 100mA is quite low, low enough that the circuit can be used for an overnight charger for many typical single-cell li-ion batteries.The resistors are deliberately kept at large orders of magnitude (tens/hundred Kohm and Mohm range) to keep the off-state current as low as possible, at about 2΅A. Resistor tolerances should be kept at 1% for output voltage accuracy. The 50k pot allows for an output voltage range between 4.08V to 4.26V - thus allowing calibration as well as a choice between a charging voltage of 4.1V or 4.2V depending on the cell to be charged. The capacitors are for stability, especially C2 which prevents the output from ringing/oscillating.

..............................................................................................

Parts List

----------------------------------------------------------------------------

IC1 = LP2951, voltage regulator
D1 = 1N4002, General purpose diode
R1 = 2M, 1%, metal-film
R2 = 806K, 1%, metal-film
P1 = 50K, potentiometer
C1 = 0.1uF, polyester
C2 = 2.2uF/16V, electrolytic
C3 = 330pF, ceramic
Design and Compelled by Engineer Kshitij Wagle | Blogger Theme by Horizon - Wagle | waglehorizon