How easy is it to implement machine learning with the MAX78000?

Publisher:EEWorld资讯Latest update time:2021-01-08 Source: EEWORLDKeywords:MAX78000  ML Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The MAX78000 is essentially an ARM Cortex-M4F microcontroller with a lot of hardware around it, including a neural network (CNN) accelerator designed by Maxim (Figure 1). This machine learning (ML) support enables the chip to do things like recognize keywords or even faces in real time without wasting power budget.

1.MAX78000 includes Cortex-M4F and RISC-V cores and CNN accelerator.

The chip also includes a notable RISC-V core, but, since it’s so new, the Cortex-M4F is the primary processor. Even CNN support is still out of beta, but that’s the point of this article.

The MAX78000 has the usual microcontroller peripheral features, including a range of serial ports, timers, and parallel/serial interfaces such as I2S. It even has a parallel camera interface, and among the analog peripherals there is an 8-channel 10-bit sigma-delta ADC, which also includes four comparators.

The chip has 512kB of flash memory as well as 128kB of SRAM and a boot ROM that allows for more complex boot processes such as secure boot support. There is on-chip key storage as well as CRC and AES hardware support, and CNN support will be available in the future. The Github-based documentation is quite informative.

The development tools are free and based on Eclipse, which is the basis for other platforms such as Texas Instruments' Code Composer Studio and Silicon Labs' Simplicity Studio. Maxim doesn't do much customization, but there are enough conveniences to use hardware such as the MAX78000 while making it easy to use third-party plugins and tools, which is very convenient when dealing with cloud or IoT development environments. The default installation includes examples and tutorials that make it easy to test CNN hardware and other peripherals.

The MAX78000 development board has two LCD displays. The larger 3.5" TFT touch display is for the processor, while the second smaller display provides power management information. The chip does not have a built-in display controller and uses a serial interface to work with the larger display. Power tracking support is very complete.

The board comes with a 16 MB QSPI flash chip for convenient storage of image data. In addition, a USB bridge to the flash chip allows for faster and easier downloading of data.

The board also adds some useful devices such as a digital microphone, a 3D accelerometer and a 3D gyroscope. Several buttons and LEDs complete the peripherals, and JTAG is supported.

As mentioned before, this time we are not using a RISC-V core, but instead we are generating C code for a Cortex-M4F to set up the CNN hardware. The CNN hardware is designed to handle a single model, but can be quickly swapped out for a new model.

As with most machine learning hardware, most programmers prefer to hide the underlying hardware, providing more of a black box operation where you set up a box and feed your data into the other end. This works well if a model is available; that is, trained with different information or using a trained model. There are challenges when developing and training new models, which is something I will avoid discussing here.

I did try out the two models that Maxim offers, including the Keyword Spotting and Facial Recognition (FaceID) apps. The Keyword Spotting app is essentially a voice recognition system that listens for keywords to launch cloud-based services, which is how most Alexa-based voice systems work, as the cloud handles everything after the keyword is recognized.

On the other hand, being able to recognize many different keywords makes it possible to build voice-based command systems, such as those used in many car navigation systems. The Cortex-M4F processes the input and makes some adjustments to provide suitable input to the CNN accelerator (Figure 2). The detected class output specifies which keyword, if any, was recognized. The application can then make use of this information.

2. The Cortex-M4F processes the initial audio input stream before handing the information over to the CNN accelerator.

The FaceID system highlights the MAX78000’s camera support (Figure 3). This can be used to recognize faces or identify specific parts moving on an assembly line. The sample application can operate using fixed input (as shown) or from a camera.

3. The FaceID application highlights the ability of CNN to process images in real time.

It's easy to get by with the defaults. Maxim provides all the example code and procedures. These can be modified slightly, but retraining the model is a more involved job, although Maxim's documentation does cover that. The examples outline what needs to be done and what needs to be changed to customize the solution.

Changing the model and application to something like a motor vibration monitoring system would be a lot of work and require a new model, but the chip would likely be able to handle it. It would just require more machine learning and CNN support.

The toolset supports models from platforms such as TensorFlow and PyTorch (Figure 4). This is useful because training is not handled by the chip but rather on a platform such as a PC or cloud server. Likewise, models can be refined and tested on high-end hardware to validate the model, which can then be trimmed to fit the MAX78000.

4. PyTorch is just one of the frameworks that the MAX78000 handles. Training is not done on the microcomputer. Maxim's tools convert the model into code that drives the CNN hardware.

At this time, documentation for the CNN accelerator and RISC-V support are both scarce. Maxim's CNN model compiler can import C code into the Eclipse IDE. Debug regular application code and remote debugging via JTAG.

Maxim also offers the MAX78000FTHR, a simplified evaluation board (Figure 5) that has no display or other peripheral hardware, but leaves most of the I/O exposed. The development board alone is only $25. When purchased in volume, the chip will cost about $15 each.

5. Simplified evaluation board MAX78000FTHR

The MAX78000 is very interesting to use. It is a great platform to support edge ML applications. However, note that while this is a very low-power solution, it is not even close to the low-end Nvidia Jetson Nano. It is interesting to examine the power tracking support, as low power consumption can be a key factor in many MAX78000 applications, especially battery-based solutions.


Keywords:MAX78000  ML Reference address:How easy is it to implement machine learning with the MAX78000?

Previous article:TDK's ultra-compact full-color laser module brings users colorful visual effects
Next article:All-round product implementation, Feiteng realizes the rise of domestically produced CPUs

Latest Embedded 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号