newlandmark

[Training Camp_Advanced Class] Smart switch based on 51 microcontroller + ESP-12S

 
Overview

1 Introduction

Lichuang EDA Summer Training Camp is a training course that can greatly improve your personal level! (Let me give you some praise first, this is not an advertisement). I was fortunate enough to participate in the basic class of the Lichuang EDA summer training camp, and then I successfully graduated after studying with @LichuangEDA-Mogong . Then I took the advanced version of the course. These courses are all free, and you can also get free coupons and proofing coupons (all for learning).

During this learning process, I changed from a novice to being able to draw schematic diagrams and PCBs and make them into real objects. I feel that my technical level has been greatly improved.

Smart switch based on STC15W408AS+ESP-12S The second version of STC15W4K56S4 (44P) + EMW3080B is a project I made in the advanced version. There may be deficiencies, please correct me!

2. Selection

1.51 single-chip microcomputer The single-chip microcomputer does not have the STC15W4K56S4 model recommended by the teacher , which is a bit difficult for me to solder. So I chose the STC15W408AS chip that I have used. It has 28 pins and is easier to solder!      In the second version, I chose the STC15W4K56S4 chip. In order to save money, I chose a 44-pin chip. When soldering, I found that it was also very easy to solder.

2. The WIFI module      did not use 3080, mainly because the mall has not yet stocked the product. The ESP-12S also supports AT commands to connect directly to Alibaba Cloud IoT.     The second version uses EMW3080B, which is also recommended by Fanqi Song. It comes with Feiyan firmware, which is more convenient than others.

3.3.3V power supply Two circuits of 3.3V power supply were produced according to the teacher's explanation, one for the microcontroller and one for the WIFI module. The 3.3V WIFI module uses ME6215C33M5G (C84119), which is currently out of stock in the mall and should be replenished! The classic AMS1117 (C6186) is used for the 3.3V of the microcontroller. It is available in the mall, and the quantity is large! Nothing has changed for the second edition.

4. TTL serial port I chose the CH340E (C99652) recommended by the teacher. It has few peripheral components, but it is not easy to weld. It is a bit of a test for my welding skills. In fact, I like to use CH340G. This chip is easier to solder, but it has more peripheral components.

The above is the process of production and selection. I basically follow the teacher’s ideas. I hope that one day I can design, select, sample, manufacture and produce by myself.

3. Schematic drawing

The process of drawing schematic diagrams is relatively simple because there is a foundation laid in the basic class and a bunch of reference answers. The difference here from others is that I designed 8 LED indicators to observe the status. Among them, the 5v power supply and the two 3.3v power supplies occupy 3 LEDs, the microcontroller occupies 4 LEDs for status check of the microcontroller, and the relay occupies 1 LED. In this way, AC220V can be disconnected during debugging. After debugging is completed, it can be connected.

4.PCB drawing

PCB drawing is still a big problem for me. First of all, I don’t have any foundation. I just got started by watching the video teaching of B Lilichuang EDA. Then I don’t know many things that need to be paid attention to in design (experience?). The board I drew in the basic class was a mess. Later, the basic class explained a series of practical techniques such as differential wiring, via holes, ground covering, etc., which made me give up automatic wiring and use manual wiring, which is indeed much better-looking than automatic wiring.

PCB layout is also another difficulty. When I first drew it, I didn't even pay attention to the fact that the high-voltage part cannot be supplemented with copper, the distance from the control part, etc. Including the problem of clear space for the antenna part of the WIFI module, we only found out after everyone reminded us in the QQ group of the advanced class. Then there is the liver layout. I painted until 2 o'clock in the morning on the night of the 8th. Yes, I was the one who painted until 2 o'clock as the teacher said. On the morning of the 8th, the teacher probably took a sneak peek at my PCB and raised a few issues. He also made modifications at noon, such as the buttons being too close to the high-voltage part and other detailed issues. I continued the liver test in the afternoon, and basically checked in the evening and found no major problems. I paid 5 yuan for proofing the next day.

To be continued...

  • The advanced class will start on August 5, 2020, and the project will be created
  • August 06, 2020 Project introduction, demand analysis, device selection
  • On August 07, 2020, the scheme design, software and hardware planning began!
  • The first version was completed on August 8, 2020, and the problems were revised.
  • On August 9, 2020, the problems with the PCB were modified for the second time and the proofing was submitted!
  • The first version of the document was modified on August 11, 2020
  • On August 16, 2020, I found that my ability was limited and I could not complete the development, so I started drawing, proofing, and purchasing components again.
  • After receiving the goods on August 20, 2020, welding and debugging were carried out.
  • The assignment will be completed on August 21, 2020.

Second edition revised

The STC15W408AS microcontroller has insufficient resources and cannot process json data, and the 8K storage is not enough. The second version of the copy assignment was completely overturned. The single-chip microcomputer did not use 48-pin ones, but the 44-pin ones were chosen because they were cheaper. The module was replaced with 3080. Please note that after buying the module, you must upgrade the firmware first, otherwise the Alibaba Cloud backend will not go online. I've been stuck here all morning. At noon, the group reminded me to upgrade the module firmware, so I got it done! The second version is a complete copy of the homework, so I don’t want to be verbose!

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-05-15 16:18:27

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号