It was different animal inside: not ESP8266, but rather a MediaTek MT7681N chip that does WiFI.
The MT7681 is mounted on a daughter board labelled ESN-MT7681-V2.4 (image 3 below). At the opposite end for its WiFi antenna (near CJ1 label), the daughter board connects to the main board via 7 pins which might help with programming. The push button is to the left of the daughter board. Above the push button is a blue (WiFi related) LED & below is a red LED that's on when the relay powers the female appliance socket.
1) Top of case 2) Inside3) WiFi daughter board, same orientationpush button & LEDs to the left Lower right corner of insides
Does anyone know if one can program these devices with Arduino IDE?
I can find pinouts for the MT7681 chip itself. But so far, I need & cannot find 1) pinouts for the 7 pins on the mounting board. I assume for Arduino IDE programming, I'd also need 2) a MT7681 board add on like for the ESP8266.
I'll probably let this go for now, but in case someone can take it further ... The main ECOPlug board labels: SM-P701 94V-O YY-04 E361546 FR-4 The MT7681 module label: ESN-7681-V2.4 Continuity testing with my multi-meter, I mapped some of pins of the MT7681 module: What I got so far for the top pins (left to right) 1-7: 1) ? 2) ? 3) the right (non +) end of blue LED (wifi indicator) 4) top of push button 5) ? 6) GND 7) VCC
Bottom of push button connects to pin 6 ( GND ). GNDing pin 4 (top of push button) results in toggling the relay & the red (power) LED. But so far, I'm not finding where pin 4 connects to the MT7681 GPIOs.
From the datasheet, External flash memory MX25L4006E, pins 1-8 counter clockwise starting at the dot: 1) chip select 2) SO serial output (or 1 of dual output) 3) Write Protection 4) GND 5) SI serial input (or 0 of dual output) 6) Clock Input (SCLK) 7) Hold, pause device without deselecting 8) VCC
The MT7681 chip: pins number 1-40 counter clockwise starting at the lower left. See here for the pinouts of the chip.
Caution: the MT7681 pins are very tiny to check. I believe these MT7681 pins connect to the indicated External Flash Memory pins 8 FLMISO ext mem input >> Ext Mem 1, 2 & 8 9) FLMOSI ext mem output >> Ext Mem 1, 2, 5, 8 10 FLCS chip select >> Ext Mem 1, 2, 5, 8
I'm pretty sure of GND & VCC indicated on the top 7 pins. However, so far, on those 7 pins, I found 1) no connection to MT7681's Rx or Tx or GPIO pins. I also do not know: 2) if one can augment Arduino IDE to program the MT7681 modules or 3) how to put the MT7681 in flashing mode.
So fairly easily, one could power the MT7681 module (via VCC & GND & maybe a large capacitor across them), but then what?
A programming jig over the 25L4006E flash memory seems doable. Could one somehow directly flash that memory with a sketch?
Hi, I have ordered this same ECOPLUG. I also was checking continuity to find if the UART pins of the mt7681n where exposed somewhere in the pcb. I found that one of them is exposed in the top solder in a place where its supposed to be a resistor. I also found that the pin 1 of the module is controling the relay.
Finally After these test the ECOPLUG didnt work anymore. I replaced the mediatek module for an esp01 in order to check if it was the mt7681 the problem and i found out that the mt7681 was dammage. It seems to be very sensitive.
First off, I'd rip the Mediatek out and throw it in the trash. Trace the circuit and hook up an ESP01 and be done with it. Dont forget ESP03 is also a good choice due to small size.
The problem is: -the Arduino IDE has no support for this animal and all the functions you need (WiFi/GPIO Access). -even if you are successful to flash the chip, the code wont work because you'll never get the wifi to start up without a driver! All this code is written for the ESP, not that chip. -All the references to the pins will be wrong because you have no definition from the "Arduino PIN" to the real logical pin #
If you are a masochist and love punishment, you can port the whole thing to the LinkIt development platform. But the thought of that gives me flashbacks to the ESPRESSIF VM of days past. Here is a link to download it:
But if you are really bored, and have nothing better to do, then I would go for it! It could be fun, seriously. But it's going to be a lot of work for silly $8 plug when other solutions exist. I advise against it because I'm sure that thing will go down the drain soon just like all the others that went up against the ESP because of lack of community support.
If you want something a bit more fun and something that will yield an end result that is a bit more "productive" from your efforts, I suggest the Kankun Smart plug. It runs a full version of Linux and is easily hacked. I put some programs on mine and gave it some real intelligence - it's nice if you want something more advanced. Check out Kris's tutorial here:
Yes, the link you provided to the Wifi Bee with the same chip could be useful. But remember the way we used to use the ESP initially with the Arduino as a slave? That is basically this thing. So you would have to get that firmware from the wifi bee onto your mediatek, then put a controller..... (just solder in an ESP and throw that chip in the trash where it belongs!!!! Someone of your caliber can adapt in the ESP01 in 10 minutes.)
Last Edit: Sept 10, 2017 6:28:16 GMT by jimkernsjr
regarding to the esp01. I replaced the mediatek and now im using the esp01 instead. I made an sketch with arduino IDE to control the relay with the RX pin attached to first pin where it was the mediatek module.. i also made an Android app to controll it, and thats all... the mediatek module now is laying around somewhere over the desk...
This will NOT work with MT7681, even if it uses TUYA cloud or Smartlife app (this combination is rare). Be careful, there are even some of the wall switches that you can normally flash that won't work. Here is how to do some wall switches: www.youtube.com/watch?v=TjqD6UQ_oMQ
If you really want to use my old firmware (why?!?), you can put the .bin file on your Rpi SD card and flash it instead of Tasmota. Tasmota is very modular, you can put rules, so there's no point to be customizing the old firmware anymore:
You can customize your MQTT topics, so you can do a direct drop in replacement by duplication the topic naming semantics of Computourist:
I'm also looking into OpenMQTTgateway to replace the old RFM69 stuff with RFM95. Looks like it can be a good drop in replacement, that can run on the ESP32 and add BLE. No need for the clunky ethernet shield anymore. I see a nifty TTGO LORA board that has an OLED all in one that looks up to the job!