See through walls, track objects, monitor breathing patterns, and more using the power of radio frequency with the Walabot!
In this tutorial, we will explore Walabot’s features using the Software Demo Kit (SDK) on Windows and the Application Programming Interface (API) on Linux-based OS for embedded projects.
Required MaterialsTo follow along with this tutorial, you will need the following materials to get started. You may not need everything though depending on what you have. Add it to your cart, read through the guide, and adjust the cart as necessary:
- Walabot (Starter or Creator or Developer)
- Computer (Windows, Linux) w/ USB Port
For more embedded applications with a Raspberry Pi, you will need the following materials:
- LCD 7" or Monitor w/ HDMI Cable
If you aren’t familiar with the following concepts when using a Raspberry Pi, we recommend checking out these tutorials before continuing.
This tutorial will show you how to communicate with your serial devices using a variety of terminal emulator applications.
How to upload images to an SD card for Raspberry Pi, PCDuino, or your favorite Single Board Computer.
Hardware OverviewFeaturesThe Walabot utilizes radio frequency technology to sense the environment. An image of the environment is reconstructed using an array of linearly polarized broadband antennas to transmit, receive, and record signals. The data is processed and sent through a USB cable to a host device. The host device can be your computer, single board computer, or even a smartphone!
Depending on the Walabot model, here are a few possible applications:
- In-Room Imaging
- Object Detection, Location, and Tracking
- Motion Sensing (i.e. Breathing Patterns, Gestures)
- Speed Measurement
- In-Wall Imaging
- Dialectric Properties of Materials
There are three models of the Walabot. For the scope of the tutorial, we will be using the starter and developer to begin. The starter uses 3x antennas as opposed to 18x antennas to detect the environment. The starter is capable of basic range measurements and monitoring breathing patterns. Due to the amount of antennas it has available, it will not be able to sense objects behind a material. The starter also does not come with an enclosure.
The developer has a higher resolution with the 18x antennas. It's capable of the applications listed earlier. However, the developer can consume more power depending on the configuration and it requires a little bit more time to process the data. Below is a comparison taken from the datasheet.
The side with the antennas should be facing out to sense the environment. The image below shows the Walabot Starter’s 3x antennas.
The image below shows the Walabot Developer’s 18x antennas populated on the board. Make sure the flat side of the enclosure is facing out to sense the environment.
The Walabot requires a 5V (+/-10%) power supply. The board can be powered using a USB port. Depending on the application and operation profile, the Walabot may consume up to 0.4A to 0.9A. You may need an additional power source for the Walabot Developer. If necessary, open the Walabot enclosure with a Phillips precision screw driver.
Highlighted in red is the default jumper position for data transfer and powering the Walabot. To power the board with an external power supply, move the jumper to the left side and connect an additional power source to the USB port highlighted in green. The USB connector is only for power so you would still need a USB cable connected on the right connector.
Note: The micro-B cable included with the Walabot Starter is an OTG cable. You will need to an additional cable to connect the device to a computer for development.
If are using a USB cable that is not included with the Walabot, make sure that the data lines are connected when using the cable with the Walabot! Certain cables are designed to be charging cables, so there might not be any data lines connected in the USB cable.
To connect the Walabot Starter, you will need to align the “D” shape of the micro-B USB cable with the port.
Once the cable is connected to the Walabot, connect the other end to a computer's USB port.
Walabot DeveloperNote: If are using a USB cable that is not included with the Walabot, make sure that the data lines are connected when using the cable with the Walabot! Certain cables are designed to be charging cables, so there might not be any data lines connected in the USB cable.
To connect the Walabot Developer, insert the USB cable's micro-B end to the Walabot's USB port. You can use a separate micro-B USB 2.0 cable or the included micro-B USB 3.0 cable. By default, there is a jumper that uses the port closest to the edge of the Walabot.
Connecting with a separate micro-B USB 2.0 cable.Connecting with the included micro-B USB 3.0 cable.
If you decide to use a separate micro-B USB 2.0 cable to your computer, you will be aligning it with the “D” shape of the micro-B USB 3.0 connector as shown in the image below.
Once the cable is connected to the Walabot, connect the other end to a computer's USB port.
MountingYou may want to mount the board during testing. Grab some electrical tape or mount the Walabot Starter to a box using standoffs. The Walabot Developer includes a magnetic disk that is able to stick to a surface such as a robot, smartphone, or wall. With the magnetic mount, it is able to attach and detach easily from the surface. In the examples provided, the starter and developer were mounted on a red box or resting on a table for testing.
Software Installation (Linux)Walabot API LibraryNote: Make sure that you have Python version 2 or 3 installed. Raspberry Pi should have it installed already. To verify, open a serial terminal and typepython -V
in the command line. Pressing theEnter
key should notify you if Python is installed. If Python is not currently installed, head over to Python's download page.
The process to install the Walabot API for Linux and Raspberry Pi are the same. The only difference is the package to download. Head over to Walabot’s site to download the package.
https://walabot.com/getting-started
Scroll down the page and click on the package for your distribution. For the scope of this tutorial, we will choose the package for Raspberry Pi.
Once downloaded, you may get the following warning:
This type of file can harm your computer. Do you want to keep "walabot_maker_1.0.34_raspberry_arm32.deb" anyway?
Click on the “Keep” button to confirm the download.
Open a command line as indicated by the green arrow and highlighted icon in the image below.
Head to the location where the package was downloaded. Most likely this was placed in the “Downloads” folder. Type this command and hit the “Enter key.”
cd Downloads
Note: This tutorial was written with the "walabot_maker_1.0.34_raspberry_arm32.deb" package. You may need to adjust the package name depending when on the package that was downloaded."
To view the contents, feel free to type this command:
ls
In the command line, type this command based on the *.deb package that was downloaded:
sudo dpkg -i walabot_maker_1.0.34_raspberry_arm32.deb
Once the command is ready and matches the downloaded package, hit the “Enter” key.
While installing, you may be prompted with an End User License Agreement. Read through it, press the “→” button on your keyboard, and hit “Enter.”
You will be prompted again with another question. Read through the brief message, navigate to “<Yes>”, and hit “Enter.”
The following paths and files will be installed in these locations:
- /usr/lib/libWalabotAPI.so - The Walabot library.
- /usr/include/WalabotAPI.h - The Walabot library header file.
- /var/lib/walabot/… - The Walabot database and configuration files. Give this path to Walabot_SetSettingsFolder.
- /usr/share/doc/walabot/… - Example code, license, and README.
- /etc/udev/rules.d/… - Special udev rule for Walabot device, so it could be accessed without root privileges.
For more information about the Walabot API Library, head over to Walabot’s documentation. http://api.walabot.com
Example APILet's try out the examples in Python! The examples enable the user to utilize the sensor data for embedded projects. There a few methods of running the examples. Since we still have the command line open, we’ll open the Python example through the terminal. Navigate to the examples using this command:
cd /usr/share/doc/walabot/examples/python
Typing this command will list the three examples in that path:
ls
Connect the Walabot to the USB port to start testing the Walabot examples.
To run the SensorApp.py example, type this command once you are in the directory.
python SensorApp.py
Again, make sure there are no moving objects in front of the sensor when the program begins. The SensorApp.py is just like the target detection example that was demonstrated in the SDK for Windows. The sensor data will be output in the terminal as shown below.
Try moving your hand in front of the sensor to get a feel for the sensor values. Type Ctrl+c in the command line to stop the program.
Breathing w/ BreathingApp.pyTo run the BreathingApp.py example, type this command:
python BreathingApp.py
This is just like the breathing example that was demonstrated in the SDK for Windows. With nothing in front of the Walabot, the output should be a very small value.
Stand in front of the Walablot and take a deep breath in. As you inhale, the value may look like the output below. The value may be different depending on how far you are from the Walalbot.
As you exhale, the value should decrease. The output may look similar to the output below.
Type Ctrl+c in the command line to stop the program.
Detecting Objects Behind Materials w/ InWallApp.pyNote: Due to the limitations of the Walabot Starter, it is not able view objects behind walls.
To run the InWallApp.py example, type this command:
python InWallApp.py
Again, move the Walabot slowly a circular motion on a flat surface once the program begins. Here’s what the output may look like when there are no objects behind a wall or table.
Here’s what the output may look like when there is a metal pipe behind the surface.
Rotating the Walabot, here’s what the output may look like with the metal pipe behind the surface.
Type Ctrl+c in the command line to stop the program.
***This getting started guide is taken from getting-started-with-walabot.
IoT-Cloud Environment SetupREQUIREMENTS
- A raspberry running with Raspbian, and a terminal or SSH access. Other OS like Ubuntu may work, but has not been tested yet.
- Register a device in the thinger.io console and keep the credentials by hand. If you need help with this part, please check this other how-to.
Note: Not required for Raspbian Jessie or newer versions.
It is necessary to use a modern compiler to build thinger.io examples. The latest Raspbian version already provides a modern compiler, starting with Jessie, but you may install a newer compiler if you are using older Raspbian versions. It is required at least GCC 4.8.2. Please type gcc -
v in a terminal to check if you need to update your compiler.
It is necessary to keep all your system updated, so please start by upgrading all the installed packages by typing the following commands. It may take some time depending on your Internet connection
sudo apt-get updatesudo apt-get upgrade
Next, open /etc/apt/sources.list
in a editor and replace the name wheezy
with jessie
.
sudo nano /etc/apt/sources.list
Then we are going to update the package list again, so we can access to newer jessie packages:
sudo apt-get update
now we can finally install install GCC 4.9
sudo apt-get install gcc-4.9 g++-4.9
Last step is to revert back from Jessie
to Wheezy
, open /etc/apt/sources.list
again and replace jessie
with wheezy
, after that do an update of your package list:
sudo nano /etc/apt/sources.listsudo apt-get update
If we type gcc -v
at this moment, the default version is still 4.7. So we are going to change that to make the newer gcc 4.9 the default version. First remove all gcc
alternatives.
sudo update-alternatives --remove-all gccsudo update-alternatives --remove-all g++
And now add both gcc alternatives with more priority to GCC 4.9 version.
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.9
At this stage, if you type gcc-v
it should show version 4.9.2 or greater. You can always change the default compiler with the following command.
sudo update-alternatives --config gcc
INSTALL ADDITIONAL DEPENDENCIESIt is necessary use CMake for compiling the examples and install thinger as daemon if you want. It is also required to install Open SSL if we want to securely connect to the platform trhough TLS.
Update the apt repository first:
sudo apt-get update
Install Dependencies (CMake and OpenSSL)
sudo apt-get install cmake libssl-dev
STARTING WITH THE PLATFORMDownload the latest Linux Client version from GitHub.
git clone https://github.com/thinger-io/Linux-Client.git
Enter in the Linux-Client folder we just cloned.
cd Linux-Client
And now it is time to enter the credentials in the main project file. So we are going to edit the main.cpp
file from src
folder. You can use any editor you want. We will use here nano
.
nano src/main.cpp
In this case you must edit the fields USER_ID
, DEVICE_ID
, and DEVICE_CREDENTIAL
with the information you provided while registering your device in the platform. Here is an example screenshot of how the main.cpp
file should look like before editing these fields.
When you are done editing the parameters, exit the nano editor pressing Ctrl+X
and then type ‘y
‘ to save the changes.
Now you must add execute permissions to the run.sh
script.
chmod +x run.sh
And now you can run it to test that everything is working.
./run.sh
If everything is going fine you should see how the program is compiled and executed automatically. The program actually reports some debug text that can help us to check if we have configured the credentials well. The expected result you should see is something like the following picture.
Now you can go to your thinger.io console and check that the Raspberry appears as connected. You can even try to execute the sum
resource defined in the main.cpp
that simply performs a sum. For test the device resources, please go to the API Explorer that appears in the device dashboard.
Please refer the thinger.io documentation for creating your own user credentials. You need to put your user credentials inside the source code, otherwise you are unable to connect your system with cloud as well as unable connect your mobile apps with cloud.
*****Setting up the Working Environment (Raspberry PI) is time consuming and requires constant attention*****
################## Our Project ##################Camping Safety Device [The Proposed Project]IntroductionDuring the holiday, people all around the world like to go out for camping. Most of time they choose the forest, hills, mountains or riverside for camping. Camping places are always dangerous for people. So, people need some safety device.
The idea of this project is building a camping safety device based on Walabot and raspberry pi. Its a 360 degree rotate able device that works as radar. when the sensor sense any giant animals approaching the camp its immediately sends the push notification to the users as well as play the emergency siren/alarm.
- Walabot
- Raspberry Pi
- Android application development platform
- Knowledge about Linux
- Power Banks for powering the device
- Servo for rotation
- Servo mount
- cables
- USB HUB
Walabot is power hungry, I have used and external power supply for power up the walabot.
- Connect the sensor with Raspberry Pi via USB hub (for providing sufficient power).
- The source code is written in C and its available in git repository.
- The source code maintain the data collection from walabot and data transmission to cloud.
- For more reference about the cloud connectivity please refer the thinger.io documentation.
- Everything is embeded on raspberry pi means that, user only power up the system and everything runs automatically. (You can use the bash script for embeding the system.)
- Since its a cloud connected device---- Internet connection is mandatory.
After Download the source code from the repository, place your thinger.io user credential for cloud connection.
### code modification ###
File name : main.cpp
location: src/thinger-Linux-Client/src
#include "thinger/thinger.h"
#include "stdio.h"
#include "stdlib.h"
#define USER_ID "Your_ID" // place your credential, its important
#define DEVICE_ID "Your_Device"
// place your credential, its important
#define DEVICE_CREDENTIAL "Your_credential"
// place your credential, its important
int num = 0;
This is very important. You can easily check your device connectivity and data via thinger.io dashboard. please check the thinger.io documentation for more details.
***Attention***The Mobile Application Collects data from my own iot-cloud account as a result if the device (raspberry pi and walabot) is offline, the mobile application just show the normal image alert. If you want to test the APK perfectly, mail me for powering up the device. Other wise please check the demo apps. The demo apps works without device.
DemoDevice needs to connected with Cloud before running the main mobile apps, otherwise it not works. But the demo mobile apps works without device.
LimitationsDue to the complexity of the cables, we are facing rotational problem. We are not sure but assuming that, rotation may increase the false positive rate. [not tasted yet] but proper filter may reduce the False Positive rate. The performance of the system may increased by suing other single board computers such as (UP board or Udoo etc.) . The system is fully depend on Internet. but possible to used Wifi/BLE based connection for local communication.
Future Plan- Adding push notification based alert, while mobile apps is running on background.
- Possible to add an external siren/alarm for better notification.
- BLE based communication system is helpful (where there is no Internet connectivity), The system easily extend for BLE.
Comments