Multifunctional smart crib design

The environment for newborn babies is harsh, and it is often difficult for parents to understand whether the baby’s current environment is comfortable. Taking care of babies is the most troublesome thing for young parents. In order to let parents know more about the environmental changes around the crib, when the environment changes greatly, timely treatment, such as the temperature difference between day and night when the seasons are alternating, it is difficult for parents to grasp whether the current temperature of the crib is comfortable, and the baby often has a fever due to sudden changes in temperature at night. Through the use of various sensors to collect the surrounding environment of the crib, real-time monitoring of the temperature, moderate, gas and other environmental data around the crib, through the infrared temperature measurement module to measure the baby’s body temperature in real time, while adding music playback, shaking comfort, baby crying detection By uploading data to the cloud through the Internet of Things Internet of Things, parents can easily view the real-time status of the baby’s growing environment, providing a healthy, scientific, and comfortable environment for babies while reducing the burden on busy parents.


Introduction
With the development of the Internet of Things, in recent years, various smart home products have gradually entered the family, and various smart products have greatly facilitated our lives. At present, most cribs on the market are traditional cribs. Traditional cribs cannot monitor the environment around the crib in real time. In reality, there are too many unforeseen factors affecting the healthy growth of infants and young children, such as environmental conditions. Parents still have to live and work normally on the basis of taking care of infants and young children, so it is inevitable that they will be negligent when taking care of infants and young children.In view of the above situation, we have designed a multifunctional smart crib. [1][2][3] The functions of the crib are: temperature and humidity collection in the crib, music playback, crib data abnormal reminder, automatic shaking, non-contact body temperature detection, sound detection, TFT Data display, air quality testing, and parents can view real-time data on cribs in the cloud at any time. Provide a comfortable environment for babies to grow.

Overall system design
The system uses multiple sensors to detect crib environment changes in real time. The MLX90614 non-contact infrared temperature sensor collects baby's body temperature data, DHT22 collects temperature and humidity changes around the crib, MQ135 detects air quality in real time, and realizes the automatic crib function of the crib by controlling the motor. The sound automatically detects music and shakes when the baby cries, uploads the data to the server through the ESP8266, [4][5][6][7]and displays the acquired data in real time through the TFT screen. The system uses ESP8266 Wi-FiSoC as the main control core, and the TFT screen is driven by Arduino nano.

System Master
The system adopts ESP8266 Wi-FiSoC as the system master. The ESP8266 has rich hardware interfaces and can support UART, IIC, PWM, GPIO, ADC, etc. It also has a built-in low-power 32-bit CPU, which can double as an application processor and is suitable for various Internet of Things applications. Occasion. ESP8266Wi-FiSoC is used as the main control of the system to process the data collected by the sensor and also realize data uploading. At the same time, the price has a large advantage and the overall cost performance is high. [5][6] 2.2. Non-contact temperature measurement MLX90614 infrared temperature measurement module determines the temperature of the object according to the infrared radiation energy of the measured object, does not contact with the measured object, and has the temperature distribution field of the object to be measured. The temperature resolution is high, the response speed is fast, and the temperature measurement range is wide. It is not limited by the upper limit of temperature measurement and has good stability. The use of non-contact infrared sensors can reduce the interference of the environment on the sensor and the measurement accuracy is high, which can continuously monitor the body temperature of the baby. The MLX90614 and the main control chip use IIC communication, just need to connect the corresponding VCC, GND, SCL, SDA to the corresponding pin of the main control chip.

Temperature and Humidity Measurement
The temperature and humidity measurement uses the DHT22 digital temperature and humidity sensor. The DHT22 digital temperature and humidity sensor is a temperature and humidity composite sensor with a calibrated digital signal output. The DHT22 is installed on the bottom of the crib to detect whether the temperature and humidity in the baby's bed are normal. When the baby wets the bed, the humidity will increase, and the corresponding bedtting humidity threshold is set. When the humidity exceeds the threshold, the bedwetting is determined, and the bed can be detected. Whether the internal temperature is comfortable, set the baby comfort temperature range, when the temperature is too high or too low, it is judged as uncomfortable temperature. When the temperature or humidity is abnormal, the system master control GSM module issues a warning reminder. At the same time, there is also a DHT22 digital temperature and humidity sensor around the crib for collecting the temperature and humidity around the crib so that parents can better understand the temperature and humidity of the current environment and prepare in advance.

