3380 views|8 replies

158

Posts

0

Resources
The OP
 

Bluetooth-based smart bedroom control [Copy link]

Table of Contents
Overview
This is my first time using GD's Calibri MCU. The process was smooth and I didn't encounter any difficult problems. Use Calibri MKD integrated compilation environment. The GD32-colibri-F350RX development kit integrates an emulator, which is ideal for beginners. You don't need to worry about emulation and program downloading. Through the experience of some peripherals of GD32F350 some time ago, I can already handle the chip with familiarity. So here I will implement a simple simulation project.
The concept of smart home has been around for some time, but the real explosion has not yet appeared in the market, but the future prospects must be good. There are many products on the market, of all kinds. I will also take advantage of the popularity to realize Bluetooth smart bedroom control.
First, the overview of the realization of the goal:
1. The Bluetooth module communicates with GD32-colibri-F350RX through the serial port. The mobile phone app can control the LED on the GD32-colibri-F350RX development kit ;
2. The LCD displays the real-time bedroom temperature and humidity;
3. When the temperature is too high, when it reaches the set threshold value, an alarm signal is issued, and the prompt is displayed through the LCD . And turn on the air conditioner, and simulate it by controlling the on and off of the LED through the relay. Second, materials 1, GD32-colibri-F350RX development kit; 2, Bluetooth module; 3, LCD display; 4, relay; 5, LED lamp; 6, some Dupont wires, etc. 3. Hardware assembly 1. Connect GD32-colibri-F350RX development kit to Bluetooth module 374928 Connect 3.3V to the Bluetooth module to power it. Define PA9 and PA10 as USART0 and connect to the Bluetooth module serial port to achieve mutual communication. 2. Connect the GD32-colibri-F350RX development kit to the 12864 LCD display 374929. Power the LCD module and the backlight through the power interface of the development board. Select the serial mode for LCD and ground PSB. PB1---->CS Chip select signal PB0----->SID Data signal PB12----->SCK Clock signal PB15----->PSB Mode selection 3. Connect with relay 374930 Use PA6 to control the relay. Physical connection diagram: 374931
Fourth, the overall system structure diagram
[attach] 374940 [/attach]
Five, software implementation
1, integrated environment using MDK : https://en.eeworld.com/bbs/thread-918175-1-1.html
2, Bluetooth module and development kit to achieve serial communication:
Basically, the communication module software and hardware implementation, refer to: https://en.eeworld.com/bbs/thread-918175-1-1.html
Here we mainly process the data sent by the BluetoothBLEmodule. USART0interrupt function implementation
Both sending and receiving are processed by interrupt functions, so as not to wasteCPUresources. Interrupt reception, and process the data in the mainfunction. Compile and download 374933, and you can control the LED lights on the development board through the mobile phone app. 1. Realize LCD to display the temperature and humidity in the bedroom: Define the pins connected to the lcd 374935. I am using a 12864 Calibri LCD display. I will not post the driver for it, but directly display the part. 2. Realize automatic control. The learning environment can be adjusted in real time according to the indoor temperature and humidity parameters. Here I use relays to simulate the air conditioner or humidifier switch. 374938 When the temperature reaches a preset threshold, a high temperature threshold and a low temperature threshold can be set. When it is higher than the high temperature threshold or lower than the low temperature threshold, the air conditioner switch is automatically turned on. Here, a relay is used to light up the LED to simulate. 6. Demo video display https://v.youku.com/v_show/id_XMzgxODQwMTgzMg==.html?spm=a2h3j.8428770.3416059.1 u color=rgb(0, 0, 255)]https://v.youku.com/v_show/id_XMzgxODQwMTgzMg==.html?spm=a2h3j.8428770.3416059.1[/url]
Seventh, Summary
With the continuous development and growth of social economy, people's demand for working and living environment is also constantly increasing, and smart home is born. But the accompanying security issues must be solved. Smart home has been very popular in recent years, but it has not yet entered thousands of households. What is the reason?
In any case, smart home, smart building and Internet of Things are growing rapidly. In high-end buildings, you will find that whether it is automatic adjustment of lights or automatic adjustment of air conditioners, they are more humanized, and there are many smart scenes, so smart home will definitely be a good market in the future. Coupled with AIbig data, the future world may be beyond your imagination.
Here I simply simulated and realized a smart bedroom. To be truly intelligent, it must be connected to the cloud, and more importantly, security issues should be considered.
Supplementary content (2018-11-4 11:24): 1. The temperature and humidity sensor data is collected by the Bluetooth module through the UART interface to receive sensor data. 2. Since I only have the Cypress BLE module, I used its BLE function and sensor data collection.html[/url]
Here we mainly process the data sent by the BluetoothBLEmodule. USART0Interrupt function implementation
Both sending and receiving are processed by interrupt functions, so as not to wasteCPUresources. Interrupt reception, and process the data in themainfunction.
374933[/attach]
Compile and download, and control theledlight on the development board can be realized through the mobile phoneapp. 1. Realize LCD to display the temperature and humidity in the bedroom: Define the pins connected to the lcd 374935. I am using a 12864 Calibri LCD display. I will not post the driver for it, but directly display the part. 2. Realize automatic control. The learning environment can be adjusted in real time according to the indoor temperature and humidity parameters. Here I use relays to simulate the air conditioner or humidifier switch. 374938 When the temperature reaches a preset threshold, a high temperature threshold and a low temperature threshold can be set. When it is higher than the high temperature threshold or lower than the low temperature threshold, the air conditioner switch is automatically turned on. Here, a relay is used to light up the LED to simulate. 6. Demo video display https://v.youku.com/v_show/id_XMzgxODQwMTgzMg==.html?spm=a2h3j.8428770.3416059.1 u color=rgb(0, 0, 255)]https://v.youku.com/v_show/id_XMzgxODQwMTgzMg==.html?spm=a2h3j.8428770.3416059.1[/url]
Seventh, Summary
With the continuous development and growth of social economy, people's demand for working and living environment is also constantly increasing, and smart home is born. But the accompanying security issues must be solved. Smart home has been very popular in recent years, but it has not yet entered thousands of households. What is the reason?
In any case, smart home, smart building and Internet of Things are growing rapidly. In high-end buildings, you will find that whether it is automatic adjustment of lights or automatic adjustment of air conditioners, they are more humanized, and there are many smart scenes, so smart home will definitely be a good market in the future. Coupled with AIbig data, the future world may be beyond your imagination.
Here I simply simulated and realized a smart bedroom. To be truly intelligent, it must be connected to the cloud, and more importantly, security issues should be considered.
Supplementary content (2018-11-4 11:24): 1. The temperature and humidity sensor data is collected by the Bluetooth module through the UART interface to receive sensor data. 2. Since I only have the Cypress BLE module, I used its BLE function and sensor data collection.html[/url]
Here we mainly process the data sent by the BluetoothBLEmodule. USART0Interrupt function implementation
Both sending and receiving are processed by interrupt functions, so as not to wasteCPUresources. Interrupt reception, and process the data in themainfunction.
374933[/attach]
Compile and download, and control theledlight on the development board can be realized through the mobile phoneapp. 1. Realize LCD to display the temperature and humidity in the bedroom: Define the pins connected to the lcd 374935. I am using a 12864 Calibri LCD display. I will not post the driver for it, but directly display the part. 2. Realize automatic control. The learning environment can be adjusted in real time according to the indoor temperature and humidity parameters. Here I use relays to simulate the air conditioner or humidifier switch. 374938 When the temperature reaches a preset threshold, a high temperature threshold and a low temperature threshold can be set. When it is higher than the high temperature threshold or lower than the low temperature threshold, the air conditioner switch is automatically turned on. Here, a relay is used to light up the LED to simulate. 6. Demo video display https://v.youku.com/v_show/id_XMzgxODQwMTgzMg==.html?spm=a2h3j.8428770.3416059.1 u color=rgb(0, 0, 255)]https://v.youku.com/v_show/id_XMzgxODQwMTgzMg==.html?spm=a2h3j.8428770.3416059.1[/url]
Seventh, Summary
With the continuous development and growth of social economy, people's demand for working and living environment is also constantly increasing, and smart home is born. But the accompanying security issues must be solved. Smart home has been very popular in recent years, but it has not yet entered thousands of households. What is the reason?
In any case, smart home, smart building and Internet of Things are growing rapidly. In high-end buildings, you will find that whether it is automatic adjustment of lights or automatic adjustment of air conditioners, they are more humanized, and there are many smart scenes, so smart home will definitely be a good market in the future. Coupled with AIbig data, the future world may be beyond your imagination.
Here I simply simulated and realized a smart bedroom. To be truly intelligent, it must be connected to the cloud, and more importantly, security issues should be considered.
Supplementary content (2018-11-4 11:24): 1. The temperature and humidity sensor data is collected by the Bluetooth module through the UART interface to receive sensor data. 2. Since I only have the Cypress BLE module, I used its BLE function and sensor data collection.https://v.youku.com/v_show/id_XMzgxODQwMTgzMg==.html?spm=a2h3j.8428770.3416059.1
[/url]
Seventh, Summary
With the continuous development and growth of social economy, people's demand for working and living environment is also constantly increasing, and smart home is born. But the accompanying security issues must be solved. Smart home has been very popular in recent years, but it has not yet entered thousands of households. What is the reason?
In any case, smart home, smart building and Internet of Things are growing rapidly. In high-end buildings, you will find that whether it is automatic adjustment of lights or air conditioning, they are more user-friendly, and there are many smart scenes, so smart home will definitely be a good market in the future. Coupled with AI big data, the future world may be beyond your imagination.
I just simply simulated and realized a smart bedroom here. To be truly intelligent, it must be connected to the cloud, and more security issues are considered.
Supplementary content (2018-11-4 11:24): 1. The temperature and humidity sensor data is collected by the Bluetooth module through the UART interface to receive sensor data. 2. Since I only have the cypress ble module, I used its ble function and sensor data collection.https://v.youku.com/v_show/id_XMzgxODQwMTgzMg==.html?spm=a2h3j.8428770.3416059.1[/url]
Seventh, Summary
With the continuous development and growth of social economy, people's demand for working and living environment is also constantly increasing, and smart home is born. But the accompanying security issues must be solved. Smart home has been very popular in recent years, but it has not yet entered thousands of households. What is the reason?
In any case, smart home, smart building and Internet of Things are growing rapidly. In high-end buildings, you will find that whether it is automatic adjustment of lights or air conditioning, they are more user-friendly, and there are many smart scenes, so smart home will definitely be a good market in the future. Coupled with AI big data, the future world may be beyond your imagination.
I just simply simulated and realized a smart bedroom here. To be truly intelligent, it must be connected to the cloud, and more security issues are considered.
Supplementary content (2018-11-4 11:24): 1. The temperature and humidity sensor data is collected by the Bluetooth module through the UART interface to receive sensor data. 2. Since I only have the cypress ble module, I used its ble function and sensor data collection.

图片1.png (54.28 KB, downloads: 0)

图片1.png

图片2.png (116.67 KB, downloads: 0)

图片2.png

图片3.png (13.31 KB, downloads: 0)

图片3.png

图片4.png (255.36 KB, downloads: 0)

图片4.png

图片6.png (16.14 KB, downloads: 0)

图片6.png

图片7.png (520.46 KB, downloads: 0)

图片7.png

图片8.png (18.93 KB, downloads: 0)

图片8.png

图片9.png (35.95 KB, downloads: 0)

图片9.png

图片10.png (390.03 KB, downloads: 0)

图片10.png

图片11.png (129.4 KB, downloads: 0)

图片11.png

图片12.png (239.39 KB, downloads: 0)

图片12.png

图片13.png (88.33 KB, downloads: 0)

图片13.png
This post is from GD32 MCU

Latest reply

nmg
Attached to the judges' supplementary materials: anger0925【GD32-colibri-F350RX】+light up LEDClick to viewanger0925【GD32-colibri-F350RX】+Development BoardClick to viewanger0925【GD32-colibri-F350RX】+MDK Development Environment SetupClick to viewanger0925【GD32-colibri-F350RX】+USART to realize serial data communicationClick to view  Details Published on 2018-10-25 08:35
 

5216

Posts

