Author Topic: Simple ESP8266 with power module resets  (Read 1500 times)

0 Members and 1 Guest are viewing this topic.

Offline markus1234Topic starter

  • Newbie
  • Posts: 6
  • Country: at
Simple ESP8266 with power module resets
« on: January 31, 2017, 05:26:59 pm »
Hello,
I want to build a small wifi in wall switch which just switches a relay on or off. For simplicity I have taken a HLK-PM03 (http://www.hlktech.net/product_detail.php?ProId=59) since it's easy to use and small. This power module will power a ESP8266-03 which than will switch a relay (by using a transistor).

My schematics:


This work pretty well in any room but in the kitchen - there it will randomly reset. Also if I just touch the  ac at the terminals or the power outlet below, it will reset. Does someone know why?

thanks in advance
 

Offline TheDane

  • Regular Contributor
  • *
  • Posts: 209
  • Country: dk
Re: Simple ESP8266 with power module resets
« Reply #1 on: January 31, 2017, 07:00:17 pm »
A decoupling capacitor (or several) might be what's missing, and causing your stability issues.

From the AC-DC converter datasheet it states:
Output ripple and noise:    ?70 (mVp-p)
Rated input voltage, full load. Using 20MHz of bandwidth, The load side 10uF and 0.1uF capacitor to be tested.

Your schematic shows no caps at all. A 10µF and 100nF cap is required, be sure the voltage rating is ok  :-+

A kitchen tends to be grounded quite well, and since your body works great as an antenna - touching electronics can cause large voltages (and currents) that easily can (and will) cause resets, etc. when no ESD components has been fitted. https://en.wikipedia.org/wiki/Electrostatic_discharge
Build it into a case, touching mains AC isn't for beginners - and isn't recommended, even for advanced geeks
 

Offline markus1234Topic starter

  • Newbie
  • Posts: 6
  • Country: at
Re: Simple ESP8266 with power module resets
« Reply #2 on: January 31, 2017, 09:42:21 pm »
Hi,
thanks for the fast answer :)

I tried that right now and added a 10uF and a 100nf cap right after the 3.3v output of the power brick (in parallel - with 1 cm of wire).

The problem still exists  (althought it seems to be getting better):(
« Last Edit: January 31, 2017, 09:52:50 pm by markus1234 »
 

Offline jm_araujo

  • Regular Contributor
  • *
  • Posts: 77
  • Country: pt
Re: Simple ESP8266 with power module resets
« Reply #3 on: February 01, 2017, 12:50:54 pm »
You should also use a base resistor in Q1, and a flyback diode across the relay coil.

Leaving those out will give you problems when switching the relay!
« Last Edit: February 01, 2017, 12:52:58 pm by jm_araujo »
 
The following users thanked this post: TheDane


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf