1

Topic: Simple Remote control using ESP8266

Hi,

I intend to built a project using Arduino UNO with an ESP8266 module, to turn on/off loads remotely.

My Uno board is functioning well.

The ESP module is having latest firmware installed on it.

I'm using RemoteXY.com editor, and its equivalent (newest) app on Android.

I have copied the source code and compiled it to Arduino with NO errors.

Also the baud rate is identical between source code and ESP.

The problem is, that I am not able accurately to connect to the app and control loads.

Between 20 attempts I can only connect once, and the connection is often reset and broken.

What could be the error?

P.S I have used the ESP connection from RemoteXY tutorial, but DIDN'T use the resistive voltage divider between RX pin on ESP and TX pin on Uno.

Thanks in advance

2

Re: Simple Remote control using ESP8266

DjMadness wrote:

P.S I have used the ESP connection from RemoteXY tutorial, but DIDN'T use the resistive voltage divider between RX pin on ESP and TX pin on Uno.

I absolutely recommend you use either voltage divider, or a "level shifting" device such as ....

https://www.ebay.co.uk/itm/4-channel-Bi … Swn4da31kF

These modules, powered by the respective 5V and 3.3V supplies ensure that no signal can exceed the required voltage levels.

Also resistors can pick-up external signals, like an aerial, especially when they are high value resistors.

2B, or not 2B, that is the pencil ...

3

Re: Simple Remote control using ESP8266

Nope, you don't need level shifters, the GPIOs on the ESP8266 are 5V-tolerant as long as you're not trying to use the pins also connected to the flash chip on a NodeMCU.  5V will blow the flash chip, but the ESP8266 rides it out, so sayeth the CEO of Espressif.  See the pic below for the DANGER WILL ROBINSON pins.

https://i.imgur.com/Y6LfZmG.jpg

Most likely your RF transmit power is too high.  The Arduino IDE core for the '8266 by default sets RF output power to 20dBm.  Drop that to around 2 or 3dBm if you're in the same room with your router, or it might overdrive your router.
WiFI.setOutputPower(2);  // sets the RF power to 2dBm.
That's solved a few of my connection issues.  Your RF setting may be higher or lower than the 2dBm I use, so play around with it.

Also, if you have multiple interrupt-driven routines, that can disconnect the WiFi.  It's kinda sensitive if your code goes away for long periods and doesn't give the core a break every 20-50ms.  Try adding yield(); or delay(0); spread throughout your code so that the WiFi stays refreshed.