239

Resources
From 2
 
Attached to the judges' supplementary materials:
anger0925
【GD32-colibri-F350RX】+light up LED
anger0925
【GD32-colibri-F350RX】+Development Board
anger0925
【GD32-colibri-F350RX】+MDK Development Environment Setup
anger0925
【GD32-colibri-F350RX】+USART to realize serial data communication
This post is from GD32 MCU
Add and join groups EEWorld service account EEWorld subscription account Automotive development circle
 
 
 

530

Posts

4

Resources
3
 
This post is from GD32 MCU
 
 
 

221

Posts

0

Resources
4
 
This post is from GD32 MCU
 
 
 

1903

Posts

0

Resources
5
 
All the works have been submitted.
This post is from GD32 MCU
 
 
 

1368

Posts

6

Resources
6
 
Very good, very impressive.
This post is from GD32 MCU
 
Personal signature专注智能产品的研究与开发,专注于电子电路的生产与制造……QQ:2912615383,电子爱好者群: void
 
 

1025

Posts

1

Resources
7
 
So fast
This post is from GD32 MCU

Comments

Gadgets  Details Published on 2018-9-11 15:04
 
 
 

158

Posts

0

Resources
8
 
Gadgets
This post is from GD32 MCU
 
 
 

158

Posts

0

Resources
9
 

Attached here is the source code. app.rar (16.46 KB, downloads: 4)
This post is from GD32 MCU
 
 
 

Guess Your Favourite
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list