elleny

2020 TI Cup Electronic Design Competition Question A Wireless Motion Sensor Node Design

 
Overview

Update: The crystal oscillator needs to be soldered, 8M active

Introduction

Author's blog homepage: https://blog.csdn.net/weixin_44578655

This document and related materials are the work of the blogger participating in the 2020 TI Cup College Student Electronic Design Competition. Related blog: https://blog.csdn.net/weixin_44578655/article/details/109020022

Data link (Baidu Netdisk): Link: https://pan.baidu.com/s/1WnXZ1bDB-cs1LRwfiP6rYg Extraction code: iqek Physical picture: picture.pngpicture.png

Contents of open source data compression package: Insert image description here

Schematic diagram, PCB

The PCB was drawn using EasyEDA. The AD files in the folder were exported from EasyEDA. There may be some problems with the borders and characters after exporting. Insert image description here

It is recommended to use Lichuang EDA! Because when editing the document, the Lichuang EDA project has not yet been released: You can check my LCEDA open source homepage later: https://oshwhub.com/doee

  • ADS1292R ECG acquisition module
  • STM32F103C8T6 minimum system module
  • LMT70 module

The three parts of the board are connected through jumper caps and used as one, or they can be separated and used separately.

The crystal oscillator of the microcontroller uses an 8M active crystal oscillator.

I enlarged the soldering pad of LMT70 to make it easier to solder, but I don’t know if it will be affected if the temperature measuring hand touches the soldering pad.

In order to make the component layout more compact, no component character labels are left.

Server-side project source code:

The server-side compilation environment is VS2019, and the language is C#. If this is your first contact with PC writing, I would like to recommend a basic introductory PC design tutorial: https://www.cnblogs.com/liaocheng/p/9144317.html

The compressed package of the server-side project contains multiple projects: Insert image description here

The final version used is the version pointed by the arrow in the picture above. Insert image description here

In the directory in the picture above, there is an exe file generated by the project, which can be run directly.

Due to time constraints, this version is not perfect. When switching between wifi and Bluetooth modes, you need to turn it off and on again.

The default baud rate of the serial port mapped by Bluetooth is 115200. How to change the parameters of the Bluetooth virtual serial port under Windows. For details, see:

https://blog.csdn.net/px_528/article/details/70782059 The IP address in TCP mode needs to be changed in the source code, so if you do not plan to refer to the source code, this server-side software cannot be used directly (game time Nervous, many details cannot be perfected)

Each module on the device side

I try my best to annotate the source code on the device side and make the code structure as clear as possible, so that I can feel free to sort it out after the competition.

Device-side source code document structure

Insert image description here

System Block Diagram:

Insert image description here

Software framework:

Insert image description here

This is written in the report. To be a bit more sophisticated, it is called "task". Don't be misled, it is not multi-tasking!

All modules of the system run in the large loop of the main function, and the timing loop operation of each module is realized through software timing. Software timing method, taking key scanning as an example:

if(sys_tick - key_tick >= 10) { key_tick = sys_tick; //Key scanning, processing, etc. }

Among them, sys_tick is a global variable that will increase by 1 every 1ms (accurately counted through the 1ms timer interrupt), which is used for system operation timing (generally called the system time base). It can facilitate software timing. The effect achieved by the above code is that the if judgment is established once every 10ms. If placed in a large loop, the 10ms timing can be achieved. Scanning every 10ms can eliminate the need for button debounce and reduce system operating overhead. The work of each module basically adopts this method to implement software timing execution, which is convenient for setting the timing period.

Insert image description here

About the ADS1292 module

Connection line sequence VIN---3.3V~5V 3V3---3.3V GND---GND DRDY---PA8 CS---PB12 CLK---PB13 DOUT---PB14 SDIN---PB15

The "3V3" pin specifically supplies power to the digital part of the ADS1292 module to reduce interference to the analog part. Two options are available:

  1. Use external 3.3V, that is, the 3V3 pin should be connected to the external 3.3V. At the same time, use a jumper cap to short-circuit the two frame selection pins as shown. Insert image description here
  2. Use the 3.3V stabilized voltage within the system. At this time, the 3V3 pin does not need to be connected. You need to connect the jumper cap as shown below.

Insert image description here

The position of the ECG electrode patch. If you purchase a lead wire like the one shown below:

Insert image description here

According to the color, connect as shown below, and the measured ECG waveform will be correct. Insert image description here

About the gyroscope module

For the gyroscope module, I use a less popular module. This application only uses the pitch axis, so an ordinary MPU6050 can be used.

The gyroscope module is strapped to the leg to measure steps. Please refer to the design report for details. Insert image description here

About Bluetooth module and host computer

Bluetooth module uses HC05

Since the system initially used a Bluetooth host computer, the Bluetooth data sending part was retained in the project. Insert image description here

The supporting Bluetooth debugging host computer is:

Insert image description here

It is a very easy-to-use PC. You can search it in the application market. The interface controls can be developed twice. In this competition, many groups doing question A directly used this PC. It can be said that the author of this APP Saved a large number of people participating in e-sports.

About LMT70

LMT70 can be powered through the IO port, which is recommended by the manual. Using the 12-bit ADC that comes with stm32, the data is quite stable after adding mean filtering.

About esp8266

The specific model of the module is esp8266-01s. The initialization part mainly uses AT commands to configure wifi and servers. Insert image description here

The esp8266 was modified later. Since there was no interface left on the board, the Bluetooth interface could only be used. The power supply voltages of the two modules are not the same (Bluetooth: 3.6-6, esp8266: 3.3V), so a hole was added. Hole adapter board, there is a voltage stabilizing module on the board (AMS1117 cannot be used, because the system power supply is lithium battery 3.7-4.2V, and 1117 requires a relatively large voltage difference, so a low voltage difference LDO must be used to output 3.3V normally, which is used here is TPS73233DBVR) Insert image description here

About the screen

Link: https://item.taobao.com/item.htm?spm=a1z10.5-cs.w4002-22419023648.11.103e497cFxRZgy&id=526022333035 Insert image description here

Select "old model without chip select CS"

This SPI-driven LCD refresh speed is okay, at least the real-time display of ECG waveforms is satisfactory.

The store provides the source code of the stm32 part. When designing the PCB, it is also based on the pin definitions in the screen routine (using hardware SPI).

Equipment casing

The shell is drawn using solidworks, material: acrylic, copper pillar, equipment: engraving machine, hand. I was pressed for time on the last day, so I drew the wrong mounting holes for the screen, but I still managed to install it. Insert image description here

design report

We took a whole day to write the design report, which truly reflected the content of the work. The relevant plans in the report were also the actual ones adopted.

The word version of the design report includes the theoretical calculation part of the Fir filter (the PDF version is the final submitted version without this part). My teammates wrote the theoretical analysis very seriously, but because it ended up exceeding the number of pages, I cut it before submission.

Production costs

ADS1292R: about 30rmb per piece stm32f103c8t6: 10rmb LMT70: 10 (not easy to weld)(Don’t use this thing if you make it yourself, you can replace it with NTC) Other components <30rmb Screen: plus postage 46 Lithium battery + charging module, etc.: < 15rmb (3.7V small battery will do) Bluetooth/WIFI module: <15rmb Gyro Instrument module: If you use MPU6050, you can buy it for 5 RMB. Lead wire: 30 RMB plus postage. ECG electrodes: 20. The total cost is about 200 RMB. Compared with the independent ECG module of Aubao that often costs 300+ during the electric competition, it is really wise.

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-07-02 21:57:41

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号