May 13, 2024

Using MCU to create intelligent thermostat _ from the power communication / man-machine interface one by one

Driven by the wave of Internet of Things, thermostats have evolved toward the Internet of Things and intelligence. Microcontroller (MCU) developers introduce low-power, segmented LCD display control and Wi-Fi/Bluetooth/ZigBee wireless connectivity support, as well as a new 256-bit AES advanced encryption feature to help intelligent thermostats Application development.

At present, more and more Internet of Things (IoT) thermostat products are emerging in the market. This article explains how to use a microcontroller (MCU) to build an IoT thermostat, and takes the Atmel SMART SAM L22 MCU as an example. It also introduces this MCU as a segmental liquid crystal display (LCD) controller platform to implement a thermostat. The function of the application. The MCU includes a 32MHz ARM Cortex-M0+ processor to expand the company's existing low-power MCU family. Designed for human-machine interface (HMI) applications such as thermostats described in this article, it has a built-in segment display controller that supports up to three hundred and twenty segments, and an external peripheral for buttons, sliders and scroll wheels. Touch controllers (PTCs) as well as USB, TImer, SERCOM and many other peripheral devices that can be configured as USART, SPI and I2C interfaces. Low power / communication / security IoT thermostat essential features

The IoT application emphasizes the Internet of Things, so the IoT thermostat must also have network communication capabilities. In addition, in response to increased device functions and data transmission, it must also meet the characteristics of low power consumption, security and easy-to-use human-machine interface.

Using MCU to create intelligent thermostat _ from the power communication / man-machine interface one by one

Low power consumption

As with many other IoT applications, power consumption is an important consideration for IoT thermostats. IoT applications are usually battery powered, or users want them to reduce power consumption while providing more functionality than previous models. The SAM L22 MCU is designed for low power applications. When using EEMBC Coremark test with flash memory, the power consumption in operating mode is lower than 39μA/MHz, and the power consumption in standby mode is only 1.87μA (when RTC is in operation). This MCU achieves the above low power consumption thanks to its unique design and numerous features. For example, power level features allow it to choose the right performance for a specific task. The controller can quickly switch the core voltage from 1.2 volts (V) to 0.9V. Lowering the core voltage can significantly reduce overall power consumption because the power consumption of the central processing unit (CPU) increases with increasing frequency and voltage. When the core voltage is 0.9V, the maximum frequency of the CPU is 12MHz; when the core voltage is 1.2V, the maximum frequency of the CPU is 32MHz. For example, when the core voltage is 0.9V and the frequency is 12MHz, the MCU calculates a Fibonacci sequence of 28μA/MHz; when the core voltage is 1.2V and the frequency is 32MHz, the same calculation consumes 37μA/MHz.

In addition to a low dropout regulator (LDO), the MCU also includes a buck converter. Previous power consumption was measured with a buck converter and a 3.3V voltage. At this voltage, the buck converter has the highest efficiency. This is much more efficient than LDOs and enables low power consumption.

Another advantage of this MCU is the Direct Memory Access (DMA) and Event System, which enable data communication and control of external peripherals without CPU involvement. The Cortex-M0+ processor can go to sleep while each external peripheral is performing tasks or controlling each other independently.

The analog capabilities of this MCU are also designed for this type of low power application. The 12-bit 1MSPS analog-to-digital converter (ADC) measures temperature sensors in 10Ksps and single-ended modes, requiring only 60μA for analog-to-digital conversion.

communication

Second, IoT applications must communicate with the Internet, smart phones, sensors, actuators, or other IoT devices via radio frequency (RF). This MCU provides multiple input/output (I/O) interfaces for connecting various RF modules and other external peripherals. It can be equipped with up to six on-chip SERCOM external peripherals, enough to connect more components to the thermostat. Peripheral devices external to each SERCOM can be configured as USART, UART, SPI or I2C. The Atmel SmartConnect WINC3400 Wi-Fi/Bluetooth combination solution or SAM R21 for ZigBee devices can be connected to the MCU via I2C or SPI. Built-in USB can be used to implement other wired communications. The USB is a quartz-free, full-speed USB device, which means no need for an accurate external oscillator, reducing the material cost of the application (BOM).

safety

