Would you like to react to this message? Create an account in a few clicks or log in to continue.

You are not connected. Please login or register

R1909. OPTOCOUPLER and "CIRCUIT ERROR"

5 posters

Go to page : Previous  1, 2

Go down  Message [Page 2 of 2]

26R1909. OPTOCOUPLER and  "CIRCUIT ERROR" - Page 2 Empty Re: R1909. OPTOCOUPLER and "CIRCUIT ERROR" Sun Sep 24, 2023 10:53 am

KerimF

KerimF

royqh1979 wrote:So  for two isolated circuit, their grounds don't have to be the same ( or have the same real voltage).

Yes, they don't necessarily have the same voltage relative to a third reference (common to both). Let us recall that an isolated node can have any voltage just by changing the location of our 0V reference.

If I understood you well, do you mean that it is better for simulIDE to have many virtual isolated grounds (one for each isolated circuit) and their locations are chosen automatically by the program?
Perhaps this could be achieved in simulIDE. But in this case, the user will need to discover every added virtual 0V if no symbol is added for it too.

27R1909. OPTOCOUPLER and  "CIRCUIT ERROR" - Page 2 Empty Re: R1909. OPTOCOUPLER and "CIRCUIT ERROR" Sun Sep 24, 2023 11:08 am

royqh1979



KerimF wrote:
If I understood you well, do you mean that it is better for simulIDE to have many virtual isolated grounds (one for each isolated circuit) and their locations are chosen automatically by the program?
Perhaps this could be achieved in simulIDE. But in this case, the user will need to discover every added virtual 0V if no symbol is added for it too.

What I mean is that, an explicit 0V reference point could provide some convinience, but it's not a must.

28R1909. OPTOCOUPLER and  "CIRCUIT ERROR" - Page 2 Empty Re: R1909. OPTOCOUPLER and "CIRCUIT ERROR" Sun Sep 24, 2023 11:51 am

KerimF

KerimF

royqh1979 wrote:
KerimF wrote:
If I understood you well, do you mean that it is better for simulIDE to have many virtual isolated grounds (one for each isolated circuit) and their locations are chosen automatically by the program?
Perhaps this could be achieved in simulIDE. But in this case, the user will need to discover every added virtual 0V if no symbol is added for it too.

What I mean is that, an explicit 0V reference point could provide some convinience, but it's not a must.

In every isolated circuit it is a must to set one of its nodes as 0V (or perhaps having any other fixed value). Only by doing this, the voltages of the remaining nodes in the circuit could be calculated (always relative to it).

The simple question is about who will decide the location of this added 0V (the user or the program?), in every part of the circuit which is isolated from the main part (also chosen by the user by adding to it the first well-defined ground symbol in SimulIDE).

Practically, the user just needs to add one ground symbol, in the least, in every such isolated parts.

29R1909. OPTOCOUPLER and  "CIRCUIT ERROR" - Page 2 Empty Re: R1909. OPTOCOUPLER and "CIRCUIT ERROR" Sun Sep 24, 2023 11:55 am

Alex68

Alex68

It’s easier for me to make any model of an optocoupler, based on moss structures or bipolar ones, using primitive current and voltage sources.
Then they will work in any build of the program.R1909. OPTOCOUPLER and  "CIRCUIT ERROR" - Page 2 2023-373
R1909. OPTOCOUPLER and  "CIRCUIT ERROR" - Page 2 2023-374

30R1909. OPTOCOUPLER and  "CIRCUIT ERROR" - Page 2 Empty Re: R1909. OPTOCOUPLER and "CIRCUIT ERROR" Sun Sep 24, 2023 12:08 pm

royqh1979



Alex68 wrote:It’s easier for me to make any model of an optocoupler, based on moss structures or bipolar ones, using primitive current and voltage sources.
Then they will work in any build of the program.R1909. OPTOCOUPLER and  "CIRCUIT ERROR" - Page 2 2023-373
R1909. OPTOCOUPLER and  "CIRCUIT ERROR" - Page 2 2023-374

This board is for testers to test the newest buildings. So the most important things here is why a component/function won't work.

You can just choose the way to implement a circuit function, but it has nothing to do with THIS post.

31R1909. OPTOCOUPLER and  "CIRCUIT ERROR" - Page 2 Empty Re: R1909. OPTOCOUPLER and "CIRCUIT ERROR" Sun Sep 24, 2023 1:13 pm

arcachofo

arcachofo

Let me clarify a few things:

- The "CIRCUIT ERROR" is just a warning, and indeed the message is exactly: "Probably Circuit Error"
A circuit can run correctly with this warning, unless it is permanent. In this case it was not permanent, that warning shows for a second and then disappears.
The circuit didn't work in this case because an error in an optimization introduced recently (solved at Rev 1919).
Anyway I removed the warning because it can be confusing.

- About optocouplers:
Optocouplers are used as protection in most cases, but in the simulation a transistor with not burn and leak high voltage to the base.
So in most cases you can use a simple transistor or an open collector inverter and the circuit will work the same.
In some esoteric cases a more accurate model could be needed, but for the typical switching device you can get the same functionality in a simpler way.

