It bugs me that I can't be in more than one place at a single time, because it means that so much of the Earth goes unexplored! Unmanned Aerial Vehicles (UAVs, drones) allow humans to explore new heights and go places otherwise difficult to reach; however, they are typically limited to only relatively-short duration flights, even when remaining in one spot. A robot ground Earth rover solves these issues, allowing for many hours or even many days of exploration on a single charge; furthermore, imagine all of the fun one can have by going on missions that involve interactive with (and annoying) people!
For this project, I start with a robot and motor controller kit available at piborg.org and appropriately priced to bring robots to the masses. Next, I take the cellular solutions provided by Hologram and a couple (too-dangerous-for-transport) battery packs to make a few, *ahem*, "enhancements"!
Getting StartedI needed to procure the following wares for this mission:
- PiBorg DiddyBorg Red Edition (or similar) robot kit from piborg.org
- Raspberry Pi (I used Version 3, but Version 2 should work as well)
- Camera compatible with the Raspberry Pi camera port (I used a no-IR filter night vision PiCam equivalent) - Note that I discovered that USB cameras will not work with the browser-based remote control code that is provided by piborg.org, so you're better off purchasing a PiCam or equivalent that uses the "Camera" ribbon cable port on the Raspberry Pi if you try to reproduce this project!
- USB Cellular Modem from Hologram
- SIM Card from Hologram
- (Optional) larger battery pack, such as a 12-volt 11,000mAh pack by Talentcell (this requires some additional knowledge of electronics, so I won't be covering in detail how to use this larger battery pack---the battery pack included with the robot kit from piborg.org will provide hours of fun)
- Soldering iron, solder, wire cutters/strippers, appropriate safety gear
PiBorg does a great job at explaining assembly of the robot chassis, motors, and motor controller on PiBorg's Build Instructions. Assembly is very straight-forward and took a couple hours, including soldering.
One thing to note: I made the mistake of using a cheap soldering iron instead of powering up and preparing my nicer soldering station; however, it was not worth it to get lazy with the soldering! I ended up spending much more time trying to solder wires to the motors and I made my job a lot more difficult than it needed to be!
In place of the normal PiCam, I use a knock-off no-IR filter night vision version that came with some infrared headlights. It distorts daytime colors quite a bit, but who doesn't like a ninja robot better than the run-of-the-mill robots you typically see on the sidewalk or in a park in broad daylight?
Installing Operating System and Control SoftwareOnce fully assembled, the next task is to install the operating system to an SD card on a computer. Then, connect the robot to a computer monitor via HDMI, a keyboard and mouse via USB, and to a network via an Ethernet cable. After connecting batteries and powering on the robot, I successfully established first contact!
PiBorg has a good Getting Started guide that steps through installing:
- Raspbian operating system on the Raspberry Pi
- SSH (for remote access)
- motor controller libraries (which allow software to control the motor controller later on)
- python and other camera libraries
Important note: All instructions under "Setting up the Raspberry Pi" and "Installing the PicoBorg Reverse" need to be completed to have command line control; additionally, in order to use the web browser GUI for controlling the robot, a PiCam needs to be present, and all instructions under "Setting up the Raspberry Pi camera (optional)" need to be completed as well.
This guide also covers installing code examples that are optional, but it is important to not miss two steps regarding installing python libraries and other dependencies:
sudo apt-get -y install python-picamera
sudo apt-get -y install libcv-dev libopencv-dev python-opencv
Additionally, without installing SSH, we would have no way to access the robot remotely over cellular! Walking around with a monitor, keyboard, and mouse tethered by cable to your robot is no way to explore the universe---just ask NASA.
Installing Web Browser-based Remote Control GUIPiBorg provides a web browser-based remote control GUI for viewing the robot camera and steering the robot. PiBorg's WebUI installation instructions explain how to install the browser-based GUI. That, essentially, requires simply running the following commands on the terminal (or over SSH):
cd ~
git clone https://github.com/piborg/diddyborg-web.git
Connecting Robot to CellularHologram provides several dependencies needed for establishing remote control of the robot over cellular:
- USB Cellular Modem in their store
- Hologram SIM card in their store
- hologram-tools package that provides modem configuration files from hologram-io/hologram-tools on Github
First, before connecting the USB modem to the Raspberry Pi, insert a Hologram SIM into the secret SIM compartment on the modem. Usually, the cover slides open easily on the USB cellular modem; however, if you can't get it to open, I recommend acquiring one of the following tools (although they might void the warranty): this one, or this one, or maybe this one, even.
Next, activate the SIM card on the Hologram Dashboard.
Note: Since video over cellular can consume a lot of data, I recommend anyone repeating this project to set a data limit for a SIM, just in case you forget to turn something off when finished testing.
Lastly, on the Raspberry Pi terminal (can also be done over SSH), I followed Hologram's SSH into your Raspberry Pi via cellular tutorial. This tutorial provides instructions on using the hologram-tools package to configure the Raspberry Pi to use the USB cellular modem.
It's important to not forget to enable Device Tunneling on the Hologram Dashboard so the Raspberry Pi can be accessed remotely!
The Hologram SSH/Pi tutorial also provides instructions on how to use the Hologram SpaceBridge client on a personal computer to traverse the cellular network firewalls and be able to SSH into the Raspberry Pi over cellular. The only customization I needed to make, beyond what the tutorial already instructed, was to create a port forward for both Device Port 22 (SSH) on the Raspberry Pi, as well as Device Port 80 (HTTP) on the Raspberry Pi:
Option 1: If the web browser-based remote control GUI provided by PiBorg has not yet been started, the final step to setup the robot is to start the web server:
sudo ~/diddyborg-web/diddyRedWeb.py
Option 2 (recommended): Because I wanted to leave the server running even after I disconnected from the terminal/SSH, I skipped the above step and did this instead: First, I installed the screen utility so I could keep the server running in a virtual terminal. Then, I started screen, and, finally, started the server inside my screen session:
sudo apt-get install screen
screen
sudo ~/diddyborg-web/diddyRedWeb.py
Accessing Robot Remote Control GUI over CellularAt this point, the robot is accessible over cellular from a computer running the SpaceBridge client! SpaceBridge establishes a tunnel from localhost to the Raspberry Pi.
Noting the Local Port for HTTP (in my case, Port 20080) entered into the SpaceBridge tunnel configuration, all that needs to be done now is to open a web browser and enter the URL "localhost
" followed by a colon (":
") and followed by the port number.
So, in my case, I opened my web browser to the following URL: http://localhost:20080
Pro tip: On first-run, I suggest adjusting the slider at the bottom of the the web browser-based GUI, which adjusts the speed setting. My first time piloting the robot resulted in accidentally driving it up a wall and then flipping it over and its camera fell off.
ConclusionHere's what the final result looks like in the web browser:
Time to annoy some relatives with this thing!
Comments