All IoT applications must have important components: security. For secure communication, the MCU is equipped with a 256-bit Advanced Encryption Standard (AES) external peripheral. It can encrypt and decrypt without increasing software expenses. In addition, it supports multiple modes, such as Cipher Block Chaining, Galois Counter Mode, and more.

AES external peripherals have built-in DifferenTIal Power Analysis Attacks. Through differential power analysis, the attacker can know the power consumption of the controller and use this data to detect the encryption and decryption key.

By adopting this method, the peripheral device of the AES can randomly increase the period of the encryption and decryption operation, and increase the difficulty for the attacker to detect the key. The MCU also includes a peripheral device that is externally connected to the True Random Number Generator (TRNG), which generates all eighty-four cycles of true random numbers. This number is important for encryption because the true random number cannot be predicted and therefore cannot be calculated mathematically. Random numbers can be used for authentication over an IP network.

The encryption key can be stored in a backup area scratchpad, flash memory, or static random access memory (SRAM). For added security, the MCU has a built-in tamper-proof unit that detects if someone is trying to turn on the thermostat. The tamper-proof pin is connected to the housing of the thermostat. When the attacker mechanically opens the outer casing of the thermostat, the tamper-proof line will break, detecting a tampering attack.

In this case, the tamper-resistant unit will initiate an "event" and the kernel will execute the corresponding software function to delete the SRAM, serial erased rewritable read-only memory (EEPROM), flash memory or other external memory. The encryption key or other material in the body.

To further enhance security, the MCU also includes the Active Layer Protection (AcTIve Layer ProtecTIon) feature.

The signal is sent to the tamper-proof input via a printed circuit board (PCB)/shell. The program will compare the input signal with the output signal, and if it does not match, it will detect tampering. If an attacker drills a hole in the PCB and cuts the tamper-proof line on the PCB, the function will also detect tampering and initiate an "event."

Human machine interface

Equally important, IoT applications require a human machine interface (HMI) or user interface. The IoT thermostat function is controlled by the end user via a smartphone. However, it must provide an option to manually change and monitor the temperature, as the smartphone may fail or be lost.

In this case, the built-in segment LCD display shows the user temperature and other information. The segment LCD controller can control up to three hundred and twenty segments and can select forty-eight LCD pins from fifty-two LCD I/O pins. Designers can also choose unused LCD pins for assisting tools or simulation functions such as SERCOM.

In addition, the SLCD controller supports a variety of functions for reducing power consumption. For example, data can be sent from the SRAM/flash memory to the display buffer via DMA.

Hardware feature mapping, automatic bit mapping (ABM), and blinking capabilities can change the content displayed on a segment LCD with very low power consumption. This change does not require a high power core. Many thermostats display the current time on their displays. The flash function is used to display seconds and is also a hardware feature of the segment LCD controller.

In addition to being able to change settings or temperatures via a wireless local area network (WLAN) or Bluetooth remote, users can perform these tasks on the thermostat. The MCU supports Atmel QTouch technology, which includes buttons, sliders and scroll wheels with mutual capacitive touch technology and self-capacitive touch technology. This MCU provides enough touch channels for such applications. With Atmel technology, touch buttons are integrated directly into the indium tin oxide (ITO) layer of the segment LCD. The touch input can be used to raise or lower the temperature, or to select a heater or sensor in another room.

Smart / touch control thermostat smarter

The thermostat monitors the wireless temperature sensors in different rooms by RF and controls the heaters in them. Users can control it via WLAN or Bluetooth low energy protocol, home network or internet, and use smart phone to control it directly.

The MCU's built-in ADC measures the temperature around the thermostat, which digitizes the external values ​​from the temperature sensor. An internal temperature sensor can be used to control external values ​​for cross-checking. The MCU's internal temperature sensor provides a two-point measurement with an accuracy of ±1°C (0∼60°C).

Another ADC channel can also be used to measure battery voltage. The Brownout Detection (BOD) feature detects low voltages and automatically shuts down the system to prevent malfunctions.

30W Medical Power Supply

30W Medical Power Supply,Dr Adapter,B Ultrasound Power Supply,B Ultrasound Adapter

Shenzhen Longxc Power Supply Co., Ltd , https://www.longxcpower.com