- About the ground:
SimulIDE doesn't need to choose a node to be the "ground".
If you add a Ground Component then it will force that node to be at (nearly) 0 V, that's all.
Same if you add any voltage source.

KerimF wrote:In every isolated circuit it is a must to set one of its nodes as 0V (or perhaps having any other fixed value). Only by doing this, the voltages of the remaining nodes in the circuit could be calculated (always relative to it).
Sorry, I didn't know it was not posible so I did it.
For example here is no ground or node with voltage = 0 V:

R1909. OPTOCOUPLER and  "CIRCUIT ERROR" - Page 2 Kk25

32R1909. OPTOCOUPLER and  "CIRCUIT ERROR" - Page 2 Empty Re: R1909. OPTOCOUPLER and "CIRCUIT ERROR" Sun Sep 24, 2023 2:08 pm

Defran

Defran

In this particular case, the courrent is GIGA_Amps?

R1909. OPTOCOUPLER and  "CIRCUIT ERROR" - Page 2 Giga_a10
Attachments
R1909. OPTOCOUPLER and  "CIRCUIT ERROR" - Page 2 AttachmentGIGA_AMPS.zip
You don't have permission to download attachments.
(2 Kb) Downloaded 2 times

33R1909. OPTOCOUPLER and  "CIRCUIT ERROR" - Page 2 Empty Re: R1909. OPTOCOUPLER and "CIRCUIT ERROR" Sun Sep 24, 2023 2:51 pm

royqh1979



Defran wrote:In this particular case, the courrent is GIGA_Amps?

R1909. OPTOCOUPLER and  "CIRCUIT ERROR" - Page 2 Giga_a10

I've tried to make a patch and add more meters to your circuit to show the result.
Attachments
R1909. OPTOCOUPLER and  "CIRCUIT ERROR" - Page 2 Attachmentcsource.zip
You don't have permission to download attachments.
(1 Kb) Downloaded 2 times
R1909. OPTOCOUPLER and  "CIRCUIT ERROR" - Page 2 AttachmentGIGA_AMPS.zip
You don't have permission to download attachments.
(2 Kb) Downloaded 1 times

34R1909. OPTOCOUPLER and  "CIRCUIT ERROR" - Page 2 Empty Re: R1909. OPTOCOUPLER and "CIRCUIT ERROR" Sun Sep 24, 2023 2:54 pm

arcachofo

arcachofo

I've tried to make a patch and add more meters to your circuit to show the result.
Funny... it is the exact solution I implemented (Rev 1923).

35R1909. OPTOCOUPLER and  "CIRCUIT ERROR" - Page 2 Empty Re: R1909. OPTOCOUPLER and "CIRCUIT ERROR" Sun Sep 24, 2023 2:56 pm

royqh1979



arcachofo wrote:
I've tried to make a patch and add more meters to your circuit to show the result.
Funny... it is the exact solution I implemented (Rev 1923).

En... what about the issue of sdcc not in path?

36R1909. OPTOCOUPLER and  "CIRCUIT ERROR" - Page 2 Empty Re: R1909. OPTOCOUPLER and "CIRCUIT ERROR" Sun Sep 24, 2023 2:58 pm

arcachofo

arcachofo

En... what about the issue of sdcc not in path?
Almost forgot about it.
I'll reply there...

37R1909. OPTOCOUPLER and  "CIRCUIT ERROR" - Page 2 Empty Re: R1909. OPTOCOUPLER and "CIRCUIT ERROR" Sun Sep 24, 2023 3:22 pm

KerimF

KerimF

arcachofo wrote:
KerimF wrote:In every isolated circuit it is a must to set one of its nodes as 0V (or perhaps having any other fixed value). Only by doing this, the voltages of the remaining nodes in the circuit could be calculated (always relative to it).
Sorry, I didn't know it was not posible so I did it.
For example here is no ground or node with voltage = 0 V:

R1909. OPTOCOUPLER and  "CIRCUIT ERROR" - Page 2 Kk25

But I also said earlier that, if we don't look to be practical, the 0V reference could be virtual and anywhere. In fact, in your example, it is not even at any node.

Naturally, I think the case is closed now.
And removing the error warning is a good idea after all. Thank you.

On my side, I will keep doing what I used to by adding ground symbols, in isolated parts, at nodes that let the voltage readings on the simulated circuit be as friendly as possible (this is what I meant by practical).

38R1909. OPTOCOUPLER and  "CIRCUIT ERROR" - Page 2 Empty Re: R1909. OPTOCOUPLER and "CIRCUIT ERROR" Sun Sep 24, 2023 3:53 pm

arcachofo

arcachofo

But I also said earlier that, if we don't look to be practical, the 0V reference could be virtual and anywhere. In fact, in your example, it is not even at any node.
In many places it is stated as "the law" that you MUST choose a node to be 0V, but indeed it is not absolutely true, maybe convenient, but you can do it without ground.
Some simulators will even give an error if there is no ground and others will complicate the code to force a random one to 0V.

