Detecting short circuits of outputs to GND or 3.3V #11923
Replies: 7 comments 5 replies
-
The constant OPEN_DRAIN is intended to be used for the mode=xx argument. For the pull=xxx argument the PULL_UP (value=2), PULL_DOWN (value=1) constants should be use. In your case OPEN_DRAIN (value 7) worked, since it has bit 1 set and PULL_UP is checked after PULL_DOWN and supersedes a previous PULL_DOWN setting. |
Beta Was this translation helpful? Give feedback.
-
The function What happens, if too much current was drawn from many GPIOs? Does it |
Beta Was this translation helpful? Give feedback.
-
Hard to say. It could overheat and get permanently damaged. |
Beta Was this translation helpful? Give feedback.
-
Perhaps of slight interest: C code we use in CircuitPython to detect adequate pull-ups on I2C. Similar code in other ports: |
Beta Was this translation helpful? Give feedback.
-
Using code to detect short circuits is evil. It should be done with a multimeter before first applying power. |
Beta Was this translation helpful? Give feedback.
-
While your approach, @sosi-deadeye does not damage the pins because the current is limited in time to short pulses, it has the risk of perhaps damaging the pin in the rare case that something interrupts and prevents the switching back. It might be an interrupt that does not return. However in practice I found the pins to be robust even in such cases. By we don't know how new hardware behaves. The other approach presented by @dhalbert leads to the more general alternative: |
Beta Was this translation helpful? Give feedback.
-
I continued to work on this idea (nice inspiration @sosi-deadeye) .
Preliminary program:
Findings:
So on the ESP8266 there is no easy/safe general testing for free float possible, it seems. Except taking the risk and going to "brave mode"!?! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I got the inspiration from this Issue, which was a false claim. The use of
GPIO12
does not brick anESP32
. The problem was related to anotherGPIO
used by externalSPIFLASH
.Then I wanted to know if a short circuit of outputs could be detected. The answer is yes.
Example where
GPIO33
is connected to3.3V
andGPIO4
,GPIO18
andGPIO19
toGND
.Beta Was this translation helpful? Give feedback.
All reactions