Skip to content

Instantly share code, notes, and snippets.

@Zolomon
Created March 1, 2015 10:19
Show Gist options
  • Select an option

  • Save Zolomon/24bae232fddd0bfd6e0e to your computer and use it in GitHub Desktop.

Select an option

Save Zolomon/24bae232fddd0bfd6e0e to your computer and use it in GitHub Desktop.
Exploring the affect on the effect with different resistors.
for x in range(1, 10):
for y in range(1, 10):
Ri = x # Internal resistor
R = y # Load resistor
Vs = 12 # Internal voltage source
Vri = (Ri/(Ri+R)) * Vs # internal resistor
Vr = (R/(Ri+R)) * Vs # supplied load resistor
Pri = (Vri**2)/Ri # effect on the internal resistor
Pr = (Vr**2)/R # effect on the load resistor
print("Ri: %.2f R: %.2f Vs: %.2f Vri: %.2f Vr: %.2f Pri: %.2f Pr: %.2f" % (Ri, R, Vs, Vri, Vr, Pri, Pr))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment