桂花蒸

IoT smart relay

 
Overview

1. Project requirements

Design a board that can control the lights at home through a mobile phone APP.

2. Product demand

1. Hardware: USB power supply, WIFI control, relay (with load within 100W)

2. Embedded: Respond to the instructions of the WIFI module to perform corresponding actions and control the WIFI module to enter the corresponding state.

3. Mobile APP: Different users can configure the network, control the relay status, read the relay status, and manage multiple devices.

4. Server: Can link WIFI module and mobile phone, can maintain user information, and is not easy to crash.

3. Function description

1. The TYPE-C interface provides power and can be used for program burning. The USB to TTL conversion uses the CH340E chip, which has a simple circuit, is reliable and durable.

2. Use two push buttons. SW1 is the STC15 microcontroller power push button to facilitate program downloading; SW2 is a function push button. A short push is to control the relay switch, and a long push is to enter the distribution network mode.

3. Use 4 LED indicators. LED1, 2, and 3 flash quickly to indicate the network distribution mode, and LED 4 flashes quickly to indicate successful network distribution.

4. Schematic design

1. USB to TTL. Adopt CH340E classic circuit.

2. LDO reduces voltage. WIFI and microcontroller are powered separately to ensure stable power supply for the communication module. Choose an LDO with an enable pin to facilitate the STC15 microcontroller to download the program.

3. DS18B20. A DS18B20 interface is reserved for easy access to the temperature sensor.

4. Relay drive circuit. The inverter ensures that the relay is reliably turned off when the MCU is powered on, and the NUD3124 ensures that the relay is reliably driven.

5. WIFI module EMW3080. A highly reliable commercial WIFI module, the access to Alibaba Cloud has passed official rigorous testing.

5. PCB design

Screenshot(270).png2.jpg

6. Debugging

1. After the welding is completed, it is found that the power supply of the microcontroller is only 1.8V. After checking the schematic diagram, it is found that pin 1 of ME6215 is not connected to VCC. The schematic diagram and PCB have been corrected.

2. After distributing the network, it was found that the mobile phone could not control the relay. After checking the relevant program code, it was found that the identifier of the switch did not match the one on the Life IoT platform, and it can be used after modification.

7. Finished product display

1.jpg

3.jpg

4.jpg

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-06-20 04:46:01
  • Regarding the LM2596 conversion circuit problem, the output cannot be output
  • _wcsicmp cannot compare Chinese characters?
  • What do you think of TI's lithium battery AFE chip bq76940?
  • InstaSpin FOC question
  • Share and ask for help g2553 temperature serial port
  • A small problem in the program...

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号