• Stars
    star
    131
  • Rank 275,867 (Top 6 %)
  • Language OpenSCAD
  • Created over 7 years ago
  • Updated over 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

ESP8266-based smart wall switch

View this project on CADLAB.io.

ESPurna Boards

ESPurna-H

The ESPurna-H board is a custom ESP8266-based smart wall switch. It's singularity is that it's meant to be embedded into the wall behind a standard wall switch, replacing the mechanic switch with a wifi-enabled smart switch.

The board is based on the HLW8012 power monitor IC, the same the Sonoff POW uses.

It features:

  • SPDT 10A relay with NO and NC connections brought out
  • Connections for external button and notification LED
  • HLW8012 chip for power monitoring
  • 50x50mm low profile form factor to fit in the wall switch hole

ESPurna-H Board - schematic

ESPurna-H Board - layout - top

ESPurna-H Board - layout - bottom

ESPurna-H Board - front view

Bill of materials

Item Location(s) Buy Required Optional H CPU units Total Total H
Tinkerman ESPurna-H PCB OSH Park 1 6.50€ 3 6.50€
Ai-Thinker ESP12F ESP-12 Aliexpress / Ebay 1 2.10€ 5 2.10€
Hi-Link HLK-PM01 HLK-PM01 Aliexpress / Ebay 1 2.16€ 5 2.16€
Songle SRD-05VDC-SL-C Aliexpress / Ebay 1 0.39€ 3 0.39€
AMS1117-3.3 IC1 Aliexpress / Ebay 1 0.03€ 50 0.03€
HLW8012 IC4 Aliexpress 1 0.72€ 20 0.72€
SF70E 73C thermal fuse F1 Aliexpress 1 1.20€ 5 1.20€
Fuse holder FUSE Aliexpress 1 0.06€ 100 0.06€
500mA 250V fuse FUSE Aliexpress 1 0.05€ 100 0.05€
Varistor 270V VARISTOR Aliexpress 1 0.18€ 20 0.18€
Push button RESET Aliexpress 1 0.02€ 100 0.02€
1N4148 SMD Diode D3 Aliexpress 1 0.04€ 100 0.04€
2N7002 SOT-223 N-Mosfet Q2, Q3, Q4 Aliexpress 2 1 0.05€ 50 0.10€ 0.05€
10uF 0805 tantalum capacitor C11, C12 2 0.01€ 100 0.02€
100nF 0805 ceramic capacitor C21, C22, C43, C45 2 2 0.01€ 100 0.02€ 0.02€
33nF 0805 ceramic capacitor C41, C42 2 0.01€ 100 0.02€
1uF 0805 ceramic capacitor C44 1 0.01€ 100 0.01€
0.001 2512 Ohm resistor R41 Aliexpress 1 0.03€ 10 0.03€
0 Ohm 1206 resistor R42 Aliexpress 1 0.01€ 500 0.01€
22Ohm 0805 resistor R27 1 0.01€ 100 0.01€
300Ohm 0805 resistor R28 1 0.01€ 100 0.01€
1KOhm 0805 resistor R31, R43, R44, R50 1 3 0.01€ 100 0.01€ 0.03€
10KOhm 0805 resistor R21, R22, R23, R24,
R25, R26, R32, R45,
R47, R49
7 3 0.01€ 100 0.07€ 0.03€
15KOhm 0805 resistor R46, R48 2 0.01€ 100 0.02€
470KOhm 0805 resistor R51, R52, R53, R54,
R55
5 0.01€ 100 0.05€
2 positions 5mm screw terminal Aliexpress 1 0.06€ 100 0.06€
3 positions 5mm screw terminal Aliexpress 1 0.07€ 100 0.07€
5x2 position male header 1 0.01€ 100 0.01€
Total 13.11€ 0.97€
  • (H) Optional, only required for power monitor.
  • (units) Minimum quantity for the stated price.
  • Prices are based on the cheapest option, usually Aliexpress.
  • Check the schematic (image or eagle file) for relation between parts and values.

Firmware

