logo elektroda
logo elektroda
X
logo elektroda

WiFi switch with low power consumption (0.03W) by piotr_go

piotr_go 1065 10
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • White electronics enclosure with schematic symbol and screw terminal connector

    Recently, when building a controller for my cooker, I decided to experiment with something simpler. Admittedly, I'm not keen on WiFi control, but I was curious to see how low the current consumption could currently be. The off-the-shelf solutions I tested ranged from 0.3W to 1W. So I bought some Zigbee modules, a couple of WiFi modules, a couple of different transformerless inverter ICs and bistable relays. A bit of coding and. a pleasant surprise. 0.1W in the first tests, and after a couple of changes to the software + enabling power saving less than 0.05W.... with WiFi... Eeeeee? It didn't stop there. By modifying the power supply a bit I managed to get down to around 30mW. I even assembled my own meter to confirm the results. I was expecting something in the region of 0.1W. I decided not to use the Zigbee version.

    I wrote the softwares using ESP-IDF 5.5, without any bytes, apps or clouds. Control from a browser on/off + simple configuration. It is also possible to update the FW.

    To make things less rosy, the whole thing took a while. I am completely unfamiliar with web development, some 90% of my programming time was taken up with it.
    There was also a bug that was causing all sorts of things to happen, I got stuck until I found it. Reset! Apparently the capacitor + resistor in the module wasn't enough and ESP was able to crash at odd times. I connected a reset to the GPIO and set it to high after startup, helped.

    Used WiFi module ESPC2-02 from DOIT, 230v-->5v inverter BP2525D, 5v-->3.3v inverter M3406, bistable relay control GM8023B.





    Schedule: 3e2333bd3
    Schematic of a bistable WiFi switch using ESPC2-02 and GM8023B relay

    Building:
    White electronics enclosure with L and N markings and relay circuit symbol White plastic device enclosure with four corner screws
    Dimensions: 44x44x22mm

    Interior:
    Close-up of the bottom side of a PCB with soldered components and screw terminals Bottom view of a PCB in a white plastic enclosure with mounted SMD components

    Electronic module with bistable relay, screw terminals, and ESPC2-02 chip Electronic module with relay next to a white 3D-printed plastic enclosure

    Current draw:
    XL-011 stopwatch and ATORCH meter showing 0.06W power usage at 231.65V Power consumption meter with LCD screen showing 27.9 mW and a case connected by a wire.
    Measured with a plug-in meter and an average hourly measurement when powered from 5V.
    Consumption measured with the control side running.


    Light bulb icon on dark background in browser interface at 192.168.1.216

    WiFi Configuration:
    WiFi setup screen for ESP module with SSID, password, and hostname fields

    Updating FW:
    “Update Firmware” button on page at IP address 192.168.1.216/update
    You can either press and select the file, or drag the file onto the button.

    Info:
    Debug interface screenshot of ESP via browser with IP address and system stats
    Various helpful information.

    Commercial use prohibited.
    Attachments:

    Cool? Ranking DIY
    About Author
    piotr_go
    DIY electronics designer
    Offline 
    piotr_go wrote 2900 posts with rating 3316, helped 94 times. Been with us since 2003 year.
  • ADVERTISEMENT
  • #2 21778234
    Jawi_P
    Level 36  
    Nice it ;) The case is from PLA and the black jumper is a pen?
  • #3 21778243
    piotr_go
    DIY electronics designer
    Jawi_P wrote:
    Body is of PLA

    PETG, higher softening temperature. Although the chip is unlikely to heat up.

    Jawi_P wrote:
    the black jumper is a pen?

    ??? aaaa WZorek, printed in black (on grey film) PETG on the first layer.
  • ADVERTISEMENT
  • #4 21778398
    krzbor
    Level 28  
    piotr_go wrote:
    Modifying the power supply a little, I was able to get down to around 30mW.

    Could you write a bit more - how did you manage this? 30mW is usually what the ESP alone draws and that's without a radio, and you have a radio (quite responsive) and an inverter.
  • ADVERTISEMENT
  • #5 21778405
    chemik_16
    Level 26  
    >>21778398
    inaccurate gauge :)
  • ADVERTISEMENT
  • #6 21778419
    piotr_go
    DIY electronics designer
    krzbor wrote:
    Could you write something more - how did you get it to work? 30mW is usually what the ESP alone draws and without a radio, and you have a radio (quite responsive) and an inverter.

    I initially tested on an ESP32-C3 (I was making a cooker controller on it so it was handy), C2 performed slightly better (can't remember the exact numbers).
    R10 I changed to a zener. The original manufacturer of the BP2525D recommended a 1.5k...2k resistor (the voltage at the output increases at low load).
    I also tested several 5v--->3.3v inverters, the M3406 performed best at low load.

    Upload the binary to the ESP32-C2 if you have one and test.

    chemik_16 wrote:
    inaccurate meter

    While the measurement on the 230V side may be inaccurate (too little current), it should be OK at 5V.
    I checked with several USB meters, it came out similar.

    =========== update ===========

    Aaaaaa, I completely forgot, in AP mode the current consumption is quite a lot higher.
    You can't set it up normally, it's only for the first setup, or after a reset to default settings.
    Reset to default settings after holding SW1 for more than a second.
    Address: 192.168.2.1
  • #7 21778587
    gulson
    System Administrator
    Great respect! "The Chinese don't like it, see why".
    All in all, Zigbee also consumes 30mW during transmission.
    There the standby is implemented a bit better and I think it closes in 1mW ?

    But I don't think you're planning on battery power as it's connected to the mains anyway ?
    The idea was simply to reduce the electricity bill ? :)

    I was wondering about WiFi switches / remotes with rechargeable batteries.
    I heard somewhere about some microWiFi made by a Polish company: https://blebox.eu/
    I wonder how they do with consumption, I had a rechargeable remote control that worked for over a year.
    Until the cell died ;)
  • #8 21778723
    p.kaczmarek2
    Moderator Smart Home
    I was already waiting for you to post this. Congratulations, it came out great.

    Just one thing puzzles me - wouldn't it be possible to optimise the circuit even more? Are there bistable relays on 3 volts?

    I ask because although most of the IoT products I review ( list here ) always have a mains voltage -> 5 V inverter and then a separate LDO 3.3 V, then recently I saw that the Chinese have gone one step further and in the plug-in with the LN882H , from what I understand, they have omitted the LDO altogether and will power the Wi-Fi circuit directly from the main inverter - they have put a relay there for 3 V too, albeit a regular one.
    Helpful post? Buy me a coffee.
  • #9 21778840
    piotr_go
    DIY electronics designer
    gulson wrote:
    But I don't think you're planning battery power

    Battery testing will happen, although I don't know when yet.

    gulson wrote:
    It was simply a matter of reducing electricity bills?

    Well baaa, 10pc instead of one :)

    p.kaczmarek2 wrote:
    Wouldn't it be possible to optimise the circuit even further? Are there bistable relays for 3 volts?

    I suspect I would have to pay quite a bit more for the relay than the inverter cost.
    Other than that 5v + inverter is more stable though.
  • #10 21778943
    Karol966
    Level 31  
    Apparently a device like many (from majfriends) and yet arouses appreciation, hats off to you for the beautiful, complex workmanship :)
    I am impressed by the ease with which you use Chinese, not necessarily popular electronic components ;)
  • #11 21779070
    piotr_go
    DIY electronics designer
    Karol966 wrote:
    with what ease you use Chinese, not necessarily popular electronic components

    The low price is tempting to try.
    I remember when I had to pay almost 10zl for a similar 5v-->3.3v inverter at our place, and I could only dream about inductors in 0603/0805. Today at the Chinese ... 2 cents.
    Too bad they don't have bp2525d at LCSC, I had to buy on aliexpress (aliexpress has gone completely to the dogs, I put one item in the basket, it shows a rating of 4.9, after paying it turns out to be something else with a rating of 3.2 and comments about fraud).
📢 Listen (AI):
ADVERTISEMENT