You need to log in to create posts and topics.

[Arduino UNO] - LED is ON even if I don't connect the GND to the resistor in the circuit

Hi! I'm trying to replicate this example in SimulIDE and I don't understand why the LED still lights up when the other end of the resistor is disconnected from GND. Is this a bug?

Uploaded files:
  • example.png

Hi.

The led can work without resistor.
I guess this is more a visualization problem, in SimulIDE unconnected wires can't exist.

Can you share the circuit file?

Yes, I can share the circuit (see below). Today my arduino board is supposed to be arriving. When it arrives I will test the schematic on it (to see if the behavior is the same).

 

 

Uploaded files:

An unconnected input pin can have undefined behavior in a real device.
In the simulation it will read as 0.

But it will probably work in a real Arduino as well.

By the way, the circuit you sent is not the same than in your picture:

alin89c has reacted to this post.
alin89c

I believe I've just created my first proximity sensor (see the attached GIF).
So, to be clear, when I disconnect the ground, the behavior is the same as in SimulIDE (with the exception that the LED can also be turned on by bringing an object in close proximity with the push button—it can be anything: even a 1 meter wood stick). So this is not a SimulIDE bug. It would be interesting to be able to do do this proximity thing in SimulIDE also...

P.S. What I've also noticed is that if I bring the wood stick in close proximity with the push button very slowly, the LED doesn't turn on. It turns on only when I press the push button (with the wood stick). To turn the LED off, I also need to increase the distance between the stick and the push button (it's not enough to just release the push button).

Uploaded files:
  • ezgif-1-b4cd2685d3.gif

I believe I've just created my first proximity sensor (see the attached GIF).

Great!

So, to be clear, when I disconnect the ground, the behavior is the same as in SimulIDE. So this is not a SimulIDE bug...

Thanks for reporting.

But note that a simulator does not always behave the same than real circuits.
A simulator is always a partial model of reality and there are many things that might not be simulated.
For example in real life there is certain amount of electromagnetic noise around, some simulators might simulate it or not.
And there are many things like this...

 

alin89c has reacted to this post.
alin89c

Your are probably picking up some EMR which is enough for the high impedance input to detect a high level.

alin89c has reacted to this post.
alin89c

@arcachofo
Aaah, you replied before I had the chance to finish my edits (my edits on the post you replied to)... Anyway, I'll keep this info in mind.