Chat here is you are connecting ESP-xx type modules to existing AVR based Arduino

Moderator: igrr

User avatar
By AcmeUK
#85444 OK now we can see where you are at.

You have a 2 channel esp-01 controlled relay board. Did this come preloaded with code that responded to an Android app? Maybe like this :-

http://www.icstation.com/esp8266-wifi-channel-relay-module-smart-home-remote-control-switch-android-phone-control-transmission-distance-100m-p-12592.html ?

I assume that you have replaced the preloaded code with the ESP8266_Control_Relay.ino sketch.

Looking at your graphic for the unit I see that it has a STM8S103 multi-purpose 8-bit microcontroller on board!

SO I would speculate that the STM8S103 is controlling the relays and that the ESP-01 is acting as a wifi modem.

Therefore you are going to need to find out what the ESP-01 needs to pass the the microcontroller to switch the relays. NOT A EASY TASK!

If I remember correctly a similar unit required a quad 2 byte packet to switch the relays. Why a quad 2 byte packet I hear you ask? Is it because the protocol is designed to handle more than just 2 relays, perhaps an array of tens or even more?

You may be able to glean some pointers from this:-

https://www.studentcompanion.co.za/wp-content/uploads/2019/07/ESP8266-5V-WiFi-Relay-user-manual.pdf

You would save time and grief if you ditched the board and bought a simple 2 channel board and controlled it from a NodeMcu.

Or my preferred solution, which is use a Wemos D1 mini with 2 D1 mini relay modules and mount them on either a double or triple base.

Good Luck
User avatar
By Zoran
#85463 Yes you are right
esp-01 came with preloaded code, but i replaced it with ESP8266_Control_Relay.ino sketch.

and i tried to find original code, but problem is with app ESP8266 SMARTCONFIG becuase it doesnt recognize my SSID...it shows unknown ssid....so i cannot do anything....

https://www.aliexpress.com/item/3284397 ... 4c4dnE50sc

i tried everything you sent me in this pdf document and nothing

where to find original code (if this is the problem) and how to make relays to turn on with esp-01...how to avoid this microprocessor