Capacitive two-dimensional cigarette box missing detection system

Publisher:平静心境Latest update time:2012-02-05 Source: 21ic Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
In cigarette production, when packing cigarettes, the packing and packing machine does not work properly when the production flow of cigarettes is large or the incoming materials are insufficient, and cigarette boxes often have missing cigarettes. In order to effectively identify missing cigarettes, many cigarette factories are equipped with missing cigarette detection devices on the production line. At present, the missing cigarette detection methods include X-ray detection method, weighing method, capacitance detection method, etc. These methods can detect missing cigarettes. But they all have shortcomings. Due to different tobacco moisture content, even the same brand of cigarette boxes have a weight change range of 2% to 3%. There are 50 cigarettes in a box, and the weight reduction caused by missing one is 2%, which is within the normal value range of cigarette box weight change. Therefore, the weighing method cannot obtain reliable detection results. The X-ray detection method has high detection reliability, complex system, and potential threats to human safety. The use and management costs are high. The capacitance detection method has a simple structure and low cost, but the one-dimensional capacitance array is used for detection, which is not reliable and cannot analyze the missing position. The capacitive two-dimensional cigarette box missing detection device proposed in this paper can not only reliably detect the missing cigarettes in the box, but also locate the missing cigarettes. It has a simple structure, low cost, energy saving, environmental protection, safety and reliability.

1 System composition and implementation

1.1 System test principle

As shown in Figure 1, the cigarette box adopts a 5x5x2 structure to arrange the cigarettes. A pair of parallel plates are set at both ends of every 5 cigarettes, which constitutes 10 pairs of flat plate capacitors. The capacitance is:
C=ε·s/d (1)
where ε is the dielectric constant of the medium between the plates, s is the relative effective area of ​​the two plates of the flat plate capacitor, and d is the distance between the plates. It can be seen from formula (1) that as long as any value of ε, s, and d is changed, the capacitance value C will change. Since the dielectric constants of cigarettes and air are very different, when there is a missing cigarette in the cigarette box, the dielectric constant of the corresponding position will change, and the corresponding row capacitance sensor and column capacitance sensor values ​​will change. By calculating and comparing the two-dimensional capacitance value with the standard value, the missing cigarette box can be detected.


In actual measurement, due to the large size of the cigarette box, the effective distance between the plate capacitors is large, and the measured capacitance value is very small, only a few pico-farads. After comparison, the self-designed micro-capacitance detection circuit has large noise, low accuracy, and low resolution, and cannot guarantee the reliability of measurement. The high-precision capacitance/digital conversion chip AD7746 from AD Company is a 24-bit digital output capacitance value measurement chip. AD7746 is a high-resolution ∑-△ type capacitance digital converter (CDC). The measured capacitance can be directly connected to the input end of the device. Its resolution is up to 24-bit distortion-free code, 21 most significant bits, linearity is ±0.01%, and accuracy is up to ±4pF (factory calibration). The sampling frequency/passband is 10Hz to 90Hz, with an I2C-compatible serial interface, and can work under a single power supply of 2.7 to 5.25V. The working environment temperature range is from -40 to +125℃.

In Figure 1, the design of the plate uses an insulating ceramic coated on the PCB board to reduce the edge parasitic capacitance of the plate capacitor and ensure mechanical strength. The connection between the plate and AD7746 uses SMA shielded wire to reduce parasitic capacitance and improve anti-interference ability.

1.2 Host computer system structure

The host computer software is programmed using LabVIEW2009. LabVIEW is a typical representative of graphical programming languages. The characteristics of graphical programming languages ​​are based on standard software and hardware resource platforms such as general-purpose computers to build a test monitoring system with clear hierarchy, powerful functions and friendly human-computer interface. Therefore, it has been increasingly widely used in the field of measurement and control. The host computer mainly monitors the received data to ensure the normal operation of the system and saves important data in a timely manner.

The host computer uses the LabVIEW development platform to design a cigarette box missing strip management system. The host computer communicates with the main controller through RS232 to RS485, and notifies the lower computer to collect data and record missing strip information through the host computer parameter settings.

The upper computer system mainly completes the following tasks:
1) Set parameters for the lower computer device of cigarette box detection and control sampling;
2) Collect real-time data of cigarette boxes on the production line;
3) Automatically generate various real-time and historical production reports;
4) Link to the database to save historical data and query missing information;
5) Display the missing bar position pattern for the missing bar cigarette box, alarm and send a rejection control signal to the rejection device;
6) Self-learn the data reflected on 10 sets of capacitor plates for normal cigarette boxes and cigarette boxes with missing bars in different positions, and cooperate with human intervention to improve detection accuracy.


As shown in Figure 2, the upper computer cigarette box missing strip management platform system mainly includes 6 modules, including serial communication, parameter setting, system alarm, data storage, report output, and rejection signal output. LabVIEW is used to establish a subVI for serial communication with the lower computer to process the received data and determine whether a strip is missing. When a strip is missing, in addition to generating a rejection control signal and an alarm, the upper computer also stores the missing strip information in the database to facilitate future inquiries by operators. Figure 3 is a front panel diagram of the parameter setting of the cigarette box missing strip management platform.


1.3 Lower computer system structure

The entire lower computer system is shown in Figure 4. The microcontroller uses the Flash microcontroller with the Philips 51MX core, the master microcontroller uses P89C51RD2, the slave microcontroller uses P89C669, the host and slave use SPI communication, and the slave and microcapacitor digital conversion chip AD7746 use I2C communication.


PHILIPS' 51MX core Flash microcontroller adopts the enhanced 80C51 core with a maximum speed of 40 MHz; Flash code memory capacity ranges from 4 to 96 kB; on-chip extended RAM: 256 B to 8 kB; supports 6-Clock mode, doubling the speed at the same clock, or achieving lower power consumption and reduced EMI at the same speed; dual DPTR, effectively speeding up throughput; 4 interrupt priorities to better meet real-time requirements; 3 timers/counters, supporting PWM and PCA functions, timer overflow can automatically trigger I/O flipping, interrupt-free processing; built-in watchdog and software reset functions; support ISP/IAP/ICP download; ALE disabled (to reduce EMI); support power-off wake-up function (low-power application); high-reliability OTP memory, used in various harsh occasions; with CAN, I2C, SPI, ADC and other functional modules.

The whole system workflow, before using the detection system for the first time, the management personnel need to log in to the upper computer management platform to collect the standard capacitance value of the box of cigarettes without missing strips and the corresponding capacitance characteristic value when missing strips appear at different positions, and measure them multiple times to obtain the average value to reduce the acquisition error; then send these data to the main microcontroller, and the main microcontroller stores them in the foot ROM memory as parameters for judging whether the box of cigarettes is missing strips.

When the system is working, when the cigarette box just enters the detection area, the initial position detection switch will output a signal to the main microcontroller to start the system, and the main microcontroller will notify each slave through the SPI port in turn to complete the initialization of AD7746 and wait for data collection. When the front half of the cigarette box completely enters the detection area, the front half box position detection switch will output a signal to the main microcontroller, and the main microcontroller will output a signal to the stepper motor, and the actuator will block the cigarette box from moving forward, and the slave will immediately collect data; after the collection is completed, the data will be sent to the main microcontroller in turn. When the second half of the cigarette box enters the detection area, the data of the second half of the box will be collected. After the data collection is completed, the main microcontroller will use the algorithm to calculate and determine whether the cigarette box is missing strips. If a missing carton box is detected, a signal is sent to the actuator to reject the carton, and the missing carton position information is uploaded to the host computer. The missing carton judgment and rejection signal output can also be completed by the host computer to provide a more flexible and reliable missing carton judgment algorithm.

1.4 Design of the capacitance data acquisition unit circuit

The circuit design schematic is shown in Figure 5. The plate on one side of the capacitance sensor is connected to the EXCA terminal of AD7746 through the SMA shielded wire, and the plate on the other side is connected to the CINl+ terminal to realize the sampling of the capacitance. Due to the different ambient temperatures, the AD7746 needs to be temperature compensated, and RTD is selected to connect to the VIN- and VIN+ ends; the SCL and SDA of the AD7746 are respectively connected to the P1.6 and P1.7 ports of the slave microcontroller P89C669; the P1.6 and P1.7 ports can be configured as I2C digital interfaces, and the /RDY of the AD7746 is connected to the P3.2 (/INT0) port of the microcontroller. When the data conversion is completed, the microcontroller enters the interrupt service subroutine to process the data, thereby realizing the control of the AD7746.



2 Measurement results

Figure 6 shows the measurement values ​​of the 10 capacitive sensors in the 5x5 cigarette box when there is no missing cigarette bar and when there is a missing cigarette bar at different positions. ABCDE corresponds to the measurement values ​​of 5 column positions, and 12345 corresponds to the measurement values ​​of 5 row positions. The data with gray shading is the two-dimensional change data when the cigarette bar is missing at the corresponding position. It can be seen from the figure that when there is a missing cigarette bar, the corresponding row data and column data will change significantly. The column data change amplitude (0.15~0.21pF) is much larger than the column measurement error of 0.03pF, and the resolution reaches 23%. The row data change amplitude (0.009~0.013pF) is much larger than the row measurement error of 0.002pF. Therefore, through two-dimensional data detection, the system can reliably identify the missing cigarette bar and determine the missing position.



3 Conclusion

The cigarette box missing carton detection system based on the two-dimensional capacitive sensor array has a simple structure, can determine the missing cigarette carton position, and display the missing carton pattern, which greatly improves the reliability of the detection. At the same time, it is low-cost and does not pose a radiation hazard. It is suitable for fields such as cigarette production quality control or tobacco logistics monitoring. It effectively prevents missing carton cigarette boxes from entering the market, causing unnecessary economic and legal disputes between cigarette manufacturers, distributors and consumers, and even seriously affecting the reputation of enterprises. It has broad application prospects.

Reference address:Capacitive two-dimensional cigarette box missing detection system

Previous article:Introduction to the application of magnetic components in set-top box power supply
Next article:Research on the Neutral-Ground Voltage Problem in Data Centers

Latest Power Management 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号