Baby comfort
Baby comfort includes automatic shaking and music playback. Music playback uses JQ6500. JQ6500 is a serial port MP3 chip. It integrates hard decoding of MP3 and WMV. It adopts AD button control mode and controls the corresponding pins through the main control chip. The level change triggers the corresponding control. The automatic shaking adopts the design of DC motor and linkage rod. The rotation of the motor drives the linkage rod to realize the shaking function of the crib. The motor is driven by the uln2003 chip and directly controlled by the main control chip. At the same time, the button is also used to control the shaking, correspondingly realize the opening and closing of the shaking, and also can be timed off, and the parents can sleep on the baby by the shaking function and the music playing function.

Exception warning
When it is detected that the data acquired by the sensor exceeds the set threshold, the data is processed first to check whether the sensor data is fluctuating. If the abnormal data detected by the non-sensor is detected, the main control chip controls the GSM module to send a data abnormality warning. In the mobile phone number preset in advance, if the data does not return to normal after a certain period of time, the call is made until the data is restored.

Cloud Server
The communication protocol between the system and the cloud server is the MQTT protocol. [7][8][9] The MQTT is a connection protocol for M2M and the Internet of Things, and adopts a lightweight publishing and subscription message transmission mechanism. Mosquitto is an open source messaging agent that implements the MQTT v3.1 protocol, providing a lightweight, publish/subscribe messaging push mode that makes device-to-device short message communication easy to use. [10][11] After building the ubuntu system on the cloud server, install mqtt mosquitto 1.4.5. [8][9] 3. System test In order to check whether each part of the sensor can run according to the predetermined program, and check whether the parts can cooperate with the operation, the system will perform the overall simulation data test to check whether the system can run as expected, record the data, and check whether the sensor data is normal.

Simulated temperature and humidity test
Test content: Verify that the temperature and humidity sensor is working properly, and if the temperature and humidity are abnormal, can you trigger the voice reminder according to the setting. Test procedure: Cover the DHT22 temperature and humidity sensor with a moist hot towel to simulate the baby bedwetting scene. Test result: After the towel is put on, it takes about 5 seconds. TFT and cloud can display real-time temperature and humidity. After about 10 seconds, the scheduled mobile phone number receives the abnormal reminder message, and the mobile phone number is scheduled to receive the phone call after about 5 minutes.

Simulated body temperature test
Test content: Verify that the non-contact infrared temperature measurement module works normally. When the body temperature is abnormal, it can trigger the reminder according to the setting. Test procedure: Use a cup of hot water and place it in front of the infrared temperature measurement module to simulate the baby's body temperature. Test result: After the cup is put about 3 seconds, the temperature data displayed on the TFT is refreshed. After about 5 seconds, the cloud refreshes to the body temperature data. After about 10 seconds, the predetermined mobile phone number receives the abnormal reminder message, and the mobile phone is scheduled to be about 5 minutes. Receive a phone call

Simulated abnormal air test
Test content: Verify that the warm air quality sensor is working properly, and can trigger the voice reminder according to the setting when the air is abnormal. Test procedure: The lighter releases contaminated gas near the sensor, simulating anomalous air quality. Test result: When the gas in the lighter is released, the predetermined mobile phone number receives the abnormal reminder message about 10 seconds, and the mobile phone number is scheduled to receive the phone call after about 5 minutes.

Conclusion
The use of some cost-effective sensors to achieve real-time monitoring of the overall data of the crib at very low cost, the overall cost of the crib is not high, there is a greater price advantage, the use of GSM remote reminder can avoid the voice reminder to the baby At the same time, the non-contact infrared temperature measurement can monitor the body temperature of the baby in real time, which can conveniently view the real-time data of the crib from the cloud, so that parents can better understand the changes of the baby's growth environment and provide a comfortable environment for the baby to grow up.