Introduction: Detective work Emergencials Situations - Qualcomm Dragonboard 410c

Looking security systems who works to monitoring emergencials situations, information technology's affirmable to notice that is as well hard to cognitive process all the entropy recorded. Intelligent about that, we decided to use our knowledge in audio/image processing, sensors and actuators to create one complete system that makes possible to predict situations where the great unwashe's lives are in danger.

This throw haver localised sensor and remote devices to collect data and send to the dragonboard, which has processing power surefooted of extracting important information from the information received.

The inaccessible twist is an Arduino panel with a module HC-06 turn possible to tranfer every the informations, and a low cost wide net capable of processing extraordinary amount of data.

Step 1: Required Components

Step 2: Making Distant Device

Now it's clock to colligate all the following components to the Arduino Display board, creating a device that bequeath receive the data from the ambience (noise, humidness, temperature, etc), and send to the Dragonboard aside the bluetooth mental faculty HC-06.

It's necessary to ante up attention on the conections, because complete the sensor has specifcs places to conect.

On the system of rules, it's workable to have more than one device to pull in information. The Thomas More devices you have installed in the environment, Sir Thomas More accurate the diagnostics generated by data processing is. Since it will be thinkable to extract a wider range of information that may be useful.

We decided to utilize an arduino board because has more than miscible sensors, and it's possible to install this removed devices in diferents places, assembling more informations.

The local device is the DragonBoard 410c, wich process audio, video, digital and analog informations with your powerful SnapDragon 410 processor.

Placing of the components (Remote Devide)

Wich unrivalled piece has some pins that moldiness to be connectected in the right pins on the arduino pro miniskirt get on.

Bluetooth module HC-06 has 4 pins:

  • TX (Transmissor) -> connected on the RX Arduino's pin
  • RX (Receiver) -> connected connected the Lone-Star State Arduino's pin
  • VCC -> connected happening the 5v
  • GND

DHT 11 Sensor has 4 pins (but only 3 occupied):

  • Signal -> conected on a integer pin
  • VCC -> connected on the 5v
  • GND

PIR Sensor has 3 pins:

  • Signal -> connected on a member pin
  • VCC -> machine-accessible on the 5v
  • GND

Gas sensor (MQ) has 4 pins:

  • Member OUT -> conected along a digital pin (if you want a digital information)
  • Analog OUT -> in our case, we're exploitation this connected on a analog pin
  • VCC -> connected happening the 5v
  • GND

Noise sensing element (KY-038) has 3 pins:

  • Signal -> connected on a analog trap
  • VCC -> on-line along the 5v
  • GND

Code for Arduino remote Gimmick:

/*<br> * Arduino ship information through Blutooth  *   * The value of sensors are record, concatened on   * String and station via series larboard.  */   #include "DHT.h"  #define DHTPIN  3 #delineate DHTTYPE DHT22 #define PIRPIN  9 #define COPIN   A6  DHT dht(DHTPIN, DHTTYPE); float humidaty, temperature; mathematician pir = 0; int co, mic; String msg = ""; cleaning lady nome[40];  void apparatus() {   Serial.begin(9600);   dht.begin(); }  nothingness loop() {   humidaty = dht.readHumidity();   temperature = dht.readTemperature();   pir = digitalRead(PIRPIN);   co = analogRead(COPIN);   mic = analogRead(A0);    msg = "#;" +Draw(humidaty) + ";" + Twine(temperature) +";"+ String out(mic) +";"+ Chain(pir)+ ";" + String(co) + ";#" +"\n";   Serial.print(MSG);   delay(2000); }            

Cipher explanation:


All the pins used in the Arduino are quoted at the origin of the code and the respective libraries required for the operation of the sensors are initialized. All information will constitute passed to respective variables which will receive the values read from each detector all 2000 milliseconds, then every of them are Concatenated in a String, then IT is statute in Serial. From there it is rattling easy of the pyton code present in the DragonBoard to capture so much data.

Step 3: Softwares and Libraries

To process all the data conventional and control the protection system, is indispensable use some softwares and libraries in the Qualcomm DragonBoard 410c.

In this especific fancy we're using:

Softwares:

  • Python
  • Arduino

Plataforms:

  • Amazon AWS -> online server
  • Phant -> Host data service

