Showing posts with label current. Show all posts
Showing posts with label current. Show all posts

Sunday, February 1, 2026

HP 12C Platinum: RC Series Circuit Analysis

HP 12C Platinum: RC Series Circuit Analysis


The program was originally posted on the Museum of HP Calculators website (https://www.hpmuseum.org/forum/thread-24591-post-215436.html#pid215436).


A difference between the HP 12C Platinum and the HP 12C Classic is that the Platinum has a square function (x²). The square function is the g-shifted (blue) of the multiplication key.



Introduction and Program Code


Given the following of a RC series circuit:


Stack Z: E: voltage of the RC circuit

Stack Y: R: resistance of the resistor (R) in ohms (Ω)

Stack X: Xc: equivalent resistance of capacitor (Xc) in ohms (Ω)


What is calculated:


Stack Z: equivalent impedance of the RC series circuit in ohms (Ω), Z = √(R^2 + Xc^2)

Stack Y: current in amps (A), I = E ÷ Z

Stack X: true power in watts (W), P = I^2 * R


Program Code:


x^2

001

43, 20

beginning of the program

x<>y

002

34


STO 0

003

44, 0

store resistor

x^2

004

43, 20


+

005

40


√x

006

43, 21


PSE

007

43, 31

show impedance

ENTER

008

36


R↓

009

33


÷

010

10


PSE

011

43, 31

show current

ENTER

012

36


x^2

013

43, 20


R↓

014

33

stack manipulation (014 – 018)

R↓

015

33


x<>y

016

34


R↓

017

33


R↓

018

33


RCL 0

019

45, 0


×

020

20


GTO 000

021

43, 33, 000

finish program, show power


Example


E = 150 V

R = 19 Ω

Xc = 10 Ω


Results (to four decimal places):


Z ≈ 21.4709 Ω

I ≈ 6.9862 A

P ≈ 927.3319 W


Source

Noll, Edward M. Basic Electronics Math With a Scientific Calculator Howard W. Sams & Co, Inc. Indianapolis, IN. 1977. 0-672-21425-3 pp. 81-98


Eddie


All original content copyright, © 2011-2026. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.


Sunday, February 22, 2015

HP Prime and TI-84+: RLC Parallel Circuit and Impedance

RLC Parallel Circuits and Impedance

 
Parallel RLC Circuit



The program RLCPAREL calculates:

* The total impedance of the circuit, and its magnitude in ohms
* Phase angle in a circuit in degrees.
* Current of the series in amps.

Input:
Battery/Source:  enter voltage and frequency
Add as many resistors (R) (in Ohms Ω), capacitors (C) (in farad), and inductors (L) (in henrys) as needed.

Notes:
HP Prime program only:  On the input screen, enter the real (a) and imaginary (if needed) (bi) parts separately.  Complex numbers can be directly entered on the TI-84+ program.

Example:
Parallel circuit powered by a 14 V, 5000 Hz battery.  The circuit has:
a resistor of 100 Ω, a capacitor of 3.2*10^-6 farads, and an inductor of 0.082 henrys.

Results:
Total Resistance:
0.987305540105 – 9.88715235955*i
Magnitude:
9.93632497508
Phase Angle:
84.2974952432
Current:
1.40897163037

HP Prime:  RLCPAREL

// Impedance of a Parallel
// EWS 2015-02-22
// Turn allow complex from real input on
// Declare subroutines
chsubr();
casubr();

// Main Routine
EXPORT RLCPAREL()
BEGIN
// initial steps
Z0:=0;
// radian mode
HAngle:=0;
// counter
I:=0;
// battery information
INPUT({V,F},"Battery Information",
{"V = ","F = "},
{"Volts","Frequency (Hz)"});
chsubr();
END;


// Choose Subroutine
chsubr()
BEGIN
LOCAL ch;
CHOOSE(ch,"# of Components: "+STRING(I),
{"Add Resistor (R)",
"Add Capacitor (C)",
"Add Inductor (L)",
"Calculate"});
// Execute calculation subroutine
casubr(ch);
END;

// Calculation Subroutine
casubr(x)
BEGIN
LOCAL a,b;
IF x==1 THEN
INPUT({a,b},"Add Resistor (Ω)",
{"a =","bi ="});
Z0:=Z0+1/(a+b*i);
I:=I+1;
chsubr();
END;

IF x==2 THEN
INPUT({a,b},"Capacitor (farad)",
{"a =","bi="});
Z0:=Z0-1/(i/(2*π*F*(a+b*i)));
I:=I+1;
chsubr();
END;

IF x==3 THEN
INPUT({a,b},"Inductor (henry)",
{"a =","bi="});
Z0:=Z0+1/(i*2*π*F*(a+b*i));
I:=I+1;
chsubr();
END;

// Termination
IF x==4 THEN
Z0:=1/Z0;
PRINT();
PRINT("Total Resistance = "+Z0);
PRINT("Magnitude (Ω) = "+ABS(Z0));
PRINT("Phase Angle (°) ="+
STRING(−ARG(Z0)*180/π));
PRINT("Current (amps) = "+
STRING(V/ABS(Z0)));
RETURN Z0;
END;
END;

TI-84+: RLCPAREL

a+bi   // Complex mode
Radian  // Radians mode
0→Z
Disp “BATTERY”
Disp “V = VOLT”
Disp “F = FREQ (HZ)”
Prompt V,F
Lbl 0
Menu(“CIRCUIT”,”+ RESISTOR”,1,”+ CAPACITOR”,2,
“+ INDUCTOR”,3,”CALCULATE”,4)
Lbl 1
Input “R (OHMS):”,R
Z+1/R→Z
Goto 0
Lbl 2
Input “C (FARAD):”,C
Z-(2πFC)/i→Z
Goto 0
Lbl 3
Input “L (HENRY):”,L
Z+1/(i2πFL)→Z
Goto 0
Lbl 4
1/Z→Z
Disp “IMPEDANCE=”
Pause Z
Disp “MAGNITUDE=”
Pause abs(Z)
Disp “PHASE ANGLE (°)=”
Pause -angle(Z)*180/π
Disp “CURRENT (AMPS)=”
Pause V/abs(Z)

Sources:
ElectronicsTutorials.  Parallel RLC Circuit Analysis  URL: 
Retrieved February 22, 2015


Van Valkenburg, Mac E. (Editor) and Wendy M. Middelton (Editor)
"Reference Data for Engineers: Radio, Electronics, Computer, and
Communications"  9th Edition.  Newnes, Butterworth-Heinemann:  Wolburn,
MA  2002.  Print.

This blog is property of Edward Shore.  2015.


HP Prime and TI-84+: RLC Series Circuit and Impedance

RLC Series

 
RCL Series Circuit

The program RLCSERIES (RLCSERIE for TI-84+) calculates:

·     *    The total impedance of the circuit, and its magnitude in ohms
·     *    Phase angle in a circuit in degrees.
·     *    Current of the series in amps.

Input:
Battery/Source:  enter voltage and frequency
Add as many resistors (R) (in Ohms Ω), capacitors (C) (in farad), and inductors (L) (in henrys) as needed. 

Notes:
HP Prime program only:  On the input screen, enter the real (a) and imaginary (if needed) (bi) parts separately.  Complex numbers can be directly entered on the TI-84+ program.

Example:
Series circuit powered by a 14 V, 5000 Hz battery.  The circuit has: a resistor of 100 Ω, a capacitor of 3.2*10^-6 farads, and an inductor of 0.082 henrys.

Results:
Total Resistance:
100 + 2566.158792*i
Magnitude:
2568.10649035
Phase Angle:
87.7683842611°
Current:
5.45148733225 * 10^-3

HP Prime: RLCSERIES

// Impedance of a Series
// EWS 2015-02-22
// Turn allow complex from real input on
// Declare subroutines
chsubr();
casubr();

// Main Routine
EXPORT RLCSERIES()
BEGIN
// initial steps
Z0:=0;
// radian mode
HAngle:=0;
// counter
I:=0;
// battery information
INPUT({V,F},"Battery Information",
{"V = ","F = "},
{"Volts","Frequency (Hz)"});
chsubr();
END;


// Choose Subroutine
chsubr()
BEGIN
LOCAL ch;
CHOOSE(ch,"# of Components: "+STRING(I),
{"Add Resistor (R)",
"Add Capacitor (C)",
"Add Inductor (L)",
"Calculate"});
// Execute calculation subroutine
casubr(ch);
END;

// Calculation Subroutine
casubr(x)
BEGIN
IF x==1 THEN
INPUT(R,"Add Resistor","R =",
// Impedance of a Series
// EWS 2015-02-22
// Turn allow complex from real input on
// Declare subroutines
chsubr();
casubr();

// Main Routine
EXPORT RLCSERIES()
BEGIN
// initial steps
Z0:=0;
// radian mode
HAngle:=0;
// counter
I:=0;
// battery information
INPUT({V,F},"Battery Information",
{"V = ","F = "},
{"Volts","Frequency (Hz)"});
chsubr();
END;


// Choose Subroutine
chsubr()
BEGIN
LOCAL ch;
CHOOSE(ch,"# of Components: "+STRING(I),
{"Add Resistor (R)",
"Add Capacitor (C)",
"Add Inductor (L)",
"Calculate"});
// Execute calculation subroutine
casubr(ch);
END;

// Calculation Subroutine
casubr(x)
BEGIN
LOCAL a,b;
IF x==1 THEN
INPUT({a,b},"Resistor (Ω)",
{"a =","bi="});
Z0:=Z0+(a+b*i);
I:=I+1;
chsubr();
END;

IF x==2 THEN
INPUT({a,b},"Capacitor (farad)",
{"a =","bi="});
Z0:=Z0-i/(2*π*F*(a+b*i));
I:=I+1;
chsubr();
END;

IF x==3 THEN
INPUT({a,b},"Inductor (henry)",
{"a =","bi="});
Z0:=Z0+i*2*π*F*(a+b*i);
I:=I+1;
chsubr();
END;

// Calculation
IF x==4 THEN
PRINT();
PRINT("Impedance = "+Z0);
PRINT("Magnitude (Ω) = "+ABS(Z0));
PRINT("Phase Angle (°) ="+
STRING(ARG(Z0)*180/π));
PRINT("Current (amps) = "+
STRING(V/ABS(Z0)));
RETURN Z0;
END;
END;

TI-84+: RLCSERIE

a+bi   // Complex mode
Radian  // Radians mode
0→Z
Disp “BATTERY”
Disp “V = VOLT”
Disp “F = FREQ (HZ)”
Prompt V,F
Lbl 0
Menu(“CIRCUIT”,”+ RESISTOR”,1,”+ CAPACITOR”,2,
“+ INDUCTOR”,3,”CALCULATE”,4)
Lbl 1
Input “R (OHMS):”,R
Z+R→Z
Goto 0
Lbl 2
Input “C (FARAD):”,C
Z-i/(2πFC)→Z
Goto 0
Lbl 3
Input “L (HENRY):”,L
Z+i2πFL→Z
Goto 0
Lbl 4
Disp “IMPEDANCE=”
Pause Z
Disp “MAGNITUDE=”
Pause abs(Z)
Disp “PHASE ANGLE (°)=”
Pause angle(Z)*180/π
Disp “CURRENT (AMPS)=”
Pause V/abs(Z)

Sources:
ElectronicsTutorials.  Series RLC Circuit Analysis  URL: 
Retrieved February 22, 2015

Van Valkenburg, Mac E. (Editor) and Wendy M. Middelton (Editor)
"Reference Data for Engineers: Radio, Electronics, Computer, and
Communications"  9th Edition.  Newnes, Butterworth-Heinemann:  Wolburn,
MA  2002.  Print.



This blog is property of Edward Shore.  2015.

DM42 and HP 42S: Quadratic Equation, Characteristic Polynomial, and Eigenvalues

DM42 and HP 42S: Quadratic Equation, Characteristic Polynomial, and Eigenvalues The programs are listed for the Swiss Micros DM42 an...