This project will show you, how to build a simple Driver Quality Monitoring system. With it, the acceleration. It uses an Avnet SmartEdge Agile with Brainium Portal to gather acceleration data and a Raspberry PI Zero W combined with a SIM7000E NB-IoT HAT for location informations. The later also functions as gateway for the SmartEdge Agile.
Basic Setup - Step 1: Setup the gatewayFirst you have to install Raspbian on the PI. For this you can find help on the link below:
https://www.raspberrypi.org/documentation/installation/installing-images/
After this, install Brainium Gateway and add a device.
Basic Setup - Step 2: Create project for gathering dataOn the Brainium Portal go to Projects and create a new one and add the device to it.
On the Dashboard add a new widget tracking World Acceleration.
Click on Start Tracking and assign device.
To get the acceleration data you can record and download from the portal or use MQTT.
To start recording click on the Record Session button. To stop click on the same button again. On the appearing popup you can download the acceleration data in CSV format.
To use MQTT you can find help on the Cloud Documentation > MQTT Api page.
To gather location info I used a SIM7000E NB-IoT HAT. First connected the hat to the raspberry. They communicate via UART, however by default it is used for Linux console by default, so we need to do the fallowing steps:
- Enter the configuration page with the command below:
sudo raspi-config
- Choose Interfacing Options -> Serial -> no->yes
- To disable Linux’s use of console UART, open /boot/config.txt file, find the below statement and uncomment it to enable the UART.
enable_uart=1
- Reboot
After this you can connect to the HAT and request the location information. For this you can use the example from the Waveshare wiki,.
Putting things togetherAfter the setup was done I wanted to put all components in a closed enclosure to keep everything clean and tidy. For this I used a simple cardboard box. I connected the powerbank to the Raspberry, made a small hole for the antenna adapter and secured all parts with zip ties.
Comments