黄土马家

[Training Camp-Advanced Class] Internet of Things Socket

 
Overview

1. Introduction

1. Use Arduino programming to realize intelligent distribution network, mobile phone App control, and smart speaker voice control

2. Lichuang EDA designed the circuit, Fusion360 designed the shell and parts assembly, and KeyShot product rendering

3. ESP8266 is the main control, including a relay, a user button, an RGB indicator light, and a DS18B20 temperature sensor

2. Integrated AC-DC power module, used for system power supply, or USB interface for power supply, with two expansion pins reserved for external OLED, etc.

2. Hardware circuit analysis

1. Download circuit

①The USB-to-serial port chip uses CH340C, which has a built-in clock generator and does not require external crystals and oscillation capacitors.

②CH340 chip supports 5V power supply voltage or 3.3V power supply voltage.

When using a 5V working voltage, the VCC pin of the CH340 chip inputs an external 5V power supply, and

And the V3 pin should be connected to an external power supply decoupling capacitor with a capacity of 0.1uF. 5V operating voltage reference circuit:

Download circuit-5V.png

When using 3.3V operating voltage, the V3 pin of the CH340 chip should be connected to the VCC pin

Connect to each other and input an external 3.3V power supply at the same time. 3.3V working voltage and automatic download reference circuit:

Automatically download circuit.png

2. Relay drive circuit

Reference circuit:

relay.png

The status of each pin during ESP8266 power-on (reference: Power-on pin initialization status problem ):

GPIO pin initial state initial level
GPIO0 input pull-up H
GPIO2 input pull-up H
GPIO4 input dropdown L
GPIO5 input dropdown L
GPIO12 input pull-up H
GPIO13 input pull-up H
GPIO14 input pull-up H
GPIO15 input pull-up H
GPIO16 Output set high H

Analysis of the role of optocoupler:

The relay control pin is GPIO16, which is high level during power-on and uses light

coupling to prevent the relay from conducting during power-on, and then cooperate with the transistor to drive the relay

Diode function analysis:

When switching a relay, due to the self-inductance phenomenon, an inductive electric current will be generated on the relay coil.

**Potential, a diode is added to both ends of the relay coil to form a loop, so that the electromotive force generated by the coil is

It is consumed in the loop in the form of freewheeling current to protect the components in the circuit from being damaged.

3. AC-DC power module

The AC-DC power module uses Hailingke's HLK-PM01, 5V-3W output power, HLK-PM01 data sheet reference circuit:

AC-DC.pngInput components: input component.pngOutput components: Output component.png

It should be noted that the withstand voltage derating of the filter capacitor of the output component is greater than 75%. If the output voltage is 5V, the withstand voltage of the filter capacitor should be greater than 20V.

3. Picture display

IoT socket-black.png

IoT socket-red.jpg

IoT socket 2.png

IoT socket.png

PCB-front.jpg

PCB-Backside.jpg

PCB-welding.jpg

4. Debugging process

2020-8-17

1. The circuit board arrived today and has been soldered. No problems were found after downloading the test program.

2020-8-23

1. A bad ending is impossible

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-07-01 13:30:32

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号