石榴姐

[Course Design] Based on -esp8266 smart socket-402304A

 
Overview

IMG_20210531_122252.jpg Finished product display

1 Introduction

For home smart sockets that use the esp8266 chip as the main control, the firmware can be flashed by espeasy, tasmota, esphome, bliker and other open source firmware, or you can flash nodemcu, micropython and play by yourself!

This project uses a public version of the shell design. After successful testing, it can be used in daily life and has practical value.

2 knowledge points

(1) Learn the design ideas and methods of smart home products;

(2) Learn how to use the circuit of the ESP8266 chip;

(3) Learn the principles of relay driving and understand the rules of high-voltage isolation wiring;

(4) Understand the design ideas of isolated power supply 220 to 5V;

(5) Understand how to design a suitable PCB shape according to the shell;

(6) Learn to use Lichuang EDA to design schematic diagrams and PCB diagrams;

(7) Learn the composition of PCB boards and factory production processes;

(8) Practice welding skills and master the use of multimeters, soldering irons and other tools;

(9) Learn how to use TTL serial port tools and how to burn firmware.

3 Introduction to onboard resources

(1) Onboard 220V to 5V/700MA isolated power module, which can be directly connected to the mains power;

(2) Onboard relay, external electrical equipment;

(3) Using ESP8266 as the main control and Wifi communication, there are many playable firmwares;

(4) In addition to Wifi control, it also provides a button to manually control the device;

(5) Some spare IOs of ESP8266 use pin headers to connect externally, which is convenient for adding expansion modules;

4 Circuit Function Analysis

The circuit design is simple and is mainly composed of: 220V to 5V isolated power module interface circuit, 5V to 3.3V step-down circuit, ESP8266 main control circuit, relay control circuit, LED indication circuit and button control circuit.

4.1 220V to 5V isolated power supply

2.jpg

4.2 5V to 3.3V step-down circuit

3.jpg

4.3 ESP8266 main control circuit

6.jpg

4.4 Relay control circuit

4.jpg

4.5 LED indication circuit and button control circuit

5.jpg

5 Application examples

All low-power household appliances within 1000W can be connected and controlled by this smart socket!

6 things to note

This program is a practical application program and is only used for learning reference. All commercial activities for profit are strictly prohibited;

This circuit matches the housing and can be designed according to the overall dimensions and layout in the reference picture, or you can find some public molds for use;

Pay attention to the electrical power. This relay module cannot be connected to high-power household appliances above 1000W. The relay module can be modified and applied to high-power occasions;

7 Circuit board welding

IMG_20210530_183809.jpg Pictures of the front side of the proofing circuit board and the front side after soldering the components. Pictures of IMG_20210530_183743.jpg the back side of the proofing circuit board and after the components are soldered. IMG_20210530_183841.jpgIMG_20210530_183859.jpgIMG_20210530_192254.jpg Installation diagram of the circuit board in the casing.

8 Tasmota firmware online compilation and burning

Tasmota open source firmware Github address: https://github.com/arendst/Tasmota

If you do not need to customize the firmware function, it is recommended to directly use Tasmotizer to program the firmware compiled by Tasmota!

Tasmotizer download address: https://github.com/tasmota/tasmotizer/releases

Custom firmware online compilation address: (requires Github account login) https://gitpod.io/#https://github.com/benzino77/tasmocompiler

Compilation process:

bianye-1.png The compilation system bianye-2.png is running. After the operation is completed, the first step is to click download source bianye-3.png Next, configure your own Wifi account password bianye-4.png Next, select the chip model used, and the sensors and functions that need to be integrated. bianye-5.png Next, select the language of the firmware, click compile, and wait for compilation. Download the firmware when finished! shuaesp8266.png Use tasmotizer to burn firmware

9 Tasmota configuration and Domoticz service access

After the firmware is burned, the module will automatically restart. After a while, click GetIP on tasmotizer to get the address of the module on the Wifi network. Open this address in the browser to set up Tasmota. Of course, you can also use tasmotizer to set it up directly. !

shezhiesp8266.png The basic settings of this module are as follows: mqttesp8266.png Set the home MQTT server address, user, and password. domoticz-1.png Create a new virtual device in the home Domoticz service, of type switch. domoticz-2.png View the IDX number of the newly created switch in Domoticz. domoticzesp8266.png Set the number to Tasmota of esp8266! Access completed!

After the above steps, today's protagonist socket has officially become a member of the smart home. Its linkage, automation scripts, etc. can be set in the Domoticz system!

Control video demonstration has been uploaded as an attachment!

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-06-20 01:33:56

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号