Posts

High-Speed SPI Communication for Arduino Nano 33 BLE Sense

Image
1. Motivation The reason why we have to develop our own low-level driver (or API) for nano 33 is because the unstable message communication while using official API: Figure 1. Result from receiver.  As Figure 1. shows, We use the official API to send the message 'I hope everything goes well' several times, but the receiver shows an inconsistent result.  When we slow down the transmission speed, the problem solved. However, the lower speed is not acceptable for many use case. That is why we have to build a stable & fast SPI API for  Arduino Nano 33 BLE Sense.  2. Basic Principle of SPI 3. Registers of nRF52840 Figure 2. Registers To-Be-Continue...

Image Skeleton Recognition Methods

OpenPose An open-source library for multi-person pose estimation. It detects key points on the human body, including joints and skeletal connections, using deep learning techniques with convolutional neural networks (CNNs).  DeepPose A method proposed by Microsoft that uses deep learning for estimating key points on the human body. It employs CNNs for end-to-end pose estimation by directly predicting joint positions from images. PoseNet Developed by Google, PoseNet is a lightweight real-time pose estimation system. It uses CNNs to detect key points on the human body and is suitable for applications requiring real-time performance. HRNet (High-Resolution Network) An advanced pose estimation method that focuses on high-resolution feature representations. It maintains and merges multi-scale feature maps to improve the accuracy of key point detection.  AlphaPose An open-source multi-person pose estimation library based on PyTorch. It uses CNNs and confidence maps to detect key points and

High speed data transmission method for Arduino nano 33 ble

Image
1. Tested flip pin speed of Arduino nano 33 BLE Sense Code:   while ( 1 ){     digitalWrite ( A0,HIGH ) ;     digitalWrite ( A0,LOW ) ; } Figure 1. approx. 426 kHz Why so slow: Control by mbed-OS  2. Tested SPI error at very low speed 34 became 68:  34: 0010 0010 68: 0100 0100 Problem: clock did not align . 3. Develop corrected SPI and test its speed FAILED: With more than 75% error transmission, it will cost at least 4 times. Risk Evaluation: Continuing SPI development by directly setting registers will face two risks: It may take many days, even weeks, to learn and debug the low-level driver for Arduino-nRF register development due to the lack of documents. There is still a risk of the not aligned clock problem. (might make many efforts in vain) 4. Direct operate register NRF_P0 -> DIRSET = 0x FF ;  //P0 lower 8bit = Input Mode while ( 1 ){   NRF_P0 -> OUTSET = 0x FF ;  // P0 lower 8bit = Output High   NRF_P0 -> OUTCLR = 0x FF ;  // P0 lower 8bit = Output Low } Figure

A note of Tiny Machine Learning: Progress and Futures

Frameworks @PC PyTorch TensorFlow MXNet JAX Frameworks @mobile phones TVM TF-Lite MNN MCNN TensorRT (NVIDIA) Frameworks @MCU CMSIS-NN (ARM) X-Cube-AI (STMicroelectronics) TF-Lite Micro (TensorFlow) microTVM (apache) MCUNet (MIT Han’s lab) TinyNAS TinyEngine Original Paper:  https://ieeexplore.ieee.org/document/10284551

Tiny machine learning at edge computing

 Embedded Machine Learning (ML)  advantages: 1. low cost 2. more use cases 3. less delay 4. energy efficient 5. privacy Edge Computing (EC) challenges [1]:  1. task scheduling 2. resource allocation 3. delay optimization 4. energy consumption optimization 5. privacy and security [1] Hua, H., Li, Y., Wang, T., Dong, N., Li, W. and Cao, J., 2023. Edge computing with artificial intelligence: A machine learning perspective.  ACM Computing Surveys ,  55 (9), pp.1-35.

TinyML Tools and Frameworks

When it comes to developing and deploying in the field of TinyML, there are several tools, libraries, and frameworks available to assist developers in creating, training, and deploying small-scale machine learning models on resource-constrained devices. These tools and libraries enable inference on embedded devices while also allowing for model quantization, pruning, optimization, and other operations to adapt to resource-limited environments. Here are some examples: Tools and Frameworks: TensorFlow Lite for Microcontrollers (TFLite Micro) : TensorFlow Lite, introduced by Google, is a tool for running TensorFlow models on mobile and embedded systems. TFLite Micro is a version tailored for microcontrollers and similar small devices, supporting deployment of lightweight models. Edge Impulse : Edge Impulse is a comprehensive platform for developing, deploying, and managing machine learning models on embedded devices. It offers a graphical interface for streamlined data collection, model t