Making the HP Prime a great EE calculator (Poor man's Casio FX-61F) - Page 1
Forum section: electronics / general

author: TopQuark
author_rank: Frequent Contributor
timestamp: January 18, 2023, 01:59:33 pm
content: 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 functions2. Custom EE functions for defining L, C, parallel circuits and voltage dividersRemapping ButtonsFor 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 rebootsI 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 shortcutsI'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.

author: TopQuark
author_rank: Frequent Contributor
timestamp: January 18, 2023, 02:15:50 pm
content: 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 elements4. Calculating the output voltage of an impedance voltage divider based on the two Z and the input voltageThese 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'sAs 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 50HzYou can inputCode:Zl(50, 0.1) + Zl(50, 0.2)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 keystrokesCode:50->FZl(0.1) + Zl(0.2)

author: TopQuark
author_rank: Frequent Contributor
timestamp: January 18, 2023, 02:23:54 pm
content: 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})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)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.

author: TopQuark
author_rank: Frequent Contributor
timestamp: January 18, 2023, 02:33:48 pm
content: 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 enterCode:50->Fsolve((Zc(10e-6) + PAR(2000 + Zc(x), Zl(0.006)) = 1.771717931e-3 - 316.4248383 * i, x = 1e-9)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.

author: Zucca
author_rank: Unknown
timestamp: January 18, 2023, 03:56:52 pm
content: Interesting buthttps://www.eevblog.com/forum/chat/current-and-future-rpn-pocket-calculators-wp34s-dm42-wp43s-c43/

author: TopQuark
author_rank: Frequent Contributor
timestamp: January 18, 2023, 04:21:35 pm
content: Quote from: Zucca on January 18, 2023, 03:56:52 pmInteresting, never tried "daily-driving" RPN, I grew up with a Casio scientific, so I am most familiar with Algebraic. Maybe I'll try RPN on an emulator for a bit, before deciding if I should be excited about the project you linked.For now, I like the Prime, I can call the impedance of capacitor/inductor function with two keystrokes, and I feel productive. Maybe I can be slightly more productive with RPN, but I'm not sure if there's that much to gain.

author: kripton2035
author_rank: Super Contributor
timestamp: January 18, 2023, 05:50:16 pm
content: the HP Prime is the best handheld calculator I've ever use... as TopQuark did, you can program anything you need if it is not inside the calculator.it is blazing fast, has a nice crisp touch screen with gestures... almost a complete computer in the size of a handheld calculator.

author: Zucca
author_rank: Unknown
timestamp: January 18, 2023, 06:48:47 pm
content: I prefer to turn on a real PC/Laptop if I need a computer and grab a RPN calculator/emulator (for example free42 on the phone) if I need a pocket calculator.It is my very personal taste and way of thinking, I personally don't like the things in the middle....That said thanks toTopQuarkfor sharing with us your work!

author: kripton2035
author_rank: Super Contributor
timestamp: January 18, 2023, 07:03:44 pm
content: the prime has a setting to use it like maths books, algebraic, or full rpn ...

author: TopQuark
author_rank: Frequent Contributor
timestamp: January 18, 2023, 07:23:45 pm
content: Besides lacking EE specific keys and functions, the other thing I noticed about the Prime that I didn't like, is the poor viewing angle of the screen when the Prime is laid flat.So I designed a 3D printable kickstand that attaches to the Prime using the protective cover slots. Think I'll release it on thingiverse or sth once I refine the design a bit more.

author: tooki
author_rank: Super Contributor
timestamp: January 19, 2023, 07:00:37 pm
content: Quote from: TopQuark on January 18, 2023, 07:23:45 pmYep, that’s the consequence of the display being installed upside-down. The Prime’s hardware engineers warned about this, but it was done for some reason.Nice solution! Is it stable enough?

author: TopQuark
author_rank: Frequent Contributor
timestamp: January 19, 2023, 08:28:34 pm
content: Quote from: tooki on January 19, 2023, 07:00:37 pmIt is stable enough to withstand forceful pressing of all buttons and touch screen, and stay in place even when placed on smooth glass, I think unless you are trying to knock it over or shove it around, it will stay up. I find it to be more stable than my Fluke 87V kickstand for example.I'm printing the latest (hopefully last) iteration of the stand, will upload the files tomorrow if everything works out.

author: TopQuark
author_rank: Frequent Contributor
timestamp: January 23, 2023, 01:08:39 pm
content: It's done! My 3D printed kickstand for the HP Prime that doubles as a slide cover.https://github.com/TopQuark12/primeKickstand

author: jonpaul
author_rank: Super Contributor
timestamp: January 23, 2023, 02:05:59 pm
content: Had HP-41C, in 1980s..1990s, made a lot of EE programs on the mag tape stripes.Recently a friend restored the HP-41C and mag tape reader...works great!in 1960s..1970s, Tektronix gave out The old pré electronicTektronix Circuits ComputerStill have and use them!Jon

author: TopQuark
author_rank: Frequent Contributor
timestamp: January 23, 2023, 02:14:10 pm
content: Quote from: jonpaul on January 23, 2023, 02:05:59 pmOh wow, that looks amazing. I wonder if I can recreate a modern open source version that can be laser cut and made cheaply.

author: Black Phoenix
author_rank: Super Contributor
timestamp: January 23, 2023, 03:59:26 pm
content: Quote from: TopQuark on January 23, 2023, 01:08:39 pmSo you are the one who published in r/calculators this mod.I know i had saw it somewhere other than here...

author: SiliconWizard
author_rank: Super Contributor
timestamp: January 24, 2023, 07:26:43 pm
content: Quote from: Zucca on January 18, 2023, 06:48:47 pmYeah, that's a pretty recurring topic. I find little use for pocket calculators myself these days, except when I'm on the go/in lab and need a quick calculation.Depends on your workflow and habits, but not having a computer nearby these days when you are working is kind of rare. Now the key is to find the right tools for you as software, that work for you.That said, pocket calculators are this kind of devices that I have fond memories of, and I can appreciate them as technical objects.SwissMicros have done a great job at this. The HP Prime is good, but I think it's either too little or too much, and not really on par with the good old HP calculators.

author: TopQuark
author_rank: Frequent Contributor
timestamp: January 24, 2023, 07:50:44 pm
content: Quote from: SiliconWizard on January 24, 2023, 07:26:43 pmI think I'm a bit old school in that sense, even though I have just left university. I usually prefer intuition, back of the envelope calculations, hand drawn schematics, building physical prototypes and measuring things IRL. I have trust issues with simulation tools, but am slowly warming up to it and incorporating it into my workflow. I also find my attention rapidly drifting away when I touch my PC or smartphone.All that I am saying is, I find a dedicated calculator that I can configure/program to deal with boilerplate calculations really helpful, such as the Prime, so that I can ideate faster without distractions. The dedicated keypad is certainly a big plus.

author: tooki
author_rank: Super Contributor
timestamp: January 25, 2023, 07:37:54 am
content: Quote from: SiliconWizard on January 24, 2023, 07:26:43 pmAs someone who never used a “classic” HP calculator (and has no interest in learning RPN, no matter what alleged advantages it may have), they’re not what I compare it to. My calculator experience before the Prime was nearly 100% Texas Instruments, first with standard scientific calculators, then early graphing calculators (TI-85 and TI-86), and then with algebraic-entry scientific calculators (TI-30 X II, etc).Anyhow, with that background, the Prime has found a permanent spot on my desk. A real, high-quality keypad is something I value enormously. (TI is miserable in this regard.) I don’t want to switch to my computer to do simple calculations. Like TopQuark, engaging with my computer is asking to get distracted with something else.As for the Prime itself, I love the capacitive touchscreen, which does add some real value. The processor is extremely fast, so this is a calculator that never makes you wait. (As of today, it’s the fastest graphing calculator by a wide margin.) It’s also very thin and light without feeling cheap. It’s not perfect (they really need to add aproperengineering notation mode, and they need to make it easier to enter units, and make it an option for it to automatically simplify the output units), but even so it’s an incredibly useful tool.