NOTE: PLEASE NOTE THAT IT IS A REQUIREMENT OF THE HLW8012 POWER MONITOR CHIP TO TIE THE POWER LINE TO THE CIRCUIT GROUND. THIS MEANS THAT YOU SHOULD NEVER EVER CONNECT THE BOARD GROUND TO YOUR COMPUTER WHILE CONNECTED TO MAINS. NEVER EVER FLASH THE BOARD WHILE CONNECTED TO MAINS!!

The ESPurna board is named after the ESPurna firmware which features:

  • Support for multiple ESP8266-based boards (check list)
  • Support for up to 5 different network configurations
  • Support for different types of switches and different options (pulses, synchronization,..)
  • MQTT enabled
  • Alexa integration using the FauxmoESP Library
  • Domoticz integration via MQTT
  • Home Assistant integration via MQTT
  • Support for different sensors (DHT22, DS18B20, HLW8012, current sensors, analog sensors,...)
  • Fast asynchronous HTTP Server
  • Backup and restore settings option
  • Upgrade firmware from the web interface
  • REST API (enable/disable from web interface)
  • Over-The-Air (OTA) updates
  • ... and much more

Open Hardware

Hardware designs (schematics and CAD) files are licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License and follow the terms of the OSHW (Open-source hardware) Statement of Principles 1.0.

Disclaimer

THIS PRODUCT IS TARGETED TO EXPERIENCED USERS AT THEIR OWN RISK. THIS PRODUCT IS MEANT TO BE USED PLUGGED TO MAINS AND IT REQUIRES A DEEP UNDERSTANDING OF THE PERILS OF HIGH VOLTAGE ON HUMAN LIFE.

TO THE FULLEST EXTENT PERMISSIBLE BY THE APPLICABLE LAW, I HEREBY DISCLAIM ANY AND ALL RESPONSIBILITY, RISK, LIABILITY AND DAMAGES ARISING OUT OF DEATH OR PERSONAL INJURY RESULTING FROM ASSEMBLY OR OPERATION OF THIS PRODUCT.

More Repositories

1

espurna

Home automation firmware for ESP8266-based devices
C++
2,984
star
2

hlw8012

HLW8012 library for Arduino and ESP8266 using the Arduino Core for ESP8266.
C++
124
star
3

sonoffsc

Itead Studio SonoffSC custom firmware with MQTT and Domoticz support
C
102
star
4

eeprom_rotate

Wrapper around Arduino Core for ESP8266 EEPROM library that handles sector rotation
C++
65
star
5

justwifi

WIFI Manager for ESP8266 using Arduino Core framework
C++
45
star
6

basicstation-docker

Basicsâ„¢ Station Packet Forward protocol using Docker
Shell
42
star
7

my92xx

MY9291 and MY9231 LED driver library for Arduino AVR and ESP8266
C++
37
star
8

m5stack-rfm95

RFM95 layer for the M5Stack prototyping platform (PCB design, 3D printed enclosure and sample code)
C
35
star
9

mqtt2cloud

Utility to publish MQTT topics to cloud services like cosm.com or tempo-db.com
Python
29
star
10

s7xg

AcSIP S7XG LoRaWAN/GPS module library
C++
26
star
11

ttgo-beam-tracker

TTN tracker based on TTGO T-Beam hardware
C
26
star
12

my9291

MY9291 LED driver library for Arduino ESP8266
C++
25
star
13

standalone-lorawan-gateway-balena

Deploys the The Things Stack LoRaWAN Network Server Open Source Edition, BasicStation and Backend tools using Balena.
23
star
14

eeprom32_rotate

Wrapper around Arduino Core for ESP32 EEPROM library that handles partition rotation
C++
23
star
15

xbee2mqtt

Python
23
star
16

node-red-contrib-power-monitor

A Node-RED node to monitor home appliances based on their power consumption.
JavaScript
21
star
17

debounceevent

Simple push button and toggle switch debounce library for Arduino and ESP8266 that reports number of clicks and length
C++
16
star
18

rak833-hat

Raspberry Pi Hat for the RAK833 MiniPCI-E module
Shell
16
star
19

the-things-stack-docker

