How to Embed Models into Microcontrollers?
Neuton, our unique neural network framework, creates natively, incredibly compact and accurate models that can easily be integrated into even the smallest microcontrollers. Since our models natively built compact without compromising accuracy we do not require performing other functions such as compression or other transformations. They are ready to be embedded into a microcontroller immediately after training is complete.

The Neuton Platform works tabular or sensory data enabling you to solve problem types such as regression, time series and classification both binomial and multinomial.
1. Model Training
Prior to the start of training, you will need to enable and configure TinyML settings that will allow the model to be optimized for use on your specific device:
Bit depth of calculations.
The choice of bit depth depends on the device and the amount of free memory on it. The available options include 8, 16, and 32 bits.
Data normalization type.
Allows you to control the number of required resources. You may select to use a single normalization scale if the data values ​​in the data set are approximately in the same range. This will make the model even more compact. If the variables in the data set have different scales, a unique type of normalization should be selected.
Support for Float calculations.
If your device supports float calculations, select this option to create models with higher accuracy. For 32 bits, the float support is enabled by default. 
Note: When using TinyML settings, Preprocessing and Feature Engineering are automatically disabled. It is important to validate that your dataset meets the minimal standards required for training.
During training, the Neuton Platform makes available a real-time dashboard so you can monitor the quality of the model, the number of coefficients as well as the model size. Once the most optimal model quality and size is achieved, training will be stopped automatically. Alternatively, you may also manually stop training once the model is deemed consistent and you have achieved your target model requirements.
2. Model Embedding
To begin the process of embedding your model into your device you should take the following steps:
1. Download the model archive (OS specific)
The archive for downloading appears immediately after you stop or complete the training. Once complete you can continue with following steps:
Information about the model
Files with weight and meta-information in two formats, binary and HEX, that are used in the calculation process. 2 formats are needed to support projects with and without a file system.
Calculator
A set of functions that is an add-on to Newton's algorithm providing predictions. For instance, the calculator includes functions for loading a model, calling call-back functions like transferring data, receiving calculation results, etc.
Neuton Library
An algorithm that performs calculations.
Implementation file
A file in which you can set the logic of actions for the results of calculations based on your business requirements.
2. Prepare the source code for the microcontroller firmware
Requirements to Embed your model:
Code for collecting data from sensors / microphone / camera, etc. You need to prepare this code yourself.
Code for processing the prediction result (for example, an alarm, message sending, etc.).
Files downloaded from the Neuton Platform (calculator, model, and library).
Modified implementation file. A call to the data collecting code and results processing should appear in it.
Note: The codes for collecting data and processing the prediction result can be written immediately in the implementation file, if they were not prepared earlier.
After the preparation of all the components, you may need to debug your solutiuon prior to implementation.
Next, your model will be loaded into your project automatically after the calculator has initialized. No additional steps are required once completed.
3. Download the firmware on the device
Flash memory contains the firmware code and the model, RAM contains the data necessary for the model operation: accumulators for neurons, service information, etc.
After updating the firmware on the device, the data from the sensors will be transmitted to the calculator performing the prediction and returning the result in a fraction of a second. Then the prediction results are processed according to the logic you specified while defining your application requirements.
Note: The input data for predictions must be identical in format to the data used for the training, including the order of columns. In this case, the target variable should be excluded.
Note: The option to download the model is available in Neuton’s Third Law (Subscription plan). However, in other plans, you can evaluate the quality of the model and its size in our web interface. 
Contact Us
Get in touch to learn more
Contact Us
Contact Us
Thank you!
Please check your inbox. We will reach out to you shortly with the next steps.
Contact Us
Thank you!
Please check your inbox. We will reach out to you shortly with the next steps.