基于STM32F103ZET6主控+ESP8266的ZigBee网关电路设计方案
原标题:基于STM32主控的ZigBee网关电路设计方案
本系统已经在实际大棚中使用几个月,系统稳定。系统采用STM32F1032为主控,通过ZigBee无线传感网络组网,采集近距离无线数据(实测在大棚中点对点距离超过三百米),利用液晶触摸屏供用户触摸操作并显示数据,将系统接入WiFi模块,以实现数据的网络化传输,IP设置界面,用户若一定时间内不输入则连接一个程序中自定义的IP,用户也可以手动输入一个IP地址,进而实现相关数据传输服务,Android客户端通过访问服务器,接收数据,从而实现了数据的网络化的远程传输,同时Android端还有实时数据、智能控制、阀值设置、修改名称功能。
实时数据:列表显示数据,定时自动刷新页面,用户也可以按图标自行刷新。
智能控制:手机发送信息给服务器,服务器再发给网关,网关接收到数据根据程序进行判断进而执行对应操作。程序中实现的是输入0或1控制网关上的LED的亮灭,用户也可以很方便的在程序中修改,自行定义接收到数据对应的操作。
阀值设置:通过设置上下限,每组数据跟上下限比较,在其中则数据显示绿色,否则为红色,方便用户查看。
修改名称:用户可根据编号对数据名称进行修改。
本项目采用zigbee节点做为温湿度采集节点,因而可以非常方便扩展相应节点,以实现多点温室信息采集,不仅是温室数据,还可以扩展其他传感器节点模块,很方便实现多种多点数据采集,本项目中 STM32F103ZET6 + ZigBee+ wifi,可以相当无线传感网络的网关,可以应用于各种工业自动化控制数据采集,智能家居信息采集... 同时用户也可在此基础上在数据采集中扩展应用modbus,can等现场总线或其他无线协议,这些均可很方便加入该系统中。
【STM32F103ZET6】
Mainstream Performance line, ARM Cortex-M3 MCU with 512 Kbytes Flash, 72 MHz CPU, motor control, USB and CAN
The STM32F103xC, STM32F103xD and STM32F103xE performance line family incorporates the high-performance ARM® Cortex®-M3 32-bit RISC core operating at a 72 MHz frequency, high-speed embedded memories (Flash memory up to 512 Kbytes and SRAM up to 64 Kbytes), and an extensive range of enhanced I/Os and peripherals connected to two APB buses. All devices offer three 12-bit ADCs, four general-purpose 16-bit timers plus two PWM timers, as well as standard and advanced communication interfaces: up to two I2Cs, three SPIs, two I2Ss, one SDIO, five USARTs, an USB and a CAN.
The STM32F103xC/D/E high-density performance line family operates in the –40 to +105 °C temperature range, from a 2.0 to 3.6 V power supply. A comprehensive set of power-saving mode allows the design of low-power applications.
These features make the STM32F103xC/D/E high-density performance line microcontroller family suitable for a wide range of applications such as motor drives, application control, medical and handheld equipment, PC and gaming peripherals, GPS platforms, industrial applications, PLCs, inverters, printers, scanners, alarm systems video intercom, and HVAC.
主要特性
Core: ARM® 32-bit Cortex®-M3 CPU
72 MHz maximum frequency, 1.25 DMIPS/MHz (Dhrystone 2.1) performance at 0 wait state memory access
Single-cycle multiplication and hardware division
Memories
256 to 512 Kbytes of Flash memory
up to 64 Kbytes of SRAM
Flexible static memory controller with 4 Chip Select. Supports Compact Flash, SRAM, PSRAM, NOR and NAND memories
LCD parallel interface, 8080/6800 modes
Clock, reset and supply management
2.0 to 3.6 V application supply and I/Os
POR, PDR, and programmable voltage detector (PVD)
4-to-16 MHz crystal oscillator
Internal 8 MHz factory-trimmed RC
Internal 40 kHz RC with calibration
32 kHz oscillator for RTC with calibration
Low power
Sleep, Stop and Standby modes
VBAT supply for RTC and backup registers
3 × 12-bit, 1 μs A/D converters (up to 21 channels)
Conversion range: 0 to 3.6 V
Triple-sample and hold capability
Temperature sensor
2 × 12-bit D/A converters
DMA: 12-channel DMA controller
Supported peripherals: timers, ADCs, DAC, SDIO, I2Ss, SPIs, I2Cs and USARTs
Debug mode
Serial wire debug (SWD) & JTAG interfaces
Cortex®-M3 Embedded Trace Macrocell™
Up to 112 fast I/O ports
51/80/112 I/Os, all mappable on 16 external interrupt vectors and almost all 5 V-tolerant
Up to 11 timers
Up to four 16-bit timers, each with up to 4 IC/OC/PWM or pulse counter and quadrature (incremental) encoder input
2 × 16-bit motor control PWM timers with dead-time generation and emergency stop
2 × watchdog timers (Independent and Window)
SysTick timer: a 24-bit downcounter
2 × 16-bit basic timers to drive the DAC
Up to 13 communication interfaces
Up to 2 × I2C interfaces (SMBus/PMBus)
Up to 5 USARTs (ISO 7816 interface, LIN, IrDA capability, modem control)
Up to 3 SPIs (18 Mbit/s), 2 with I2S interface multiplexed
CAN interface (2.0B Active)
USB 2.0 full speed interface
SDIO interface
CRC calculation unit, 96-bit unique ID
ECOPACK® packages
STM32F103ZET6电路原理图
ESP8266
低功耗、高集成度的 Wi-Fi 芯片
仅需 7 个外围元器件
超宽工作温度范围:-40°C 至 +125°C
ESP8285 - ESP8266 内封 8 Mbit Flash
性能稳定
ESP8266EX 的工作温度范围大,且能够保持稳定的性能,能适应各种操作环境。
高度集成
ESP8266EX 集成了 32 位 Tensilica 处理器、标准数字外设接口、天线开关、射频 balun、功率放大器、低噪放大器、过滤器和电源管理模块等,仅需很少的外围电路,可将所占 PCB 空间降低。
低功耗
ESP8266EX 专为移动设备、可穿戴电子产品和物联网应用而设计,通过多项专有技术实现了超低功耗。ESP8266EX 具有的省电模式适用于各种低功耗应用场景。
32 位 Tensilica 处理器
ESP8266EX 内置超低功耗 Tensilica L106 32 位 RISC 处理器,CPU 时钟速度最高可达 160 MHz,支持实时操作系统 (RTOS) 和 Wi-Fi 协议栈,可将高达 80% 的处理能力留给应用编程和开发。
责任编辑:David
【免责声明】
1、本文内容、数据、图表等来源于网络引用或其他公开资料,版权归属原作者、原发表出处。若版权所有方对本文的引用持有异议,请联系拍明芯城(marketing@iczoom.com),本方将及时处理。
2、本文的引用仅供读者交流学习使用,不涉及商业目的。
3、本文内容仅代表作者观点,拍明芯城不对内容的准确性、可靠性或完整性提供明示或暗示的保证。读者阅读本文后做出的决定或行为,是基于自主意愿和独立判断做出的,请读者明确相关结果。
4、如需转载本方拥有版权的文章,请联系拍明芯城(marketing@iczoom.com)注明“转载原因”。未经允许私自转载拍明芯城将保留追究其法律责任的权利。
拍明芯城拥有对此声明的最终解释权。