Cold Chain Monitoring Using Nordic Thingy : 91
About the project
A TinyML model using Edge Impulse will predict the status of cold chain like Over heat, Sun Light exposure etc. throughout the transport.
Items used in this project
Software apps and online services
Challenges in Cold Chain Monitoring:
- Heat Exposure
- Direct Sun Light Exposure
- Damage to the shipment due to Sudden shock / fallen down
- The TinyML model using Nordic Thingy : 91 will predict the status of Cold Storages and classifies into Normal, Over heated, Sudden Shock and Direct Sun Light exposure.
The complete architecture is mentioned below :
Nordic Thingy : 91:
- Battery-operated prototyping platform for the nRF9160 SiP
- Certifications: FCC (USA), CE (EUR)
- nRF52840 board controller
- LTE-M/NB-IoT/GNSS, Bluetooth LE and NFC antennas
- User-programmable button and RGB LEDs
- Environmental sensor for temperature, humidity, air quality and air pressure, plus a color and light sensor
- Low-power accelerometer and high-g accelerometer
- 4 x N-MOS transistors for external DC motors or LEDs
- Rechargeable Li-Po battery with 1350 mAh capacity
The Prototype development involves following steps:
- Firmware update (Connect to Edge Impulse)
- Data Acquisition
- Model Training in Edge Impulse
1. Firmware Update in Nordic Thingy : 91
Initially the Nordic Thingy :91 will not come up with the firmware supported by Edge Impulse. we need to update the firmware from Edge Impulse.
Step 1.1 ) Download the firmware.hex file from below link.
Install nRF Connect and then follow below steps:
- Open nRF Connect for Desktop and launch the Programmer application.
- Then Switch off the Nordic Thingy:91.
- Press the multi-function button (SW3) while switching SW1 to the ON position.
- Select the option" Select Device" and choose Nordic
- Add the hex file ( firmware.hex)
- And then initiate the write option. ( Make sure EnableMCUboot is Enabled)
Once it is flashed, switch off and ON the device.
Connect to Edge Impulse:
If you're a new user, create an edge Impulse account. And create new project.
Open the command prompt and run the below command:
And then it asks to choose the terminal, in my device I have connected Serial Port 8. It may varies.
Refer this link for detailed steps:Data Acquisition:
Once the device is connected to Edge Impulse. Next step is data acquisition. Before proceeding with data acquisition, I have developed a Mini Vaccine Box where I have attached the Nordic Thingy : 91.
For normal condition, I have kept ICE packs and data captured under low temperature.
Direct Sun Light :
For a Direct sun light condition, I have kept the prototype under direct sunlight exposure.
Sudden Shock :
In some cases, The items in cold chain may be sensitive to more vibrations and sudden fall. So I have trained a model by manually applying sudden fall and vibrations.
Over Heated Condition:
In most cases, The cold chain needs to be maintained in certain temperatures, I have kept the prototype in hot conditions without ice pack to simulate the over heat conditions.
The Data acquisition under different scenarios is explained in the demo video. Kindly refer for more details.Model Training
Here comes the tricky part, In this project, The nature of data is totally contrast to each other. We have captured Accelerometer, Humidity, Temperature and Infrared as an Input for the model. But Preprocessing will varies for Accelerometer data and Temp, Humidity and Infrared data.
I have selected three processing blocks ( Spectral, Flatten, Raw).
For a Preprocessing, The inputs will be :
1 / 3 • Pre Processing
For a Spectral features, The inputs will be only accelerometer data and
For Raw, the Input will be only temperature.
In create Impulse Section, the configurations shall look like this.
Neural Network Settings:
To train a model, Configure the neural network as below:
The outcome will be 94.5%.
For MQTT Demo:
For MQTT demo, follow the steps mentioned in the GitHub link.
Unfortunately, The iBasis Sim doesn't support network coverage in India, I couldn't able to show the demo.