-
Notifications
You must be signed in to change notification settings - Fork 17
Resistor divider simulation #203
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
Comments
Great idea. I agree. |
Thank you! The way the vote is on the features page, using VotePowers. You can vote for any feature as many times as you want. I'm still working on a more detailed FAQ that explains how this works, but here is a quick explainer. |
This would be great. In the interim would it be possible to make the potentiometer have hot keys for values so we can simulate the same thing? |
Sounds like a good suggestion. There's also page-up/page-down that jump up/down, but not to a specific point. If anyone is interested in hacking on this, you can add a new keyboard event listener here, and then check if the key is 1, 2, 3, etc. and modify the value accordingly. |
While waiting for this, there's some workaround: you can achieve a similar functionality by implementing a custom chip (see #301 for details). Here's one example showing how to use a custom chip to simulate multiple analog buttons connected to a single analog input: |
The custom chip works well BTW. Thanks for the suggestion. |
Oddball suggestion, but instead of implementing further simulation in the backend, maybe borrow the simulator from https://github.com/SEVA77/circuitjs1? P.S. This is an awesome project. I'm so glad I found it. |
Thanks for the suggestion @kubark42! The funny thing about "circuitjs1" is that it's actually implemented in Java and compiled to JavaScript. In any case, we already have a solution for the analog simulation part of this feature. The main challenge is how to integrate it into the existing simulation framework while keeping the performance high and not breaking existing projects which rely on the current behavior of resistors. Right now, this feature is #8 in the requested feature list, let's see how long until it makes it to the top :-) |
2 years later, still not implemented |
1.5 months later, and now it's number 6 on the list |
Prioritization should happen for important things and urgent things. It isn't a great optic when it takes 2 years to do something as simple as a resistor divider. Maybe it's a heck of a lot of work on the backend, and that's why it isn't happening. But if prioritization comes down only to votes, then low-hanging fruit never gets prioritized. Typos and documentation errors will endure effectively indefinitely if only the most highly voted features get implemented. Looking at the prio list, some things are jaw-droppingly difficult, such as an offline simulator. Le'ts hope that resistor dividers are easy and can find their way into the queue before the devs tackle offline support and its almost infinite number of computer configurations. |
I'm wondering - how much work time do you estimate the resistor divider would take? |
Nothing against you, but this functionality of voltage dividers is already in the worst simulator TinkerCAD... Dont know how simulation in Wokwi works, if it is not like "circuit" simulation, but more cpu only simulation with peripherals. |
Is this implemented? Couple hours and i got no success until i found this. Painfull. Btw, this is good... |
Not yet |
@jxmked You can simulate this behavior with a Custom Chip |
Yep. But Custom Chip doesn't have support for VScode. Kinda painful. |
Resistor dividers are useful for connecting multiple buttons to a single analog input pin, as described here. This is particularly useful for MCUs with limited number of IO pins, such as the ATtiny85.
Currently, Wokwi includes a very basic analog simulation: You can connect a single part (e.g. a potentiometer or an analog temperature sensor) to one or more analog input pins. However, if you add any resistors to your analog circuit, the simulator will ignore them.
Let's simulate them!
The text was updated successfully, but these errors were encountered: