There are many kinds of edible oils, and the detection methods of different types of edible oils are not the same. Taking peanut oil quality detection as an example, it can be seen from the special physical properties of peanut oil that peanut oil begins to crystallize at 0-5℃[1,2]. Other types of edible oils do not crystallize at this temperature. Using this special physical property, the absorbance of peanut oil is measured under the condition of its crystallization state. The crystallinity information of peanut oil at different temperatures is different, so a constant temperature environment is required to ensure the measurement accuracy. This paper gives a design scheme of a portable chemical reagent-free and environmentally friendly peanut oil quality rapid detector based on ARM+FPGA.
1 Instrument working principle and scheme design
The edible oil quality on-site rapid detector uses a signal acquisition module to detect the absorbance of the sample oil. Because the absorbance is related to the material composition of the sample oil, the purity of the sample oil can be understood through the absorbance.
1.1 Working principle
Through the fuzzy PID calculation of the ARM processor, the FPGA is adjusted to generate a pulse width modulation signal PWM with adjustable duty cycle, and the thermoelectric cooler is driven to achieve constant temperature control. The working principle of the instrument is shown in Figure 1. The signal acquisition module is composed of a monochromatic LED light source and a light-frequency converter TSL230B. TSL230B outputs pulse signals (or square wave signals) with different frequencies according to the intensity of the transmitted light. Because the intensity of the transmitted light is related to the absorbance, the FPGA reads the frequency of the different pulse signals input into the signal acquisition module to obtain the absorbance information. The FPGA then transmits the absorbance information to the ARM controller for data processing, calculates the purity information of the peanut oil sample and displays it on the display.
1.2 Design
ARM controller has the characteristics of strong information processing capability and high integration. Now many intelligent instruments are based on ARM as the core control system. However, with the development of detection technology, the functions of intelligent instruments are increasing, and the information of control process design is also increasing. The control system based on ARM can no longer fully meet the requirements. FPGA contains a large number of resources for implementing combinational logic, which can complete the design of large-scale combinational logic circuits. At the same time, it also contains a considerable number of triggers. With the help of these triggers, FPGA can also complete complex timing logic functions [11]. The integrated design of ARM and FPGA has the following advantages:
(1) It can greatly reduce the use of external devices.
(2) It can be applied to various occasions, such as process control.
(3) There are many control objects. Using one ARM chip and one FPGA chip makes the system structure simple and flexible.
(4) The whole system design can be made functionally clear, compact in structure, and easy to control in timing.
According to the functions required by the system, the overall framework diagram of the structure is designed, as shown in Figure 2. The control information is sent through the keyboard keys. The detection needs to be completed under a constant temperature, so a constant temperature device (consisting of a thermoelectric cooler and a temperature sensor DS18B20) is needed to provide a stable detection environment. The light source is a red LED lamp. The red light is irradiated on the cuvette containing edible oil. A photoelectric detection module (optical frequency converter TSL230B) is placed in the transmission direction of the light. The data of the photoelectric detection module is transmitted to the CPU (consisting of an ARM chip + FPGA chip), and then sent to the LCD display after data processing.
2 System Function Module Division
In the integrated design of ARM and FPGA, it is necessary to divide their functions systematically and reasonably. The principle of division is task-oriented. In this system design, ARM is the core device, using 16-bit data communication, and FPGA is the expansion device and coprocessor of ARM.
From the working principle of the system, it can be seen that according to the system task requirements, the functional division of the entire system is shown in Figure 3.
The functions of the ARM functional modules are as follows:
(1) UART0: connected to the RS232 serial interface, connected to the dedicated measurement and control software on the computer, and communicate data with each other.
(2) Communication module 0: Serial data communication with FPGA, sending control instructions and data to FPGA, and receiving data sent by FPGA.
(3) I/O: connected to the LCD display to display output information; connected to the keyboard keys to send control signals to the system; connected to external digital signals, this system reads the data of the temperature sensor DS18B20.
The functions of the FPGA functional modules are as follows:
(1) Communication module 2: Serial data communication with ARM, receiving control instructions and data sent by ARM, and sending data to ARM.
(2) General logic: realize memory control function.
(3) PWM: realize PWM output with adjustable duty cycle.
(4) Counter: detect external pulse frequency or square wave frequency.
(5) Communication module 1: connected to the RS232 serial communication interface, connected to some external devices for data communication.
(6) Other extensions: used for the expansion of some spare functions. When some functions need to be added, they can be realized without changing the hardware.
3 Circuit Design
3.1 Main Control Core Circuit Design
ARM chip S3C44B0X and FPGA chip EP2C5T114C8 are the core devices of the system. Due to different clock frequencies, asynchronous serial data communication is used between them.
3.2 Power Supply Circuit Design
In the entire system design, the power requirements of each part of the system are different. Power supply design is very important, involving three aspects: power distribution scheme selection, power management and monitoring, and power consumption. In the entire system, the ARM and FPGA voltage configurations are shown in Table 1. The voltages that the system needs to convert are 5 V, 3.3 V, 2.5 V and 1.2 V.
The voltage conversion chips used are AMS1117-5, AMS1117-3.3, AMS1117-2.5 and AMS1117-1.2.
In this system, the voltage conversion chip AMS1117-5 is first used to convert the 9 V voltage of the external DC power supply into a 5 V DC voltage. The voltage conversion circuit is shown in Figure 4(a). Then, the voltage conversion chips AMS1117-3.3, AMS1117-2.5 and AMS1117-1.2 are used to convert the 5 V DC voltage into 3.3 V, 2.5 V and 1.2 V DC voltages. The conversion circuit is shown in Figure 4(b).
3.3 Download configuration circuit design
The JTAG interface supported by S3C44B0X download configuration is 4-wire: TMS, TCK, TDI, TDO. TCK is the test clock input; TDI is the test data input, and the data is input into the JTAG interface through the TDI pin; TDO is the test data output, and the data is output from the JTAG interface through the TDO pin; TMS is the test mode selection, which is used to set the JTAG interface to a specific test mode; nTRST is the test reset, and the input pin is valid at low level [4], as shown in Figure 5 (a).
EP2C5T144C8 supports JTAG interface and active serial ASP interface to download configuration. In the specific design, the program can be debugged by JTAG first. When the program is debugged correctly, the program can be fixed to the configuration chip by active serial ASP. As shown in Figure 5 (b), JTAG is the download socket; E1 is the configuration chip EPCSISI8; ASP is the active serial ASP download socket for fixing the program to the configuration chip.
3.4 Storage system circuit design
The storage system of S3C44B0X has the following main features: The maximum addressing space supported by the ARM architecture is 4 GB (232 B). The ARM architecture regards the memory as a linear combination of bytes starting from the zero address. The first stored word data is placed from the zero byte to the third byte, and the second stored word data is placed from the fourth byte to the seventh byte, arranged in sequence; there are 8 storage banks, and the access size can be changed (8 bit/16 bit/32 bit). Each storage bank can reach 32 MB, and a total of 256 MB, Bank0~Bank5 can support ROM, SRAM memory, Bank6~Bank7 can support ROM, SRAM and FP/ED0/SDRAM memory; there are two ways to store word data: little endian format and big endian format, and the storage mode can be selected through external pins. In the little endian storage format, the low byte of the word data is stored in the low address, and the high byte of the word data is stored in the high address. In the big endian format, the high byte of the word data is stored in the low address, and the low byte of the word data is stored in the high address [4]. The Flash and SDRAM memory circuits are shown in Figure 6.
3.5 Button Circuit Design
The control button uses 4 buttons (temperature control, range control, detection, and display). The button interface circuit is shown in Figure 7. The 4 interfaces used correspond to the interrupt interfaces ExINT4, ExINT5, ExINT6, and ExINT7 of S3C44B0X. As can be seen from the circuit diagram, the interrupt interface is connected to VDD through a pull-up resistor. VDD is a +3.3 V voltage and always maintains a high level. When a button is pressed, it is directly grounded and set to a low level to trigger an interrupt. The reset circuit is shown in Figure 8.
3.6 LCD Circuit Design
The built-in LCD controller of S3C44B0X is highly versatile and supports monochrome, grayscale, and color LCD screens. It can support different LCD displays through programming. The screen size, level polarity, interface timing, data line width, and refresh frequency can be set through the relevant control words inside the processor. It supports many STN (supertwisted nematic) LCD displays of different specifications and working modes. It also supports 4-bit dual scan, 4-bit single scan, and 8-bit single scan display modes [4]. Figure 9 shows the external interface circuit of the LCD display, which can be connected to the LCD display through the data line.
4 PCB Design
The system uses a large number of chips, and the number of pins of S3C44B0X, EP2C5T144C8, SST39VF160, and K4S641632 chips is large. Considering the size of the board and the processing cost, some chip electronic components are placed on the back of the circuit board. The system adopts a 4-layer PCB design. According to the PCB design rules, the power line and the ground line should be thickened to reduce the system loop resistance, the decoupling capacitor should be directly connected to the power supply as much as possible, and the digital circuit and analog circuit layout should be separated as much as possible to reduce system interference, etc., to improve the working stability of the electronic circuit [7].
The design scheme of edible peanut oil rapid detector is proposed, and the quality of peanut oil is detected by absorption photometry. This detection method is different from the traditional chemical reagent detection method, making the instrument easy to use and does not require professional personnel to operate, which is conducive to the promotion and use of the instrument. Using ARM and FPGA integrated design, the control function of the ARM chip combined with the flexible multi-hardware interface simulation characteristics of FPGA makes task processing more flexible and efficient, making the instrument circuit structure simple and low-cost.
References
[1] Yang Xin. Research on peanut oil quality detector [D]. Changchun: Jilin University, 2006.
[2] Sun Yuqiu, Chen Boshui, Zeng Guang, et al. Research on low temperature energy of peanut oil and biodiesel [J]. Internal Combustion Engine, 2008 (3): 50-51.
[3] Liao Yikui. Integration and application of ARM and FPGA [M]. Beijing: China Electric Power Press, 2008.
[4] Hangzhou Litai Electronics. S3C44B0 Chinese data manual, 2004.
[5] Feng Zhigui, Wu Mingzan, Chen Xiaoning, et al. Design of radar servo controller based on ARM and FPGA [J]. World Science and Technology Research and Development, 2008, 30 (6): 746-750.
[6] Yang Xin, Yao Haiyan. Design of peanut oil quality detector [J]. Science and Technology of Western China, 2008, 7 (29): 52-54.
[7] Ni Zefeng, Jiang Zhonghua. Circuit board design and board making Protel Typical Examples of DXP[M]. Beijing: Posts and Telecommunications Press, 2003.
Previous article:A brief discussion on abnormal mechanism
Next article:Image acquisition solution based on TMS320C6x11 series DSP
Recommended ReadingLatest update time:2024-11-16 21:27
- Popular Resources
- Popular amplifiers
- Analysis and Implementation of MAC Protocol for Wireless Sensor Networks (by Yang Zhijun, Xie Xianjie, and Ding Hongwei)
- MATLAB and FPGA implementation of wireless communication
- Intelligent computing systems (Chen Yunji, Li Ling, Li Wei, Guo Qi, Du Zidong)
- Summary of non-synthesizable statements in FPGA
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- CGD and Qorvo to jointly revolutionize motor control solutions
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Nidec Intelligent Motion is the first to launch an electric clutch ECU for two-wheeled vehicles
- Bosch and Tsinghua University renew cooperation agreement on artificial intelligence research to jointly promote the development of artificial intelligence in the industrial field
- GigaDevice unveils new MCU products, deeply unlocking industrial application scenarios with diversified products and solutions
- Advantech: Investing in Edge AI Innovation to Drive an Intelligent Future
- CGD and QORVO will revolutionize motor control solutions
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- CAN communication design, please help
- How to make component packages with multiple pins connected internally in Allegro
- Has anyone used ads7844?
- 【Home Smart Dashboard】Using ESP-WHO to implement face detection
- How to choose external memory for DSP?
- Plastic turnover box as fish pond filter box
- OFDM—The technical core of the fourth generation of wireless communication (transferred)
- 【Gravity:AS7341 Review】+ Choice of driver development board
- Get WiFi authentication method from 802.11 data frame
- CPU card programming system main frequency setting