With the rapid development of people's living standards and the accelerating pace of life, refrigerators play an increasingly important role in families, but they are troublesome to organize. At the same time, people often cannot figure out whether food has been used up or forget some food in the refrigerator, causing various life troubles.
This design uses radio frequency identification (RFID) technology, combined with the Internet and information processing technology, to establish an intelligent refrigerator food supervision system to record the food in the refrigerator. Then the food in the refrigerator can be displayed on the refrigerator's LCD screen by querying the database, or you can send text messages to the refrigerator to query the food at home, and buy the food in the refrigerator through the mobile phone, meeting the needs of future smart homes.
With the development of the Internet of Things, the investment in smart homes in the direction of the Internet of Things is rapidly expanding, and the finished products of RFID tags are constantly decreasing. In the future, they may replace barcodes for food outsourcing. Moreover, RFID tags are known for their durability, durability, and maintenance-free. As most people's families have reached a well-off level, they are eager for more convenient and trouble-free home appliances. Although this system is only a prototype, it is moderately priced and uses more cutting-edge technology. It is more trouble-free than traditional refrigerators, providing convenience for the busy lives of urban people and solving many trivial matters in life. It will be accepted by most people when it is put on the market.
1 System overall design
1.1 System Overall Plan
According to the functions and technical requirements of the smart refrigerator terminal, it is decided to adopt the "hardware + software" system structure to design the smart refrigerator terminal. The application layer is written based on the OS according to the different needs of the project. Each part is briefly introduced as follows:
The system uses a hardware development platform based on Intel Xscale PXA270, which is an ARM processor based on Intel XScale architecture.
The embedded operating system is Windows CE 5.0. Windows CE is a highly modular embedded operating system. Users can customize and tailor it according to their own equipment requirements through the Platform Builder tool.
Application framework: qt-embedded-wince-opensource4.6 has a rich standard library, dynamic engine, widget style sheet, powerful graphics drawing and multi-threading capabilities; it achieves high performance and small footprint on Windows CE.
This system is a household appliance that can query and access food at any time through the Internet. Users can learn about refrigerator food information through text messages and decide whether to buy online. The overall system scheme diagram 1 is as follows.
1.2 System Module
According to the design plan, we divide the entire system into three main modules, as shown in Figure 2.
1.3 Module Function Detailed Description
(1) Food status module.
(2) Online shopping module.
(3) Recipe module.
2. Hardware Design
[page]
2.1 RFID reader/writer, antenna module
ISO18000-6C I series reader is a new generation of long-distance electronic tag reader developed by Shenzhen Xinshi Technology Co., Ltd. The tags supported by the reader are mainly passive electronic tags that comply with ISO18000-6C (hereinafter referred to as "6C") protocol. Users can use this reader to read, write, lock and other functions on 6C electronic tags. The reader has three working modes of reading electronic tags: master-slave, timing and trigger. The communication interface connecting the host and the controller has RS-232, RS-485 and Wiegand interface. It can be directly connected to the control device with standard Wiegand W26 or W34 interface, or connected to the controller or PC through the standard communication interface for data communication and exchange; there are also four trigger signal input interfaces. When the pressure sensor detects that the pressure in the refrigerator changes, the corresponding function is triggered to make the reader scan the food label in the refrigerator. At the same time, this module provides reading and writing multiple tags at a time, which is suitable for the design of this project.
2.2 GPRS/GSM module
This module uses DU600 from Hongpeng Electronics Co., Ltd. It supports multiple connection modes and can realize the basic functions of mobile phone communication. The GPRS module of the smart refrigerator only needs to send and receive SMS and interpret the received SMS information. It only needs DU600 to select the wake-up mode to wait for the SMS to be received and can send the control command to PXA270 through the command obtained after interpreting the SMS to realize the purchase function and query function.
2.3 Pressure sensor module
Through the 89C51 single-chip microcomputer, the LCD module, serial port module and 24-bit ADC module are integrated. This module is mainly responsible for sensing the change of pressure and transmitting the interrupt signal to the central control platform through the serial port.
The pressure sensor HX711 uses HiSilicon's patented integrated circuit technology and is a 24-bit A/D converter chip designed for high-precision electronic scales. When the pressure sensor changes, it will send a signal to the core board to indicate that there is a change in the refrigerator and start RFID scanning.
2.4 Temperature Control Module
This module is a refrigeration control system based on a single-chip microcomputer, with real-time temperature display and adjustable refrigeration temperature, as low as minus 10 degrees.
The temperature sensor of this module uses DS18B20. According to the communication protocol of DS18B20, the host (single-chip microcomputer) must go through three steps to control DS18B20 to complete temperature conversion: reset the DS18B20 before each reading and writing, send a ROM instruction after the reset is successful, and finally send a RAM instruction, so that the DS18B20 can perform the predetermined operation. Reset requires the main CPU to pull down the data line for 500 microseconds and then release it. When DS18B20 receives the signal, it waits for about 16 to 60 microseconds, and then sends a 60 to 240 microsecond low pulse. The main CPU receives this signal to indicate that the reset is successful. At the same time, this module uses a semiconductor refrigeration chip to simulate the refrigerator preservation function.
3 Software Design
3.1 System Software Block Diagram
The software block diagram of the smart refrigerator based on Windows CE 5.0 is shown in Figure 6.
[page]
3.2 Application Development
(1) RFID implementation process.
Use the ReadID function in the RFID API to read the RFID card in the refrigerator, and read the RFID card multiple times in succession. During the reading process, use the anti-collision algorithm to exclude the same RFID card information read, and then save the obtained RFID card information in the data structure so that the data structure can be used to check the database information later. After the reading is completed, disconnect the RFID connection and start comparing the information with the database.
Here we use the widely used binary tree anti-collision algorithm. When exchanging data between the reader and the transponder, part or all of the serial number bits are often transmitted. The transmission order at this time is defined as: send the low bit first, then the high bit. When comparing data inside the reader or transponder, the following principle is followed, that is, compare the bits in sequence, compare the low bit first, then the high bit, and agree that 0<1. According to this comparison order, when judging the size, the low-bit data takes precedence, that is, when comparing two numbers A and B, the size of the first unequal bit starting from the low bit determines the size of the two numbers. Only when all the bits of the two numbers are equal, the two numbers are equal. During the execution of the binary tree algorithm, the reader will send multiple commands to the transponder to divide the transponder into two groups and obtain a unique transponder after multiple groupings. In addition, during this grouping process, the command parameters are stored in the form of nodes to form a data bifurcation tree, thus forming a "binary tree". The binary tree anti-collision algorithm of the smart refrigerator is compared in the transponder. Because there can be multiple readers, and the data read by the reader is finally sent to the transponder, the transponder is selected as the place to burn the anti-collision algorithm. In this way, the tag data can be transmitted to the main control platform PXA270 after the transponder receives the tag read by the reader and excludes the same.
(2) GPRS implementation process
When the shopping list is received after database comparison, the GPRS program written in C++ code is run through QT. First, the information data to be sent to the customer is obtained from QT, and then OnBnClickedBtnOpen () is used to configure the RS-232 serial port connection to configure GPRS, and wait for the GPRS connection to succeed.
When the connection is successful, GPRS will return "AT+OPENAT=MODE:3#" data to confirm the connection is successful. Then send the message to GPRS through the OnBnClicked -BtnSend (string) function, and then GPRS will send it to the customer's mobile phone according to the content of the message. After the message is sent successfully, GPRS will wait for 5 minutes for the customer to send a reply to confirm the purchase.
If the customer does not reply to confirm the purchase within 5 minutes, the purchase of food will be automatically canceled and the GPRS connection will be disconnected; if the customer replies to confirm the purchase within 5 minutes, the program will return a purchase confirmation message and disconnect the GPRS connection.
(3) Pressure sensor implementation process
When the refrigerator is opened, PXA270 powers on the pressure sensor. The pressure sensor will record the initial gravity when it works for the first time. When the refrigerator is closed, the gravity of the pressure sensor is measured and compared with the initial gravity to see if it has changed. If it has not changed, the pressure sensor is turned off and the pressure sensor ID reader is disconnected.
(4) Temperature control process
Due to the problem of PXA270 external socket, the temperature sensor is based on the microcontroller operation and does not need to be embedded in the PAX270 development board. The temperature sensor will start with the start of the refrigerator. When the data measured by the temperature sensor is sent to the microcontroller, the microcontroller will first compare the temperature in the refrigerator with the set refrigerator temperature. If it is higher than the refrigerator temperature, the refrigeration device will be turned on. During the refrigeration period, the refrigerator temperature is continuously measured and compared with the set refrigerator temperature value; if it is less than or equal to the set refrigerator temperature value, the refrigeration device is turned off. The microcontroller continues to receive the refrigerator temperature transmitted from the temperature sensor and compares the set refrigerator temperature value to prepare to start refrigeration at any time to maintain the refrigerator temperature. When the refrigerator is powered off, the microcontroller will stop running and directly turn on the refrigerator again after power is turned on and initialize the microcontroller from the beginning.
[page]
(5) Online shopping process
In this process, we specified the Internet of Things supermarket website that the refrigerator can directly access for docking. Therefore, in this project, we built a shopping website (ASP) in order to interact with this type of product. By calling the system's own header file
In addition, users need to log in to the shopping website to place an order. Here, we assume that each smart refrigerator is equipped with a dedicated account to bind the login and submit the page through POST. When the refrigerator logs in successfully, you can purchase goods and place an order.
(6) Database implementation
Through SQLite, the refrigerator stores various information about food for easy search.
NowTab1 stores the food table of the last refrigerator, which is convenient for comparing the changes with the data read by RFID this time, and appropriately deleting or adding NowTab1 data for the next comparison, and can also display the food in the refrigerator.
HistoryTab3 saves the food that has been stored in the refrigerator so that customers can find the food they have bought.
SureTab2 stores the food table of the basic needs of the refrigerator. This table is used to confirm that if the food in the NowTab1 table is missing a certain amount, it will be compared with SureTab2. If a certain food is missing beyond the limit, the shopping program will be started and the missing food will be purchased to prevent the refrigerator from running out of food.
NameTab4 stores the name corresponding to the number. NameTab4 is used to easily obtain the name of the food from the information read by the RFID.
If the name cannot be found, it can be found through the numbering network and added to the AddrTab5 table for later search.
AddrTab5 can get the address name according to the address number. AddrTab5 is to facilitate the production address of the food from the information read by RFID. If the address cannot be found, the address can be found online through the address number and added to the AddrTab5 table for later search.
You can first list the ingredients and recipes that can be cooked in the refrigerator according to Cookbook5. Cookbook5 is a recipe stored in the database, which makes it easy to find recipes that can be cooked from the existing ingredients in the refrigerator. Cookbook5 can download recipes from the Internet and save them in the database.
You can get recommended recipes through RDCookbook6. RDCookbook6 lists the most likely recipes to be cooked based on the ingredients currently in the refrigerator and the recipes in Cookbook5.
(7) GUI interface design
The GUI of this system is implemented using QTE.
1. Brief design overview A groupBox control is placed on the left side of the main interface, and four pushBottons are added to it, which represent: main interface, food status, online shopping and recipe recommendation. A stackedWidget control is placed on the right side of the main interface, and a total of five pages are added to realize the display of different functional modules. The buttons are connected through signals and slots to realize the jump of the corresponding functional interface.
2. Main design implementation methods.
Hide title bar
his->setWindowFlags(Qt::FramelessWindowHint);
this->setWindowModality(Qt::ApplicationModal);
Calendar display
//Display date
curFile=QDateTime::currentDateTime(). toString("dd");
ui->label_9->setStyleSheet("font-size:30px");
ui->label_9->setText(curFile);
//Display year and month
curFileyear=QDateTime::currentDateTime(). toString("2011-MM");
ui->label_8->setStyleSheet("font-size:18px");
ui->label_8->setText(curFileyear);
Dynamic update time.
QTimer *timer=new QTimer();
connect(timer,SIGNAL(timeout()),this,SLOT(timerUpDate()));
timer->start(1000);
void icebox::timerUpDate()
{
curFiletime=QDateTime::currentDateTime(). toString("hh:mm:ss");
ui->label_7->setText(curFiletime);
}
4 Conclusion
RFID refrigerators can take advantage of radio frequency identification technology, provide protection for the healthy life of modern families, reduce the waste of social resources, conform to the concept of green environmental protection in contemporary society, and can be applied to smart homes. However, at present, supermarket products have not yet used RFID tags, so every food needs to be labeled, which will be a cumbersome process, and the label cost may exceed the food itself. This is a problem encountered in the practical use of smart refrigerators. However, with the popularization of supermarket logistics RFID technology and the further decline of label prices, smart refrigerators will inevitably enter every household and become the protagonist of smart homes.
Previous article:Design of ECG Monitor Based on Linux and MiniGUI
Next article:Design of CAN bus based on AT90CAN128
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- 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
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Download from the Internet--ARM Getting Started Notes
- Learn ARM development(22)
- Learn ARM development(21)
- Learn ARM development(20)
- Learn ARM development(19)
- Learn ARM development(14)
- Learn ARM development(15)
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Comprehensive electrical skills from entry level to mastery
- Linux serial communication 1——96-N-8-1 format
- [STM32WB55 Review] Summary
- 1000 posts, commemorating
- This is a circuit for detecting the grid voltage. I would like to ask how the differential circuit works.
- BMP library management based on FPGA.pdf
- [RISC-V MCU CH32V103 Review] SPI Test
- I need help with the simplest program to control 12864 with keys
- TUSB9261 -- USB3.0 to SATA interface bridge chip programming guide
- 【ST NUCLEO-H743ZI Review】1. Unboxing