1 Overview
At present, embedded systems are developing very rapidly, and the development of various applications based on ARM processors is in full swing. This is mainly due to the high cost performance and short development cycle of embedded systems, and they can be implemented in a variety of application systems. . This article introduces a measurement and monitoring system based on Samsung's ARM9 embedded chip S3C2410. Using this ARM chip as the main CPU, it realizes the measurement of AC and DC voltage and current, the measurement of local and nearby temperature, and the measurement of photosensitivity. The measurement results are stored in the local MIB database and remotely accessed and monitored through the IP network protocol. The system design is advanced and highly integrated, and has been widely used in practice.
2. Introduction to embedded ARM9 S3C2410X
S3C2410X is a 32-bit RISC processor based on the ARM920T core provided by Samsung. Its low power consumption, low price, and high performance design are particularly suitable for handheld devices and general embedded applications. In order to reduce the cost of the entire system, it provides Rich internal devices, including separate 16KB instruction Cache and 16KB data Cache, MMU virtual memory management, maximum 16M color TFT LCD controller in 24bbp mode, system manager that supports NAND Flash system boot, chip select logic and DRAM controller, 3-channel UART, 4-channel DMA, 4-channel PWM timer, 117 general-purpose IO ports and 24-channel external interrupt sources, RTC with calendar function, 8-channel 10-bit ADC and touch screen interface, IIC, IIS interface, USB master-slave device , SD&MMC card interface, 2-channel SPI and PLL clock multiplier. It adopts AMBA's new microcontroller bus structure, which greatly improves the transmission speed of data and instructions. Its enhanced ARM architecture MMU can be used for transplanting operating systems such as WinCE and Linux, and supports various low-price, large-capacity NOR/NAND Flash or EEPROM boot. The maximum operating frequency reaches 266MHz and is based on the small package 272FBGA. The ARM core has a standard JTAG structure, which provides convenient debugging tools for application system development. Currently, there are many general development tools on the market that can be used for debugging and development of S3C2410X.
Since S3C2410X has rich interfaces and built-in hardware controllers, most application system functions can be realized using its simplest system. The simplest system is shown in Figure 1, which only includes the S3C2410X ARM9 chip, 32-bit sdram, and low-price large-capacity Nand Flash. In order to realize serial port and network port communication, it is necessary to add the serial port level conversion chip MAX232 and the network MAC and PHY chip DM9000 (or LAN9115). Other modules in the system are used to implement functions such as measurement and sensing of various parameters.
3. Design of embedded measurement and monitoring system
This system needs to measure, collect and store parameters of the voltage, current or temperature, illumination, etc. of the equipment under test, such as power equipment or solar energy, and implement remote monitoring. The data storage format is SNMP's MIB database. The database can be accessed by the remote operator's SNMP control platform through the system's NMP agent. The transmission protocol is the IP protocol of Ethernet. The information can also be displayed by local operation, so the local is equipped with a serial interface. Based on the above application requirements, the system block diagram is shown in Figure 1 below.
Figure 1 System principle block diagram (Fig1 System Diagram)
This system needs to collect two remote and local temperature detections, one illumination detection, three DC 8-130V voltage detection, three DC 0-20A@12VDC current detection, one AC 105-280V voltage detection, and one AC AC 0-20A@120VAC current detection. The measurement principles and sensor devices used are described in the next section. The system hardware platform adopts the 3C2410X standard hardware platform. The main CPU has sdram as the main memory, NAND Flash as the program storage space, and is started from the NAND Flash. Its temporary database is stored in the sdram. When a certain time interval is reached or a command is received, , back up the database in sdram to Flash. During measurement, the temperature and illumination are measured through the IO port of ARM9, and the output voltage converted from the AC and DC voltage and current through the sensor is sampled through the on-chip ADC, and then calculated by the CPU and stored in the database.
4. Parameter measurement implementation
The measurement of each parameter is the front-end circuit of this system and is also the ultimate goal. Since the ARM system is powered by 3.3V and has a universal IO interface and built-in ADC circuit, each measurement parameter can be collected through the ARM processor as long as it is converted into IO data or 0-3.3V analog voltage through the corresponding sensing device. Thereby it is converted into a digital signal and then stored digitally or transmitted over the network. The measurement and acquisition circuit of each parameter is shown in Figure 2.
The collection of DC voltage can be obtained directly through resistor voltage division, because the range of DC voltage that needs to be collected is known, and the maximum voltage value is mapped to 3.3V, and the values of the two voltage dividing resistors in Figure 2 can be obtained. During measurement, the current DC voltage value can be obtained by multiplying the ADC value collected by ARM by a known coefficient. In order to protect the CPU IO, BAV99 dual diodes are added to the circuit for protection. Assume that the voltage dividing resistors are 12KΩ and 470KΩ respectively, then Uo = 12/(12+470)×Ui = Ui/40. According to the ARM 10-bit ADC sampling result, if the ADC sampling value is Uadc, the collected input voltage value is : Ui = [Uadc/1024] ×3.3×40 (V).
The AC voltage is collected using TV19G_E series precision voltage transformers. This device uses slope film alloy iron core and has a linearity better than 0.1%. Small size, directly soldered to the circuit board. Fully enclosed, high electrical strength. It is a current-type voltage transformer. Different input voltages cause different currents to flow through the primary side through the current-limiting resistor, and the secondary side obtains the same current as the primary side. Different output voltages are obtained through direct sampling through operational amplifiers or resistors, as shown in Figure 2.
The voltage value collected at this time is actually the instantaneous value of the AC voltage, which has good real-time performance and small phase distortion. This article uses software instead of hardware to implement AC voltage collection, which can reduce hardware investment. Practice has proved that using this method and passing the algorithm The voltage, current, active power, power factor and other power parameters obtained after calculation have good accuracy and stability.
The formula for the effective value of voltage is
Discretize it and replace the continuously changing voltage function value in a cycle with a limited number of sampled voltage digital quantities in a cycle, then
In the formula, ΔTm is the time interval between two adjacent samplings; um is the instantaneous voltage sampling value of the m-1th time interval; N is the number of sampling points in one cycle. If the time interval between two adjacent samples is equal, that is, ΔTm is a constant ΔT. Considering N=(T/ΔT)+1, then there is
value. The power factor is cosφ=P/UI. The sampling interval of the system is determined by the user. When sampling, 16 points are accurately sampled at equal time intervals within one signal cycle and the results are stored. After the collection is completed, the collected data are digitally filtered and the corresponding values are calculated.
The AC and DC currents are collected using Hall devices ACS752SCA-050 and ACS706ELC-20A, which work on the same principle and support the maximum currents from -50A to +50A and -20A to +20A respectively. It will process the current flowing through the device through Hall induction and then amplify and output the corresponding voltage value. This voltage value is proportional to the flowing current value, and the proportional relationship is shown in Figure 3a. When the flowing current is 0, the output voltage is 2.5V (5V power supply), when the flowing current is 50A, the output voltage is 4.5V, when the flowing current is -50A, the output voltage is 0.5V, and the period is linear change, the current can be calculated as I=25×(V-2.5) A according to the measured voltage value. Since the current can be in both forward and reverse directions, the same method can be used to test AC and DC current.
The temperature measurement in the system uses DS18B20 resolution programmable single-wire digital thermometer, which can be used in conjunction. Its application principle is shown in Figure 2. The measurement temperature range is -55 degrees to +125 degrees, the accuracy can reach 0.5 degrees, and the digital accuracy can be programmed from 9 to 12 bits. This chip only has a single line output, which can be connected to the IO pin of the CPU and needs to be programmed and controlled. This system uses the IO input and output device driver control under the Linux operating system to perform read and write operations to achieve temperature data collection. The specific program flow is described in the following section.
Figure 3a Current sensing output voltage relationship chart Figure 3b Illuminance frequency relationship chart
The illumination measurement in the system uses the photosensitive sensor TSL235 circuit. This circuit is a conversion circuit from illumination to frequency. It has a built-in silicon photodiode and a current-to-frequency converter. It outputs square waves of different frequencies with a 50% duty cycle. The pins are only The power supply, ground and output can be directly connected to the IO of the CPU. The CPU can measure the frequency of the square wave through TIMER control or interrupt detection, so that the corresponding illumination can be calculated. The relationship curve between illumination and frequency is shown in Figure 3b.
Previous article:Bootloader operating principle and implementation based on S3C2410 development board
Next article:System analysis of S3C2410 interrupt processing
Recommended ReadingLatest update time:2024-11-16 09:48
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- 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
- The power cord is too long and the power-on voltage is too high. Should I use a TVS tube?
- What is the essence of GND in the circuit?
- EEWORLD University - i.MX Linux Development Practical Guide
- Encoder Problems
- Introduction to IC Packaging and Testing Process
- TI C6000 Optimization Advanced: Loops are the most important!
- A zero voltage platform appears on the secondary side of the forward converter, causing large oscillations. What might be the cause? How can I solve it?
- STM32MP157A-DK1 Review - 5.10 minutes to create a Linux Distro
- DIY a ESP32 game console based on MicroPython
- Getting started with BIT_BAND (bit segment/bit band) and alias area in STM32