DIY smart rocking bed to monitor baby health, providing design solutions, software and hardware architecture

Publisher:谁与争锋1Latest update time:2014-05-22 Source: 21ICKeywords:DIY Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1. Project Overview

1.1 Project Summary

The Baby Sleeper is a smart rocking bed based on the STEVAL-MK1062V2 development kit. It uses the sensors on the development board, adds motors, GPRS, music playback and sound sensors to monitor and control the baby's sleeping environment, allowing the baby to grow in a warm and comfortable environment.

1.2 Project Background

Sleep plays a vital role in the growth and development of infants. In fact, infants under one year old spend at least 16 hours a day sleeping. This is because their brains are not fully developed and they easily fall asleep due to fatigue. And only adequate sleep can ensure the development and maturity of various tissues and organs. Otherwise, it is not good for the maturation of brain tissue and the growth and development of various organs. A good sleeping environment is the guarantee of sleep quality. The traditional rocking bed only provides a place to sleep, but does not monitor and improve the baby's sleeping environment. It has at least the following defects:

1. Competition in today's society is becoming increasingly fierce. Young parents have to work during the day and take care of their babies at night, which has seriously affected their rest. How to reduce the burden on parents and take care of the baby's rest has become an urgent problem to be solved.

2. When the baby is sleeping at home, the parents go out to buy groceries or do something outside. If the baby suddenly wakes up and the parents are unaware of it, the baby may be in various dangers.

3. The baby's brain is fragile. When high-power devices such as mobile phones and walkie-talkies are working next to the baby, the radiation they generate will inevitably affect the development of the brain. How to notify parents when radiation is discovered to ensure the baby's sleep quality is a problem that needs to be considered.

4. Weather conditions such as temperature and humidity are also important factors that affect the baby's sleep quality. If the air conditioner can be automatically adjusted according to the baby's sleep conditions to create an ideal sleeping environment, the baby will develop better.

In response to the above problems, we designed this "Baby Sleeping Treasure" to provide babies with a comfortable and healthy sleeping environment, while solving the problems of parents having almost no experience in taking care of babies, a fast work pace, little time, and a lack of relevant knowledge and experience in infant care.

2. Demand Analysis

2.1 Functional requirements

The functions of this baby sleeping treasure are:

1. After the baby wakes up from sleep, he will definitely turn over and shake. The gyroscope and accelerometer determine whether the baby wakes up through the shaking amplitude and acceleration of the rocking bed, and then notify the parents through GPRS. At the same time, the motor controls the rocking bed to shake, play nursery rhymes or tell stories, so that the baby can fall asleep quietly again.

2. When a mobile phone or high-power electrical appliance is close to the shaking bed, the electromagnetic radiation will inevitably affect the geomagnetic field. The geomagnetic meter monitors the radiation by detecting the changes in the geomagnetic field. Then it will sound an alarm to avoid the radiation source from approaching.

3. The pressure and temperature sensors monitor the ambient air pressure, temperature, etc. in real time. When the temperature and pressure exceed the appropriate values, they will remind parents and immediately adjust the output of the air conditioner to make the baby feel comfortable again.

4. The sound sensor monitors the baby's crying. When the crying exceeds a certain limit or lasts for a certain period of time, the system will notify the parents.

5. According to the baby's sleeping habits, this sleep baby can record multiple sleep data, and automatically adjust the rocking frequency, sleeping temperature, etc. of the rocking bed to suit different babies through fuzzy algorithm and built-in small expert system.

2.2 Performance Standards

The core of the whole system is completed by STM32. The baby's sleeping environment and sleep quality are monitored through temperature sensors, humidity sensors, geomagnetic sensors, acceleration sensors, gyroscopes and sound sensors. In case of abnormal conditions, the system can automatically adjust and notify parents.

At the same time, the system has built-in fuzzy algorithms and a small expert system, which automatically records various data of the sleep every time the baby falls asleep: such as the time of falling asleep, current temperature, rocking frequency and angle of the rocking bed, etc. Through multiple measurements and data accumulation, the system will automatically adjust to find the sleeping environment that different babies like and adapt to the needs of different babies.

3. Solution Design

3.1 System Function Implementation Principle

GPRS: General Packet Radio Service. It uses packet switching to transmit data.

Temperature sensor: The resistance value of a metal conductor changes with temperature, and the temperature is obtained by reading the resistance value.

