Abstract: This paper introduces a new type of smart meter application system, and explains the actual circuit and design method of the handheld unit part and the rate device part of the smart meter. The specific circuit schematic diagram and related main software design procedures are given.
Keywords: Smart meter microcontroller EEPROM program
With the development of the national economy, smart meters are becoming more and more widely used. As an alternative and upgraded product to the widely used IC card meter system, smart meters have been widely used in developed countries such as Japan, Europe and the United States. There are also manufacturers in my country who are actively developing commercialized smart meter products. This article introduces the circuit structure and software design scheme of a new type of smart meter.
This smart meter is an electromechanical smart meter. It consists of three parts: hardware circuit, corresponding software and issuance system. It can realize the billing of different electricity prices in different time periods by a certain power company, thereby realizing intelligent power consumption supervision. This article will introduce the hardware circuit and corresponding software system.
1 Electric meter hardware device
The hardware of this meter device includes three parts: interface card, handheld unit and meter rate system. Through the interface card inserted in the expansion slot of the microcomputer, the handheld unit can be used to realize the connection with the ordinary microcomputer. The electric power company inputs the user's electricity purchase information to the handheld unit through the serial port of an ordinary microcomputer. The user then sends the electricity purchase information to the meter rate system using the handheld unit. The rate system monitors the user's electricity consumption based on the user's electricity purchase information and completes the calculation. charges and remind users to purchase electricity at appropriate times.
1.1 Handheld unit
The circuit schematic diagram of the handheld unit part is shown in Figure 1.
It has to complete the following functions:
(1) Receive the user's electricity purchase information output by the microcomputer program through the serial port, store and encrypt the user's electricity purchase information.
(2) Accurately send the user’s electricity purchase information to the rate system using infrared mode.
(3) After sending the user’s electricity purchase information, the system will automatically clear the electricity purchase information.
●The external crystal oscillator pins XTAL1 and XTAL2 can form an oscillation circuit with the inverting amplifier on the 87C51 chip to provide clock signals for the microcontroller.
●RST/VPP is the reset input terminal of the microcontroller and the Vpp power supply terminal of the internal RAM in power-down mode.
●The P1 pin is an input/output port. It has an internal pull-up resistor and is an 8-bit I/O port. This pin is used to receive the lower 8-bit address during EEPROM programming and program verification.
●RXD (P3.0) pin is a serial input port.
●TXD (P3.1) pin is a serial output port.
The RST pin of 87C51 is connected to an external reset circuit, the P1.2 pin is connected to an external transmitting circuit, and the P1.3 pin is connected to an external receiving circuit. 24C01A is an EEPROM produced by ATMEL Corporation of the United States. It is a two-wire serial interface CMOS memory with a capacity of 1k bits (128×8). Used to store information necessary for the software program to run. Among them, SDA is the serial data line and SCL is the serial clock line.
1.2 Electric meter rate system
The main functions that the meter rate system needs to complete are as follows:
●Receive user electricity purchase information sent by the handheld unit;
● Combine the newly received user electricity purchase information with the own user electricity consumption information of the rate system to obtain new information; ● Dynamically calculate to obtain the remaining power, and ignite the LED tube when the remaining power reaches the warning value , to remind users to purchase electricity and cut off the power supply when the excess electricity consumption reaches a certain value.
The circuit principle of the meter rate system is shown in Figure 2.
Among them, the cost-effective single-chip computer P87LPC764 of PHILIPS SEMICONDUCTORS Company is the main device to complete this part of the function. The microcontroller P87LPC764 comes with an internal 6MHz RC oscillator, internal watchdog circuit and internal reset circuit. It has strong anti-electromagnetic interference capabilities and small operating current.
PCF8583 is a clock/calendar chip from PHILIPS SEMICONDUCUORS with its own 240×8-bit RAM. It is used to provide time information for power companies to implement time-of-use electricity pricing strategies. It can store 4 years of calendar time information, and its calendar time information function can also be set through programming.
CAT24WC02 is a true 0-power EEPROM chip that uses I2C bus interface and has a lifespan of 1 million times of erasing and writing.
2 Software design of smart meters
The software program of the handheld unit includes three parts: microcomputer serial port communication, 87C51 internal working and handheld unit data transmission.
The microcomputer serial port communication part mainly completes the output of the user's electricity purchase information to the microcontroller 87C51 in the handheld unit part through the serial port asynchronous communication adapter UART. The internal working part of 87C51 mainly completes the encryption of user's electricity purchase information.
The handheld unit data transmission program mainly completes sending the encrypted user electricity purchase information to the meter rate system. And it will be automatically cleared after it is determined that the user's electricity purchase information has been correctly received by the meter rate. Its program flow chart is shown in Figure 3.
The working program of the microcontroller P87LPC764 is mainly used to receive the encrypted user's electricity purchase information, decrypt the user's electricity purchase information, and then add the user's electricity purchase information to the last remaining electricity consumption information stored in the EEPROM peripheral memory CAT24WC02 to obtain the user's electricity purchase information. The latest electricity consumption information after this electricity purchase is combined with the newly stored calendar time information in 24WC02 to dynamically calculate the user's electricity consumption information to complete the alarm to the user when the remaining power reaches the warning value and the When the set value is exceeded, the power supply is cut off, and the user's power consumption information is stored in the peripheral EEPROM chip CAT 24WC02.
Previous article:Design of dual-channel digital voice monitor
Next article:Application circuit design of single-chip CVSDMC3418
- Popular Resources
- Popular amplifiers
- 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!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- 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
- [Smart Wardrobe] Material Unboxing ESP32-S3-BOX
- A valve is used in the water supply of the product. The valve is opened when water is used and closed when water is not used. How to measure the force of the opening and closing valve?
- Taiwan Sun Yat-sen University ASIC Laboratory Comprehensive Script Tutorial
- MSP430 Program Library--Digital Tube Display
- How to add hard interrupt to DSP/BIO in DM6437
- Six sharings of power supply design experience
- DSP28335 pwm program dead zone experiment
- BLDC motor driver based on STM32F030+L6230 (FOC5.2 library): program+schematic diagram+BOM and other open source sharing
- Connecting a TVS in parallel to the input of the DCDC chip as protection will limit the power input range. Is there any good solution?
- Working Principle and Topology of Class D Amplifier