ARM (Advanced RISC Machines) is a general term for a class of microprocessors. ARM is a well-known company in the microprocessor industry. It has designed a large number of high-performance, low-cost, low-energy RISC processors, related technologies and software. ARM microprocessor is a high-performance, low-power 32-bit microprocessor, which is widely used in embedded systems. ARM 9 represents the mainstream processor of ARM company, and has been widely used in handheld phones, set-top boxes, digital cameras, GPS, personal digital assistants and Internet devices. Here, the typical STR912FW44X6 chip in the ARM 9 series produced by ST company is used as the MCU of the hardware development platform to complete the hardware design of the data acquisition and transmission system in the ARM-based solar power generation system, and a new method of using RS 485 serial port instead of RS 232 serial 121 for communication is proposed.
l Overall hardware design framework
The overall hardware design framework is shown in Figure 1.
Figure 1 Overall hardware design framework
2 Hardware Introduction
Now the STR912FW44X6 chip is used as the MCU of the hardware development platform. The STR912FW44X6 has expanded dot matrix LCD display, input buttons, UART interface, IrDA, CAN, USB, ETM interface, audio amplifier/microphone amplifier and Ethernet interface. Among them, this article uses the UART interface and Ethernet interface. The UART interface is divided into one RS 232 serial port and two RS 485 serial ports. The RS 232 serial port is used to connect to the RS 232 serial port of the GSM module to realize GPRS wireless transmission; two RS 485 serial ports, one is used as a MODBUS communication interface, and the other is used to connect to the electric meter to collect statistics and display the power generation of the solar power generation system. Ethernet is connected to the network through a network cable to realize wireless transmission of data.
3 Hardware circuit design and function implementation
3.1 Circuit design and function implementation of RS 232 serial port
RS 232 is a serial data interface standard, and is currently the most commonly used serial interface standard for data transmission between computers and between computers and peripherals. The RS 232 serial interface bus is suitable for communication distances between devices not exceeding 15 m, and the maximum transmission rate is 20 KB/s.
The RS 232 serial port is realized by ST3232EAR produced by ST. ST3232EAR is a chip that converts the RS 232 signal level (-10 V, +10 V) of the computer serial port into the TTL signal level (0V, +3.3 V) used by the microcontroller. Its internal structure consists of three parts: the first part is the charge pump circuit, which consists of pins 1 to 6 and 4 capacitors. Its function is to generate two power supplies of +12 V and -12 V to provide the level requirements for the RS 232 serial port. The second part is the data conversion channel, which consists of pins 7 to 14 to form two data channels. Among them, pins 13 (RlIN), 12 (R1OUT), 11 (TlIN), and 14 (T1OUT) are the first data channel; pins 8 (R2IN), 9 (R2OUT), 10 (T2IN), and 7 (T2OUT) are the second data channel. The TTL/CMOS data is converted from TlIN and T2IN to RS 232 data, and sent to the computer DP9 plug from T1OUT and T20UT; the RS 232 data of the DP9 plug is converted from RlIN and R2IN to TTL/CMOS data, and then output from R1OUT and R2OUT. The third part is the power supply, which consists of 15-pin GND and 16-pin VCC (+5 V).
By connecting the RXD and TXD of the GPIO in the MCU to the 12th pin (R1OUT) and the 11th pin (T1IN) of the ST3232 respectively, the 14th pin (T10UT) and the 13th pin (R1IN) output RS 232 level, and then connecting the RS 232 serial port of the GSM module and the RS 232 serial port on the MCU board, the purpose of controlling the function of the GSM module can be achieved by writing AT commands to the RS 232 interface, so as to realize data transmission through GPRS.
3.2 Circuit design and function implementation of RS 485 serial port
RS 485 is used to collect data from solar power generation systems. The reason why RS 485 is used here instead of RS 232 is that RS 485 has many advantages over RS 232. RS 232 adopts unbalanced transmission mode, that is, single-ended communication, and the data signals at its transceiver are all relative to the ground signal. Therefore, its common-mode suppression ability is poor, and coupled with the distributed capacitance of the twisted pair, its maximum transmission distance is about 15 m, the maximum rate is 20 KB/s, and it can only support point-to-point communication. RS 485 uses balanced transmission and differential reception to achieve communication. Since the transmission line usually uses twisted pair and sometimes differential transmission, it has a strong ability to resist common-mode interference. The bus transceiver is very sensitive and can detect voltages as low as 200 mV, so its transmission signal can be restored over a kilometer. The maximum communication distance of RS 485 is about 1,219 m, and the maximum transmission rate is 10 MB/s. It uses dual-half-duplex working mode to support multi-point data communication, and its bus generally supports a maximum of 32 nodes.
The RS 485 interface chip uses ADM3485. ADM3485 uses a single power supply +3.3 V to work, half-duplex communication mode, and can complete the function of converting TTL level to RS 485 level. The structure and pins of the ADM34185 chip are very simple. It contains a driver and a receiver inside. The RO and DI terminals are the output terminal of the receiver and the input terminal of the driver respectively. When connected to the microcontroller, it only needs to be connected to the RXD and TXD of the microcontroller respectively. The RE and DE terminals are the enable terminals for receiving and sending respectively. When RE is logic 0, the device is in the receiving state; when DE is logic 1, the device is in the sending state. Because ADM3485 works in half-duplex state, only one pin of the microcontroller is needed to control these two pins. The A terminal and the B terminal are the differential signal terminals for receiving and sending respectively. When the level of the A pin is higher than that of the B terminal, it means that the data sent is 1; when the level of the A pin is lower than that of the B terminal. The data sent is 0. The wiring is very simple when connected to the microcontroller. Only one signal is needed to control the receiving and sending of ADM3485. At the same time, a matching resistor is added between the A and B terminals. Generally, a 100Ω resistor can be selected. The design has two RS 485s, one of which is used as a MODBUS communication interface, and the other is used to connect the watt-hour meter to collect statistics and display the power generation of the solar power generation system.
3.3 Ethernet circuit design and functional implementation
The Ethernet port uses 0880-1X1T-01, and the Ethernet physical layer interface chip uses ST's STElOOP Fast Ethernet physical layer chip. The STEl00P Ethernet interface chip provides a set of media independent interfaces (MII). Media independence means that any type of PHY device can work properly without redesigning or replacing the MAC hardware. The MII interface is a standard interface between the Fast Ethernet MAC layer and the PHY layer, and is a standard for the Ethernet industry defined by IEEE 802.3. It includes a data interface and a management interface between the MAC and PHY. The data interface includes two independent channels for the transmitter and receiver respectively. Each channel has its own data, clock, and control signals. The MII data interface requires a total of 16 signals. The management interface is a dual-signal interface: one is a clock signal and the other is a data signal.
Through the management interface, the upper layer monitors and controls PHY. Ethernet-based TCP/IP communication allows ARM to be connected to the Internet through a network cable and can communicate with a computer in real time to transmit real-time data of the solar power generation system.
A new communication method using RS 485 serial port instead of RS 232 serial port is proposed. This method solves the limitations of RS 232 serial port in transmission distance and number of nodes, and greatly improves the data transmission capacity.
Previous article:Using ARM and FPGA to build a neural network processor communication solution
Next article:Detailed analysis of the characteristics and differences of MCU, ARM, and FPGA embedded
Recommended ReadingLatest update time:2024-11-16 14:58
- Popular Resources
- Popular amplifiers
- Siemens PLC Programming Technology and Application Cases (Edited by Liu Zhenquan, Wang Hanzhi, Yang Kun, etc.)
- Siemens PLC from Beginner to Mastery with Color Illustrations (Yang Rui)
- Siemens S7-1200-PLC Programming and Application Tutorial (3rd Edition) (Edited by Shi Shouyong)
- 西门子S7-12001500 PLC SCL语言编程从入门到精通 (北岛李工)
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
- Thirty-three MCU (microcontroller) input/output interface circuits
- EEWORLD University Hall----Live Replay: TE explains the design trends of smart antennas and sensor application cases in the Internet of Things
- PDIUSBD12 Send mode command, soft connection does not work
- .DSN file is garbled when opened.
- Live Q&A Summary: ADI MEMS Sensors Open a New Era of Conditional State Monitoring
- Security Technology System of Wireless WLAN
- It is found that the OPAMP of STM32G474 cannot be internally connected to ADC4
- In-depth understanding of C language function parameters as pointers
- EEWORLD University Hall ---- The first stop of the ADI Road theme tour of Shijian: Industrial Automation
- AD20 Installation Issues