Easily found GND,3.3V,GPIO0. Last 2 pins I assumed were Rx/Tx but couldn’t connect by serial. Zooming up on the ESP chip I found just ink where Rx/Tx pins should be on the surface.
I have a spare M3 and easily put Tasmota on it with serial connection. Didn’t need to add any pullup or pulldown resistors except to pull GPIO0 to GND to put in flashing mode.
I’m hoping I can just wire in the M3 to the plug board. Checked voltages on board for the pins with mains power going to it.
GND,3.3V,GPIO0 as expected. Hole I want to wire GPIO14 reads 3.3V and GPIO13 reads -1.7V.
Does -1.7V + 3.3V give potential difference of 5V to operate the relay or is the -1.7 to run the LED?
New to electronics and I was actually surprised to find any voltage across those last 2 holes. Is this going to be just as simple as attaching 5 pins from M3 to the 5 holes in the board or is this going to go bang or just work intermittently.
The ESP chip has a bunch of GPIOs connected to other areas of the board, like the relay and button. By only connecting TX, RX, GND, 3.3V and whatever the other one is you will be missing all these connections.
It is an ESP8266 chip, you should be able to program it. There are no code protection fuses for the ESP8266. It’s just a matter of working out which pin is TX, RX, and GPIO0 (to put it in bootloader mode*).
Look up the ESP chip datasheet and either physically trace the connections from the pads to the IC or use a multimeter in continuity mode to work out which pins are which.
* Then for simplicity of programming:
Connect a button between RST and GND Connect a button between GPIO0 and GND
To enter bootloader mode simply hold the GPIO0 button in, tap the RST button, then release the GPIO0 button. When you have successfully uploaded your firmware just tap the RST button to exit bootloader mode.To enter bootloader mode simply hold the GPIO0 button in, tap the RST button, then release the GPIO0 button. When you have successfully uploaded your firmware just tap the RST button to exit bootloader mode.
This is the ESP chip I took off the board. Soldered on my own pins to try to crack this by serial. Those are the only 5 pins connecting ESP to the main board. Different baud rates, nothing. I googled this and found another forum where someone had same problem. They said chip had to be programmed prior to being put on the module. Good way to stop tinkering. You maybe able to see from pic just white ink on module. I ran my meter up and down it to see if any continuity with pins exposed to the main board and GND,VCC,GPIO0 all fine. MTDI connects to -1.7V hole and 3.3V (pin I was looking to connect GPIO14 to) connects to MTCK. I’ve flashed several other plugs by serial. Don’t have high hopes TUYA convert will ever work again, so this is just a puzzle I keep trying to take a go at.
This is template for my other different brand plug. I think ESP only needs pin for button, and 1 each for LED , Relay signal. The main board could supply GND and VCC to relay and LED.
Yes, I can get it to enter flash mode by pulling GPIO0 to ground. Even when ESP module was still attached to main board pushing in button and supplying power puts it into flash mode. Just no serial connection. Swapped RX/TX about those last two pins. Tried different Baud rates and not a peep from serial. Unsoldered module in case something on main board preventing upload. In pic you can see pin 25,26 not present.
Well at least it has made me learn from it trying to solve the puzzle. This tamper proofing doesn’t seem to have caught on. Perhaps saving in solder 1/20th of a cent and cutting off 2 pins costs 1/10th of a cent so it’s a cost thing.
What the hell. I just went and wired in the M3 as I planned and it worked. Now have to shorten the wires so I can close the case. Will test it to see if it lasts.
Ha, that’s ended this experiment. M3 still ok but plug not working. No leds even.