Open conversy opened 4 months ago
So it would be bidirectional, right?
That wouldn't be hard, although it's not as easy as this. pins[___].current is just for reporting purposes. Modifying it does not change the circuit behavior.
I'd have to get rid of the voltage source for the output (change getVoltageSourceCount()) and instead connect the output directly to the inputs, probably using stampResistor() with a small value for the "on" input and a large value for all the "off" inputs.
Thank you for answering!
Yes, it would be bidirectional, I guess. I read somewhere that such chip has an internal resistance of about 60 ohms, for what it's worth.
[edit] added 'bi' before 'directional'
Anyway could it be compatible with something like 74HC4052
?
Maybe I can use sub-circuit to simulate something like this, using MOSFETS?
Indeed I managed to make it with sub-circuits, Or at least I think I do, it seems to working for me, please notify me if something is wrong. 😄 The simulation performance wouldn't be the same as the using pre-programmed approach, but it's neglectable unless you have very large circuits (or slow computer).
Here circuit files (multiple versions due to VCC/logic):
You can File > Open File...
and then File > Create Subcircuit...
and then move the outputs around and save under some name.
Notes:
Screenshot of the example circuit (using simple version):
BTW I like CircuitJS so far, there are few annoying things, but it's huge help.
Actually there seems to be error in the design, it doesn't work with negative VEE, which is should, and on top of that voltages are weird at best. I will investigate, try to fix it and update the design. I am not really good at electronics :/
It seems the MOSFETs inside are driven not by GND/VCC but VEE/GND logic. And one of MOSFETs seems to be upside down I think.
I will update the comment above (incl. the TXT file links).
Updated the original comment. If anything more is wrong, please let me know.
(sorry for the delay)
@AgainPsychoX thank you so much!
However, I'm not quite sure I understood how to use a subcircuit in circuitjs, even after searching through "directions" on the falstad.com site... How to add one of your circuit into my own and use it?
(Sorry for late response, I missed the e-mail).
Here are instructions:
File
> Open File...
(or use Ctrl
+O
keyboard shortcut).File
> Create Subcircuit...
:
Show label
checkbox. I will go here with 74HC4052_5V_S
. Save Across Sessions
checkbox, so the subcircuit is available even in other tabs, after refresh and after browser restarts.Draw
> Subcircuits
> Add <name you choosen>
:
Esc
or Space
or using the menu: Draw
> Select/Drag Sel
. That's should be it. Extra notes:
Edit...
(or double clicking). Care: Load Model Circuit
might replace your current circuit to display the contents; also it might be unavailable if you try edit circuit used inside other circuit.
Save Across Sessions
checkbox). You can open the website, and open browser developer console (Chrome/FireFox keyboard shortcut is F12
), then navigate to Application
(Chrome) or Data
tab (Firefox). After selecting the website under Storage
> Local Storage
you can see all the data the website saves in your browser storage, including subcircuits with keys prefixed with subcircuit:
, in my case:
Delete
:
Ctrl+C
/Ctrl+V
; also works between browser tabs), Esc
/Space
to exit to select mode, w
draws wire, r
resistors, c
/C
capacitors, g
ground, v
/V
voltage sources, etc. Make note that the shortcuts are case-sensitive (small/big letter mean different things). /
is useful to fast find the components without navigating through menus.Let me know if anything is unclear, I will try to help if I can.
@AgainPsychoX Sorry I saw your answer the other day but could not find the time to implement it... Thank you so much, these are very clear explanations, that might deserve being put somewhere on the circuitjs website, so that others can find them easily...
Thanks to your explanation, I could create the part in a subcircuit and use it in another circuit.
Your design is not exactly what I expected (it seems there are two input, while I only have one in the part I want to simulate), but I can adapt yours easily I think.
Many thanks again!
Hello,
the currently available Multiplexer is digital-only: the output is the "High Logic Voltage" if the selected input pin's value is True. It would be nice to have an analog option, that would basically transfer the selected input pin's voltage/current to the output. Maybe something like this in
MultiplexerElm.java
, though I'm not sure how the internals of CircuitJS work:I hope this makes sense! (And congrats for this excellent software!)