summaryrefslogtreecommitdiff
path: root/2882/CH1
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2882/CH1
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '2882/CH1')
-rwxr-xr-x2882/CH1/EX1.1/Ex1_1.sce22
-rwxr-xr-x2882/CH1/EX1.10/Ex1_10.sce16
-rwxr-xr-x2882/CH1/EX1.11/Ex1_11.sce16
-rwxr-xr-x2882/CH1/EX1.12/Ex1_12.sce44
-rwxr-xr-x2882/CH1/EX1.2/Ex1_2.sce22
-rwxr-xr-x2882/CH1/EX1.3/Ex1_3.sce23
-rwxr-xr-x2882/CH1/EX1.4/Ex1_4.sce18
-rwxr-xr-x2882/CH1/EX1.6/Ex1_6.sce18
-rwxr-xr-x2882/CH1/EX1.7/Ex1_7.sce21
-rwxr-xr-x2882/CH1/EX1.8/Ex1_8.sce17
-rwxr-xr-x2882/CH1/EX1.9/Ex1_9.sce16
11 files changed, 233 insertions, 0 deletions
diff --git a/2882/CH1/EX1.1/Ex1_1.sce b/2882/CH1/EX1.1/Ex1_1.sce
new file mode 100755
index 000000000..e5236cb18
--- /dev/null
+++ b/2882/CH1/EX1.1/Ex1_1.sce
@@ -0,0 +1,22 @@
+//Tested on Windows 7 Ultimate 32-bit
+//Chapter 1 Introduction to Electronics Pg no. 8
+clear;
+clc;
+
+//Given Data
+
+//Colour coding of four band resistor
+//Given Sequence: [Gray Red Red Gold]
+gray=8;
+red=2;
+gold=0.05;
+
+//Solution
+
+R=(gray*10+red)*(10^(red));//Base resistance in ohms
+R_min=R*(1-0.05);//Least possible resistance in ohms using variance
+R_max=R*(1+0.05);//Most possible resistance in ohms using variance
+
+printf("Resistance should be in between %d ohms and %d ohms",R_min,R_max);
+//Error in textbook as 5% of 8200 is 410 and not 41
+
diff --git a/2882/CH1/EX1.10/Ex1_10.sce b/2882/CH1/EX1.10/Ex1_10.sce
new file mode 100755
index 000000000..83dcd27b5
--- /dev/null
+++ b/2882/CH1/EX1.10/Ex1_10.sce
@@ -0,0 +1,16 @@
+//Tested on Windows 7 Ultimate 32-bit
+//Chapter 1 Introduction to Electronics Pg no. 33
+//Solved Problem 3
+clear;
+clc;
+
+//Given Data
+
+R=120;//resistance in ohms
+P=1000;//power in watts
+
+//Solution
+
+I=sqrt(P/R);//current in amperes
+
+printf("I=%.2f Amperes.",I);//Displaying upto 2 places of decimal
diff --git a/2882/CH1/EX1.11/Ex1_11.sce b/2882/CH1/EX1.11/Ex1_11.sce
new file mode 100755
index 000000000..fadc1342f
--- /dev/null
+++ b/2882/CH1/EX1.11/Ex1_11.sce
@@ -0,0 +1,16 @@
+//Tested on Windows 7 Ultimate 32-bit
+//Chapter 1 Introduction to Electronics Pg no. 33
+//Solved Problem 4
+clear;
+clc;
+
+//Given Data
+
+R=10;//resistance in ohms
+P=4;//power in watts
+
+//Solution
+
+I=sqrt(P/R);//current in amperes
+
+printf("Maximum safe current is I=%.3f Amperes.",I);//Displaying upto 3 places of decimal
diff --git a/2882/CH1/EX1.12/Ex1_12.sce b/2882/CH1/EX1.12/Ex1_12.sce
new file mode 100755
index 000000000..1782ce750
--- /dev/null
+++ b/2882/CH1/EX1.12/Ex1_12.sce
@@ -0,0 +1,44 @@
+//Tested on Windows 7 Ultimate 32-bit
+//Chapter 1 Introduction to Electronics Pg no. 33 and 34
+//Solved Problem 5
+clear;
+clc;
+
+//Given Data
+//Figure 1.34
+
+Rm=2;//resistance of motor in ohms
+V=10;//battery voltage in volts
+Rpot=10;//maximum resistance of potentiometer in ohms
+Ppot=100;//maximum power rating of potentiometer in watts
+
+//Solution
+
+Ipot=sqrt(Ppot/(Rpot+Rm));//maximum safe current possible through potentiometer in amperes
+printf("Current rating of potentiometer I = %.2f Amps\n\n",Ipot);
+
+Rp=10;//Resistance of potentiometer set in ohms
+I10=V/(Rp+Rm);//Current for corresponding resistance of potentiometer
+
+printf("When the potentiometer is set to %d Ohms,\nthe total resistance of the circuit is %d ohms.\n",Rp,Rp+Rm);
+printf("I = %.1f Amps\n",I10);
+
+if(I10<Ipot)
+ printf("\nThe amount of current is less than %.2f Amps and the potentiometer is safe.\n\n",Ipot);
+end
+
+
+Rp=2;//Resistance of potentiometer set in ohms
+I2=V/(Rp+Rm);//Current for corresponding resistance of potentiometer
+
+printf("When the potentiometer is set to %d Ohms,\nthe total resistance of the circuit is %d ohms\n",Rp,Rp+Rm);
+printf("I = %.1f Amps\n",I2);
+
+if(I10<Ipot)
+ printf("\nThe amount of current is less than %.2f Amps and the potentiometer is safe \n",Ipot);
+end
+
+Rp=1;//Resistance of potentiometer set in ohms
+I3=V/(Rp+Rm);//Current for corresponding resistance of potentiometer
+
+printf("\n However when potentiometer resistance is %d ohms, I= %d/%d = %.1f Amp.\nThis is greater than %.2f Amperes.\nThe potentiometer wire will get heated and temperature will rise.\nFor still lower values of potentiometer setting,\nI will be still higher and the potentiometer will be damaged.\nIt may even burn out.",Rp,V,(Rp+Rm),I3,Ipot)
diff --git a/2882/CH1/EX1.2/Ex1_2.sce b/2882/CH1/EX1.2/Ex1_2.sce
new file mode 100755
index 000000000..34161d53a
--- /dev/null
+++ b/2882/CH1/EX1.2/Ex1_2.sce
@@ -0,0 +1,22 @@
+//Tested on Windows 7 Ultimate 32-bit
+//Chapter 1 Introduction to Electronics Pg no. 9
+clear;
+clc;
+
+//Given Data
+
+//Colour coding of four band resistor
+//Given Sequence: [Orange Orange Yellow Silver]
+orange=3;
+yellow=4;
+silver=0.1;
+
+//Solution
+
+R=(orange*10+orange)*(10^(yellow));//Base resistance in ohms
+R_min=R*(1-silver);//Least possible resistance in ohms using variance
+R_max=R*(1+silver);//Most possible resistance in ohms using variance
+
+printf("Resistance should be in between %d ohms and %d ohms",R_min,R_max);
+//Error in textbook as 330K is not 33000 and is 330000
+
diff --git a/2882/CH1/EX1.3/Ex1_3.sce b/2882/CH1/EX1.3/Ex1_3.sce
new file mode 100755
index 000000000..dbba96e39
--- /dev/null
+++ b/2882/CH1/EX1.3/Ex1_3.sce
@@ -0,0 +1,23 @@
+//Tested on Windows 7 Ultimate 32-bit
+//Chapter 1 Introduction to Electronics Pg no. 9
+clear;
+clc;
+
+//Given Data
+
+//Colour coding of five band resistor
+//Given Sequence: [Yellow Gray Violet Black Green]
+yellow=4;
+gray=8;
+violet=7;
+black=0;
+green=0.005;
+
+//Solution
+
+R=(yellow*100+gray*10+violet)*(10^(black));//Base resistance in ohms
+R_min=R*(1-green);//Least possible resistance in ohms using variance
+R_max=R*(1+green);//Most possible resistance in ohms using variance
+
+printf("Resistance should be in between %.2f ohms and %.2f ohms",R_min,R_max);//Upto 2 decimal points
+//Decimal approximation error w.r.t. textbook
diff --git a/2882/CH1/EX1.4/Ex1_4.sce b/2882/CH1/EX1.4/Ex1_4.sce
new file mode 100755
index 000000000..7c58983fc
--- /dev/null
+++ b/2882/CH1/EX1.4/Ex1_4.sce
@@ -0,0 +1,18 @@
+//Tested on Windows 7 Ultimate 32-bit
+//Chapter 1 Introduction to Electronics Pg no. 12
+clear;
+clc;
+
+//Given Data
+
+area=1;//meter squares
+d=0.25;//distance between plates in centimeters
+e=8.85D-12;//permittivity of air
+
+//Solution
+
+d=d*10^-2;//converting distance into meters
+C=e*area/d;//Capacitance in Farads
+C=C*10^12;//Coverting capacitance to pF from F
+printf("C= %d pF\n",C);
+printf("The capacitor can thus store a charge of %d*10^-12 C with 1 Volt.",C);
diff --git a/2882/CH1/EX1.6/Ex1_6.sce b/2882/CH1/EX1.6/Ex1_6.sce
new file mode 100755
index 000000000..37f37cecd
--- /dev/null
+++ b/2882/CH1/EX1.6/Ex1_6.sce
@@ -0,0 +1,18 @@
+//Tested on Windows 7 Ultimate 32-bit
+//Chapter 1 Introduction to Electronics Pg no. 17
+clear;
+clc;
+
+//Given Data
+//Fig. 1.16
+
+//Solution
+blue=6;
+gray=8;
+violet=50;
+gold=0.05;
+
+C=(blue*10+gray)*10^blue*10^-12;//Capacitance in Farads
+C=C*10^6;//Converting from Farads to micro Farads
+
+printf("The value of capacitance is %d uF \n and voltage rating is %d volts and tolerance of ±%d percent.",C,violet,gold*100);
diff --git a/2882/CH1/EX1.7/Ex1_7.sce b/2882/CH1/EX1.7/Ex1_7.sce
new file mode 100755
index 000000000..d04ef4550
--- /dev/null
+++ b/2882/CH1/EX1.7/Ex1_7.sce
@@ -0,0 +1,21 @@
+//Tested on Windows 7 Ultimate 32-bit
+//Chapter 1 Introduction to Electronics Pg no. 29
+clear;
+clc;
+
+//Given Data
+//Fig 1.33
+vi=6D-3;//input volatage in volts
+Rin=1200;//input resistance in ohms
+Ai=100;//current gain
+Ro=25000;//output resistance in ohms
+Rl=1000;//load impedance
+
+//Solution
+
+is=vi/Rin;//Input current
+i2=Ai*is;//Output circuit current source value
+iL=i2*(Ro/(Ro+Rl));//Current divider to find load current
+Vout=iL*Rl;
+
+printf("The output voltage is Vout=%.2f V",Vout);//Displaying upto 2 places of decimal
diff --git a/2882/CH1/EX1.8/Ex1_8.sce b/2882/CH1/EX1.8/Ex1_8.sce
new file mode 100755
index 000000000..4a427b073
--- /dev/null
+++ b/2882/CH1/EX1.8/Ex1_8.sce
@@ -0,0 +1,17 @@
+//Tested on Windows 7 Ultimate 32-bit
+//Chapter 1 Introduction to Electronics Pg no. 33
+//Solved Problem 1
+clear;
+clc;
+
+//Given Data
+
+wattage=100;//wattage in watts
+voltage=220;//voltage in volts
+
+//Solution
+
+I=wattage/voltage;//current in amperes
+
+printf("I=%.3f Amp.",I);//Displaying upto 3 places of decimal
+//Error due to decimal approximations
diff --git a/2882/CH1/EX1.9/Ex1_9.sce b/2882/CH1/EX1.9/Ex1_9.sce
new file mode 100755
index 000000000..158907d19
--- /dev/null
+++ b/2882/CH1/EX1.9/Ex1_9.sce
@@ -0,0 +1,16 @@
+//Tested on Windows 7 Ultimate 32-bit
+//Chapter 1 Introduction to Electronics Pg no. 33
+//Solved Problem 2
+clear;
+clc;
+
+//Given Data
+
+I=6;//current in amperes
+R=36;//resistance in ohms
+
+//Solution
+
+P=I^2*R;//power in watts
+
+printf("P=%d W.",P);