Libraries:

  • OpenCV - Video Processing (https://opencv-python-tutroals.readthedocs.io/en/latest/)
  • PyAudio - Audio frequency Processing (https://people.csail.mit.edu/hubert/pyaudio/)
  • Wave (https://www.physionet.org/physiotools/wave-installment.shtm)
  • AudioOp (https://docs.Python.org9http://scikit-pick up.org/unchangeable/install.html/2/library/audioop.html)
  • Numpy (http://www.numpy.org)
  • SciKit1 - Train and predict the car learning (http://scikit-teach.org/stable/install.html)
  • cPickle - Save up the car learning parameters (https://pymotw.com/2/pickle/)
  • MRAA - Use the GPIOs (hypertext transfer protocol://iotdk.intel.com/docs/master/mraa/python/)
  • UPM - Use the GPIOs(https://github.com/intel-iot-devkit/upm)
  • PySerial - Use to serial comunication with Bluetooth twist (https://pythonhosted.org/pyserial/)

Step 4: Using SSH and Installation Libs

Number 1 of all you need to get the IP address from the Dragonboard, in order to doh that, you demand to become connected the DragonBoard connected with a mouse, a keyboard and a HDMI monitor. When the board turned along you require to tie in to a network, than you give way to the terminal and run the mastery:

sudo ifconfig

after that you can get the Information science address.

With the IP address you rear end access the Dragonboard via SHH, to do that you necessitate open a terminal in a computer connected in the same network every bit the board. In the terminal you can run the mastery:

              ssh linaro@{IP}

(you should supercede {IP} with the Informatics address that you mystify in the Dragonboard).

The initiatory lib you need to put in is the mraa lib. In order to do that you indigence to run the following command in the terminal:

              sudo supply-apt-repository ppa:mraa/mraa && sudo apt-ge;t update && sudo apt-get install libmraa1 libmraa-dev mraa-tools python-mraa python3-mraa

To install opencv for python you only need to run the bid:

sudo apt-get install python-opencv

To set up PyAudio you need to running game the command:

sudo apt-get install python-pyaudio python3-pyaudio

The libs WAVE and AudioOp are already installed in the board. To install numpy you need to run the command:

sudo apt-get install python-numpy python-scipy

The last lib that you suffer to set up is the scikit, to install information technology you motive to have pip installed. Than you only need to streak the command:

pip install scikit-lear

Step 5: Bluetooth Protocol

DragonBoard Connection with the Arduino by way of Bluetooth

The Bluetooth module (HC-06) was initially connected to the Arduino Nano reported to the following example:

Using the Linaro (OS Used in the current externalize in DragonBoard) visual communication interface, on the right side of the bottom banish click connected the Bluetooth symbol and then get across on "Frame-up New Device" and configure with your Bluetooth module leaving it paired. Verify that your module is really connected by clicking along the Bluetooth symbolization again, click on "Devices..." and see if the cite of your twist is recorded and connected. Now select your device in the "Bluetooth Devices" screen and right click happening it and note the port that your Bluetooth module is connected to (ex.: "rfcomm0"). Note: The interface name that your device is connected to volition follow important for the close gradation to enable data exchange.

Establishing DragonBoard Data Exchange and Bluetooth


Basically we follow the abuse by step of the link: HTTP://www.uugear.com/portfolio/bluetooth-communi... but we did not perform the part of the sexual unio only the execution of the python codes and Arduino. In Python was used the successive subroutine library that is initialized in the port connected to bluetooth, hence the python code interpret the data of the sensors that are well-connected to the arduino through the bluetooth module.

Step 6: Victimisation Mezzanine on DragonBoard 410c

To make the connections betwen the dragonboard and the componnents, we are using a type of shield called by Mezannine, developed aside 96boards.

Using this buckler, unite peripherals becomes much easier.

The connectors uses is from the plantation's development kit, so information technology's but using an especif cable that connects both shipway,

All the parts can be easily found in this website: https://www.seeedstudio.com/category/Grove-c-45.ht...

We are using this kits bellow:

  • Grove Relay
  • Woodlet Sunlight sensor
  • Grove led socket
  • Grove temporary&humi sensor
  • Grove Doorbell

Step 7: DragonBoard 410c Package

The part of the political program in the DragonBoard was coded in Python and the platform used along the Arduino was developed in C++. All 2 proceedings the Arduino reads all the sensor committed to it. Than the Arduino institutionalise the reading to the DragonBoard by Bluetooth. The DragonBoard combines the reading came from the Arduino with the reading that IT makes by the Mezzanine shield with the features from the audio and the video samples.

With this data, the Board try to predict if it is occurring an emergency brake situation. The Board transmi to the Amazon Web Service using the Phant the raw data and the prediction that it ready-made. If the board predict that it is occurring a strange situation it prove to warn the user blinking a led and buzzer in the Mezzanine and show at web application. In the web lotion information technology also affirmable to see the raw data to understand what is happening in this area.

Be the First to Portion out

Recommendations

  • Anything Goes Contest 2022

    Anything Goes Contest 2022