Smart power strip week day timer

Based on the adaptive smart plug project, I just wanted a simple private network, no cloud, no server – stand alone smart power strip, that simply turns the mains outlets on and off during the day . Furthermore , the smart day timer should continue the schedule even though the wifi drops off.

I made 3 versions of the day timer:

A. The modified Denver SHP-310U power strip with ESP8285.

B. An ESP32-S2 based version with RTC and 12V and 5V outputs.

C. A modified Eightree ET28 smart plug with ESP32-C3 and power metering.

A. The modified Denver SHP-310U power strip with ESP8285.

The smart power strip is based on the Denver SHP-310U and it provides a simple web page to set the start times and the end times for the outlets to turn on and off.

Below is the settings web page shown in a Windows Brave browser. The USB outputs are active when the mains outlet next to the USB connectors is ON. For each outlet 4 time plans are available for each week day to define the start- and end-time for an output to become ON. Overlapping the ON periods is allowed !.

The time settings for turning the outlets ON and OFF are saved in the emulated EEprom area of the ESP8285 flash memory. The smart plug green LED is ON when connected to the wifi network, and the output red LEDs is ON when the actual mains outlet is ON. It works with the Arduino OTA and the wifi captive portal as well.

The Arduino source code for the no cloud smart plug is found here: Power strip week timer

Details on flashing the ESP8285 microcontroller is found in the adaptive smart plug description.

B. An ESP32-S2 based version with RTC and 12V and 5V outputs.

The power strip does not include a Real Time Clock and thus need to access a NTP server at start up to set the current time. To get around that I made a dual output version, because I want to control our 5G modem and the Raspberry PI home server:

A sketch of the schematic looks like this:

Basically, the circuit can switch voltages in the range 5..30 V DC at max. 50A, but taking cooling, connectors and wiring into account..!! The main components used are the IRF3708 MOS-Fets and these boards, that can be purchased from Aliexpress:

The PCBs along with LEDs , resistors, capacitor and the IRF3708 MOS-FETs built into a plastic box:

At power up, this version of the weekly timer dont need to wait for an internet connection to acquire the time via NTP, it just reads the current time from the PCF8563 Real Time Clock RTC), backed up by a CR1220 battery.! In case an internet connection becomes available, the RTC is updated with the NTP time on a hourly basis.

To use the captive portal to set-up the wifi ssid and password , the tiny push-button marked ‘0’ on the ESP32-S2 board must pressed while applying power. The wifi setup use the scheme as for the adaptive smart plug.

An example of the web page to set the weekly timeplans for the 2 outputs with 4 timeplans each:

It is possible to use up to 16 outputs, but the total number of timeplans must not exceed the product of: ( number of week time sets ) * (timeplans for each week time set), that is , using 16 outputs , each output has only one time plan. Using 8 outputs, each output has max 2 timeplans. In the example above with 2 outputs, each output could have max. 8 time plans allocated. The number of outputs and time plans are defined at compile time.

The Arduino OTA is included as well in the source code here: ESP32_RTC_week-timer  

C. A modified Eightree ET28 smart plug with ESP32-C3.

For this version I looked for a smart plug with a faster CPU than the ESP8266 used in the Sonoff S26 in order to handle the timer set arrays.

I went for the Eightree ET28 plug , that has got the more powerful ESP32-C3 CPU as well the nice open source Tasmota software. The Tasmota software can control the plug using timers with local sunrise / sunset data as trigger points for plug ON/OFF. BUT it requires the wifi connection to stay active for timers to work, and I wanted a version that triggers even if the wifi connection is gone. For this the Eigthree plug need to opened to flash my home brewed software. Use a set of wood clamps to carefully open the plug:

Next is to add the wires 3V3, GND, RX, TX, GPIO9 to flash the ESP32-C3, that is placed on the ESP8685-WROOM-03 module. On the main PCB board is also the BL0937 power metering chip, that provides a signal with a frequency, proportional with the power consumed by the load. The ESP8685-WROOM-03 module has nice, though small solder pads for the flash wires:

To reach the solder pads on the module, the live and neutral mains sockets and the associated white plastic stand-off must be removed. I used a 150 W soldering gun to remove each of the mains sockets. The flash wires also can be soldered in place without removing the PCB, see the rightmost picture:

The flash procedure goes on as for the adaptive smart plug, but with GPIO9 as the boot wire to be connected to GND when applying 3V3 power supply. The Arduino software version looks like this: Eigthree_daytimer_ino . The smart plug webpage is similar to the two versions above, but has one output to be controlled: