![]() |
HP-41 Ohms Law Program - Printable Version +- HP Forums (https://archived.hpcalc.org/museumforum) +-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html) +--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html) +--- Thread: HP-41 Ohms Law Program (/thread-176212.html) |
HP-41 Ohms Law Program - Jeff Davis - 12-24-2010 I have been writing a program to calculate the Ohm's Law Circle. Below is the program. There are three calculations possible for each category based on which two inputs are non zero when the program runs. I am very interested in any feedback as well as program improvements to make the program run smoother and faster.
Re: HP-41 Ohms Law Program - designnut - 12-25-2010 I wrote a simple program to enter the x value into the stack to fill the t repeating register, it can be used to clear the stack if X is zero, or to enter E into the t repeating register. Keying a resistor and dividing gives I, multiplying then gives EI=W. Re: HP-41 Ohms Law Program - Namir - 12-25-2010 I suggest that you design your program using the following labels for the input of values and the calculations of results:
label A --> Input P The program displays the "P E I R Q" menu before each set of calculations. You then proceed to enter any three values and calculate the fourth one. After you view the result, you press the R/S key and have the program jump back to the label "OL" to display the "P E I R Q". Pressing E tells the program to display a termination message like "DONE" or "BYE". Namir
Edited: 25 Dec 2010, 4:13 a.m.
Re: HP-41 Ohms Law Program - Walter B - 12-25-2010 If you want a widespread use and understanding please remember the common letter for voltage is U.
Re: HP-41 Ohms Law Program - Dieter - 12-25-2010 Hehe... for decades this kind of calculation has been a classic
- The program knows which variables have been entered and therefore which others will have to be calculated in which way. This can be done with a simple trick: think of the four variables as bits in a four-digit binary number. So 1001 means that the first and the fourth variable have been entered, and 0110 means the second and third one are known. Each time a variable is entered, the program sets its corresponding bit by adding the respective decimal value, adding up to a unique "variable code":
In this case (Ohm's law) always two values are known and the two others can be calculated. So we end up with six possible cases, resulting in six different variable codes: 3, 5, 6, 9, 10 and 12.
The rest is easy: a simple indirect jump to label 03, 05, 06, 09, 10 or 12 where the two remaining values are evaluated and stored. For instance, at label 06 the values for R and I are known, so the missing voltage is determined by U = R*I and the unknown power is P = U*I. XEQ "OHM"Enter values U and R: 24 XEQ ANow any key A, B, C or D can be pressed to get the corresponding value: XEQ C => I=0,051All other values can be recalled as well: XEQ A => U=24,000I do not include the listing - I think it's trivial. Dieter Re: HP-41 Ohms Law Program - Garth Wilson - 12-27-2010 As someone who has been in electronics engineering in the U.S. for the last 25 years, I have never heard of using "U" for "voltage." Karl's link below seems to explain why: it's mostly only in use in Europe. I would not say it's in "widespread use" here.
Edited: 27 Dec 2010, 3:19 a.m.
Re: HP-41 Ohms Law Program - Karl Schneider - 12-27-2010 Here's the post containing the link that Garth referred to:
Quote: I've wondered about this, having seen "U" utilized to denote 'voltage' (potential difference) in German and Scandinavian documents. "V" and "E" (electromotive force) are favored in North America, but I have not thought this to be ideal.
However, it also seems that use of "V" for denoting potential difference is not unique to North America. I found a short discussion from five years ago to be reasonable: http://boards.straightdope.com/sdmb/archive/index.php/t-338522.html I tried to verify it expediently by reviewing Wikipedia pages in a number of languages that concerned 'potential difference'. However, not having ready access to textbooks from around the world, I couldn't say if the explanation given in the discussion is entirely correct. Perhaps knowledgeable Forum'ers in Britain, Australia, Spain, Italy, France, Netherlands, and Brazil might like to chime in... -- Karl
Edited: 27 Dec 2010, 3:05 a.m.
Re: HP-41 Ohms Law Program - Nigel Bamber - 12-27-2010 Quote:
What an elegant solution. If you have it can you share it ? Thanks Nigel
Re: HP-41 Ohms Law Program - Nigel Bamber - 12-27-2010 Quote: Re: HP-41 Ohms Law Program - Thomas Klemm - 12-27-2010 cf. Ohm's Law for the HP-41C/CV/CX
If you don't have a card reader you can replace the following command with CL
112 7CLREG Switch to USER mode and use the following key-mapping:
Initialize XEQ A
Enter values U and R: 24 XEQ DNow any key B, C, D or E can be pressed to get the corresponding value: XEQ C => I=0.051All other values can be recalled as well: XEQ D => U=24.000 The program doesn't use Dieter's method but instead calculates the value if it is 0. Feel free to modify it to your needs.
Cheers
Edited: 2 Jan 2011, 1:24 p.m.
Re: HP-41 Ohms Law Program - Gerson W. Barbosa - 12-27-2010 Quote: One of my textbooks (HAYT Jr, William H. & KEMMERLY, Jack E. Análise de Circuitos em Engenharia) uses v for voltage (and i for current). Thus, Ohm's Law is stated as v = Ri Also, this notation avoids ambiguity in expressions like v = 6 V. All my other engineering textbooks use uppercase V indistinctly for both voltage and the SI unit, however. Here, some high-school Physics textbooks use U for voltage. Gerson (Brazil).
Re: Ohm's law - Ren - 12-27-2010 For a technoclutz like me,
@Walter,
Ren
Re: HP-41 Ohms Law Program - Bart (UK) - 12-27-2010 Certainly my experience in both South Africa and the UK is V for voltage. Re: Ohm's law drifting off topic - Walter B - 12-27-2010 Hi Ren, dona nobis pacem ;) FYI, AFAIK the letter U employed for voltage has no relation with any pronounciation. It's just a letter commonly used for this physical entity like I is common for the current, L for inductivities etc. And as Karl mentioned, a capital V would be ambiguous, as well as a capital E is since it's employed for the electrical field strength. Referring to the point you brought up: I dunno where you come from nor live, though the probability for being US-American is pretty elevated in this forum. Since I am definitely no native English speaker I will certainly make some pronounciation errors (among others), though following some decades of experience people in "English" speaking countries understand me quite well (allowing me leading some projects there) - far better than most "English" speakers are understood here (if they bother learning a second language at all).
Since you know "languages" is one of my hobbies, you know there's no offense intended. BTW, is your forum name in any way connected to the Chinese word for man?
Re: Ohm's law - Thomas Klemm - 12-27-2010 Quote: With an HP-48G I'd recommend to use the built-in equation library:
2: Electricity Or you could install the HP-41E MicroCode Emulator and use the listing.
Cheers Re: HP-41 Ohms Law Program - Walter B - 12-27-2010 Just checked some Wikipedia articles in different languages: Quote:The latter claims US-Americans use another letter than the international community - as usual ;) Re: HP-41 Ohms Law Program - Gerson W. Barbosa - 12-27-2010
Quote: You're right! That's exactly what the authors say in the first chapter of the book (Definitions and Units). It's been quite a long time since I last read it, but I do remember my HP-28S was particularly useful then :-) http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/archv015.cgi?read=82010 Regards,
Gerson.
Re: Ohm's law - designnut - 12-27-2010 I admit I felt sad when I first saw a fellow using a programmable calculator for Ohms law.If one can't solve that simple a problem do they really belong in electrical engineering? What happens when you get a hard problem? Panic city? Sam
Re: HP-41 Ohms Law Program - Dieter - 12-27-2010 I used this method about twenty years ago for a triangle calculation program: three sides and three angles are six variables, three of which are given by the user. That's eighteen possible combinations, and here the mentioned method starts making sense. Re: Ohm's law - Martin Pinckney - 12-27-2010 Ouch, Sam!
Though a CE, not an EE, I have written solver routines for similarly simple relations, like the Rational Formula (Q=CiA). For me , its not the difficulty of the problem, its the convenience when doing repetitious calculations that makes these programs useful, particularly when you have the variable names displayed in front of you.
Re: Ohm's law - Jeff Davis - 12-27-2010 Thanks to all who have responded. I am not an EE but I do like to program on the HP-41. Since I was currently in a project to calculate a few items I thought it would be fun to write a program. I know it is trivial but fun none the less.
Re: HP-41 Ohms Law Program - Thomas Klemm - 12-27-2010 I guess this is how Sam would solve these problems:
Quote:
24 ENTER ENTER ENTER 24.000
Quote:
CLx 1 / * 576.000
Quote:
1 ENTER ENTER ENTER 1.000
cf. EE calculations, some not obvious
Ohm's lawThis may seem simple, but can be used as a rapid verification of dissipation and the voltage and current relation. Remember the little circles of voltage E divided by the IR product. Key in the voltage repeatedly, and divide by either I or R to see the other value, as in E=IR. The power in a resistor can be found by keying in the resistor and dividing to get I, then multiplying to get EI. It can be used to solve W=EI, by keying in power repeatedly, and dividing to get either E or I.
Sam, it's a pity your article is hard to read. I think it's a treasure unfortunately well hidden. Above you may find a suggestion to improve its legibility. Add some examples if possible and maybe some explanations or pictures as well.
Best regards Re: HP-41 Ohms Law Program - Les Bell - 12-27-2010 Quote: As former editor of various international editions of an electronics magazine (in the UK, Canada and Australia) I've never seen U as a symbol for voltage. It's always been V or equally commonly E (for electromotive force, I believe). One might more properly claim that some parts of Europe use a different letter from the international community - as usual ;) Best,
--- Les Re: HP-41 Ohms Law Program - Karl Schneider - 12-28-2010 From the "off-Forum" discussion of 2005 I linked, along with my limited personal experience, I took it as a given that potential difference or 'voltage' was denoted by "U" in the Germanic, Scandinavian, and eastern European countries. It also now seems clear that "V" remains the favored term in British-influenced countries (UK, USA, Canada, Australia, South Africa). But what about the prominent western and Mediterranean countries of Europe (France, Spain, Italy, and Portugal)? A closer examination of pertinent Wikipedia pages in Romance languages suggests that "U" denotes electric potential difference, while "V" denotes electric potential, even though both have the same unit (volt). At least three of the pages criticized the term 'voltage' in favor of 'tension' -- for the good reason of eliminating circularity of terminology, but 'tension' itself can also mean the physical, weight-bearing load that stresses an overhead electrical line.
Quote: My interpretation: "...'voltage' is technically incorrect .. A majority of electrical engineers repudiate the use of the term 'voltage'..."
Quote: My interpretation: "It is often popularly called 'voltage', but the term is not used professionally (as an) anglicism."
Quote: (Help?) "... potential difference...'tension', (or the rarer) and improper 'voltage'."
-- Karl
Edited: 30 Dec 2010, 1:08 a.m. after one or more responses were posted
Re: HP-41 Ohm's Law Program - Walter B - 12-28-2010
Quote:Interpretation Aid: "Always in the electrical area, this difference of potential is also commonly called 'tension' or, more rarely (and improperly), 'voltage'." Watch out: This is not a "potential difference" = ambiguity of the English language. Please note there's an obvious difference between adjectives and adverbs, too :-/
Addendum 1: Quote:I hate to repeat, but as stated in my post you responded to, at least French and Portuguese use U. French even inform you (just for the case case you didn't know before) this U is the "standardized symbol" for electrical tension - please check the site of IEC - regards to Les ;) Addendum 2: Quote:Please don't confuse "international" with "English speaking country" or "former British colony".
Edited: 28 Dec 2010, 6:08 a.m.
Re: HP-41 Ohm's Law Program - Les Bell - 12-28-2010 As a member of the IEEE, I have to defer to my ancient copy of the "Electronic Engineer's Handbook", Donald G. Fink (ed), McGraw-Hill, 1975. Para 1.27 states: Quote: I've omitted the rest of the equation - I wish the web and email spoke LaTeX, but it doesn't. ;) And for the rest of this 2.8"-thick (oops: 71mm-thick) book, so it goes - consistently using V to represent voltages (which we all know are potential differences). The word "tension" doesn't appear in the index, and disappeared from electrical English usage around the same time as vacuum tubes.
Now, to business: Quote: Ah, yes - but if you look one line higher(http://www.iec.ch/zone/si/si_elecmag.htm#si_epo), you'll see: Electric potential, V Since you can't measure an absolute potential, there is no unit for it, and the SI unit, the volt, must represent a potential difference. So V and U are the same thing by different names, and the IEC should stick to what it's good at: setting standards for power supply connectors. ;)
Quote: We had French and (it's been so long I can't remember) either Dutch or German editions as well - and in my occasional communications with them I can't recall "U" being used. I certainly never received any requests to explain our use of "V", but I would certainly have been puzzled if I had seen "U = IR" in the copies of their editions that I occasionally browsed. My advice is, in any calculator program which has to represent voltage and which you hope will be used internationally, stay away from "U". We all know what "V" is, even if we resent its imperialistic connotations. And for proof that "U" is confusing, just read this thread and those linked from it. Of course, the prudent programmer will probably wish to determine the Mandarin/Chinese/Japanese character for voltage, since it will probably ultimately trump "V", "E" and "U". But since it probably isn't on the keyboard of the HP-41 (and since they probably use "V" anyway ;) ) I'd say you're safe for the time being. And besides, Alessandro Volta deserves the credit. With tongue planted firmly in cheek,
--- Les Re: HP-41 Ohm's Law Program - Massimo Gnerucci (Italy) - 12-28-2010
Quote: Just to firmly keep this tongue in cheek (and joking on Volta's translation into english): NO U-TURN, PLEASE! ![]() Greetings, Massimo Re: Ohm's law - Ren - 12-28-2010 @Walter B., I am in Southeastern Minnesota, USA, while I'm not fluent in any other language than English, I have had limited learning experience in Spanish, Arabic, and Chinese Mandarin, which brings me to your question on my name. I was named after a friend of my dad's, he died in a rodeo while I was very young, so I'm not sure if I ever met him, and never asked him where our name came from. It has been suggested it came from (Saint) Irenaeus.
One of my Mandarin teachers in giving me a Chinese name used the word "kindness" (also pronounced "ren")
Re: Ohm's law - Ren - 12-28-2010 Quote: Doh! B^) Ren
dona nobis pacem
Re: Ohm's law - Ren - 12-28-2010 @Sam Touche'! In my defense, I was thinking about the "harder to memorize" (for me) equations of Ohm's Law. (Please forgive my lack of HP calculator notation in these examples) i.e. Square root(Power divided by Resistance) equals Inductance or E (or U, or V) equals Square root (Power times Resistance) or E(squared) divided by R equals P
While many subscribers to this forum could probably derive the above examples in their head (knowing that P=IxE and P=I(squared)R, Ren
dona nobis pacem
Re: HP-41 Ohm's Law Program - Thomas Klemm - 12-29-2010 Quote:
cf. How to use a formula in a post
Re: HP-41 Ohm's Law Program - Les Bell - 12-29-2010 Ooh - that's handy, Thomas! Thanks for the pointer. Best,
--- Les Re: HP-41 Ohm's Law Program - John B. Smitherman - 12-29-2010 Quote: Walter, I believe that Les' use of international is correct - between or among nations; involving two or more nations. Regards,
John
Re: Ohm's law - designnut - 12-29-2010 What I suggest to calculator users for frequently encountered problem is to think about kepstroke procedures rather tthan formulas. There is a kinesthetic sense that can work for you in rapid solutions. Formulas are handed down from generation to generation with no reference to current circumstances. Re: Ohm's law - designnut - 12-29-2010 Sorry, my writing kept disappearing on me. The steps are Add, divide, multiply, subtract and the equivalent output resistance appears. when doing RC frwequency corners tthe formulas were Re: Ohm's law - Ren - 12-29-2010 Good advice Sam! Thanks! Ren
dona nobis pacem
Re: HP-41 Ohm's Law Program - Walter B - 12-30-2010 John, of course you're right. According to what was written above, however, it looked like a subset of "international" was used. If some editors publish their product in Austria, Switzerland and Germany, they may call it an "international magazine" rightfully, but hmmmh ... It seemed to me, Les' international editing was of a similar kind ;)
Re: Ohm's law - Martin Pinckney - 12-30-2010 Quote:Well, I think I understand this, although I [did not] completely follow your examples. Quote:Not sure what you mean by this. The formulas we have been discussing are expressions of physical laws that don't change. I see no reason that relations published in textbooks should be revised for particular calculator styles. They are sometimes rewritten in calculator manuals, though. Quote:Perhaps yes, for RPN calculators. No doubt when you started out with the early HP's, this made sense. And still may for some people. But the original RPN HP's were developed when memory resources (RAM and ROM) were very expensive. Now there are lots of choices in calculator styles, many of which allow easy evaluation of the formulas in the original form, which makes more sense to some people. This is why we have choices in calculators.
Edited to correct meaning. Edited: 31 Dec 2010, 10:14 a.m. after one or more responses were posted
Re: HP-41 Ohm's Law Program - Les Bell - 12-30-2010 Well, the magazine was called "Electronics Today International". . . Best,
--- Les Re: HP-41 Ohm's Law Program - Walter B - 12-30-2010 Names and titles are all hollow words d;-)
Re: Ohm's law - designnut - 12-30-2010 Martin, I have discovered relations that have not been shown in formulas. They were exposed by the handy number manipulation of the calculator. I suggest it is the difference between the academic approach (everything has been learned that can be learned) and the engineering approach where it is possible to discover something new and incorporate in the lessons. Not only are the formulas copied in content bu in form, however awkward it may be. Yet nothing new is added. Have we learned nothing in the years? I found formulas have not adapted to modern usage and are totally outmoded. I gave the example R=Xc=11/2(Pi)FC. How much handier is 2(Pi)FRC=1. The old form is still in use, copied from book to book. The resonance formula is always F=1/[2(Pi) (LC)]^1/2. Re: Ohm's law - Martin Pinckney - 12-30-2010 Sam, I acknowledge that you have developed shortcuts that work well with RPN calculators that served you well in your career. However, to describe these as "modern methods" seems curious to me. I remind you that the early HP calcs were originally designed with RPN because of the limitations of technology at the time. The "change" that occurred in calculator design has gone the other way, first to algebraic, then to textbook entry/display. I for one have benefited from this change.
I am not against RPN. I have and use several HP RPN calcs. I am only against presenting RPN as if it were this magical superior system that only the few know how good it is.
Re: Ohm's law - designnut - 12-30-2010 Martin, we don't need no stinkiin parentheses. I did find relations I have not seen addressed in books, I think if they were known they would be addressed. I discovered them only because of the handy number manipulation available with RPN. I believe they have not been shown because they have not been discovered. Possibly my investigation has been more exhaustive than formerly. Re: Ohm's law - Martin Pinckney - 12-31-2010 Quote:I know. You've said that already. But sooner or later you will encounter a complex expression that you can't evaluate directly with RPN unless you use the storage registers. Which I can avoid with my stinkin' parentheses! Re: Ohm's law - Walter B - 12-31-2010 Martin,
FYI, the little device shown in that other thread has 8 stack levels as a user settable alternative to traditional 4 levels. Based on several decades of real life experience, I tell you you'll *never* encounter a real formula requiring more than 6 levels. You can design one easily, of course, but it's not our task making life more complicated than it is.
Re: Ohm's law - Martin Pinckney - 12-31-2010 Walter,
Yes, but Sam probably used traditional 4-level HP's.
|