41 voltage divider calculation
|
02-09-2017, 02:49 PM
(This post was last modified: 01-29-2018 03:01 PM by damaltor.)
Post: #1
|
|||
|
|||
41 voltage divider calculation
I made a small program for calculating voltage dividers. It allows the calculation of both resistors and the input and output voltage.
Code: U_in --+ The program works similar to the TVM program on the advantage module: It starts with displaying a menu Code: R1 R2 UI UO If any of the values should be changed, you do not need to re-enter all values - simply enter the new value followed by the appropriate softkey and then press the key for the desired variable again. Please note that this program is made for ease of use and is certainly not the smallest possible. Example 1: Calculate R1 if U_in is 10V, U_out should be 3V, and R2 is 5kOhm Code: Input Output Example 2: Calculate U_out if U_in is 5V, R1 is 5kOhm and R2 is 10 kOhm. Same if input voltage is 10V. Code: Input Output Example 3: Find a good resistor pair to divide 5V to 3.3V Code: Input Output Here is the program. It has 77 steps in 22 registers and fits on one magnetic card, using both sides. It uses storage registers 01 to 04. Code: 01 LBL "RDIV" |
|||
02-13-2017, 07:17 AM
(This post was last modified: 02-13-2017 07:20 AM by Ángel Martin.)
Post: #2
|
|||
|
|||
RE: 41 voltage divider calculation
Neat example, thanks for sharing it. It actually should be added to the recently published Equation Library - using SOLVE, and therefore not directly comparable with your program. (see here)
Under that framework the routine to use is below - 17 steps in all but not as fast. Code: 01 LBL "UDIV" Cheers, 'AM "To live or die by your own sword one must first learn to wield it aptly." |
|||
02-13-2017, 08:22 AM
Post: #3
|
|||
|
|||
RE: 41 voltage divider calculation
Interesting idea. Feel free to add it - it would surely fit in there. I also made a version including "SOLVE" a while ago, but that would not work without the advantage module. i unfortunately lost the code... I really like that equ library!
|
|||
11-07-2022, 05:24 PM
Post: #4
|
|||
|
|||
RE: 41 voltage divider calculation
Hello damaltor: Very nice program. I was wondering why you used a "U" instead of a "V" in the LBL statements pertains to (for example "U.IN".
|
|||
11-08-2022, 06:28 AM
Post: #5
|
|||
|
|||
RE: 41 voltage divider calculation
(11-07-2022 05:24 PM)cparman Wrote: I was wondering why you used a "U" instead of a "V" in the LBL statements pertains to (for example "U.IN"). From International Electrotechnical Commission: Symbol U: Quote:Note 2 – The name "voltage", commonly used in the English language, is an exception from the principle that a quantity name should not refer to any name of unit. User damaltor is from Germany. That's probably the reason. Somewhat related: EE calculations, some not obvious |
|||
11-09-2022, 04:34 AM
Post: #6
|
|||
|
|||
RE: 41 voltage divider calculation
This is the same program for the HP-42S:
Code: 00 { 42-Byte Prgm } |
|||
11-09-2022, 05:57 AM
Post: #7
|
|||
|
|||
RE: 41 voltage divider calculation
(02-13-2017 07:17 AM)Ángel Martin Wrote: This should rather be: Code: 05 RCL 02 It is the lower resistor R2. \( \begin{align} U_o = U_i \frac{R_2}{R_1 + R_2} \end{align} \) Compare this to the original program where UO is calculated: Code: 42 LBL 22 Just keep in mind that the registers correspond to different variables: R01: UI R02: UO R03: R1 R04: R2 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 4 Guest(s)