White Paper — Save plant maintenance costs through reduced sensor power consumption Page 1 of 8
White Paper
Save plant maintenance costs through
reduced sensor power consumption
Realize abnormality detection and alarm output with the
RL78 microcontroller's CPU in stopped state
March 2018
Abstract
When striving to reduce maintenance costs of environmental sensor
systems in industrial factories and plants, lowering sensor power
consumption is imperative. This paper describes a method for reducing
the power consumption of sensor systems by utilizing the standby
functions of a microcontroller (MCU). In concrete terms, the
frequency of sensor measurements is reduced, and the system is kept in
the standby condition for as long as possible. Furthermore, abnormality
detection is also performed while remaining in this state. The 16-bit
RL78/G11 MCU from Renesas Electronics provides numerous peripheral
functions that are available in standby mode. With a suitable combination
of these functions, it becomes possible to realize abnormality detection
and alarm output without taking the MCU out of standby mode.
Factories and plants in the manufacturing industry require a large number of environmental sensors to monitor
conditions such as vibrations, presence of gases, temperature, lighting, dust, etc. Nowadays, these tasks are usually
integrated into comprehensive systems that continuously collect large volumes of sensor data and apply artificial
intelligence (AI) based analysis methods in order to enable early detection of any changes that could affect
manufacturing and lead to breakdowns (preventive fault diagnosis and maintenance).
The sensors used in such systems may be installed in locations where space limitations make it difficult to connect
power supply wiring, and they also have to collect data when the manufacturing facilities are stopped. Such sensors,
therefore, are often powered by independent battery-based power supplies. The frequency by which batteries have to
be replaced affects the maintenance costs of the plant. If there are only a few sensors, this does not pose a major
problem; but with systems having tens or hundreds of sensors, the labor costs and time required for battery
replacement become a significant consideration. When aiming to reduce the battery replacement frequency, reducing
the power consumption of environmental sensors represents a valid approach (Figure 1).
White Paper — Save plant maintenance costs through reduced sensor power consumption Page 2 of 8
Figure 1: Dealing with maintenance costs of environmental sensors
This paper describes a method for reducing the power consumption of sensor systems by utilizing the standby
functions of a MCU. The MCU used is the 16-bit RL78/G11 from Renesas Electronics, designed for sensor
applications, small household appliances and other similar-type products
Considering suitable methods for abnormality detection while
reducing the frequency of measurements
The concept of a system to be used at a manufacturing plant for precision parts is used as an example of
environmental sensor application (Figure 2). The objective is to lessen the frequency of battery replacement by
reducing the current consumption of the sensor system. For clarity, the following explanation focuses on dust sensor
control as a representative example.
Figure 2: Environmental sensor system at a precision parts plant
When manufacturing precision parts, airborne dust, smoke, suspended particles, etc., will affect the production yield.
To control these things, air showers at entrances are used for cleaning personnel, and dust sensors throughout the
plant monitor the concentration of dust particles. The operation rate of air purifiers is usually raised or lowered
according to the measured concentration values.
When the plant is operating normally, there will generally be no large fluctuations in the dust concentration. By
lowering the measurement frequency under this condition, the power consumption of the dust sensors can be
White Paper — Save plant maintenance costs through reduced sensor power consumption Page 3 of 8
reduced. For example, by performing measurement once every ten seconds rather than once per second, power
consumption can be reduced to one-tenth.
By contrast, if the plant deviates from stable operation, it is possible that the dust concentration increases abnormally.
In such a case, the operation ratio of air purifiers needs to be increased, but it may still take some time until the dust
concentration drops. If the production equipment continues to operate under a high concentration of dust, the
equipment may become contaminated and require cleaning. Consequently, it is essential to immediately stop the
manufacturing facilities of the plant when there is an abnormal increase in dust.
Suitable methods for detecting abnormality and system control must therefore be considered. The first step is the
configuration of a system for detecting abnormal conditions. Next, it must be ensured that the required processing
steps, such as outputting an alarm signal in case of abnormality detection, can be executed smoothly and rapidly.
This can be summed up as follows. The dust sensor system needs to:
(1) enable reduced measurement frequency
(2) have the capability to detect abnormal conditions
(3) enable system control in case of abnormality detection
Peripheral functions useful for sensor processing
Before explaining how such a control system can be implemented, here is some information on the RL78/G11
(subsequently called “G11”). This product is part of the low power RL78 microcontroller family from Renesas
Electronics (see Figure 3). Within this family, the G11 belongs to the “general purpose” subgroup G1x, but it is
characterized by offering strengthened analog/digital peripheral functions suitable for voltage measurements, single-
phase motor control applications, etc. These functions can be used, for example, for control of sensor hubs and
industrial sensors, battery modules, power tools, measuring instruments, kitchen appliances, vacuum cleaners,
beauty appliances, air conditioner fans, and ventilators, to list a few.
Figure 3: Renesas RL78 family roadmap
White Paper — Save plant maintenance costs through reduced sensor power consumption Page 4 of 8
The G11 incorporates four types of timers, as well as serial communication functions, a comparator, programmable
gain amp, 10-bit A/D converter, and 8-bit D/A converter. As explained in more detail below, many of the peripheral
functions are also available in standby mode while the CPU is stopped.
The power supply voltage range of the G11 is 1.6 V to 5.5 V, and it incorporates three oscillators for clock signal
generation. The G11 has four kinds of flash operation modes that optimize the operation voltage, operation timing,
and operation current of the internal circuitry. The current consumption of the microcontroller can be effectively
minimized by selecting the appropriate mode according to the power supply voltage range and the clock frequency to
be used (Figure 4).
Figure 4: Flash operation modes of RL78/G11
The following section will explain how to control a dust sensor with the G11.
Using a timer for intermittent operation while in standby mode
The first aspect to realize is reducing the measurement frequency. This can be achieved by utilizing the standby
functionality of the MCU to operate the dust sensor intermittently. The solution involves waking up the CPU of the
MCU only when measuring dust concentration, and keeping it in the standby state at other times (Figure 5). Standby
state in this context means a state where current consumption is reduced, but quick return to the normal state, where
dust concentration measurement can be performed, is possible.
Figure 5: Reducing measurement frequency using the standby state
White Paper — Save plant maintenance costs through reduced sensor power consumption Page 5 of 8
Using a system where one measurement is performed every 10 seconds as an example, it is necessary to measure
the time interval (10 sec.) in the standby state. This means that an operational timer must be available. Furthermore,
the MCU must be able to wake up the CPU when a query (input) for measurement results is received in the standby
state to enable providing a response (output). In other words, the standby mode must allow handling of external
signal input (external interrupt or serial data). An example for the measurement operation state and standby state is
shown in Figure 6.
Figure 6: Processing flow during measurement operation and in standby
The standby functions of the G11 are explained below. The G11 provides three different standby modes called HALT,
STOP, and SNOOZE, as shown in Figure 7.
Figure 7: Three standby modes of RL78/G11
The Halt mode is entered from the Run (main) mode of the CPU, and the CPU returns to the Run mode when an
interrupt is received. In the Halt mode, almost all peripherals are operational.
White Paper — Save plant maintenance costs through reduced sensor power consumption Page 6 of 8
The Stop mode, like the Halt mode, is entered from the Run mode of the CPU, and the CPU returns to the Run mode
when an interrupt is received. Some higher-level timers, safety functions, and the DOC (Data Operation Circuit)
cannot be used, but other peripherals are operational.
The Snooze mode is a special mode, which is entered from Stop mode when the microcontroller receives serial data,
a timer trigger signal, or a DTC enable request. If an interrupt is generated, the CPU wakes up; otherwise, the MCU
returns to the Stop mode. The Snooze mode is a standby mode designed to enable serial data communication, A/D
conversion, and register setting (register rewriting by the DTC) without waking up the CPU.
The power consumption of the MCU, depending on the mode, can generally be ranked as follows –
STOP < SNOOZE < HALT < CPU RUN – where power consumption increases towards the right. A comparison of
operation current (power supply current characteristics) between the Run mode and Stop mode yields the following:
CPU RUN mode: 1.4 mA (24 MHz operation, HS mode, -40ºC to +85ºC, typ., basic operation)
STOP mode: 0.25 μA (+25ºC, typ.)
As can be seen, current consumption in Stop mode is only about 0.02% that of Run mode.
In the Stop mode of the G11, interval timer operation is possible. The interval timer is used to regularly return from
Stop mode to Run mode and capture the dust sensor data. External signal input can be handled through a
combination of the Stop and Snooze modes, making it possible to accommodate measurement result queries from an
external system. The Event Link Controller (ELC) and Data Transfer Controller (DTC) functions provided by the G11
are useful for detecting external interrupts, operating the interval timer, and using comparator matching.
Fast abnormality detection and no-delay processing
This section explains the processing method when an error (abnormality) is detected.
A possible processing flow for cases when environmental sensors at a manufacturing plant detect an abnormality is
shown in Figure 8. The steps outlined in the diagram need to be carried out with minimal delay, even if the
microcontroller is in standby mode at the time.
Figure 8: Processing steps when an abnormality is detected
For example, in a system where measurement is carried out at 10-second intervals, if an abnormality occurs
immediately after a measurement has been completed (CPU went from Run to Standby), the CPU may not wake up
for as long as 10 seconds in the worst-case scenario (Figure 9 (a)). With regard to ensuring a swift response to the
abnormality, this presents a problem. A system that also enables abnormality detection while the CPU is stopped (in
the standby state) is therefore desirable. With the G11, a combination of the Stop and Snooze modes can be used to
monitor sensor output and enable triggering of an alarm signal during standby state (Figure 9 (b)).
White Paper — Save plant maintenance costs through reduced sensor power consumption Page 7 of 8
Figure 9: CPU operation when an abnormality is detected
Figure 10 illustrates a method for abnormality detection utilizing peripheral functions of the G11. In Figure 10 (b), the
DOC performs a 16-bit comparison, addition and subtraction without CPU intervention. In both Figure 10 (a) and (b),
the DTC performs register operations such as data transfer between memories while the CPU is stopped. The G11
also provides a function for outputting an interrupt flag, without any modification, as a signal (INTFO). By a suitable
combination of these functions, output of an alarm signal is possible without waking up the CPU.
Figure 10: Abnormality detection using RL78/G11 peripherals
When abnormality detection and/or alarm output has been completed, the microcontroller is returned to the CPU Run
mode. This type of wake-up operation normally requires several tens of microseconds due to processes such as
White Paper — Save plant maintenance costs through reduced sensor power consumption Page 8 of 8
switching the clock and waiting for the on-chip oscillator to stabilize. With the G11, however, the CPU wake-up time
can be reduced to as little as four to five microseconds by proper selection of the clock and flash operation mode
(Figure 4). By generating an interrupt in parallel to abnormality detection and alarm signal output, the CPU wake-up
can be triggered swiftly for smooth subsequent processing. While there may be some cases that require a more
immediate response to an abnormality, in most cases, the 5-microsecond response time will be short enough.
Documentation and useful tools available on Renesas web site
The method for using the standby functionality of the microcontroller for environmental sensor systems described
here can also be applied to other types of systems. In order to promote understanding and utilization of the standby
functionality of the G11, Renesas Electronics provides application notes and sample code on its web site.
An easy-to-use visual programming tool called “Applilet EZ PL for RL78” (Version 2.00) is also available free of
charge. Logic circuits, timers, general-purpose logic, microcontroller functions, etc., are displayed in a GUI panel and
can be combined to create a program for the microcontroller. Standby function settings can also be made easily using
a wizard format.
For G11 information and to obtain the Applilet EZ PL for RL78, please access the URLs shown below.
RL78/G11:
https://www.renesas.com/products/microcontrollers-microprocessors/rl78/rl78g1x/rl78g11.html
Applilet EZ PL for RL78:
https://www.renesas.com/products/software-tools/tools/code-generator/applilet-ez-pl-for-rl78.html
RL78/G11 RPB:
https://www.renesas.com/en-eu/solutions/key-technology/human-interface/rl78-g11.html
© 2018 Renesas Electronics America Inc. (REA). All rights reserved. All trademarks and trade names are those of their respective owners. REA
believes the information herein was accurate when given but assumes no risk as to its quality or use. All information is provided as-is without
warranties of any kind, whether express, implied, statutory, or arising from course of dealing, usage, or trade practice, including without limitation as to
merchantability, fitness for a particular purpose, or non-infringement. REA shall not be liable for any direct, indirect, special, consequential, incidental,
or other damages whatsoever, arising from use of or reliance on the information herein, even if advised of the possibility of such damages. REA
reserves the right, without notice, to discontinue products or make changes to the design or specifications of its products or other information herein. All
contents are protected by U.S. and international copyright laws. Except as specifically permitted herein, no portion of this material may be reproduced
in any form, or by any means, without prior written permission from Renesas Electronics America Inc. Visitors or users are not permitted to modify,
distribute, publish, transmit or create derivative works of any of this material for any public or commercial purposes.
Document No.: R01PM0057EU0000-RL78G11
Save Plant Maintenance Costs Through Reduced Sensor Power Consumption
To reduce maintenance costs of environmental sensor systems, the power consumption of sensors needs to be lowered. This white paper describes how to reduce the power consumption with an MCU.