Unit - 3 Iot and Applications
Unit - 3 Iot and Applications
Unit - 3 Iot and Applications
IOT HARDWARE
Transducer :
A transducer converts a signal from one physical structure to another.
It converts one type of energy into another type.
It might be used as actuators in various systems.
Sensors characteristics :
1. Static
2. Dynamic
1. Static characteristics :
It is about how the output of a sensor changes in response to an input change after steady state condition.
Accuracy –
Accuracy is the capability of measuring instruments to give a result close to the true value of the measured
quantity. It measures errors. It is measured by absolute and relative errors. Express the correctness of the output
compared to a higher prior system. Absolute error = Measured value – True value
Relative error = Measured value/True value
Range –
Gives the highest and the lowest value of the physical quantity within which the sensor can actually sense. Beyond
these values, there is no sense or no kind of response.
e.g. RTD for measurement of temperature has a range of -200`c to 800`c.
Resolution –
Resolution is an important specification towards selection of sensors. The higher the resolution, better the precision.
When the accretion is zero to, it is called threshold.
Provide the smallest changes in the input that a sensor is able to sense.
Precision –It is the capacity of a measuring instrument to give the same reading when repetitively measuring the
same quantity under the same prescribed conditions. It implies agreement between successive readings, NOT
closeness to the true value. It is related to the variance of a set of measurements. It is a necessary but not sufficient
condition for accuracy.
Sensitivity –Sensitivity indicates the ratio of incremental change in the response of the system with respect to
incremental change in input parameters. It can be found from the slope of the output characteristics curve of a
sensor. It is the smallest amount of difference in quantity that will change the instrument’s reading.
Linearity –The deviation of the sensor value curve from a particular straight line. Linearity is determined by the
calibration curve. The static calibration curve plots the output amplitude versus the input amplitude under static
conditions. A curve’s slope resemblance to a straight line describes the linearity.
Drift –The difference in the measurement of the sensor from a specific reading when kept at that value for a long
period of time.
Repeatability –The deviation between measurements in a sequence under the same conditions. The measurements
have to be made under a short enough time duration so as not to allow significant long-term drift.
Actuators in IoT
An IoT device is made up of a Physical object (“thing”) + Controller (“brain”) + Sensors + Actuators + Networks
(Internet). An actuator is a machine component or system that moves or controls the mechanism or the system.
Sensors in the device sense the environment, then control signals are generated for the actuators according to the
actions needed to perform. A servo motor is an example of an actuator. They are linear or rotatory actuators, can
move to a given specified angular or linear position. We can use servo motors for IoT applications and make the
motor rotate to 90 degrees, 180 degrees, etc., as per our need. The following diagram shows what actuators do, the
controller directs the actuator based on the sensor data to do the work.
1. Hydraulic Actuators – A hydraulic actuator uses hydraulic power to perform a mechanical operation. They are
actuated by a cylinder or fluid motor. The mechanical motion is converted to rotary, linear, or oscillatory motion,
according to the need of the IoT device. Ex- construction equipment uses hydraulic actuators because hydraulic
actuators can generate a large amount of force.
Advantages :
Hydraulic actuators can produce a large magnitude of force and high speed.
Used in welding, clamping, etc.
Used for lowering or raising the vehicles in car transport carriers.
Disadvantages :
Hydraulic fluid leaks can cause efficiency loss and issues of cleaning.
It is expensive.
It requires noise reduction equipment, heat exchangers, and high maintenance systems.
2. Pneumatic Actuators – A pneumatic actuator uses energy formed by vacuum or compressed air at high pressure
to convert into either linear or rotary motion. Example- Used in robotics, use sensors that work like human fingers
by using compressed air.
Advantages :
They are a low-cost option and are used at extreme temperatures where using air is a safer option than chemicals.
They need low maintenance, are durable, and have a long operational life.
It is very quick in starting and stopping the motion.
Disadvantages :
Loss of pressure can make it less efficient.
The air compressor should be running continuously.
Air can be polluted, and it needs maintenance.
3. Electrical Actuators – An electric actuator uses electrical energy, is usually actuated by a motor that converts
electrical energy into mechanical torque. An example of an electric actuator is a solenoid based electric bell.
Advantages :
It has many applications in various industries as it can automate industrial valves.
It produces less noise and is safe to use since there are no fluid leakages.
It can be re-programmed and it provides the highest control precision positioning.
Disadvantages :
It is expensive.
It depends a lot on environmental conditions.
Other actuators are –
Thermal/Magnetic Actuators – These are actuated by thermal or mechanical energy. Shape Memory Alloys
(SMAs) or Magnetic Shape‐Memory Alloys (MSMAs) are used by these actuators. An example of a
thermal/magnetic actuator can be a piezo motor using SMA.
Mechanical Actuators – A mechanical actuator executes movement by converting rotary motion into linear
motion. It involves pulleys, chains, gears, rails, and other devices to operate. Example – A crankshaft.
Soft Actuators
Shape Memory Polymers
Light Activated Polymers
With the expanding world of IoT, sensors and actuators will find more usage in commercial and domestic
applications along with the pre-existing use in industry.
I/O Interfaces
A parallel interface refers to a multi line channel with each line capable of transmitting several bits of data
simultaneously. They usually require buses of data — transmitting across eight, sixteen, or more wires. Data is
transferred in huge, crashing waves of 1’s and 0’s. Serial interfaces stream their data, one single bit at a time. These
interfaces can operate on as little as one wire, usually never more than four. Serial interfaces have certain advantages
over parallel interfaces. The most significant advantage is simpler wiring. In addition, serial interface cables can be
longer than parallel interface cables, because there is much less interaction (crosstalk) among the conductors in the
cable. Most hardware interfaces are serial interfaces sacrificing potential speed in parallel. Serial interfaces generally
use multiple wires to control the flow and timing of binary information along the primary data wire. Each type of
hardware interface defines a method of communicating between a peripheral and the central processor. IoT hardware
platforms use a number of common interfaces. Sensor and actuator modules can support one or more of these interfaces:
USB. Universal Serial Bus is a technology that allows a person to connect an electronic device to a microcontroller.
It is a fast serial bus.
GPIO. General-purpose input/output pins area generic pin on an integrated circuit or computer board whose
behavior — including whether it is an input or output pin — is controllable by the user at run time. GPIO pins have
no predefined purpose, and go unused by default. GPIO pins can be designed to carry digital or analog signals, and
digital pins have only two states: HIGH or LOW.
Digital GPIO can support Pulse Width Modulation (PWM). PWM lets you very quickly switch a power source on
and off, with each “on” phase being a pulse of a particular duration, or width. The effect in the device can be a lower
or higher power level. For example, you can use PWM to change the brightness of an LED; the wider the “on”
pulses, the brighter the LED glows.
Analog pins might have access to an on-board analog-to-digital conversion (ADC) circuit. An ADC periodically
samples a continuous, analog waveform, such as an analog audio signal, giving each sample a digital value between
zero and one, relative to the system voltage.
When you read the value of a digital I/O pin in code, the value can must be either HIGH or LOW, where an analog
input pin at any given moment could be any value in a range. The range depends on the resolution of the ADC. For
example an 8-bit ADC can produce digital values from 0 to 255, while a 10-bit ADC can yield a wider range of
values, from 0 to 1024. More values means higher resolution and thus a more faithful digital representation of any
given analog signal.
The ADC sampling rate determines the frequency range that an ADC can reproduce. A higher sampling rate results
in a higher maximum frequency in the digital data. For example, an audio signal sampled at 44,100 Hz produces a
digital audio file with a frequency response up to 22.5 kHz, ignoring typical filtering and other processing. The bit
precision dictates the resolution of the amplitude of the signal.
I2C. Inter-Integrated Circuit serial bus uses a protocol that enables multiple modules to be assigned a discrete address
on the bus. I2C is sometimes pronounced “I two C”, “I-I-C”, or “I squared C”. I has two wires, a clock and data
wire.
SPI. Serial Peripheral Interface/Interchange Bus devices employ a master-slave architecture, with a single master
and full-duplex communication.
UART. Universal Asynchronous Receiver/Transmitter devices translate data between serial and parallel forms at
the point where the data is acted on by the processor. UART is required when serial data must be laid out in memory
in a parallel fashion.
RS 232 Recommended Standard 232 is used for obtaining communication between the computer and circuit such to
transfer data between circuit and computer.
Data Collection
This software manages sensing, measurements, light data filtering, light data security, and aggregation of
data. It uses certain protocols to aid sensors in connecting with real-time, machine-to-machine networks. Then it
collects data from multiple devices and distributes it in accordance with settings. It also works in reverse by
distributing data over devices. The system eventually transmits all collected data to a central server.
Device Integration
Software supporting integration binds (dependent relationships) all system devices to create the body of the
IoT system. It ensures the necessary cooperation and stable networking between devices. These applications are the
defining software technology of the IoT network because without them, it is not an IoT system. They manage the
various applications, protocols, and limitations of each device to allow communication.
Real-Time Analytics
These applications take data or input from various devices and convert it into viable actions or clear patterns
for human analysis. They analyze information based on various settings and designs in order to perform automation-
related tasks or provide the data required by industry.
1. Source Port: Source Port is a 2 Byte long field used to identify the port number of the source.
2. Destination Port: It is a 2 Byte long field, used to identify the port of the destined packet.
3. Length: Length is the length of UDP including the header and the data. It is a 16-bits field.
4. Checksum: Checksum is 2 Bytes long field. It is the 16-bit one’s complement of the one’s complement sum of
the UDP header, the pseudo-header of information from the IP header, and the data, padded with zero octets at
the end (if necessary) to make a multiple of two octets.
Notes – Unlike TCP, the Checksum calculation is not mandatory in UDP. No Error control or flow control is
provided by UDP. Hence UDP depends on IP and ICMP for error reporting.
Applications of UDP:
Used for simple request-response communication when the size of data is less and hence there is lesser concern
about flow and error control.
It is a suitable protocol for multicasting as UDP supports packet switching.
UDP is used for some routing update protocols like RIP(Routing Information Protocol).
Normally used for real-time applications which can not tolerate uneven delays between sections of a received
message.
Following implementations uses UDP as a transport layer protocol:
NTP (Network Time Protocol)
DNS (Domain Name Service)
BOOTP, DHCP.
NNP (Network News Protocol)
Quote of the day protocol
TFTP, RTSP, RIP.
The application layer can do some of the tasks through UDP-
Trace Route
Record Route
Timestamp
UDP takes a datagram from Network Layer, attaches its header, and sends it to the user. So, it works fast.
Actually, UDP is a null protocol if you remove the checksum field.
1. Reduce the requirement of computer resources.
2. When using the Multicast or Broadcast to transfer.
3. The transmission of Real-time packets, mainly in multimedia applications.
Working of TCP
To make sure that each message reaches its target location intact, the TCP/IP model breaks down the data
into small bundles and afterward reassembles the bundles into the original message on the opposite end. Sending the
information in little bundles of information makes it simpler to maintain efficiency as opposed to sending everything
in one go. After a particular message is broken down into bundles, these bundles may travel along multiple routes if
one route is jammed but the destination remains the same.
We can see that the message is being broken down, then reassembled from a different order at the destination For
example, When a user requests a web page on the internet, somewhere in the world, the server processes that request
and sends back an HTML Page to that user. The server makes use of a protocol called the HTTP Protocol. The HTTP
then requests the TCP layer to set the required connection and send the HTML file. Now, the TCP breaks the data
into small packets and forwards it towards the Internet Protocol (IP) layer. The packets are then sent to the destination
through different routes. The TCP layer in the user’s system waits for the transmission to get finished and
acknowledges once all packets have been received.
Features of TCP/IP
A typical consumer-grade Bluetooth device has a minimum range of 10 metres, with the total transmission power
rated under 2.5 milliwatts. This allows tiny peripherals such as wireless earbuds and mice to operate wirelessly
without draining their limited battery reserves. The simple ad hoc (peer-to-peer) nature of a Bluetooth connection
also reduces the electronic complexity and therefore the cost of implementing it, which makes it perfect for
connecting devices to inexpensive peripherals such as headsets and input devices. Although the widely found Class
2 Bluetooth devices operate at a range of 10 metres and up, Class 3 Bluetooth radios are restricted to a maximum
range of a single metre for mostly wearable applications. However, such Class 3 devices are extremely rare at the
moment. Interestingly, while the Bluetooth specification mandates a range of 10 metres and up for Class 2 devices,
the Class 1 Bluetooth equipment used in industrial applications can be paired with high powered radios to extend
well beyond the 100-metre range.
Bluetooth Wi-Fi
Carrier Frequency 2.4GHz 2.4GHz, 5GHz, 6GHz
Specifications Authority Bluetooth SIG IEEE
Network Topology Point-to-Point, Mesh, Broadcast Hub, Mesh
Maximum Bandwidth 3Mbps 9.8Gbps
Typical Range 1-30 meters 46-92 meters
Typical Latency 3-200ms 150ms
Cost of Implementation Low High
Ease of Use Simple Complicated
The Bluetooth protocol was primarily designed with the ad hoc or peer-to-peer network topology in mind.
This made sense since it was designed to connect computers and mobile devices with one another and with wireless
peripherals. It is also engineered to work with a reduced wireless connectivity range and therefore significantly
lower power consumption. This works well owing to the portable nature of devices supporting the Bluetooth
protocol and their proximity to the host machines. Wi-Fi, on the other hand, employs a hub network topology to
create a wireless local area network conducive to homes and small offices. This explains its heavy focus on higher
data transfer speeds and significantly longer range, not to mention the hardware complexity associated with running
a larger network with a far larger number of connected devices. Having said that, both Bluetooth and Wi-Fi have
added features that blur the lines between the two wireless communication standards. More recently, Bluetooth 5
and its various revisions have added limited mesh networking capabilities. Meanwhile, Wi-Fi, too, has tried its
hand at peer-to-peer connectivity with Wi-Fi Direct.
The Bluetooth standard adapted accordingly by shifting the focus from improving range and data throughput from
version 1.0 through 3.0 to subsequently committing a course correction towards power efficiency with Bluetooth
Low Energy in version 4.0 onwards. Let’s take a closer look at how the wireless communication protocol has
evolved over the years.
Bluetooth 1.1 fixed some of these glaring issues, but the standard didn’t become viable until the release of Bluetooth
1.2 which improved transmission speeds to 721Kbps with advanced signal processing techniques and faster
connection discovery.
Marketed as Bluetooth 5, the current-gen iteration of the wireless protocol was geared largely around
improving the IoT features introduced by its predecessor. The bulk of the improvements is geared towards
increasing data transfer rates as well as range for BLE devices. Bluetooth 5 makes clever use of the inverse relation
between data transmission speed and range in wireless communication. So instead of limiting BLE to its previous
1Mbps data transfer limit, Bluetooth 5 splits the BLE protocol into 2Mbps, 1 Mbps, 500Kbps, and 125Kbps tiers.
This allows low range BLE devices such as headphones to achieve greater bandwidth, whereas industrial and home
automation sensors that don’t require transmitting large amounts of data can trade speed for an increased range.
This allows low-speed BLE devices to cover as much as 240 meters. However, the coolest addition to Bluetooth 5
was the “Dual Audio” feature that allows a single audio streaming device to broadcast content to two separate
Bluetooth devices, such as wireless headphones as well as speakers at the same time. The feature also all ows two
disparate audio streams to be broadcast to different Bluetooth devices.
In early 2019, Bluetooth 5.1 added a mesh-based model hierarchy. This is a potentially game-changing
upgrade that transforms the very behaviour of Bluetooth networks from simple peer-to-peer affairs to a more
complex topology, where multiple devices can communicate with the host as well as with each other. In a way, this
potentially blurs the lines between Wi-Fi and Bluetooth in terms of core networking architecture.
Bluetooth 5.2 is the latest launched version (with 5.3 in the works) as of this writing. Bluetooth Low
Energy Audio, which was unveiled at CES 2020 remains its most significant contribution, apart from minor quality-
of-life improvements. The new addition standardises audio transmission over BLE Audio, while also reducing
power consumption to improve battery life for TWS earbuds and wireless headsets with the new LC3 audio codec.
While Bluetooth 5 allowed streaming audio to two separate devices, version 5.2 allows one-to-many and many-to-
one broadcast. This enables multiple Bluetooth audio devices to play audio from a single source, while also allowing
multiple sources to simultaneously serve several audio streams to a single receiver.
The wireless protocol’s shift to battery efficient low energy mode with BLE made it attractive for smart
home and industrial automation applications. However, the last few revisions have added interesting location-based
features such as angle of arrival (AoA) and angle of departure (AoD) detection. These allow Bluetooth networks
to estimate the signal direction and achieve a claimed centimetre-level positional accuracy. With distance
measurement coming in future Bluetooth revisions, the new positioning capability will open a host of interesting
applications in the realm of home automation as well as in the industrial domain. Imagine smart home devices that
detect and automatically react to your presence, instead of requiring manual human intervention. The possibilities
are limited by the imagination of device manufacturers at this juncture. Only time will tell how the industry reacts
to these new exciting features that Bluetooth puts at its disposal.
Bluetooth Low Energy Architecture:
The architecture of Bluetooth Low Energy is divided into three important layers:
Application
Host
Controller
Application
We will develop multiple applications for several IoT and Bluetooth Low Energy use cases throughout the
course of this book and these applications will be hosted in the application layer of a Bluetooth Low Energy compatible
device. This is the layer which will contain the user interface, application logic, and the overall application
architecture. A working knowledge of this layer is necessary to start building Bluetooth Low Energy oriented
applications. However, it is always good to know what goes under the hood and how our application talks to the
underlying Bluetooth Low Energy hardware/chipset; hence, we will also explore the host and the controller layers.
Host
Lying just the following Application layer is the Host layer, which has the following layers:
Generic Access Profile (GAP): This defines how Bluetooth Low Energy devices access and communicate
with each other. Bluetooth Low Energy devices can connect to each other in one of the following roles:
o Broadcaster: Also referred to generically as peripheral, this is a role where a Bluetooth Low Energy
device broadcasts/advertises information packets.
o Observer: Also referred to generically as central, this is a role where a Bluetooth Low Energy
device listens for the packets and then decides to initiate a connection, or not, depending on the use
case.
Generic Attribute Profile (GATT): This defines how data or attributes are formatted, packaged, and sent
across connected devices according to its described rules. Similar to GAP, there are certain roles that
interacting devices can adopt:
o Client: This typically sends a request to the GATT server. The client can read and/or write
attributes/data found on the server.
o Server: One of the main roles of the server is to store attributes/data. Once the client makes a
request, the server must make the attributes/data available.
Attribute Protocol: This defines rules for accessing attributes/data on a device. A GATT profile is built on
top of the attribute protocol. Although GATT implements the client server roles, these are defined by
the Attribute Protocol. This protocol also defines the fact that data on a server will be arranged in the form
of attributes each of which will have:
o A 16-bit attribute handle
o A UUID
o A set of permissions
o A value
Next, the protocol also defines various read and write operations for attributes also known as ATT operations:
Read Operations
Write Operations: These are of type Write Requests with Response (write to an attribute and expect a
response), Write (write without expecting acknowledgement), Signed Write (similar to write but uses a
signature to authenticate the data)
Indications: These are asynchronous notification operations initiated by the server for the client. This is
initiated if the client has subscribed to the updates of attribute values. It requires an acknowledgement from
the client.
Notifications: are similar to an indication. The only difference is that they do not require an
acknowledgement from the client.
All in all, Attribute Protocol is just a set of rules related to accessing data. Don't worry if you don't understand the
specifications, that is, characteristics, services, and profiles, which help Bluetooth Low Energy devices to discover
significance of it at this stage. We will be covering the significance of these characteristics/attributes and related
operations in the upcoming sections:
Security Manager Protocol: This defines rules regarding authentication processes such as pairing
Logical Link Controller and Adaptation Protocol (L2CAP): This defines the following rules:
o Fragmentation and defragmentation of application data
o Multiplexing and demultiplexing of multiple channels over a shared logical link
The Host layer defines three very important, identify, and talk to each other It really can't be stressed enough that a
thorough understanding of these three specifications is absolutely imperative to design robust Bluetooth Low Energy
oriented applications. We will go over each of these in detail, right after we have briefly touched on the controller
layer.
Controller: Simply speaking, the controller is the actual Bluetooth chip or hardware, which facilitates transmission
and receipt of Bluetooth signals:
TI CC2540 Bluetooth Low Energy SoC
It consists of the Link Layer and the Physical Layer. As the name already suggests, the Physical layer consists of
all the complex analog circuits, which transmit and receive the digital data over the air. The Link Layer, on the other
hand, is responsible for scanning, advertising, creating, and maintaining links (connections) between devices. The link
layer can have five states: Standby, Advertising, Scanning, Initiating, and Connection (master- slave):
Delving deeper into the three main pillars of the Bluetooth Low Energy technology should have already given
you an idea of what lies under the hood. Now, as promised, let's discuss the important specifications defined by
the Host layer, starting with profiles.
Interrupt Controller
The CPU subsystem includes a nested vectored interrupt controller (NVIC) with 32 interrupt inputs and a
wakeup interrupt controller (WIC), which can wake the processor from Deep-Sleep mode. The Cortex-M0 CPU of
PSoC 4 implements a non-maskable interrupt (NMI) input, which can be tied to digital routing for general-purpose
use.
Memory
The PSoC 4 memory subsystem consists of flash and SRAM. A supervisory ROM, containing boot and
configuration routines, is also present
Flash
The PSoC 4 has a flash module, with a flash accelerator tightly coupled to the CPU, to improve average
access times from the flash block. The flash accelerator delivers 85 percent of single-cycle SRAM access performance
on an average.
SRAM
The PSoC 4 provides SRAM, which is retained during Hibernate mode.
System-Wide Resources
Clocking System
The clocking system for the PSoC 4 device consists of the internal main oscillator (IMO) and internal low-
speed oscillator (ILO) as internal clocks and has provision for an external clock, external crystal oscillator (ECO), and
watch crystal oscillator (WCO). The IMO with an accuracy of ±2 percent is the primary source of internal clocking in
the device. Multiple clock derivatives are generated from the main clock frequency to meet various application needs.
The ILO is a low-power, less accurate oscillator and is used as a source for LFCLK, to generate clocks for peripheral
operation in Deep-Sleep mode. Its clock frequency is 32 kHz with ±60 percent accuracy.
Power System
The PSoC 4 operates with a single external supply in the range 1.71 V to 5.5 V. PSoC 4 has four low-power
modes – Sleep, Deep-Sleep, Hibernate, and Stop – in addition to the default Active mode. In Active mode, the CPU
runs with all the logic powered. In Sleep mode, the CPU is powered off with all other peripherals functional. In Deep-
Sleep mode, the CPU, SRAM, and high-speed logic are in retention; the main system clock is OFF while the low-
frequency clock is ON and the low-frequency peripherals are in operation. In Hibernate mode, even the low-frequency
clock is OFF and low-frequency peripherals stop operating. Multiple internal regulators are available in the system to
support power supply schemes in different power modes.
GPIO
Every GPIO in PSoC 4 has the following characteristics:
■ Eight drive strength modes
■ Individual control of input and output disables
■ Hold mode for latching previous state
■ Selectable slew rates
■ Interrupt generation – edge triggered
■ CapSense and LCD drive support
PSoC 4 also has two over-voltage tolerant ports , which enable I2C Fast Mode power down specification
compliance and have the ability to connect to higher voltage buses while operating at lower VDD. The pins are
organized in a port that is 8-bit wide. A high speed I/O matrix is used to multiplex between various signals that may
connect to an I/O pin. Pin locations for fixed function peripherals are also fixed.
Fixed-Function Digital
Timer/Counter/PWM Block
The Timer/Counter/PWM block consists of four 16-bit counters with user-programmable period length. The
functionality of these counters can be synchronized. Each block has a capture register, period register, and compare
register. The block supports complementary, dead-band programmable outputs. It also has a kill input to force outputs
to a predetermined state. Other features of the block include centeraligned PWM, clock prescaling, pseudo random
PWM, and quadrature decoding.
Analog System
SAR ADC
PSoC 42xx-BL has a configurable 12-bit 1-Msps SAR ADC and PSoC 41xx-BL has a similar 12-bit SAR
ADC with 806 ksps. The ADC provides three internal voltage references (VDDA, VDDA/2, and VREF) and an
external reference through a GPIO pin. The SAR hardware sequencer is available, which scans multiple channels
without CPU intervention .
Continuous Time Block mini
The Continuous Time Block mini (CTBm) provides continuous time functionality at the entry and exit points
of the analog subsystem. The CTBm has two highly configurable and high-performance opamps with a switch routing
matrix. The opamps can also work in comparator mode. PSoC 42xx-BL has two such CTBm blocks, while PSoC
41xx-BL has one CTBm block. The block allows open-loop opamp, linear buffer, and comparator functions to be
performed without external components. PGAs, voltage buffers, filters, and trans-impedance amplifiers can be
realized with external components.CTBm block can work in Active, Sleep, and Deep-Sleep modes.
Low-Power Comparators
The PSoC 4xxx-BL has a pair of low-power comparators, which can operate in all device power modes. This
functionality allows the CPU and other system blocks to be disabled while retaining the ability to monitor external
voltage levels during low-power modes. Two input voltages can both come from pins, or one from an internal signal
through the AMUXBUS.