Interesting feature that i would like to use

Quote from average_simulide_enjoyer on February 8, 2025, 7:08 pmHm, i thought the action was instantaneous. But the act of opening and closing has a reason. I need to open the circuit of the current to not read 0V
Then I short it to read the current.
The real issue is just simply the voltage being overiten by the change of voltage when I short the current.
Hm, i thought the action was instantaneous. But the act of opening and closing has a reason. I need to open the circuit of the current to not read 0V
Then I short it to read the current.
The real issue is just simply the voltage being overiten by the change of voltage when I short the current.

Quote from arcachofo on February 9, 2025, 12:09 pmBut the act of opening and closing has a reason. I need to open the circuit of the current to not read 0V
Yes, I understand the general idea.
But when you open or close a switch it doesn't happen in that moment.
From the circuit point of view, everything you do in updateStep() happens all at once, no time has passed.So you need to do it by steps, something like a state machine or similar.
updateStep1- open/close some switches.
updateStep2- read voltages caused by step1 and open/close switches for next step.
updateStep3- read voltages caused by step2 and open/close switches for next step.
...
But the act of opening and closing has a reason. I need to open the circuit of the current to not read 0V
Yes, I understand the general idea.
But when you open or close a switch it doesn't happen in that moment.
From the circuit point of view, everything you do in updateStep() happens all at once, no time has passed.
So you need to do it by steps, something like a state machine or similar.
updateStep1- open/close some switches.
updateStep2- read voltages caused by step1 and open/close switches for next step.
updateStep3- read voltages caused by step2 and open/close switches for next step.
...

Quote from average_simulide_enjoyer on February 9, 2025, 12:18 pmI see. I changed the bool for an uint and count steps. It semi-works now. I figured out that the switches affect the readings maximum value. I think they have a 1mΩ internal resistance or something. I need to add another voltmeter and ampmeter directly shorted to ground for thr output measurement, but other than that, it's working now.
Thx.
Also, about this 1mΩ or so internal resistance, there could be a setting to change it or make it 0 for a perfectly ideal switch. Or maybe this change of measured value is just a bug in the switch code, idk.
Anyways, thx for helping and think about what I said
I see. I changed the bool for an uint and count steps. It semi-works now. I figured out that the switches affect the readings maximum value. I think they have a 1mΩ internal resistance or something. I need to add another voltmeter and ampmeter directly shorted to ground for thr output measurement, but other than that, it's working now.
Thx.
Also, about this 1mΩ or so internal resistance, there could be a setting to change it or make it 0 for a perfectly ideal switch. Or maybe this change of measured value is just a bug in the switch code, idk.
Anyways, thx for helping and think about what I said

Quote from arcachofo on February 9, 2025, 12:39 pmthere could be a setting to change it or make it 0 for a perfectly ideal switch.
Yes, switch resistance configurable is a good idea, indeed very convenient.
But an ideal switch is not possible, that would mean infinite admitance.In any case I think you could include the switch resistance in your calculations.
there could be a setting to change it or make it 0 for a perfectly ideal switch.
Yes, switch resistance configurable is a good idea, indeed very convenient.
But an ideal switch is not possible, that would mean infinite admitance.
In any case I think you could include the switch resistance in your calculations.

Quote from average_simulide_enjoyer on February 9, 2025, 1:57 pmits some weird thing. it allows the regular current to pass like a 0 Ohm resistor, but as soon as the current gets very big, like kA big, it limits it. for example, if i short 5V, it reads about 900kA, but if i connect a switch between the out terminal and ground (or between the in terminal and the source), it drops and is limited to about 4kA
edit: i just realised a very small resistor wouldnt alter low current values cuz the floating point precision isnt that good. it seems to be 1/999 Ohms of resistance, so 1.001001001001... mOhms
edit2: i wondered if it was precision issues cuz i would assume it is actually 1, but then i put a 10mOhm in series and measuring the output impedance gave 11.001001001... so it should actually be 1.001001... mOhm
its some weird thing. it allows the regular current to pass like a 0 Ohm resistor, but as soon as the current gets very big, like kA big, it limits it. for example, if i short 5V, it reads about 900kA, but if i connect a switch between the out terminal and ground (or between the in terminal and the source), it drops and is limited to about 4kA
edit: i just realised a very small resistor wouldnt alter low current values cuz the floating point precision isnt that good. it seems to be 1/999 Ohms of resistance, so 1.001001001001... mOhms
edit2: i wondered if it was precision issues cuz i would assume it is actually 1, but then i put a 10mOhm in series and measuring the output impedance gave 11.001001001... so it should actually be 1.001001... mOhm

Quote from arcachofo on February 9, 2025, 2:09 pmEverything has some resistance, even ground or rail.
The minimum resistance for a voltage source (including ground) is 1e-14, very tiny but not 0.A 0 Ohm resistor means a divide by 0 error, that is also why ideal switch is not possible.
EDIT:
edit: i just realised a very small resistor wouldnt alter low current values cuz the floating point precision isnt that good. it seems to be 1/999 Ohms of resistance, so 1.001001001001... mOhms
Yes, that is another issue.
Everything has some resistance, even ground or rail.
The minimum resistance for a voltage source (including ground) is 1e-14, very tiny but not 0.
A 0 Ohm resistor means a divide by 0 error, that is also why ideal switch is not possible.
EDIT:
edit: i just realised a very small resistor wouldnt alter low current values cuz the floating point precision isnt that good. it seems to be 1/999 Ohms of resistance, so 1.001001001001... mOhms
Yes, that is another issue.

Quote from average_simulide_enjoyer on February 9, 2025, 2:27 pmyes, i confirm that it is about 1mOhm. it would be nice to be able to make it like 1pOhm so its almost 0 and there is no way it interferes cuz such small resistance saturates the ampmeter anyways
yes, i confirm that it is about 1mOhm. it would be nice to be able to make it like 1pOhm so its almost 0 and there is no way it interferes cuz such small resistance saturates the ampmeter anyways