File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,13 +6,32 @@ def wheatstone_solver(
66 resistance_1 : float , resistance_2 : float , resistance_3 : float
77) -> float :
88 """
9- This function can calculate the unknown resistance in an wheatstone network,
10- given that the three other resistances in the network are known.
11- The formula to calculate the same is:
12-
13- ---------------
14- |Rx=(R2/R1)*R3|
15- ---------------
9+ Calculate the unknown resistance (Rx) in a Wheatstone bridge circuit.
10+
11+ A Wheatstone bridge is an electrical circuit used to precisely measure
12+ an unknown resistance. This function calculates Rx when the three other
13+ resistances in the bridge are known.
14+
15+ Circuit Diagram:
16+
17+ R1 R2
18+ +--/\/\/--+--/\/\/--+
19+ | | |
20+ Vin Vg Vout
21+ | | |
22+ +--/\/\/--+--/\/\/--+
23+ R3 Rx
24+
25+ This solver uses the balanced bridge formula:
26+ Rx = (R2/R1) × R3
27+
28+ Args:
29+ resistance_1 (R1): First known resistance
30+ resistance_2 (R2): Second known resistance
31+ resistance_3 (R3): Third known resistance
32+
33+ Returns:
34+ float: The calculated unknown resistance (Rx)
1635
1736 Usage examples:
1837 >>> wheatstone_solver(resistance_1=2, resistance_2=4, resistance_3=5)
You can’t perform that action at this time.
0 commit comments