Hello. It will show the EDM-01AA-EU smart dimmer based on the WB3S and TuyaMCU WiFi module. I will demonstrate the process of changing its firmware (this requires cutting the PCB tracks) and give a ready TuyaMCU configuration for OpenBeken . This will allow us to free it from the cloud, from the manufacturer's servers and connect it to the Home Assistant.
Purchase of EDM-01AA-EU The dimmer can be bought in various online stores for prices up to about PLN 100, although this could change slightly with the increase in the $ exchange rate. I bought it earlier this year. Sometimes the product is under the MoesHouse logo and sometimes Tuya.
Parameters according to one of the stores (triac dimming, right?):
Input power: 100-240V AC 50-60Hz
Dimming control: TRIAC Edge Cut
Inductive load (LED / CFL): 220W Max
Resistive load (Incandescent): 300W Max
Communication: WiFi 802.11 b / g / n 2.4GHz
Control channel: 1 CH
Standby power: 0.5W
Working temperature: -10 ? -45 ?
Working humidity: 90%
Button life: 500K times
Dimension: 86 * 86 * 43mm
Plug: EU plug
Kit contents - screws for fixing:
A short test with the Tuya app The Tuya application has been discussed many times - here I will only show the screenshots of how this dimmer looks in it.
The application also offers to change the available dimming range. It's convenient. You can "cut" too light or dark operating mode.
The interior of the EDM-01AA-EU Getting inside is a bit more difficult than usual. More hooks and screws.
Removed front (catches):
The big button is removed, it has two mounting feet that need to be undone, you can use two flat screwdrivers:
PCB with WiFi module and TuyaMCU (TuyaMCU supports all button, and WiFi only communication). Here the WB3S - BK7231T is used.
No further disassembly is needed to change the firmware. I am showing it for information only. Out of curiosity - what does the dimmer have inside? I was expecting a triac here, but still not ...
- WML26N65C4 (TO-220) - N MOSFET
- WMM26N65C4 (TO-263) - N MOSFET
- 817C - PC817
I did not decrypt the SMD codes of the last two elements. It's probably something from the power system. If anyone knows what these elements can be, please comment.
I did not analyze the dimming mechanism on MOSFETs either. It's time to focus on changing the load.
EDM-01AA-EU Schematic Here is a sketch of the circuit board responsible for WiFi, for dimming control, operation of the LED strip and the button:
Everything is handled by the microcontroller:
The LED 'strip' is connected to it, a button and it controls the dimming (the triac is on the second PCB).
The WB3S WiFi module only communicates with it via UART - RX and TX, the same UART that is used for programming. Unfortunately. You will have to cut paths.
EDM-01AA-EU programming We need to connect:
- power input, here you can 5V, because the board has LDO providing 3.3V for microcontrollers
- RX from UART
- TX from UART
RX and TX also need to be cut off from TuyaMCU so that it does not interfere with our programming. Here are the cut paths:
GND and 5V are signed on the second board, so we know which pins are which signals.
bkWriter 1.60 is doing well here.
The procedure is simple - when the program is waiting for "getting bus", for connection, disconnect and connect the power (5V cable, not the entire UART adapter!).
After programming, the paths should be repaired and they can be secured, I used a UV-curable soldermask here:
OpenBeken configuration for EDM-01AA-EU In this device, the WiFi module controls everything through TuyaMCU. There is no button or LED connected to it. We just need to configure TuyaMCU.
The dpID values are the same as in the case of the older ESP version of this device.
- id 1 is the on / off state
- id 2 is a dimmer (from 0 to 1000)
So we create the OpenBeken script (create the autoexec.bat file and drag it to the LittleFS field in the second WWW panel - Web App):
After reboot, the code will automatically execute and configure TuyaMCU.
Video presentation Here is how the dimmer works in two videos. It is worth paying attention to the brightening animation that TuyaMCU performs further. I only changed the batch of the WiFi module, so this animation is original.
[film] https://filmy.elektroda.pl/7_1666720276.mp4 [/film]
Summary The EDM-01AA-EU dimmer works in OpenBeken without any modifications to the firmware - just upload the appropriate script and TuyaMCU settings. The dimmer control can be accessed just like the control of an ordinary device, because the channels in OpenBeken are mapped to TuyaMCU channels automatically and transparent to the user.
The dimmer from the outside looks very unusual, and the visible LED strip shows us what the brightness level is set to.
Finally, I recommend that you familiarize yourself with a related topic:
OpenBeken and dimmer on TuyaMCU - configuration and demonstration There, some mechanisms are described in more detail.
I have a US variant of this switch and also got it working using a similar autoexec.bat. Now I'm trying to add it to Home Assistant but the Home Assistant auto generate YAML feature doesn't seem to work when it's a TuyaMCU. I was able to get the switch portion working but can't get the dimmer to work in Home Assistant. Do you happen to know the Home Assistant configuration?