Free Software

HP-Prime Standard Resistor by Mr. Konstantin Borissov, Sep 2018.
  • Mr. Borissov, student of ELEC 201, Sep 2018, submitted this program that produces the color code strip for a given value of resistance. As usual, it is provided on an "as is" basis, purely for pedagogical purposes and no warranties are made on its accuracy or otherwise. That said, for the sake of liabilities, I like this program. That is why I post it here, with permission.
  • //Purpose: Produce closest standard resistor value based on IEC 60063 preferred value system (E series) and colour code per IEC 60062:2016
    //Input: Your resistor value and E series (tolerance)
    //Output: Standard resistor value, colour coding, and percent error from entered value
    //Author: Konstantin Borissov
    //Date: 21 September 2018

    EXPORT SRV() //Uncomment for interactive input. Chose this, or the one below.
    //EXPORT SRV(myResistance, eSeries) //Uncomment for function-style input. Note: You'll have to know which E series you want.
    //If using function-style input, also comment out INPUT line(14), eSeries line(13) and line(16), and UNcomment line(17).
    BEGIN
    LOCAL myResistance, eSeries, numberInSeries, stdValue, roundValue, pctError; //For calculations
    LOCAL homeFormat, homeDigits, xPON; //To store user-defined environment later on
    LOCAL eSeriesListCode := 2; //Sets default eSeries according to list below. e.g., 2 is E12.
    INPUT ({myResistance, {eSeriesListCode,{"E6 (20%)","E12 (10%)","E24 (5%)","E48 (2%)","E96 (1%)","E192 (0.5%)"}}},"Standard Resistor Calc v1.2", {"Resistance ", "E

    series "}); //Comment if using fuction-style input.

    eSeries := 6*2^(eSeriesListCode - 1); //Convert value from dropdown list to a more useful value for calculations.
    //eSeriesListCode := CEILING(logb(eSeries/6,2) + 1); //UNcomment if using fuction-style input, converts eSeries to eSeriesListCode

    CASE //Number of sig figs to display based on E series
    IF ((eSeries == 6) OR (eSeries == 12) OR (eSeries == 24)) THEN
    roundValue := -2;
    END;
    IF ((eSeries == 48) OR (eSeries == 96) OR (eSeries == 192)) THEN
    roundValue := -3;
    END;
    END;

    //Calculations
    IF (myResistance == 0) THEN //Zero-resistance case
    stdValue := 0;
    ELSE
    numberInSeries := ROUND(eSeries*LOG( myResistance ), 0); //
    stdValue := ROUND(10^(numberInSeries / eSeries), roundValue);
    END;


    //Check for values that don't fit into the standard calculation model (27,33,39,47,82)
    IF ((eSeries == 6) OR (eSeries == 12) OR (eSeries == 24)) THEN
    CASE
    IF ( (stdValue*10^(-XPON(stdValue)))/2.6 == 1) THEN //Magic
    xPON := XPON(stdValue);
    stdValue := 2.7*10^(xPON);
    END;
    IF ( (stdValue*10^(-XPON(stdValue)))/3.2 == 1) THEN
    xPON := XPON(stdValue);
    stdValue := 3.3*10^(xPON);
    END;
    IF ( (stdValue*10^(-XPON(stdValue)))/3.8 == 1) THEN
    xPON := XPON(stdValue);
    stdValue := 3.9*10^(xPON);
    END;
    IF ( (stdValue*10^(-XPON(stdValue)))/4.6 == 1) THEN
    xPON := XPON(stdValue);
    stdValue := 4.7*10^(xPON);
    END;
    IF ( (stdValue*10^(-XPON(stdValue)))/8.3 == 1) THEN
    xPON := XPON(stdValue);
    stdValue := 8.2*10^(xPON);
    END;
    END;
    END;

    //Percent error, for zero value and all others
    IF (stdValue == 0) THEN
    pctError :=0;
    ELSE
    pctError := ROUND(%CHANGE(myResistance, stdValue), -2); //Caculate signed percent error b/en desired and std value
    END;

    //Colour Coding
    LOCAL bandColours := {" PK "," SR "," GD "," BK "," BN "," RD "," OG "," YE "," GN "," BU "," VT "," GY "," WH ", " DNE "};
    LOCAL toleranceColours := {" none ", " SR ", " GD ", " RD ", " BN ", " GN "};
    LOCAL resColourCode := toleranceColours(eSeriesListCode); //Initialize with tolerance colour band

    CASE //Determine if 4 or 5 band depending on E series
    IF (stdValue == 0) THEN //Zero resistance case
    resColourCode := bandColours(0+4);
    END;
    IF ((eSeries == 6) OR (eSeries == 12) OR (eSeries == 24)) THEN //4-band
    IF (XPON(stdValue) > 10) OR (XPON(stdValue) < -2) THEN //Check for out of bounds multipliers
    resColourCode := prepend(resColourCode, bandColours(14)); //Assign DNE multiplier
    ELSE
    resColourCode := prepend(resColourCode, bandColours(XPON(stdValue)+3)); //Assign multiplier
    END; //Next, colour bands are assigned from least to most significant
    resColourCode := prepend(resColourCode, bandColours(CEILING((stdValue*10^(-XPON(stdValue)))*10 MOD 10 + 4))); //1's,
    resColourCode := prepend(resColourCode, bandColours(IP((stdValue*10^(-XPON(stdValue))) MOD 10 + 4))); //10's

    END;
    IF ((eSeries == 48) OR (eSeries == 96) OR (eSeries == 192)) THEN //5-band
    IF (XPON(stdValue) > 11) OR (XPON(stdValue) < -1) THEN //Check for out of bounds multipliers, 5-bands have a different range
    resColourCode := prepend(resColourCode, bandColours(14)); //Assign DNE multiplier
    ELSE
    resColourCode := prepend(resColourCode, bandColours(XPON(stdValue)+2)); //Assign multiplier
    END;
    resColourCode := prepend(resColourCode, bandColours(CEILING((stdValue*10^(-XPON(stdValue)))*100 MOD 10 + 4))); //1's IP function rounds down here instead

    of giving integer part
    resColourCode := prepend(resColourCode, bandColours(IP((stdValue*10^(-XPON(stdValue)))*10 MOD 10 + 4))); //10's, colour bands are assigned from least to

    most significant
    resColourCode := prepend(resColourCode, bandColours(IP((stdValue*10^(-XPON(stdValue))) MOD 10 + 4))); //100's
    END;
    END;


    //Aesthetics
    homeDigits := HDigits; //Store user-defined number of digits to display
    HDigits := 2; // Too many digits looks messy

    //Outputs
    PRINT ("Closest Standard Resistor Value: ");
    PRINT (stdValue + " Ω");
    PRINT (" ");

    PRINT ("Entered value: ");
    PRINT (myResistance + " Ω");
    PRINT (" ");

    homeFormat := HFormat; //Store home number format display.
    HFormat := 0; //Temporarily changes output format to standard from here on for a better display look.
    PRINT ("Error is: ");
    PRINT (pctError + "%");
    PRINT (" ");

    PRINT ("Resistor E series: ");
    PRINT ("E" + eSeries + " (±" + ROUND(20*0.5^(eSeriesListCode-1)-0.125, -1) + "%)" ); //Incl. function to convert eSeriesListCode to tolerance.
    PRINT (" ");

    PRINT("Colour Code: " + resColourCode); //Print colour coding

    HDigits := homeDigits; //Back to original, user-defined, format.
    HFormat := homeFormat;

    RETURN (stdValue);
    END; //Hasta la vista

 
HP-Prime Program to Convert Delta into a Y (Sep 2018) Mine and Mr. Konstantin Borissov's (the winner of the contest)
  • To convert a delta of resistors (or inductors).
  • // DELTA TO WYE

    EXPORT D2Y(Rab,Rbc,Rca)

    BEGIN

    .. // LOCAL Rab:=(0,0),Rbc:=(0,0),Rca:=(0,0);

    .. // INPUT({Rab,Rbc,Rca},"DELTA TO WYE");

    .. LOCAL S:=Rab+Rbc+Rca;

    .. RETURN({Rab*Rca/S,Rab*Rbc/S,Rbc*Rca/S});

    END;

  • To activate it with a nicer dialogue instead, remove the comment brackets (//) in front of the two lines inside the body, and remove also the parameters in the header of the program. The user still needs to remember the order of the output parameters, a caveat easy to remove (I prefer it without) if we add a few PRINT lines to identify which is which of the three output results. If you are asking yourself, what on earth is the initial value of the local variables (0,0)? It is the complex number zero, zero real part, zero imaginary part. Why!? Because in the second term, instead of resistances, inductances or capacitances, we will represent those elements as complex valued impedances ... and we will use the same program to combine them in paralel. Cool, huh?
  • To convert from wye to delta, just enter the three conductances, Ga, Gb, Gc, and you'll get the three conductances Gab, Gbc, Gca.
  • To convert a delta of capacitors, use their inverses and you'll get the inverses of the corresponding whe-connected capacitances.
  • With great pride, let me include the program, using an input dialog and with labeled output submitted by Mr. Konstantin Borissov, Sep 2018. Excellent! I only suggest to use a more descriptive name for the program itself, perhaps "EXPORT D2Y, or DTY, or "DY"? Thank you Mr. B. The dots in front of many lines are not part of the program. I added them to keep the indentation of the code from the reformatting of the browser.
  • EXPORT RY() // Enter Delta resistances
    BEGIN
    ..   LOCAL Rab, Rbc, Rca, Ra, Rb, Rc;
     ..  INPUT ({Rab, Rbc, Rca},"Enter Delta resistances: ");
     ..  Ra := ((Rca * Rab)/(Rab+Rbc+Rca));
     ..  Rb := ((Rab * Rbc)/(Rab+Rbc+Rca));
     ..  Rc := ((Rbc * Rca)/(Rab+Rbc+Rca));

     ..  PRINT ("Ra: ");
     ..  PRINT (Ra);

     ..  PRINT ("Rb: "); 
     ..  PRINT (Rb);

     ..  PRINT ("Rc: ");
     ..  PRINT (Rc);

     ..  RETURN ({Ra,Rb,Rc});
    END;

 
HP-Prime Emulator Download, 2018 ROM, and Documentation Site
  • To download the emulator for the HP-Prime for your laptop (and the corresponding connectivity kit and documentation), go to:
  • http://www.hp-prime.de/en/category/13-emulator
  • To download the 2018 JULY 06 version of the calculator ROM (use the Connectivity Kit to load it to your calculator HP-Prime. It is pretty intuitiv. You can also find instructions on the Internet, of course.)
  • HP_Prime_Calculator_Firmware_20180706
 
HP-50g Program to convert a Delta into a Y by Mr. Ehsan Ahmadi
  • % This program was presented by Mr. Ehsan Ahmani as an
    % after the class challenge. It prompts the user for the
    % three resistances of the triangle between nodes A, B and C
    % then computes, labels and displays the equivalent Y
    % resistances.

    << "Rab Rbc Rca" PROMPT
    -> ab bc ca
    << 'ca x ab/(ab+bc+ca)' EVAL
    'Ra' ->TAG

    'ab x bc/(ab+bc+ca)' EVAL
    '
    Rb' ->TAG
    'bc x ca/(ab+bc+ca)' EVAL
    'Rc' ->TAG
    >>
    >>

 
WeBWorK template for a question
  • This is provided here for my colleagues who have watched the video on creating questions for assignments on WeBWorK that I posted on YouTube and would like to try their luck with this bare-bones template. I want to add here that are strongly advised to go to http://tinyurl.com/WeBWorK-P1 and read there a more thorough presentation about the details of such a file, but for what it's worth, here is my template: TEMPLATE.PL
 
HP-50g How to back up your HP-50g to and SD card
  • How to backup the HP-50g 1/12/13 10:25 AM

    To answer the question of one of your classmates:
    With a memory module already in the port.
    Execute the following sequence of commands.
    PUSH
    :3:BCK1
    ARCHIVE
    ---------------------------------------------------------------
    Now, to recover from a memory wipe out, etc.
    Insert the module in the port and:
    :3:BCK1
    RESTORE
    POP
    -----------------------------------------------------------------
    Notes:
    :3: represents the "drive 3", which is the memory module.
    BCK1 is the name of the file where you'll back up the HP.
    Instructions like PUSH, POP, ARCHIVE, RESTORE you
    can type in ALPHA ALPHA mode (or look them up in the
    CAT list of functions).

HP-50g Emulator for Windows
  • The emulator that you have seen me use in class, and in videos, can be downloaded from http://www.hpcalc.org/hp49/pc/emulators/hp50gsemu48.zip
  • After downloading that file, my personal notes on how to make it work are:
  • Expand and copy the downloaded ZIP file from:
    http://www.hpcalc.org/hp49/pc/emulators/hp50gsemu48.zip

    Copy all files and the included ROM subdirectory to:
    C:\Program Files (x86)\HP Emulators\Emu48

    In the subdirectory C:\Program Files (x86)\HP Emulators\Emu48\ROM,
    rename the file ROM_215.50G to ROM.49G.

    Edit the file 50G.kml, so that the 6th line that reads:
    Rom "ROM.49G"
    becomes
    Rom "ROM/ROM.49G"

    Now set a shortcut on your favourite directory to the
    executable Emu48.exe.

HP-50g Two Resistances (or impedances) in parallel
  • This mini program has proven to be very useful along the years, so here it is: RpR . For details about storing the program and naming it, do watch the video tutorials on the HP-50g in the TUTORIALS page of this site (available only to students in this class).
HP-50g Connectivity Kit (good edition)
  • If the Connectivity Kit that came in the CD-ROM with your HP-50g keeps reporting an error message, just download this upgrade from http://tinyurl.com/p4den. I have found that it works on Windows XP, but not on Windows Vista. You will be using this took only to upgrade your ROM/OS. If you have Vista, please talk to me after the lecture.

HP-50g beta 2.09 ROM version
  • If your calculator has the ROM version 2.08 (in RPN mode, type VERSION and enter it to the register (1) of the stack, then click on EVAL), you need to upgrade it to version 2.09. Download the file HERE, and the instructions how to install it, HERE. Be extra careful to follow those instructions to the letter lest you damage your calculator irreversibly.

Power Point Slideshow
  • Students that do not own Microsoft's PowerPoint software, can download the free PowerPoint Viewer from:

 


Click here to download Microsoft's free PowerPoint Viewer

 

Adobe Portable Document Format

 


Click here to download Adobe's free Acrobat PDF Reader

 

CircuitMaker2000
  • CircuitMaker provides fast, powerful yet affordable schematic design and simulation in one complete program. This intuitive, easy-to-use "Virtual Electronics Lab" gives you the flexibility to design and test electronic circuits, trying all the "what if" scenarios without ever worrying about faulty parts or bad connections. Students can download the free student edition of this commercial program click HERE. not on the icon below.
  • The vendor, Altium, has since discontinued sales and support for this product. Currently, your labs in our department are running full version of an alternate simulator, MultiSim. However, CircuitMaker, in its student version, continues to provide a friendly platform to experiment at home with the basic electric and electronic circuits in our course.
  • The icon below takes you to the page of a colleague in UCSD that has an open link (no password necessary) to download the free student version for CM.


Click here to download the free student version of CircuitMaker2000

 

 

 

 

 

 

 

 

 

 

Do you want to use these tips on using CircuitMaker2000 and these ones? Not?