HP42S / DM42 program: Voltage Divider Circuit
The HP42S / DM42 has a SOLVER function that can solve an equation for any of its variables.
A voltage divider has 4 parameters: two resistors and two voltages (input voltage and output voltage).
Given any tree parameters the HP42S / DM42 can find the 4th at the press of a button.
The circuit:
----------
^ |
| +-+
| | |
| | | R1
| +-+
V1 |---------------
| +-+ ^
| | | |
| | | R2 V2=output
| +-+ |
v | v
--------------------------
Equations: V2=(V1*R2)/(R1+R1)
V1=(V2/R2)*(R1+R2)
R2=V2R1(V1-V2)
R1=(R2/V2)*(V1-V2)
Equation for the solver: 0= ((V1*R2)/(R1+R1)) - V2
Start a new program with: GTO . . PRGM
The LBL and MVAR functions are found in the PGM.FCN menu of the calculator. The letters of the variables are
entered during the writing of the program via the ALPHA menu.
The program is called VDIV:
00 { 47-Byte Prgm }
01 LBL "VDIV"
02 MVAR "V1"
03 MVAR "V2"
04 MVAR "R1"
05 MVAR "R2"
06 RCL "V1"
07 RCLx "R2"
08 RCL "R1"
09 RCL "R2"
10 +
11 / (press divide)
12 RCL "V2"
13 -
14 END
This program must executed from within the SOLVER
It does not matter which units you use but all of them must be the same. That is:
all resistors must be in Ohm or all of them must be in KOhm etc... All voltages must
be either in Volt or all voltages must be in mV...
Using the program
Example1: R1=5K R2=15K V1=10V V2=?
SOLVER VDIV
5 and then press the R1 menu button
15 and then press the R2 menu button
10 and then press V1 menu button
To calculate V2 press the V2 menu button. Result: 7.5 K Ohm
To get out of the solver mode type: EXIT EXIT
Example2: R1=? R2=10K V1=12V V2=6V
SOLVER VDIV
10 and then press the R2 menu button
12 and then press V1 menu button
6 and then press V2 menu button
To calculate R1 press the R1 menu button. Result: 10 K Ohm
To get out of the solver mode type: EXIT EXIT
Written by Guido Socher