On my side, I will keep doing what I used to by adding ground symbols, in isolated parts, at nodes that let the voltage readings on the simulated circuit be as friendly as possible (this is what I meant by practical).
Yes, that's a good idea imo.
And the concept of "galvanic isolation" does not make a lot of sense in the simulation, this is just a bunch of numbers, there is no electricity here.

There are some things that might behave differently if you use grounds in 2 isolated circuits.
For example in the real world if you use a voltmeter between 2 isolated circuits you should read 0V, but that is because the voltmeter is indeed connecting the 2 circuits and forcing those nodes to be at the same relative potential because there is no return path.

In the simulation you only see this if you don't use grounds (at least in one of them) but this will not work with the oscilloscope for example, because the oscilloscope channels are not connected to reference pin (like real ones) they just "ask" the nodes what is their voltage, same thing with probes when you hover wires.

Real voltmeters or oscilloscopes rely on some current flowing to make a measurement. In the simulation, nodes just have a numeric value for it's voltage (and by definition it is always referred to 0) and you can just ask it for this value, no need to derive some current from it.

39R1909. OPTOCOUPLER and  "CIRCUIT ERROR" - Page 2 Empty Re: R1909. OPTOCOUPLER and "CIRCUIT ERROR" Sun Sep 24, 2023 5:27 pm

KerimF

KerimF

arcachofo wrote:In many places it is stated as "the law" that you MUST choose a node to be 0V, but indeed it is not absolutely true, maybe convenient, but you can do it without ground.
Some simulators will even give an error if there is no ground and others will complicate the code to force a random one to 0V.

You are right. I shouldn't use the word 'must', sorry.

40R1909. OPTOCOUPLER and  "CIRCUIT ERROR" - Page 2 Empty Re: R1909. OPTOCOUPLER and "CIRCUIT ERROR" Sun Sep 24, 2023 5:31 pm

arcachofo

arcachofo

KerimF wrote:
arcachofo wrote:In many places it is stated as "the law" that you MUST choose a node to be 0V, but indeed it is not absolutely true, maybe convenient, but you can do it without ground.
Some simulators will even give an error if there is no ground and others will complicate the code to force a random one to 0V.

You are right. I shouldn't use the word 'must', sorry.
What I meant is that is normal that everybody think that way.
Everywhere you read that the only way is choosing a node for V=0.

KerimF likes this post

41R1909. OPTOCOUPLER and  "CIRCUIT ERROR" - Page 2 Empty Re: R1909. OPTOCOUPLER and "CIRCUIT ERROR" Wed Oct 11, 2023 3:06 pm

Defran

Defran

The structure as an optocoupler in R1983 does NOT work at all. In R1909 something worked...

42R1909. OPTOCOUPLER and  "CIRCUIT ERROR" - Page 2 Empty Re: R1909. OPTOCOUPLER and "CIRCUIT ERROR" Wed Oct 11, 2023 3:23 pm

arcachofo

arcachofo

The structure as an optocoupler in R1983 does NOT work at all. In R1909 something worked...
I think it is about configuring it correctly.

For example in this circuit There is a voltage source controlled by current.
The LED is conducing around 30 mA of current.
The voltage source has gain = 1.
So it will produce around 30 mV.

R1909. OPTOCOUPLER and  "CIRCUIT ERROR" - Page 2 Giga_a10

You can do it in different ways:
- Configure a bigger gain.
- Configure it as a current source.

43R1909. OPTOCOUPLER and  "CIRCUIT ERROR" - Page 2 Empty Re: R1909. OPTOCOUPLER and "CIRCUIT ERROR" Wed Oct 11, 2023 3:33 pm

Defran

Defran

The optocoupler structure does not work in the R1983 version, in R1909 it worked poorly, but somewhat.

The correct link between the LED and the controlled source must be taken into account, as well as the electrical isolation between the primary and secondary circuit (the only reason for optocouplers).


R1909. OPTOCOUPLER and  "CIRCUIT ERROR" - Page 2 Optoac13

Attachments
R1909. OPTOCOUPLER and  "CIRCUIT ERROR" - Page 2 AttachmentOPTOACOPLADOR_simple test.zip
You don't have permission to download attachments.
(2 Kb) Downloaded 0 times

44R1909. OPTOCOUPLER and  "CIRCUIT ERROR" - Page 2 Empty Re: R1909. OPTOCOUPLER and "CIRCUIT ERROR" Wed Oct 11, 2023 3:42 pm

arcachofo

arcachofo

I think it is about configuring it correctly:

45R1909. OPTOCOUPLER and  "CIRCUIT ERROR" - Page 2 Empty Re: R1909. OPTOCOUPLER and "CIRCUIT ERROR" Wed Oct 11, 2023 3:52 pm

Defran

Defran

You are right. It works. This item to green, thanks.

arcachofo likes this post

Sponsored content



Back to top  Message [Page 2 of 2]

Go to page : Previous  1, 2

Permissions in this forum:
You cannot reply to topics in this forum