- Energy Meter GSM with Arduino (part 2)Posted 5 days ago
- Energy Meter GSM with Arduino (part 1)Posted 1 week ago
- ARDULOCK: a keyboard with RFID modulePosted 1 month ago
- Autofocus Glasses/Phoropter Using Variable Focus Liquid LensPosted 3 months ago
- Home Automation & Lights controlling SystemPosted 3 months ago
- Solar TrackerPosted 3 months ago
- LTspice inverter simulation with thermal effectsPosted 3 months ago
- AI in LEGO EV3 Maze-Driving RobotPosted 3 months ago
- Temperature predicting using boltiotPosted 3 months ago
- Sparkly Air SensorPosted 3 months ago
Switcher – A WiFi Open Source Power Switch and Socket Based on ESP8266
The Switcher is a Wifi, open source, power switch and socket.
Built with modularity in mind – It can be mounted as a wall lights switch or used as a standalone power socket. Switcher gives the ability to control your lights, or any other household appliance, wirelessly over the network and the Internet! There is a dedicated iOS App and web interface which can be used with any browser! You can build your own designs to make unique wall light switches for your house.
The switch uses the prominent ESP8266-01 module, an Arduino program, a 3D printed box and modules. It is free and open source, so you can build and modify it on your own!
This project can be dangerous! The circuit is attached directly to the mains electrical grid and is exposed to high voltages! Make sure you understand what you are doing and that, a mistake can be harmful or even lethal!!!
This is a very easy to build project. The idea is that you build the main module first, for which the circuit is provided below, and then build one of the modules. For now there are only two: a wall mounted light switch with touch button and RGB led indication and European type electric socket (Schuko type) which can be used to control any household appliance.
You can download 3d models for the base and the shields from here: https://github.com/hborisov/switcher_box
In the repository there are also gcode files which can be used to directly 3d print plastic enclosures.
The circuit is very simple. The main goal was to make it small enough so that it can fit into the wall console where a standard light switch is put. The main obstacle was to find a small and powerful enough power supply, because the ESP can consume a lot of energy sometimes. So I came up with this module – Hi-Link 5v/3w which can be found easily on the Internet.
The other decision I made was to use a triac instead of a relay, because the triac is smaller, faster and also in the future I would like to add a dimming capabilities to the switch.
At the center of the circuit is the ESP8266 module. Pins 2 (Rx), 3 (RST), 4 (GPIO0), 5 (CH_PD), 6 (GPIO2) are pulled high to prevent booting the ESP into programming mode. This requires “inverting” the GPIO pins programmatically. Also in this case the Rx pin is used for button input and its UART function is disabled in the program.
The power supply module steps down the voltage to 5V, but the ESP requires 3.3V, that’s why I use LM1117 voltage regulator. I could have used 3.3V power supply but I’ve decided to have both: 5V and 3.3V which later paid off because in the shields (modules) I am using RGB leds which operate on 5V.
GPIO0 of the ESP8266 is used to switch on/off the controlled appliance. This is done through an optocoupler and a triac. The optocoupler isolates the low voltage circuit from the high-voltage one and the triac (BT136) is doing the switching.
Bill of Materials:
- 3.3K SMD resistors (0603), 5 pieces
- 430 SMD resistor
- 470 SMD resistor
- 10uF SMD tantalum capacitor (P package), 2 pieces
- 3pin terminal block 3.5mm (DEGSON)
For the modules:
- CVILUX CU3
- CVILUX CW3S
- RGB led – WS2812B
- A button
The firmware is implemented in Arduino (C++).
You can find the source code here: https://github.com/hborisov/switcher_cpp
Eagle project can be downloaded from here: https://github.com/hborisov/switcher_pcb
A board can be ordered directly from OSH Park: https://oshpark.com/shared_projects/eMwHjMz0