Home Articles What you need to know to define a microcontroller with Wi-Fi connection

What you need to know to define a microcontroller with Wi-Fi connection

Connection

Alex Li, Microchip Technology

As industrial IoT evolves, the trend is toward packing more features into a single SoC (system-on-chip) instead of multiple discrete devices because the result is a shorter bill of materials, lower design risk and the need for less space, among other advantages. An excellent example is the Wi-Fi microcontroller that integrates Wi-Fi connectivity with a processor and the GPIO (General Purpose I/O) required to meet the needs of a wide variety of applications. When defining one of these devices, many factors must be taken into account and to make a prudent decision it is important to know them well.

Today's market offers low-cost Wi-Fi connectivity options, but often requires sacrifices in the number of peripherals and other aspects. This means that choosing the best Wi-Fi microcontroller is difficult and risky because a Wi-Fi microcontroller must not only have robust Wi-Fi connectivity but also high-performance features. Failure to comply with one or both of these aspects will cause the entire design project to be delayed or even fail. The microcontroller, as the core of the system, is the most important part of the Wi-Fi microcontroller, so it is necessary to study its performance at the beginning of the project because changing the device later often requires redesign of all software and circuit configuration. assistant.

Don't forget the ADC

Analog-to-digital (A/D) conversion is one of the most neglected functions when defining a Wi-Fi microcontroller despite being the first processing component in the signal chain after the analog input. This means its performance is very important for the whole system, so it is important to know the main parameters about the A/D converter (ADC) and how it should be addressed by the Wi-Fi microcontroller manufacturer.

One of the first specifications designers should pay attention to is the number of bits on the ADC. This can be confusing because in practice the actual number of bits will be less than stated in the datasheet, sometimes substantially. The most important thing is the number cash bits (effective number of bits, ENOB) available to the ADC to carry out the conversion. This will always be lower than what is indicated in the datasheet but it is very important that the ENOB and datasheet specifications are very similar as it varies considerably between different ADCs. The fewer the number of bits available to perform the conversion, the less accurately the SoC will represent the input signal.

Also, like all electronic devices, ADCs “add” something to the signal that negatively affects its capabilities, including quantization and timing errors, offset, gain, and linearity variations. ADCs are also notable for their sensitivity to large temperature variations that are common in many industrial IoT operating environments (see Figure 1). This can be mitigated by the Wi-Fi microcontroller manufacturer, so it is important to contact the manufacturer of each candidate Wi-Fi microcontroller to determine its ENOB, performance vs. temperature, linearity, and accuracy. If this information is not available, please continue.

adc
Figure 1. Low-end ADCs are characterized by low accuracy and linearity, and are sensitive to environment and temperature.

Peripherals

All Wi-Fi microcontrollers support at least a few connection standards, so it's easy to assume they'll suffice. Engineers often regret this assumption when trying to use the same Wi-Fi microcontroller in another design. This is becoming more and more common when developing or modifying industrial IoT systems since production plants usually consist of a wide variety of machines and controllers that have been manufactured and installed at different times by different companies.

As your system grows, it is likely to add more interfaces and there will come a time when you require features like touch sensing and LCD connection. If the SoC has GPIO left over, it will be able to control more relays, switches and other components sharing few or even no pins. For this reason, the interfaces supported by the device should include Ethernet MAC, USB, CAN, CAN-FD, SPI, I2C, SQI, UART, and JTAG (as well as potentially sending touch signals and support for a display) to ensure it fits virtually any application, now and in the near future.

Safety starts from within

Security is essential for all IoT applications but in the industrial environment it is paramount. When a threat enters an industrial IoT network, it can affect the entire plant and possibly the entire company. The first level of security required is within the microcontroller's embedded cryptographic engine, where encryption and authentication are performed sequentially or in parallel. As far as AES encryption is concerned, they should use keys of up to 256 bits, DES and TDES, while authentication should be
SHA-1, SHA-256 and MD-5.