The Things Stack LoRaWAN Network Server (Open Source Edition) on a Raspberry Pi using docker
Shell
16
star
20

grideye

8x8 pixels IR camera based on Panasonic's AMG8833 sensor
Eagle
14
star
21

messagepack

Library for AVR, SAMD, ESP8266 and ESP32 platforms to pack/unpack values into a compact, self-explanatory binary message.
C++
13
star
22

rf-tools

Scripts to interface RF tools like the RF Explorer or the Power Meter 8000
Python
13
star
23

rpnlib

Reverse Polish Notation calculator for ESP8266 & ESP32 microcontrollers.
C++
11
star
24

weatherstation

Arduino FIO, DHT22, BMP085 and XBee based outdoor weather station.
C++
10
star
25

pulsecounter

Arduino smart meter pulse counter sensor
Eagle
7
star
26

slices

Slices of a clock
C
6
star
27

wisblock-smartcube-companion

Bluetooth timer for Smart Cubes
C
6
star
28

rfm98pw-wing

This is an Adafruit Feather (TM) compatible Wing for the RFM98PW LoRa radio module by HopeRF that works at 169MHz.
5
star
29

the-things-stack-basicstation-balena

Shell
5
star
30

sonometer

Simple sonometer based on Arduino with a LED display and a pot to regulate sensitivity
OpenSCAD
4
star
31

2g4-packet-forwarder-docker

LoRaWAN UDP Packet Forwarder protocol for LoRa 2.4GHz Gateways using Docker
Shell
4
star
32

makepro-arduino-unit-testing

Basic examples on how to test your Arduino sketchs
C++
4
star
33

sonoff-th-emon-sensor

Open Source Hardware (OSHW) to connect a CT to a Sonoff TH via the 2.5mm jack port
4
star
34

packet-forwarder-loggers

Set of parsers and loggers to monitor metrics from a LoraWAN Packet Forwarder running inside a Docker container
Python
4
star
35

pi-kernel

Raspberry Pi Kernel build help script
Shell
3
star
36

daclock

ESP8266 based board with DS1337, buzzer and support for WS2812 strips or matrices
3
star
37

chirpstack-scripts

Scripts to use with ChirpStack LoRaWAN Network Server
Python
3
star
38

pcf8583

PCF8583 Real Time Clock and Event Counter Library for Arduino
C++
3
star
39

wisblock-weatherstation

WisBlock Weatherstation using WisBlock Sensor RAK1960 (BME680)
C++
3
star
40

mymote

Moteino clone with battery connector & charger and several shield boards
Shell
2
star
41

geigercounter

Eagle
2
star
42

wisblock-vindriktning

Hack an IKEA Vindriktning to send data over LoRaWAN with a WisBlock
C++
2
star
43

fenderino-arducaster-midi

Abierto.cc Fenderino Arducaster MIDI support sample sketch
Arduino
2
star
44

lorawan-packet-sniffer

Basic LoRaWAN sniffer based on UDP Packet Forwarder output
Python
2
star
45

chirpstack-udp-forwarder-docker

ChirpStack UDP Forwarder service for Docker
Shell
2
star
46

wisblock-cat-litter-monitor

Sensor to monitor our cats' litters
C++
2
star
47

chirpstack-gateway-relay-docker

ChirpStack Gateway Relay service for Docker
Shell
2
star
48

icompose

Manage docker stacks based on metadata stored in the docker-compose.yml itself
Python
2
star
49

emoteino

Moteino energy monitor code & shields
C++
1
star
50

wisnode-lora-downlink

TTN downlink example using RAK WisNode-LoRa
C++
1
star
51

gen4-controller

4DSystems gen4 displays controller
Eagle
1
star
52

rentalito

Arduino MQTT client with matrix display
Python
1
star
53

seriallink

AT-like serial communication library
C++
1
star
54

xoseperez

1
star
55

trafficlight

Overlay for ESPurna to manage a simple traffic light
C
1
star
56

chirpstack-mqtt-forwarder-docker

ChirpStack MQTT Forwarder service for Docker
Shell
1
star
57

chirpstack-concentratord-docker

ChirpStack Concentratord service for Docker
Shell
1
star