Design of edible peanut oil quality rapid detection instrument based on ARM+FPGA

Publisher:数据旅人Latest update time:2011-11-24 Source: 电子产品世界Keywords:FPGA Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.

Keywords:FPGA Reference address:Design of edible peanut oil quality rapid detection instrument based on ARM+FPGA

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

Research and Application of FPGA Parallel Digital Serial Transmission and Interface Technology
1 Introduction After more than ten years of rapid development at home and abroad with hardware, system and application design as the main content, the development of FPGA technology in modern information processing and control technology has begun to rise. Obviously, a series of modern info
[Embedded]
Research and Application of FPGA Parallel Digital Serial Transmission and Interface Technology
Design and implementation of a solar tracker based on FPGA
0 Introduction Solar energy is a clean, pollution-free energy source that is inexhaustible and has broad development prospects. However, solar energy is intermittent and has uncertain intensity and direction, which makes it difficult to collect solar energy. The use of a solar tracking device can keep the s
[Embedded]
Design and implementation of a solar tracker based on FPGA
Application of Embedded Logic Analyzer in FPGA Timing Matching Design
introduction As FPGA devices continue to grow in size and packaging density, the use of traditional logic analyzers in FPGA board-level debugging is becoming increasingly difficult. To this end, mainstream FPGA manufacturers have added embedded logic analyzer (ELA) IP soft cores t
[Test Measurement]
Design of a simple digital storage oscilloscope based on single chip microcomputer and FPGA
1 Introduction   Compared with traditional analog oscilloscopes, digital storage oscilloscopes not only have the advantages of waveform storage, small size, low power consumption, and easy use, but also have powerful real-time signal processing and analysis functions. In the field of electronic measurement, digital st
[Test Measurement]
Design of a simple digital storage oscilloscope based on single chip microcomputer and FPGA
Design and implementation of remote monitoring system based on FPGA+DSP
  The purpose and main research content of the project   Research purposes   In order to remotely manage equipment and monitor the environment on site, simplify on-site monitoring equipment, and effectively improve the stability and security of the entire system, a remote controller is planned to be developed, referre
[Embedded]
Design and implementation of remote monitoring system based on FPGA+DSP
Design and verification of logic chip function test system using FPGA chip
In the most primitive testing process, the testing of integrated circuits (ICs) relied on experienced testers using instruments such as signal generators, multimeters, and oscilloscopes. This testing method has low testing efficiency and cannot achieve large-scale and large-volume testing. With the continuous increase
[Test Measurement]
Design and verification of logic chip function test system using FPGA chip
Design of a Simple Digital Storage Oscilloscope Based on FPGA
0 Introduction The development of high-speed digital acquisition technology and FPGA technology has had a profound impact on traditional test instruments. Digital storage oscilloscope (DSO) is a comprehensive product of analog oscilloscope technology, digital measurement technology, and computer technology. It is ma
[Test Measurement]
Design of a Simple Digital Storage Oscilloscope Based on FPGA
Strengthening the collaborative ecosystem: SoC FPGA becomes a powerful weapon
Altera intends to gradually strengthen FPGA co-processors through more advanced process technology and closer industry cooperation, significantly improve the overall performance of SoC FPGA, and create greater differentiation advantages for seizing the embedded system market. As the penetration rate of SoC FPGA in the
[Analog Electronics]
Strengthening the collaborative ecosystem: SoC FPGA becomes a powerful weapon
Latest Industrial Control 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号