Since each cloud service provider has its own certification and its own keys, provisioning all of this to the device is complicated, requires considerable knowledge of cryptography, and represents some of the most difficult tasks when designers prepare their product for a service on the cloud. cloud. Fortunately, some manufacturers like Microchip Technology simplify this process, thus saving a lot of time and money. It is worth noting that this approach saves time and confusion: the design process can be shortened by several weeks or even more, while also ensuring that all security and supply requirements are met in a proven and verifiable way.

Importantly, most Wi-Fi microcontrollers store credentials in flash memory, where the data is accessible and vulnerable to software and physical attacks. Maximum security is achieved by storing this information in a hardware-encoded security element because the data it contains cannot be read by any external software. For example, Microchip's Wi-Fi microcontrollers such as the WFI32 (Figure 2) apply this technique in the company's Trust&GO platform to ensure the security of their microcontrollers when connected to AWS IoT, Google Cloud, Microsoft Azure, and third-party TLS networks.

wifi module
Figure 2. The WFI32 Wi-Fi module isolates credentials by storing them in hardware, making them virtually invulnerable to hacking.

Figure 2. The WFI32 Wi-Fi module isolates credentials by storing them in hardware, making them virtually invulnerable to hacking.

Pre-provisioned, preconfigured, or custom secure elements store generated credentials within Hardware Secure Modules (HSMs) embedded in the device when it is manufactured, isolating them from exposure during and after production. The Trust&Go platform only requires a low cost development kit from Microchip which the designer works on within the included design package, using tutorials and code samples to create the required manifest file. When the C code for the secure element works in the application, the design can be pushed to production.

The other type of security required is the most advanced Wi-Fi security certified by the Wi-Fi Alliance. The latest version is WPA3, building on its predecessor WPA2 by adding features that simplify Wi-Fi security and provide stronger authentication, enhance cryptographic strength, and maintain network resiliency. All new devices must be WPA3 certified to use the Wi-Fi Alliance logo, so all Wi-Fi chips and all Wi-Fi microcontrollers must be certified for maximum security. However, it should be checked that the microcontroller
Candidate Wi-Fi is WPA3 certified.

Ensure interoperability

It is always possible that a Wi-Fi microcontroller cannot communicate with some access points on the market due to RF mismatch, software and other factors. The inability to connect to widely used access points could affect a company's reputation. While it is impossible to guarantee that a Wi-Fi microcontroller will work with every access point (AP) on the planet, the problem can be minimized by verifying that the Wi-Fi microcontroller has passed interoperability tests with the most common APs. From the market. This information can be found on the manufacturers' websites, but it is not always easy to find. Call the manufacturer, request this information, and if they do not provide it, go to another supplier.

you will need help

Last but not least, there is a need for design support. Without a platform in the form of an integrated development environment (IDE), the designer is forced to plug in resources from the Internet that may or may not be useful, simple, or reliable. For example, a few manufacturers of Wi-Fi microcontrollers provide basic product information and instructions for prototyping, which do not go beyond providing the information required when moving from prototyping to production.

For this information to be useful, the manufacturer would have to supply a complete IDE
(Figure 3) that includes all the analog and digital functions performed by the Wi-Fi microcontroller as well as all the external components that are needed for its implementation in certain applications. It should serve as a means to visualize how design changes are reflected in performance and the ability to assess the RF performance of the design as well as regulatory compliance. Some of the basic tools are free, while others can be purchased at an affordable cost, such as evaluation cards designed for the manufacturer's family of Wi-Fi microcontrollers.

prototype development
Figure 3. An integrated environment like this decreases risk by providing the designer with debugging and other tools from the prototyping stage to the finished product.

Summary

The trend in IoT indicates more processing power towards the edge of the network instead of relying solely on cloud-based data centers. For this, it is necessary to integrate as many functions as possible in the smallest space and with the fewest number of components. The Wi-Fi microcontroller is one of many SoCs that have gone a long way in this regard by integrating many functions into a single device instead of using discrete components that perform a specific function.

Integrating these devices into an embedded IoT subsystem can be relatively straightforward as long as the Wi-Fi microcontroller manufacturer provides the appropriate resources. Among these are a high level of security, an agile way of provisioning it to suit the needs of cloud service providers, and a comprehensive IDE that guides the designer from prototype development to production.