1. Introduction
When purchasing seed cotton, rapeseed and grain, it is usually necessary to test their moisture content or regain to assess their grade. There are two ways to measure moisture content: the oven method and the impedance method. Although the oven method has good accuracy, it is time-consuming and not suitable for real-time measurement. The seed cotton, rapeseed and grain moisture comprehensive tester introduced in this article uses the method of measuring impedance or conductivity to obtain the moisture content of the object being measured. That is, two electrodes with a fixed distance are inserted into the object being measured, and the impedance between the two electrodes is converted into voltage. Then the moisture content of the object being measured can be obtained by looking up the table, and the result is displayed on the LCD screen after a series of processing such as temperature compensation. The seed cotton, rapeseed and grain moisture comprehensive tester uses HMS87C1408B as the main control chip, external impedance converter and voice circuit , which can test the moisture or regain of seed cotton, rapeseed and grain (including rice, corn, wheat) in real time, and provide full voice prompts and voice reporting.
2 Features of HMS87C1408B
The main parameters and performance of HMS87C1408B are as follows:
8KB OTPROM, 192 bytes on-chip RAM (including stack);
At 8 MHz, the instruction cycle is O.25 μs;
Working voltage 2.5 V ~ 5.5 V;
8-bit bidirectional multifunctional I/O port, can directly drive LED;
8-channel 8-bit A/D converter ;
1 8-bit time interval timer;
4 8-bit timer/counters;
2 10-bit high-speed PWM ;
Watchdog timer;
1 8-bit SPI serial interface;
12 interrupt sources;
1 programmable buzzer drive port;
Support power saving mode ST OP ;
Optional RC oscillator.
The four timers/counters of HMS87C1408B can not only be used as four 8-bit timers/counters, but also can be made to work in seven other timing modes by setting the relevant bits of the timing mode registers TM0, TM1, TM2, and TM3. For T0 and T1, there are:
8-bit counter and 8-bit capture mode; 8-bit capture mode and 8-bit comparison output mode; 8-bit timer/counter and 10-bit PWM mode; 16-bit timer mode; 16-bit counter generation; 16-bit capture mode; 16-bit comparison output mode. The T2 and T3 timer/counters can also be combined into the above 7 working modes.
In addition to the four timers T0, T1, T2, and T3, HMS87C1408B also has a time interval timer BITR, which will keep running and cannot be stopped as long as it is powered on. Its clock source can be an RC oscillator or a signal divided by a preset frequency division coefficient. As long as the BTCL bit in the CKCTLR register is set to 1, BITR can be cleared and counted up again. When the count reaches FF and overflows, a BIT interrupt is generated. It can be used as an on-chip wake-up timer in STOP mode, as a watchdog timer, or as other timers.
The 12 interrupts of HMS87C1408B are 4 external interrupts, 4 timer interrupts, ADC interrupt, WDT interrupt, BIT interrupt and SPI interrupt. These interrupts have their own priorities and interrupts can be nested.
The buzzer output function of HMS87C1408B allows users to select a passive buzzer. By setting the RBFUN and BUR registers, the RBl pin outputs an alternating square wave to drive the buzzer. The frequency of the square wave f=fxin/(2x frequency division coefficient×(BUR+1)), and the frequency division coefficient and BUR value are determined by the BUR register.
In addition to the watchdog circuit on the chip, the on-chip power drop detection (PFD) circuit is a unique feature of the HMS87C1408B. By properly setting the PFDR register, if the Vdd voltage drops to 2.5 V to 3.5 V, or lasts for more than 50 ms within the range of 2.0 V to 3.0 V, the power drop detection circuit resets the MCU. The drop level is determined by the PFD bit of the CONFIG register during OTP programming. This feature improves the anti-interference and anti-crash capabilities of the HMS87C1404.
The instruction system of HMS87C1408B is similar to that of Motorola, with a total of 202 instructions. The instruction system is extremely versatile and easy to use. It not only includes multiplication and division instructions, but also has 7 16-bit operation comparison instructions (ADDW dp, CMPW dp, DECW dp, INCW dp, LDYA dp, STYAdD, SUBW dp). It greatly simplifies some complex and multi-byte operations and operation programming, and improves programming efficiency.
3 System Design of Comprehensive Tester
The system block diagram of the comprehensive moisture tester for seed cotton, rapeseed and grain is shown in Figure 1.
[page]
The impedance converter converts the impedance between the two electrodes into voltage and sends it to HMS87C1408B for A/D conversion. HMS87C-1408B processes the converted value and sends it to LCD display, and the voice circuit outputs the reporting information or over-limit prompt. Since the tester often needs to be operated outdoors in the sun and in the evening, the automatic backlight control circuit can be used to automatically adjust the brightness of the LCD display. The automatic backlight senses the light intensity of the external environment through the photoresistor and converts it into a voltage to directly control the current of the backlight source to achieve automatic backlight control. The buttons are used to set the type or variety of the object to be tested, select the voice prompt or voice reporting method, the over-limit threshold, the value that needs to be corrected due to temperature changes, and display the average value through the buttons, etc. The power supply circuit is used to convert the 6 V
battery
voltage into a 3.9 V system power supply. When the battery voltage drops to 4.5 V, the low voltage detection circuit detects and provides a level conversion signal to the main control chip, and the main control chip broadcasts the "Please change the battery" voice through the voice circuit.
4 Impedance Transformer
The impedance converter circuit is an important circuit in this system. Its performance is related to the accuracy of the test data and the effective range of the test data. This system selects a single-power supply, low-drift, high-impedance
operational amplifier
TLC27L2B combined with peripheral resistors to form an impedance converter circuit. The input impedance of TLC27L2B is as high as 1012 Ω, while the impedance range of the measured cotton, rapeseed and grain (including rice, corn, wheat) is from several hundred KΩ to 10 GΩ. Therefore, TLC27L2B is suitable for use as an impedance converter, and its power consumption is extremely low. The impedance converter circuit is shown in Figure 2. It is actually a voltage follower circuit. The voltage follower has the characteristics of high impedance input and low impedance output, and its gain is:
Rc and Rd are the differential input resistance and common-mode input resistance of 运放\'); companyAdEvent.show(this,\'companyAdDiv\',[5,18])"> the op amp respectively ; K is the open-loop gain of the op amp.
Output voltage
:
Rm is the measured impedance. When the electronic switch Kd is closed, R12=R1//R2. When Kd is open, R12=R1. Kd is used to adjust the range of the measured impedance. When R1 is selected as 30 MΩ, the measured impedance can be as high as 10 GΩ. Usc is sent to the main control chip for A/D conversion after voltage division to obtain the water content.
5 Software driven LCD
The integrated tester requires low cost and small size. This system directly drives the LCD from the main control chip through software, eliminating the LCD driver chip. Since the LCD must be driven by AC, it is necessary to generate alternating positive and reverse drive voltages on each segment of the LCD. The LCD of the integrated tester has a three-digit display, with a total of 8x3=24 display segments. It is configured as 4 com and 6 seg for dynamic scanning.
Figure 3 uses the inputs of coml and segl, com2 and segl to illustrate whether the corresponding display segments are displayed. If you want the display segments corresponding to coml and segl to light up, and the display segments corresponding to com2 and segl to go out, coml and segl should have opposite output levels, and vice versa, com2 and segl should have the same output level. The synthesized waveform is shown in the third row of Figure 3. The threshold of the LCD display should be set slightly larger than Vdd/2 to reduce or eliminate possible ghosting. The com port l/2 level is generated by the main control chip setting the I/O port as an input port, and is divided by the external pull-up and pull-down resistors.
6 Voice Circuit
The comprehensive tester for moisture content of seed cotton, rapeseed and grain provides full voice prompts and voice reporting. AP8842 with 32-segment voice storage capacity is selected for voice reporting. Since there are many voices to be broadcast, all the voices to be broadcast must be decomposed into 32 independent voice segments and stored in the AP8842 voice circuit. When broadcasting is needed, the relevant voice segments are connected one by one to form sentences. For example: "Seed cotton", "water content", "two", "ten", "one", "point", "five" are synthesized by 7 independent voice segments. In this way, the sentences that can be broadcasted are much more than 32 sentences.
The call of a certain voice segment of the AP8842 voice circuit is realized through a 5-bit address (S1~S5) line and a STB line. When the 5-bit address line output is stable, when STB jumps from low to high, the voice segment signal corresponding to the 5-bit address is amplified and sent to the speaker for broadcast through the COUT pin output. When this voice segment is broadcast, if necessary, another 5-bit address and a STB are output to broadcast the next voice segment. The corresponding relationship between the input call and the output waveform is shown in Figure 4.
7 Conclusion
The comprehensive moisture tester for seed cotton, rapeseed and grain uses HMS87C1408B as the main control chip. After A/D conversion and related processing of the voltage signal output by the impedance converter, the moisture content is displayed on the LCD, and the corresponding information is broadcast through the voice circuit. Its moisture content is accurate to 0.1%, the performance is stable, the repeatability is good, and there are many varieties that can be tested, which is popular among users.
Previous article:Development of Calibration Device for Integrated Operational Amplifier Parameter Tester
Next article:Design of human skin measuring instrument based on DSP
Recommended ReadingLatest update time:2024-11-16 15:35
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Seizing the Opportunities in the Chinese Application Market: NI's Challenges and Answers
- Tektronix Launches Breakthrough Power Measurement Tools to Accelerate Innovation as Global Electrification Accelerates
- Not all oscilloscopes are created equal: Why ADCs and low noise floor matter
- Enable TekHSI high-speed interface function to accelerate the remote transmission of waveform data
- How to measure the quality of soft start thyristor
- How to use a multimeter to judge whether a soft starter is good or bad
- What are the advantages and disadvantages of non-contact temperature sensors?
- 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
- A strange MIC (microphone) signal amplifier circuit, I thought about it for a long time but still couldn't understand it
- My Journey of MCU Development (Part 7)
- Relay wiring
- How to analyze this kind of circuit? I need your advice. It can be paid.
- SinlinxA33 Set up qt program to start automatically
- Several considerations for selecting a thermometer
- Which one has faster sampling speed, ADS1220 or AD7799?
- 2005 National Undergraduate Electronic Design Competition Topic
- EEWORLD University----[High Precision Laboratory] Interface: HDMI
- How to Make DSP Digital Oscillator Generate Phase-Shifted Sine Wave