-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Operational Amplifier (OpAmp) Module and Start with a Few Basic Formulas #70
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
Milestone
Comments
engineerjoe440
added
enhancement
New feature or request
help wanted
Extra attention is needed
good first issue
Good for newcomers
labels
May 7, 2022
please assign me this issue |
let me know if like the code structure for
|
Hi, @Lakshmikanth2001! Looks like it's off to a great start! 😄 I've only got small suggestions about wording.
Let me give an effort with the docstring... (feel free to modify, we'll work out the details in your the pull request) def non_inverting(Vin = None, Vout = None, Rg = None, Rf = None):
"""
Non-Inverting Op-Amp Solver
This function will accept three inputs for the common operational amplifier
formulas related to a non-inverting operational amplifier (op-amp) and will
solve for the fourth value. All inputs default to `None`, to solve for any
value, leave its input as `None` and set all other inputs.
.. image:: https://www.basictables.com/media/non-inverting-opamp-circuit.png
Examples
--------
>>> from electriclpy.opamp import non_inverting
>>> non_inverting(Vin=10, Rg=10, Rf=10) # Solve for Vout
{...}
>>> non_inverting(Vin=10, Vout=10, Rg=10) # Solve for Rf
{...}
Parameters
----------
Vin: [int, float]
Input voltage, in volts. Default is None.
Vout: [int, float]
Output voltage, in volts. Default is None.
Rg: [int, float]
Ground-resistor value, in ohms. Default is None.
Rf: [int, float]
Forward-resistor value, in ohms. Default is None.
Returns
-------
dict: Dictionary of the resultant values, includes the following:
- Vin
- Vout
- Rg
- Rf
"""
... |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
It'll be good to add a submodule
electricpy.opamp
to contain a variety of op-amp related formulas. We can start with the formulas laid out in BasicTables. We should make a unique function for each formula and include an example and copy of the image for each.non_inverting_vout
- Image Link: https://www.basictables.com/media/non-inverting-opamp-circuit.pnginverting_vout
- Image Link: https://www.basictables.com/media/inverting-opamp-circuit.pngdifferential_vout
- Image Link: https://www.basictables.com/media/differential-opamp-circuit.pnginverting_summing_vout
- Image Link: https://www.basictables.com/media/inverting-summing-opamp-circuit.pngThe text was updated successfully, but these errors were encountered: