Introduction: 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. With this ARM chip as the main CPU, it realizes the measurement of AC, DC voltage, current, etc., stores the measurement results in the local MIB database, and realizes remote access monitoring through the IP network protocol.
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 paper introduces a measurement and monitoring system based on Samsung's ARM9 embedded chip S3C2410. With 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 remote access monitoring is realized 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 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 a wealth of internal devices, including separate 16KB instruction cache and 16KB data cache, MMU virtual memory management, 16M color TFT LCD controller in 24bbp mode, support NAND Flash system boot, chip select logic and dram controller system manager, 3-channel UART, 4-channel DMA, 4-channel PWM timer, 117 general 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 and 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 porting operating systems such as WinCE and Linux, and supports various low-cost, large-capacity NOR/NAND Flash or EEPROM boot. The maximum operating frequency reaches 266MHz, and it is based on the small package 272FBGA. The ARM core has a standard JTAG structure, which provides a convenient debugging tool for application system development. 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. Its simplest system is shown in Figure 1, which only includes S3C2410X ARM9 chip, 32-bit sdram, and low-cost large-capacity Nand Flash. In order to realize serial port and network port communication, it is necessary to add serial port level conversion chip MAX232 and network MAC and PHY chip DM9000 (or LAN9115). Other modules in the system are used to realize various parameter measurement and sensing functions.
3. Design of embedded measurement and monitoring system
This system needs to measure, collect parameters, store, and remotely monitor the voltage, current, temperature, and illuminance of the equipment under test, such as power equipment or solar energy. The data storage format is the MIB database of SNMP, and the database can be accessed by the SNMP control platform of the remote operator through the NMP agent of the system. The transmission protocol is the IP protocol of Ethernet. The information can also be displayed by local operation, so a serial interface is attached locally. Based on the above application requirements, the system block diagram is shown in Figure 1 below.
Fig.1 System Diagram
This system needs to collect two remote and local temperature detections, one light intensity detection, three DC 8-130V voltage detections, three DC 0-20A@12VDC current detections, one AC 105-280V voltage detection, and one AC 0-20A@120VAC current detection. The measurement principle and the 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 NAND Flash. Its temporary database is stored in sdram. When a certain time interval is reached or a command is received, the database in sdram is backed up to Flash. During measurement, the temperature and light intensity are measured through the IO port of ARM9, and the output voltage of the AC and DC voltage and current after the sensor is converted is sampled through the on-chip ADC, and then stored in the database after calculation by the CPU.
4. Parameter measurement implementation
The measurement of each parameter is the front-end circuit of this system and also the ultimate goal. Since the ARM system is powered by 3.3V, has a general IO interface and a built-in ADC circuit, as long as each measurement parameter is converted into IO data or 0-3.3V analog voltage through the corresponding sensor device, it can be collected through the ARM processor, converted into a digital signal, and then digitally stored or transmitted through the network. The measurement and acquisition circuit of each parameter is shown in Figure 2.
The DC voltage can be directly acquired through resistor voltage division. Since the range of the DC voltage to be acquired is known, the maximum voltage value is mapped to 3.3V, and the values of the two voltage-dividing resistors in Figure 2 can be obtained. When measuring, the ADC value acquired by ARM is multiplied by the known coefficient to obtain the current DC voltage value. In order to protect the CPU IO, a BAV99 dual diode is added to the circuit for protection. Assuming that the voltage-dividing resistors are 12KΩ and 470KΩ respectively, Uo = 12/(12+470)×Ui = Ui/40. According to the ARM 10-bit ADC sampling result, if the ADC sampling value is Uadc, the acquired input voltage value is: Ui = [Uadc/1024] ×3.3×40(V).
The AC voltage is collected using the TV19G_E series precision voltage transformer, which uses a slope film alloy core and has a linearity better than 0.1%. It is small in size and can be directly welded on the circuit board. It is fully enclosed and has high dielectric 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 gets the same current as the primary side. Different output voltages are obtained by direct sampling through an operational amplifier or resistor, 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 paper uses software instead of hardware to realize AC voltage collection, which can reduce hardware investment. Practice has proved that the power parameters such as voltage, current, active power, power factor, etc. obtained by using this method and calculating through the algorithm have good accuracy and stability.
The voltage effective value formula is:
Discretize it and replace the voltage function value that changes continuously in one cycle with a finite number of sampled voltage digital quantities in one cycle, then
Where ΔTm is the time interval between two adjacent samples; um is the instantaneous value of the voltage sampled at 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 that N=(T/ΔT)+1, then
The power factor is cosφ=P/UI. The sampling time interval of the system is determined by the user. During sampling, 16 points are accurately sampled at equal time intervals within one signal cycle and the results are stored. After the sampling is completed, the collected data is digitally filtered and the corresponding value is calculated.
The AC and DC currents are collected using Hall devices ACS752SCA-050 and ACS706ELC-20A, which have the same working principle and support maximum currents of -50A to +50A and -20A to +20A respectively. It processes and amplifies the current flowing through the device through the Hall sensor and outputs the corresponding voltage value, which is proportional to the current value flowing through. The proportional relationship is shown in Figure 3a. When the current flowing through is 0, the output voltage is 2.5V (5V power supply), when the current flowing through is 50A, the output voltage is 4.5V, and when the current flowing through is -50A, the output voltage is 0.5V, and the change is linear. Therefore, according to the measured voltage value, the current can be calculated as I=25×(V-2.5)A. Since the current can be in the positive and negative directions, the same method can be used to test AC and DC currents.
The temperature measurement in the system uses a DS18B20 high-resolution programmable single-line 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 to 9 to 12 bits. This chip has only a single-line output and can be connected to the IO pin of the CPU, which requires programming control. This system uses the IO input and output device driver control under the Linux operating system to perform read and write operations, thereby realizing the collection of temperature data. The specific program flow is described in the following section.
Previous article:Infrared alarm system based on ARM9 and GPRS
Next article:Symbols in ARM assembly language
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Learn ARM development(22)
- Learn ARM development(21)
- Learn ARM development(20)
- Learn ARM development(19)
- Learn ARM development(14)
- Learn ARM development(15)
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- [Atria AT32WB415 Series Bluetooth BLE 5.0 MCU] Resource Overview
- How to use the internal LDO of CC1310
- When adding C-Module to MicroPython, how are the parameters of Cmodule mapped to micropython?
- Common usage of MSP430 watchdog and writing method of interrupt function
- 【TGF4042 Signal Generator】+ Actual Project Application
- [Smart cat-eye design based on STM32F7508-DK] Material unboxing—STM32F750+ESP32-CAM
- Design of control system for CNC engraving machine based on embedded system
- Find a job after graduation
- Communication RF Circuit (Online Education) PPT
- ATK-0.96' OLED module