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.
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
- Popular Resources
- Popular amplifiers
- MathWorks and NXP Collaborate to Launch Model-Based Design Toolbox for Battery Management Systems
- STMicroelectronics' advanced galvanically isolated gate driver STGAP3S provides flexible protection for IGBTs and SiC MOSFETs
- New diaphragm-free solid-state lithium battery technology is launched: the distance between the positive and negative electrodes is less than 0.000001 meters
- [“Source” Observe the Autumn Series] Application and testing of the next generation of semiconductor gallium oxide device photodetectors
- 采用自主设计封装,绝缘电阻显著提高!ROHM开发出更高电压xEV系统的SiC肖特基势垒二极管
- Will GaN replace SiC? PI's disruptive 1700V InnoMux2 is here to demonstrate
- From Isolation to the Third and a Half Generation: Understanding Naxinwei's Gate Driver IC in One Article
- The appeal of 48 V technology: importance, benefits and key factors in system-level applications
- Important breakthrough in recycling of used lithium-ion batteries
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Detailed explanation of intelligent car body perception system
- How to solve the problem that the servo drive is not enabled
- Why does the servo drive not power on?
- What point should I connect to when the servo is turned on?
- How to turn on the internal enable of Panasonic servo drive?
- What is the rigidity setting of Panasonic servo drive?
- How to change the inertia ratio of Panasonic servo drive
- What is the inertia ratio of the servo motor?
- Is it better for the motor to have a large or small moment of inertia?
- What is the difference between low inertia and high inertia of servo motors?
- Reverse voltage protection for battery chargers
- ASUS laptop, the second hard drive is gone? !
- BMS Software Engineer Recruitment
- Low power mode of msp430f149
- GaN Reference Designs
- How to get started with embedded development?
- [Perf-V Review] Transplanting the Hummingbird E203 open source SOC to the FPGA board
- Design USB3.1 high-speed SD Card reader based on Genesys GL3224
- If you want to make the three-pole tube work in the amplification area, what is the idea? You need to calculate the static working point ib ic VCE three...
- How to save the bricks with the RVB2601 board