QB64 Practical Sceince use
#1
Code: (Select All)
_Title "Parallel Reciprocal"
Dim r1, r2, rt As Double
top:
Cls

Print "Enter 0 to find unknown number"

Input "Resistor R1 "; r1
If r1 = 0 Then
    Input "r1 can not be 0 "; q
    GoTo top
End If

Input "Resistor R2 "; r2
Input "Total r1 parallel to r2 "; rt

If rt = 0 And r2 = 0 Then
    Input "Are you an idiot only 1 unknown "; q
    GoTo top
End If

If rt = 0 Then
    r1 = 1 / r1
    r2 = 1 / r2
    rt = r1 + r2

End If

If r2 = 0 Then
    r1 = 1 / r1
    rt = 1 / rt
    r2 = rt - r1

End If

Print
Print "for the values of "
Print "R1";: Print 1 / r1
Print "R2";: Print 1 / r2
Print "RT";: Print 1 / rt
Print

Input "0 to end else I will run again"; q
If q = 0 Then System
GoTo top

In electronics to find a value of a Resistor in parallel or a Capacitor in series.  The following formula is used (X1 x X2) / (X1 + X2).
To find an unknown value to use would be hard, except when using reciprocals (shortcut for the formula).  Must know two values to find the third.

This is so basic, you can use as you please.
Reply
#2
"Are you an idiot only 1 unknown"

Nice!
Ask me about Windows API and maybe some Linux stuff
Reply
#3
(01-20-2023, 03:03 PM)Spriggsy Wrote: "Are you an idiot only 1 unknown"

Nice!

It's only a message to myself.
Reply
#4
I thought the formula for resistors in parallel is 1/R1 + 1/R2 + 1/R3 ...

That's what I was taught in electronics class during my aviation electronics (avionics) training in the Marine Corps.
Reply
#5
(01-21-2023, 01:15 AM)TerryRitchie Wrote: I thought the formula for resistors in parallel is 1/R1 + 1/R2 + 1/R3 ...

That's what I was taught in electronics class during my aviation electronics (avionics) training in the Marine Corps.

The basic 2 value formula is (X1 x X2) / (X1 + X2) to give a parallel total value.  Which could be used for 3 and more.  Repeat add nauseous.

When finding the value for 3 or more.  It's what you were taught in the Marines.  Using reciprocals, is such a pain in the ass without a calculator.   The program I presented can find the total or a missing single value. I created the program to find the R2 value of a simple R1, R2 circuit.  Unfortunately R2 could not be a normal sold value.  So a 20 turn pot of X value with a fixed resistor of the major value was used.  The circuit was a CC source power supply.  So a tweaking was going to be needed.

What you learned is not wrong, just harder.  Remember the two value formula, when it's only two parts.  Even without a calculator it's faster.
Reply




Users browsing this thread: 3 Guest(s)