- “Maker Faire Rome – The European edition” returns to the Gazometro OstiensePosted 14 hours ago
- Single-chip saturation meterPosted 4 weeks ago
- Raspberry Pi Relay BoardPosted 2 months ago
- PCB CAD, A SELECTION GUIDEPosted 3 months ago
- Automatic dispenser for catsPosted 3 months ago
- Do you have a mask? RASPBERRY Pi SEES ITPosted 3 months ago
- RFID based Attendance system using Arduino and External EEPROMPosted 4 months ago
- ESP32 Neopixel Status Indicator and Sensor PCB Shield with Wi-Fi ManagerPosted 4 months ago
- Remote control power functions usbPosted 4 months ago
- ESP32-CAM with Telegram: Take Photos Control Outputs Sensor Readings and Motion NotificationsPosted 4 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