Humidity sensor: measures humidity by using the adsorption capacity of humidity-sensitive materials to water molecules or by producing physical effects on water molecules.

Geomagnetic sensor: It uses Faraday's law of electromagnetic induction, that is, the principle that the coil cuts the magnetic field lines of the geomagnetic field to generate induced electromotive force. It is mostly used in aircraft, ships, etc. The main purpose is to sense changes in posture.

Air pressure sensor: detects by measuring the resistance of the varistor and a voltage signal.

Accelerometer: Converts the physical signal of acceleration into an electrical signal that is easy to measure.

Acoustic sensor: The tensioned diaphragm and the rear plate close to it form a capacitor. Under the action of sound pressure, the diaphragm produces vibrations corresponding to the sound wave signal, which changes the distance between the diaphragm and the stationary rear plate, resulting in a corresponding change in the capacitance of the capacitor. Therefore, the condenser microphone is a capacitive sensor with variable distance. A DC polarization circuit is used to output an alternating voltage, the size and waveform of which is determined by the sound pressure on the diaphragm.

Gyroscope: The direction of a rotating object's axis of rotation will not change when it is not affected by external forces. Based on this principle, people use it to maintain direction, and the thing they made is called a gyroscope. When a gyroscope is working, it needs a force to make it rotate quickly, generally reaching hundreds of thousands of revolutions per minute, and it can work for a long time. Then use a variety of methods to read the direction indicated by the axis and automatically transmit the data signal to the control system.

Music playback chip: Through the internal oscillation circuit and a small number of external discrete components, various music signals can be generated.

Motor: A conductor carrying current is acted upon by electromagnetic force in a magnetic field, causing it to move.

3.2 Hardware Resource Configuration

Since the board already includes an acceleration sensor, a gyroscope, a geomagnetic sensor, a temperature sensor and a pressure sensor, this system requires an external music player module, a motor control module, a GPRS module and a sound sensor module.

Music module: This module uses VS1003B as the MP3 audio decoding chip. The MP3 files are stored in the MICRO SD of the STEVAL-MKI062V2 development kit. The VS1003 module is connected to the development kit through the SPI port of J8 to transmit data.

Motor control module: The motor speed is controlled through the built-in PWM TIMER of STM32F103 and the external motor control board.

GPRS module: This module is connected to the expansion port UART2 of the STEVAL-MKI062V2 development kit, and the GPRS module is controlled by the semi-serial port development kit to send text messages.

Sound sensor module: The output of the sound sensor module is obtained through the changes in the high and low levels of the common GPIO in the development kit.

3.3 System Software Architecture

This work uses RT-Thread as the operating system, and each module coordinates with each other.

It is divided into five functional blocks:

1. According to the baby's sleeping habits, adjust the motor speed, air conditioning temperature, music playback tracks and volume at different times. The fuzzy control module will continue to learn and adjust the sleeping environment for the baby more intelligently.

2. Check whether the baby wakes up, take measures and notify the parents.

3. Detect geomagnetic changes and notify parents.

4. Check the air pressure and humidity values ​​and notify parents.

5. Check the temperature and adjust it appropriately.

3.4 System Software Process

System software process:

First start the RT-Thread operating system and then initialize each device.

1. According to the fuzzy library, the timer starts timing. When entering the next stage, an interrupt is generated to adjust the air conditioning temperature, the shaking amplitude of the rocking bed, the music and volume.

2. If the rocking bed shakes at a low speed and irregularly and the sound sensor receives crying sounds, it means that the baby has woken up, an interruption occurs, the motor shakes at a low speed, nursery rhymes are played, and a message is sent to report the baby's status to the parents.

3. If the intensity of the geomagnetic field changes beyond the preset range, an interruption occurs and a text message is sent to inform the parents that the radiation source is approaching.

4. If the air pressure and humidity values ​​exceed the preset range, an interruption will occur and a text message will be sent to inform the parents to open the windows for ventilation.

5. If the temperature value exceeds the preset range, an interruption occurs, a text message is sent to inform the parents, and the air conditioner is controlled to adjust the temperature.

Keywords:DIY Reference address:DIY smart rocking bed to monitor baby health, providing design solutions, software and hardware architecture

Previous article:Sharing experience on the one-hour charging management solution for smartphones
Next article:Introduction and comparison of implementation methods of smartphone keyboard controller

Latest Power Management Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

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号