FI-ApartmentBot

FI-ApartmentBot

During the summer months I love flying and testing out my UAV projects. But duing the winter months, the lack of day light and the bad weather really doesn't let you get outside as much as you would like to. Thus, I started this project, the FI-ApartmentBot. The Goal from the start was to create a robot that would roam around my apartment controlled by a driver via an remote internet connection. The driver would get a live video and audio link to the robot.

Note: This project is currently under development, documentation will be added as it is written. If you have any issues or questions feel free to contact me.

Source Code

The FI-ApartmentBot source is hosted on GitHub.

Note: The ApartmentBot runs on any Arduino compatible microcontroller. Thus, you will need the Arduino IDE to compile and load the code to your board. The ApartmentBot also uses the Digi Xbee wireless modems to communicate to the host controller. I use a Sparkfun Xbee USB Explorer to connect the host Xbee module to my server. The Xbee communicates over a serial connection at 9600 baud, be sure your baud rate is set properly.

Parts List

Remote Control

Controlling the robot remotly can be done in a couple of different ways. The easiest is to simply pass serial commands to the robot.

Serial Command Index

The user based commands and code is located in the UserControl.pde file. The following is how to properly construct a command to get the rover moving.

Directions
f = forward
b = backwards
l = left spin
r = right spin
Power - 1 - 255

Example Command: "f200#"

Be sure to terminate every command with a #. This is to verify that the command is complete due to the fact that command can be written with multipule line returns.

Autonomous Roving

I built autonomous control into the ApartmentBot based off a ultrasonic sensor and accelerometer. The ultrasonic sensor is used to detect the distance the robot from a obsitcal and the accelerometer is used to detect if the rover is prone to tipping over.

Usage

By default the roving system is deactived until actived by the user.

You can easily change the way the rover acts on boot and have it rove by defaut. The main sketch file in the source code has a boolean value that can ge changed named roveMode.

boolean roveMode = false;

Setting rove mode to true will allow the roving to be initialed on boot. You can also turn on rove mode from manual control mode. Passing roveMode=true# via serial command on a baud rate of 9600 will activate roving untill the boolean is set back.

Rover Tip Protection

I use a ADXL335 Triple Axis Accelerometer onboard the rover to calculate if the rover is driving on a valid angle that will not allow it to tip over. The ADXL355 allows for fast polling which is needed for when the rover is quickly moving in any direction. The sooner that a potentional tip can be calculated the better.

Web Interface

The web interface is currently in development, more details to come.

Lessons Learned

Battery Indicators via Voltage Division

The LIPO batteries onboard the robot carry 3.7V with 2amp of power per battery. In series the batteries produce a 7.4V output which unfortunetly to high to wire into a Arduino analog I/O. A simple voltage divider can cut the voltage in half and allow us to compensate the division with software.

To do this we can simply wire 2 10K resistors in the following way:

Voltage Divider

These two 10k resistors (R1 and R2) will cut the voltage directly in half and we can then connect the Vout to Arduino analog pin 0. Using the code example below, we analogRead(0) to get the divided voltage calculation. Reading pin0 as a 10bit value mean we would calculate the real voltage as: pin0 * 0.0048828125mV * 2.

The code below is an Arduino sketch written to do just that, the voltage result will be sent via serial at 9600 baud once every second.

 
/* Testing the use of a voltage divider to analog pin 0 */
/*
  7.4V Lipo with 2x 10k resistors = 3.7V
  Reading on APin 0 (10bit) mean each value = 0.0048828125mV = 5V / 1024
  Thus battery voltage is = APinValue * 0.0048828125mV * 2
*/
 
const int voltageReadPin = 0;
const int voltageUnitValue = 0.0048828125;
 
void setup() {
  Serial.begin(9600);  
}
 
 
void loop() {
  int voltageVal = analogRead(voltageReadPin); 
  int batteryVoltage = voltageVal * voltageUnitValue * 2;
  Serial.println(batteryVoltage);
  delay(1000);
}
 

Latest Personal Projects

tododaloo.com

tododaloo.com allows you to manage a very simple task list in your web browser. All of the data stored in the list is saved within the cookies of the browser on your machine so the server never needs to save any it and it's never shared.

TorontoWiFiMap.com

TorontoWiFiMap.com is a service that was started out of a fun project I created to play with Google Maps. It allows a user to use their current location to find the closest unencrypted wireless access point in downtown Toronto.

FI-ApartmentBot

A project started to enable me to view a live video feed from my home over the internet. A web interface displays live video and also allow for full control of the robot. Robot also has autonomous roving functions to allow for security surveillance.

FI-ATCSRP

The FI-ATCSRP (Fisher Innovation - Autonomous Temperature Controlled Solder Reflow Plate) is a surface mount soldering hot plate used for soldering SMD components to a circuit board. The project was launched in order to gain the tools needed to create custom circuits for the FI-AUAV project.

Twitter Feed