-
Notifications
You must be signed in to change notification settings - Fork 300
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
op amp freaking out in differentiator #82
Comments
Hmm, that's weird. If you make the timestep smaller (like 3u) it fixes it. Or adjust the values. Do you have "trapezoidal approximation" unchecked? You could check that, and it fixes it for me. That's weird, because usually trapezoidal is less stable. |
I left everything besides the component values the default. So trapezoidal was checked on the capacitor. If it has anything to do with it, here's my chrome://version:
Perhaps it's 32-bit vs. 64-bit floating point error. |
I thought javascript floating point always used double precision. Otherwise lots of examples would not work, I think. |
As a reference, I made the same circuit, set time step to 3µs, and it still freaked out. Other machine chrome://version:
|
Standard differentiator circuit, just different values than the example. Scope is of the op amp output. When I toggle the logic input, I expect a sharp pulse in the opposite direction from the op amp and then silence. Instead it freaks out.
Interesting to note that when I bring up the example (5k resistor, 2µ cap) and change the triangle wave to square wave, it does not freak out like this. When I change it to 1k and pulse wave, it freaks out when it's 5V and ok when it's 0V
The text was updated successfully, but these errors were encountered: