super_star

[Internet of Things] AIOT development board based on ESP8266

 
Overview

The hardware part of this project is completely designed by Lichuang EDA. Jialichuang makes the boards and Lichuang Mall purchases materials. I am very grateful for the support of the Lichuang EDA team. Thumbs up for domestic EDA, come on! ! ! ! !

 

write in front

Project version notes on August 18, 2020

 

  • The physical pictures and videos in this document were all taken using the V0.1 version of the board.
  • The schematic diagram and PCB of this project have been updated to version V0.2, some minor BUGs in V0.1 have been fixed, and the version number has been increased.
  • The pictures in the hardware circuit part of this document all use the V0.2 version of the drawings.
  • The physical diagram in this document uses the physical diagram of version V0.1.

image display

 

First let’s take a look at some pictures of Lichuang’s EDA renderings. The purple color is quite beautiful, but it’s a pity that Lichuang cannot produce purple boards.

 

LCEDA 2D picture

LCEDA 3D pictures

 

 

Introduction

 

  • This project is an Internet of Things development board that supports the Arduino development environment.
  • Using ESP8266 as the main control, it has one relay, one passive buzzer, one temperature and humidity sensor on board, and one WS2812 light strip interface, one ADC acquisition interface and one SPI interface are reserved.
  • Onboard CH340 is used for program burning and serial port debugging of ESP8266.
  • The power supply of the development board is 5V, which can be powered by MicroUSB; DC binding posts are reserved for independent power supply.
  • It can realize functions such as smart switches, smart temperature and humidity meters, and smart lights.

 

Hardware circuit & device selection

Main control module circuit

This project uses the ESP8266 WIFI module as the main control, model ESP-12S (product number: C82898) or ESP12-F (product number: C82891), a cost-effective WIFI SoC module with rich information, which can be carried out using the Arduino platform development. ( PS: An Xinke held an event before and bought a lot of ESP-12F. I just took this opportunity to use it. )

 

ESP8266 minimum system circuit

 

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

 

 

GPIO pin initialization state initialization state

GPIO0

pull up H
GPIO2 pull up H
GPIO4 drop down L
GPIO5 drop down L
GPIO12 pull up H
GPIO13 pull up H
GPIO14 pull up H
GPIO15 pull up H
GPIO16 Output set high H
     

 

When making the V0.1 version of the circuit, I did not find this problem with the initialization state. It was not until after the board was soldered and tested that I discovered the problem with the pull-up and pull-down of the port.

 

Download circuit

 

As a development board, it needs an onboard USB to TTL converter for firmware downloading and program debugging. The model is CH340C (product number: C84681), a national good core, strong and durable, and cheap. ( PS: I happen to have a WCH (Nanjing Qinheng) brand coupon in Lichuang Mall ). When ESP8266 downloads firmware, the startup mode needs to be switched to download mode. Here, a triode is used to build an automatic download circuit. The model is M8050 (product number: C541705). I have the materials on hand.

 

 

Power module circuit

 

The power supply voltage of ESP8266 is 3V~3.6V, and the power supply current is >500mA. Here, AMS1117-3V3 is used to power the WIFI module. In order to ensure the stability of the WIFI module, a separate AMS1117-3.3 (product number: C347222) is used to power other peripherals. In order to avoid circuit current backflow, Schottky diodes 1N5819 (Product No.: C402219) and SMBJ40CA (Product No.: C340689) are added to the power input for protection. Jumper resistors are placed on both the input and output parts of the LDO. It is convenient to debug and troubleshoot the system, and the resettable fuse is used for overcurrent protection.

 

 

Temperature and humidity sensor circuit

 

 

The temperature and humidity sensor used in this project is the DHT11 (product number: C117051) digital temperature and humidity sensor from Guangzhou Aosong Electronics. DHT11 digital temperature and humidity sensor is a temperature and humidity composite sensor with calibrated digital signal output. It applies dedicated digital module acquisition technology and temperature and humidity sensing technology to ensure that the product has extremely high reliability and excellent long-term stability. The sensor includes a capacitive humidity sensing element and an NTC temperature measuring element, and is connected to a high-performance 8-bit microcontroller. Therefore, this product has the advantages of excellent quality, ultra-fast response, strong anti-interference ability, ultra-long signal transmission distance, digital signal output, and precise calibration.

 

 

WS2812 interface circuit

 

I have a WS2812 light ring on hand, with a total of 24 WS2812 lamp beads. I bought it and kept it for a long time, and it is just right for this project, as shown in the picture below, so I reserved a pin header interface here to facilitate connection with Dupont wire.

 

 

Some lamp beads only support 5V level signal control. The level signal of ESP8266 is 3V3, which requires a level conversion circuit. This project uses the NMOS tube model WST3400S (product number: C105164) to design a bidirectional level conversion circuit. . The control of WS2812 can be controlled by ordinary GPIO port or SPI MOSI port. Therefore, two control ports are left here to facilitate the selection of control mode. Just use the short-circuit cap to select the port.

 

 

 

relay circuit

For the relay here, I choose Y3U-SS-105LM (product number: C674571), which is a normally open relay with a coil voltage of 5V ( PS: I happened to have a Yuanze Relay brand coupon of 15 yuan in Lichuang Mall ), which is just right. A bit big. The relay drive requires special design. For reliability, the special chip NUD3105LT1G (product number: C14894) was selected . This drive circuit is high-level triggered. The pull-down resistor R15 ensures that the initial state is low level, ensuring that the relay will not close when the system is powered on to avoid misoperation. Because the GPIO4 port of ESP8266 is initialized to low level, the connection method in the figure below is more appropriate.

 

Note: The relay model I actually use here is a normally open relay, which does not have a normally closed contact. There are both normally open and normally closed on the drawing. This design on the drawing is only for convenience and compatibility with normally open and normally closed relays.

 

 

The picture below is the reference design circuit of NUD3124. The peripheral circuit is very simple.


 

When the control port is initialized to a high level , the above circuit is not very suitable. The following circuit is more suitable. The inverter SN74LVC1G04DBVR (product number: C434067) is used in this circuit.

 

When the GPIO of the MCU is initialized to high level, because it has passed through the inverter, the signal is low level, NUD3105 does not conduct, and the relay does not pull in; when the GPIO output is low level, it becomes high level after passing through the inverter. , NUD3105 is turned on and the relay is closed.

 

buzzer circuit

This is a conventional buzzer drive circuit, you can choose active or passive buzzer. This project chooses an electromagnetic passive buzzer, model YS-MBZ9042C03R16 (product number: C409836), none The source buzzer can control the frequency of sound.

 

 

ADC circuit

 

This part of the circuit is mainly used for ADC acquisition, and a 1% resistor is used for sampling. Lead out a pin header for external resistive components.

This part is also the reference circuit given in the official ESP8266 series module user manual V1.3 of Essence

 

PCB Layout

USB part

 

USB data lines should be differential lines and try not to have too many turns.

 

Power supply section

 

The power line must first pass through the capacitor before it can power devices such as chips and modules.

 

 

 

Antenna part

 

There are instructions on the placement of the antenna in the official ESP8266 series module user manual V1.3 of Essence .

 

The antenna is placed as shown in the figure below. The bottom of the antenna is hollowed out, and clear areas are set up on both sides. No copper is laid.

 

 

 

Relay part

 

The relay part should not be laid with copper, and the wiring should be thickened. The wiring should be on the BOT layer. Windows can be set up. Tin can be piled up during welding to increase the current carrying capacity and avoid creepage of high-current parts. Slots should be set up between the pins.

 

Welding debugging

 

1. Take a photo as a souvenir

 

2. Weld the power supply part first. After the power supply part is soldered, use a multimeter to check whether there is a short circuit. If there is no short circuit, power on and test. If both power indicator lights are on, it means the power supply part is normal.

 

 

 

3. There is no problem with the power supply. Solder the jumper resistor between CH340 and the power supply part.

 

 

4. After welding the CH340, connect it to the computer to see if the CH340 can be detected. The computer has recognized the CH340 device, which means the circuit is normal.

 

5. Next, weld the automatic download circuit and ESP8266 core module

 

6. Connect to the computer for testing. The program can be burned normally and the ESP8266 minimum system is normal.

 

7. Solder other components. The final board is as shown in the picture below.

 

8. Tin piling treatment on the window opening part

 

Note: This part of the picture uses version V0.1.

development environment

development tools

 

Development environment: Arduino1.8.13 official website address: https://www.arduino.cc/en/Main/Software

 

After the Arduino IDE is installed, create a new folder named portable in the installation root directory , as shown in the figure below.

 

After starting the Arduino IDE for the first time, the default path will automatically point to the portable folder, otherwise an Arduino15 folder will be created on the C drive to save the board SDK file.

 

After automating the Arduino IDE for the first time, some configuration files will be automatically loaded in the portable folder and ESP8266 board support will be added.

 

Development board manager loads platform index

 

 

The files in the configuration folder are as shown in the figure

Board support package

 

SDK support package: ESP8266 SDK 2.7.4 open source project address: https://github.com/esp8266/Arduino/releases/tag/2.7.4

 

 

Recommended download address , this is the file I have compiled here, you can use the link directly: https://pan.baidu.com/s/1plqgOPmJfFymJHCdbGuh7w Extraction code: kf0e

Create a new packages folder in the portable folder and unzip the downloaded file, as shown in the figure

 

 

After starting the Aruino IDE, as shown in the figure below, the ESP8266 SDK is ready to use.

 

software package

DHT11 software package: DHT-sensor-library project address: https://github.com/adafruit/DHT-sensor-library

It is recommended to install directly in the library manager, as shown in the figure below

 


 

 

WS2812 software package: Adafruit_NeoPixel project address: https://github.com/adafruit/Adafruit_NeoPixel

 

It is recommended to install directly in the library manager, as shown in the figure below

参考设计图片

×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-05-23 04:43:10

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号