78K0Lx3 microcontroller smart water meter solution

Publisher:电子设计探索者Latest update time:2012-03-29 Keywords:78K0Lx3 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

NEC Electronics 78K0/Lx3 microcontroller is a high-performance 8-bit general-purpose microcontroller that uses NEC Electronics' 78K0 core. It has a variety of packages from 48Pin to 80Pin, and has a built-in 4Com/8Com mode LCD driver that can drive up to 288 LCD segments.

The Lx3 microcontroller has a built-in high-precision 8MHz oscillator circuit, and the speed of the internal oscillator circuit can be controlled through registers. For water meters that do not require a real-time clock, this can save costs and speed up software development. If you need to use an RTC, you need to connect an external 32.768kHz oscillator, which can easily implement a stepped multi-rate water fee.

In terms of communication, Lx3 has three built-in serial interfaces and two hardware modules: Manchester encoder and remote control receiver. The multiple options in remote transmission and wireless allow customers to easily cope with the ever-changing market demands.

In terms of power consumption, the static power consumption of Lx3 is less than 1μA, which can effectively extend the battery life and help improve the stability and anti-interference of the system. The operating voltage of 1.8V to 5.5V can maximize the use of battery energy. The built-in 16-level LVI module eliminates the customer's worries and monitors the battery voltage at any time. Once the battery voltage drops beyond the limit, it will immediately notify the user and store key data.

The Lx3 series microcontrollers are not only suitable for measuring meters, but also for household appliances and digital devices.

NEC Electronic Water Meter Solution

NEC electronic water meter solution uses NEC Electronics' 78K0/Lx3 microcontroller, which can store data on the microcontroller's built-in Flash memory, saving EEPROM chip costs.

In terms of power consumption, through various power-saving measures and in combination with NEC Electronics' low-power microcontroller, the whole machine achieves an ultra-low power consumption of 3.8μA when the LCD is always on. The smart water meter solution is shown in Figure 1.

Smart water meter solution based on NEC Electronics 78K0/Lx3 microcontroller - The lonely shepherd - Embedded Network Life

● Features of NEC electronic water meter solution

NEC electronic water meter solution is a card meter solution that supports a variety of reader/writer cards and communicates with the microcontroller using the IIC protocol through the card socket.

The basic functions are as follows.

(1) Basic metering function: data is written every 0.1 cubic meter.

(2) LCD display function: Displays error information, alarm water volume, remaining water volume, overdraft water volume and other data.

(3) Water purchase management function: supports factory preset, water purchase, water stop, water volume query, meter reading and other functions.

(4) Alarm and water cut-off function: When the remaining water volume reaches the alarm water volume, the valve will automatically close, prompting the user to purchase water. If the remaining water volume is 0, the valve will close, but after reinserting the card, water can continue to be used within the preset overdraft water volume range. If the user's overdraft water volume reaches the preset overdraft water volume, the valve will close and the water will be cut off.

● Special functions of NEC electronic water meter

Data storage function: There are two ways to store data in this solution. One is to use EEPROM to store data, and the other is to implement EEPROM emulation function on NEC Electronics' Flash memory, storing data in the Flash memory built into NEC Electronics' microcontroller to achieve the same storage effect as EEPROM. The library file provided by NEC Electronics can easily implement the EEPROM emulation function of the Flash memory.

Power saving function: turn off the power supply of EEPROM and card holder to put them in sleep mode. The internal voltage divider resistor of NEC Electronics 78K0/Lx3 LCD is about 60K. In order to further reduce power consumption, we use 330K external voltage divider resistor. Through these methods, the power consumption of the water meter solution is kept at 1.8μA in standby mode.

Attack prevention function: It can determine whether it is attacked and close the valve if it is attacked. There are many processing in the software to effectively prevent interference with the microcontroller.

Overdraft water fee metering: If the valve cannot be closed normally due to external attack or mechanical failure, the overdraft water fee will still be measured when the water is used.

Automatic descaling function: The valve automatically opens and closes twice a month to prevent motor failures when not in use for a long time.

Battery capacity monitoring: Use the internal LVI module to monitor the battery voltage. When the voltage is insufficient, it will alarm in time, close the valve, and prompt to replace the battery on the LCD.

Software Structure

The system software consists of a main program and an interrupt handler. The main program mainly completes the system initialization function, and then periodically queries each flag bit. If each flag bit is 0, it enters the STOP standby mode. The interrupt handler includes LVI low voltage detection interrupt, water pulse measurement interrupt, card detection interrupt, as well as magnetic attack handler, LCD and watchdog handler. The main program flow is shown in Figure 2.

Smart water meter solution based on NEC Electronics 78K0/Lx3 microcontroller - The lonely shepherd - Embedded Network Life

Summary and Outlook

NEC Electronics' water meter solution has been tested in terms of self-programming EEPROM simulation and can meet the data storage needs of water meter users. In terms of power consumption, it can fully meet the stringent requirements for low power consumption and contribute to green environmental protection.

The RTC module is not used in this solution for the time being, but from the perspective of future trends, the tiered water charges and the demand for water resource consumption statistics from management departments will increase, and the use of RTC is an inevitable trend. In foreign markets, RTC is already a necessary module.

The built-in Manchester encoder and remote control receiver help designers and developers expand the wireless remote transmission. Wireless meter reading technology can effectively reduce the workload of meter reading and minimize the impact on end users. The design of wireless water meter can be completed by slightly expanding this solution.

Keywords:78K0Lx3 Reference address:78K0Lx3 microcontroller smart water meter solution

Previous article:Realization of Data Communication between Dual CPUs
Next article:STC89C52 minimum system

Latest Analog Electronics Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号