General > General Technical Chat
Making the HP Prime a great EE calculator (Poor man's Casio FX-61F)
TopQuark:
Since graduating from Uni, I have been looking for a no holds barred calculator for daily EE work. I always saw Dave rave about the FX-61F being the only EE calculator with dedicated buttons for L, C and parallel circuits. I wanted one, but it is discontinued and 2nd hand ones goes for hundreds. This is a problem because I want at least 2 (office and home) calculators, and I wanted something more programmable anyways.
That is how I ended up with the HP prime. I got the G1 model new as it is cheaper (around 80USD) and more available where I live. I received it yesterday, and have since realised that the great programmability allows it to become a very efficient machine for EE use. I haven't touched a Fx-61F before, but reading the manual, I think my Prime mods make it just as efficient for electronics work, with the added bonus of solving unknowns.
There are two parts to my EE transformation of the HP prime.
1. Remapping buttons to launch menus for frequently used EE functions
2. Custom EE functions for defining L, C, parallel circuits and voltage dividers
Remapping Buttons
For the HP Prime, you can actually define your own keymap, and have custom actions be launched when buttons are pressed. You do this by:
- Writing a program / script that re-defines the keys and associated actions
- Hit Shift, Help, Shift, Help, so that the custom keymap is always active, even across reboots
I have remapped the following buttons, and have also put new label on the physical key of the Prime :
- Vars (Top left) -> Launches LCR menu, containing functions for:
- calculating Inductive and capacitive impedances
- finding resistive and reactive component of an impedance
- finding magnitude and angle of an impedance
- parallel any amount of impedances
- impedance voltage divider
- a b/c - > Launches the Units menu, allowing fast entry of EE units
- shift a b/c -> simplifies the unit of the previous answer (e.g. turning V/A into Ohms)
- and a few more shortcuts
I'll talk more about the custom functions I created for RLC impedances in the next post, which besides calculating (e.g. calculate Z from C and F), also allows for solving of unknowns (e.g. in a series/parallel/mixed RLC circuit, solve for C, given R, L and F)
I have tested my 2 programs (RLC and remapping) on both the PC emulator and the physical calculator.
TopQuark:
There are 4 one-liner functions I wrote to add the FX-61F functions to the Prime.
1. Calculating impedance (complex Ohm) based on capacitance (F) and frequency (Hz)
2. Calculating impedance (complex Ohm) based on inductance (H) and frequency (Hz)
3. Calculating parallel impedance of arbitrary amount of parallel elements
4. Calculating the output voltage of an impedance voltage divider based on the two Z and the input voltage
These functions can be mixed and matched to produce any RLC network with two ports and calculate its impedance, or calculate the output voltage of a voltage divider consisting of RLC's
As the HP prime is a CAS calculator, it also allows for a particular circuit element's value or impedance to be solved when placed in a RLC network.
I'll show some examples here, solving the examples in the FX-61F manual.
1. Solve the impedance of two inductors (100mH, 200mH) in series at 50Hz
You can input
--- Code: ---Zl(50, 0.1) + Zl(50, 0.2)
--- End code ---
and out comes the impedance at 50Hz.
As the frequency across the network is the same, you can define the frequency F once, and only input the inductance when calling the function Zl, saving a few keystrokes
--- Code: ---50->F
Zl(0.1) + Zl(0.2)
--- End code ---
TopQuark:
The parallel function calculate the parallel inductance of an arbitrary impedances, it has two forms:
The general form accepting any amount of parallel elements placed in a list (notice the '{ }' ):
--- Code: ---PAR({Z0, Z1, ..., Zn})
--- End code ---
To save the few keystrokes to enter the '{ }', for 2 to 10 elements, you can omit the '{ }' ::)
--- Code: ---PAR(Z0, Z1)
...
PAR(Z0, Z1, Z2 ... Z9)
--- End code ---
Z can be Zc, Zl function calls, arbitrary complex numbers, or just any real number (resistor).
I have also placed in the RLC quick launch menu, the shortcuts for ARG() and ABS(), so that you can find the magnitude and angle of the complex impedances.
TopQuark:
Being a CAS calculator, the HP Prime can do what the FX-61F can't do.
Take the mixed circuit in the FX-61F manual, say we know the final complex impedance of the circuit, but don't know the capacitance of C2, you can enter
--- Code: ---50->F
solve((Zc(10e-6) + PAR(2000 + Zc(x), Zl(0.006)) = 1.771717931e-3 - 316.4248383 * i, x = 1e-9)
--- End code ---
and the calculator will spit out 30.01e-6-1.025e-9i F, which is pretty close to the 30uF in the circuit diagram.
Note you need to really type in all the significant digits of the complex impedance of the network, otherwise the final solve won't be very good, or does not compute at all.
Also having a rough initial guess for the capacitance is needed for a good solve (1e-9 in this case).
I specifically designed the code to be basic simple functions, but not a fancy GUI with input box prompts etc. so that the calculator's numeric solve functionality can work, and maybe the graphing functions will work fine too, though I don't care much about that.
The goal here is to make it fast, frictionless and efficient to make simple circuit impedance calculations on the Prime calculator or Prime emulator, without resorting to launching matlab / LTspice. It is not intended to replace a computer.
Zucca:
Interesting but
https://www.eevblog.com/forum/chat/current-and-future-rpn-pocket-calculators-wp34s-dm42-wp43s-c43/
Navigation
[0] Message Index
[#] Next page
Go to full version