chrta/sip_call

Sporadic call ist triggered

Closed this issue · 10 comments

KaiDK commented

Tested on input GPIO0 and GPIO4.
Sporadic call is triggered (even on test setup on desk w/o any wiring.

Seems like input pin is floating (what shouldnt happen due to internal pullup activated).

Testwise i now deactivated internal pullup and tied input pin to 3V3 with R=10k (waiting for test result now...)

Check your power supply, whether it provides enough power and properly grounded. Plus try less pull-ups less than 10k, let's say 1-2k

Can you post your schematics?

KaiDK commented

I will create a schematic in the next days.

Btw. it seems that lowering the pullup resistor on input pin to 220 Ohm (really low!) solved the issue.

chrta commented

So it seems that something is pulling the ESP32-input to low with a quite low resistance/high current. The resistors on the optocoupler input and/or output may have the wrong value, so that the there is a current that is too high flowing through the optocoupler's output transistor.

agree with @chrta . you might want to check values.
220 ohm is quite low for pull-up ) you definitely have some noise coming through

as for resistor value on high side of PC817 - it is pretty robust, but 10-20mA is more than enough for it.
so if you use ~230v mains - 12k-20k resistor will do, ~110V - 5k-10k.
actually, even 3-4 times bigger resistors will do.

plus you dont need two pc817, you either replace it with one pc814, or put any diode instead of second one (opposite direction, same as you did with second pc817)

check with multimeter resistance between input and output, you might have some solder residues or uncleaned flux, which conduct noise from mains

@chrta It seems like I have the very same issue, so I am posting here, even though the issue is closed. Is that fine?

I am using the very same setup from your figure in the readme, with 8V AC on the door bell side. R1 is 330 Ohm and R2 is 5,1 kO. Still, when I hit some light switches in the building, the ESP triggers a call.

So it seems like there is some interference between my light an the door bell. The power lines of the light (230V AC) and those of the door bell are very close to each other. Any ideas on how I could solve this issue?

chrta commented

@driehle R1 of 330Ohm seems to be very low. What optocoupler are you using exactly? I would try to increase this to the max value that works reliable to detect a regular bell signal. Maybe your issue is fixed by this. Otherwise you could check if your supply voltage is stable enough, maybe you can put some big capacitors on your 3.3V line.
You could also remove R1 completely and switch your light to check if the problem is related to the primary side of the optocoupler.
You could also try to put a small capacitor between the esp32 signal input and gnd to act as a low pass to filter out small spikes.

Edit: Maybe opening a new discussion would be better that continuing to discuss here.

@chrta Thank you for your feedback! The 330Ohm for R1 comes from this article https://www.reichelt.de/magazin/projekte/smarte-tuerklingel/. The opto couplers used are two PC817.

For R2, I tried a lower value of 2kO as well. This seems to work slightly better, but still most of the time the light is turned on, the bell rings. I have not yet measured it, but the power supply is via USB with a power adapter, so I would assume it is stable enough. No batteries involved.

I'll try the other suggestions you mentioned as well and will open a new ticket, if the issue remains.