summaryrefslogtreecommitdiff
path: root/3871/CH10/EX10.23/Ex10_23.sce
blob: e2868167c5d1fd1855f61d0a4eafac177e543d28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//===========================================================================
//chapter 10 example 23
clc
clear all

//variable declaration
V    = 3;        //battery voltage in volts
Rm    = 60;        //resistance in Ω
Ifm    = 1.2;        //full-scale deflection meter current in mA
Rh    = 1500;        //half-scale deflection resistance in Ω
V1    = 0.3;        //at 10 % drop in battery voltage in V

//calculations
If    = V/Rh;    //battery current for full-scale deflection in A
If1     = If*10^3;          //battery current for full-scale deflection in mA
Ish    = If1-Ifm;        //current through zero adjuster resistor i.e,shunt resistor in mA
Rsh    = (Ifm*Rm)/Ish;    //resistance in Ω
Rse    = Rh-((Rsh*Rm)/(Rsh+Rm));    //current limiting resistor i.e,series resistor
V3    = V-V1;        //voltage in V
If2    = V3/Rh;        //battery current at full-scale deflection in A
If21    = If2*10^3;        //battery current at full-scale deflection in mA
Ish1    =If21-Ifm;        //current through shunt resistor in mA
Rsh1    = (Ifm*Rm)/Ish1;    //shunt resistor in   Ω
Rh1    = Rse+((Rm*Rsh1)/(Rm+Rsh1));        //total internal circuit resistance in  Ω
e    =((Rh-Rh1)/(Rh1))*100;        //percentage error in %

//calculation
mprintf("resistance = %3.2f  Ω",Rsh);
mprintf("\ncurrent limiting resistor = %3.2f  Ω",Rse);
mprintf("\nshunt resistor = %3.2f  Ω",Rsh1);
mprintf("\npercentage error = %3.3f percentage ",e);