Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP8266-EVB EMI noise #24

Closed
yerpj opened this issue Nov 21, 2015 · 7 comments
Closed

ESP8266-EVB EMI noise #24

yerpj opened this issue Nov 21, 2015 · 7 comments

Comments

@yerpj
Copy link

yerpj commented Nov 21, 2015

I encountered some odd behaviour with the EVB. I mounted an http server on the ESP8266 ( javascript thanks to Espruino), and I tried to switch the relay state everytime a client connects to the server (thus, giving me a audible debug info). The case happened, where the ESP reseted by itself after the relay state changed. I experienced this many times.
I think it may come from the electro-magnetic field created by the relay inductor, which may be important enough to cause electrical errors on the ESP side.
Does anyone experienced the same behaviour?

@toome123
Copy link
Contributor

I think the problem is not hardware . but you will tell you what your consumer touch with relay?

@yerpj yerpj closed this as completed Dec 9, 2015
@toome123
Copy link
Contributor

One day ago , I had the same problem, I upload simple sketch to switch relay over mqtt . And after five toggles of relay state, the esp module, block and restarting self

@toome123
Copy link
Contributor

Is there really a chance that this is a hardware problem or memmory leak

@DanKoloff
Copy link
Contributor

Hey guys,

We have tested the relays numerous times in different scenarios. They also get tested during and after the assembly of each board. I just tested to switch the relays a hundrded times and the behavior described by you does not occur here. What I recommend you to do:

  1. Test with another (better) power supply adapter.
  2. Always add software delays when switching relays. Switching relays on and off without any delay would greatly shorten their lifespan and, in fact, can damage the relay in a matter of minutes.
  3. Consider that the issue might be related to the load on the relay. Refer to the information below.

The whole thing might be the typical problem with all electromechanical relays. Inductive AC and DC loads are hard for electomechanical relays where welding contacts cause problems. Normal way to solve this problem is to use clamp diodes or zener diodes in the poles of the load. However, this lengthens the off delay and it does not totally eliminate the sparking in relay contacts. Switching the high DC voltages is also difficult for the electromechanical relays.

I am sure there is a lot of solutions that might be suggested online. There are a number of workarounds or partial solutions but they depend on your exact design and setup. There is no solution that I can recommend 100% - you will have to try different things.

I have few ideas if the problem is related to the load (point 2):

  • Try to place the ESP8266-EVB board further from any motors. If you use a 220V motor the whole freeze might be related to its influence on the ESP8266-EVB.
  • Try to place a TVS varistor/Zener near the power supply of ESP8266-EVB - the varistor picked should be suitable for [ + 3], e.g. if you supply ESP8266 with 5V the TVS should be for 8V.
  • If your motor commutates DC (not AC) you can also put capacitors in parallel to the contacts.
  • If nothing else works check if there are suitable solid-state relays that can be used instead of the one we have placed.

Best regards,
Lub/OLIMEX

@yerpj
Copy link
Author

yerpj commented Dec 14, 2015

Thank you @DanKoloff for those recommendations.
I encountered this issue without any load on the relay. My power supply is a 5V 3A, and I always put a 0.5sec delay before switching the relay. Anyway, I never try to make PWM with a mechanical relay ;-) It is switched at most a few times per minute.

I do not know if this issue comes from hardware or software , but in any case it seems that both @toome123 and me are experiencing some odd behaviors with that board.
I am using Espruino on it, and I know there is a few bugs with the port on ESP8266. @toome123 , which kind of firmware are you using?

@DanKoloff
Copy link
Contributor

Can you test with our IoT firmware (in this repository)? This would show if it is software-related issue. There is a category called "Relay" in the web form. Search for "relay" here: https://github.com/OLIMEX/ESP8266/tree/master/IoT%20Firmware

Also check this video (despite that it doesn't show the usage of the on-board relay; you can see the "Relay" category in the web form): https://www.youtube.com/watch?v=4zRq85791vo

@toome123
Copy link
Contributor

The problem I had I think was the supply is not enough. @yerpj I use Olimex IoT firmware. I think this issue can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants