Skip to content
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 analog signal range modeling #298

Merged
merged 26 commits into from
Sep 29, 2023
Merged

Add analog signal range modeling #298

merged 26 commits into from
Sep 29, 2023

Conversation

ducky64
Copy link
Collaborator

@ducky64 ducky64 commented Sep 29, 2023

voltage_out now means the voltage the device is capable of generating (even as an unintended transient), while signal_out is the voltage the device generates under normal operating conditions. voltage_limit now refers the maximum operating condition (sometimes the absolute maximum rating), while signal_limit is the functional operating limit (which may differ from the maximum rating, e.g. for a non-RRIO opamp or weirder ADCs - looking at you ESP32). Basically adds automated checking for those edge cases.

Updates all part models with signal modelling.

Other changes:

  • Enforce voltage_limits for AnalogLinks - apparently the assertion was missing before...
  • Updates the compiler to handle RangeEmpty in additions and multiplications.
  • Add AnalogClampZenerDiode, to clamp analog voltage
  • Clean up some of the analog port definitions
  • Add ResistiveDivider.divider_output and divider_ratio utility to share these common calculation functions

Future things to do:

  • Generate the proper signal output range for opamp amplifiers and diffamps - currently it's intersected with the amp output range to avoid excessive large ranges as a result of input tolerances.

@ducky64 ducky64 merged commit 915fed1 into master Sep 29, 2023
@ducky64 ducky64 deleted the analognew branch September 29, 2023 06:55
@ducky64 ducky64 mentioned this pull request Oct 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant