Skip to content

dimecho/ESPTiny-Relay-PLC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ESPTiny Relay (WiFi Edition)

Automatic 8-channel relay control - PLC style.

  • WiFi (Web Interface) 🔌 View Demo
  • Battery Deep Sleep (~10μA)
  • Modular PCB (ESP32, DS1307, TP4056)

Photo

; PLC Schedule format
; Syntax: <Relay> : <Month> : <MonthDay> : <Weekday> : <Time> : <Action> : <Type>

; Relay number: 1-8
; Month: 1-12 or * for every month
; MonthDay: 1-31 or * for every day
; Weekday: MON,TUE,WED,THU,FRI,SAT,SUN or * for every day
; Time: HH:MM-HH:MM (24h)
; Action: ON / OFF
; Type: PNP or NPN

; Examples:

Relay1 : *     : *       : MON-FRI : 08:00-12:00 : ON      : PNP
Relay2 : *     : *       : SAT-SUN : 12:00-13:00 : OFF     : PNP
Relay4 : 1,2,3 : *       : *       : 09:00-17:00 : ON      : PNP
Relay5 : *     : 1,15,30 : *       : 18:00-20:00 : OFF     : PNP
Relay6 : *     : *       : *       : 00:00-23:59 : OFF     : PNP
Relay7 : 6     : 10-20   : WED     : 06:00-08:00 : ON      : PNP

Download

Firmware

Connect

    SSID: Relay
    Password: (blank)
    Interface: http://192.168.8.8

Build

Sketch (Firmware)

  1. Install Arduino IDE
  2. Arduino/File -> Preferences -> Additional Board Manager URL: https://espressif.github.io/arduino-esp32/package_esp32_index.json
  3. Tools -> Boards -> Board Manager -> esp32 -> Install
  4. Tools -> Boards -> ESP32S2 Dev Module
  5. Sketch -> Export compiled Binary

Additional Libraries

File System (Web Interface)

  1. Run "littlefs-build-mac" (Mac) or "littlefs-build-win.ps1" (Windows) to build. LittleFS Binary: build/flash-littlefs.bin

Note: Files must be GZIP'ed. HTTP server sends compressed code to the Browser for decompression.

response->addHeader("Content-Encoding", "gzip");

Flashing Options:

  1. Wireless - Web Browser http://192.168.8.8/update
  2. USB - Arduino LittleFS Plugin

Note: ESP32 S2-Mini must have resistor (~10K) betweeen pin EN -> 3.3V for Web updates to work.

License

CCSA

About

ESP32 Relay Control Timer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors