https://elinux.org/api.php?action=feedcontributions&user=Jessebrannon&feedformat=atomeLinux.org - User contributions [en]2024-03-29T08:57:30ZUser contributionsMediaWiki 1.31.0https://elinux.org/index.php?title=Sparkfun:_BMP085_Barometric_Pressure_Sensor&diff=194024Sparkfun: BMP085 Barometric Pressure Sensor2012-11-17T00:07:49Z<p>Jessebrannon: </p>
<hr />
<div>[[Category:ECE497]]<br />
[[Category:SparkFun]]<br />
<br />
<pre style="color:red"><br />
Overview: 1, show a picture of the device that shows what pins it has.<br />
Wiring: 0, Give a specific example of how to wire it. What pins go where? Which bone header are you using? P8, P9?<br />
Code: 2<br />
git: 0 put in git<br />
Demo: 0<br />
Total: 3/10<br />
Comments: More details are needed. I think someone else in the class would have trouble<br />
reproducing what you have done.<br />
<br />
I've not seen echo bmp085 0x77 > /sys/class/i2c-adapter/i2c-3/new_device, could you give more details about what it does?<br />
</pre><br />
<br />
== '''Introduction''' ==<br />
<br />
<br />
The [https://www.sparkfun.com/products/9694 BMP085 Barometric Pressure Sensor] is a sensor that can measure the atmospheric pressure as well as the temperature at its location. It communicates with host devices via I2C.<br />
<br />
[[File:Bmp085-breakout.jpg|thumb|Image of the breakout board.]]<br />
<br />
<br />
== '''Connecting the Hardware''' ==<br />
<br />
To connect the BMP085 to a BeagleBone, first supply the Vdd and GND from the Beagle to the BMP085 Breakout Board. Then connect SDA and SCLK from the BMP085 to one of the I2C bus pins on the Beagle. The XCLR and EOC pins do not have to be connected to the BMP085. If I2C bus 3 is used, the connections are as follows: <br />
Signal | BeagleBone Pin | BMP085 Pin<br />
<br />
VCC | 3 or 4 (P9 Header) | 1<br />
GND | 1 or 2 (P9 Header) | 2<br />
SCL | 19 (P9 Header) | 5<br />
SDA | 20 (P9 Header) | 6<br />
<br />
<br />
== '''Reading the Pressure and Temperature from the Command Line''' ==<br />
<br />
The Angstrom distribution for the BeagleBone comes with a driver for the BMP085 already installed. This makes interfacing to the sensor easy. <br />
<br />
First, you need to find the I2C address of the device. Instructions on how to do this can be found [http://elinux.org/EBC_Exercise_12_I2C here]. My BMP085 showed up at I2C address 0x77. To initilialize that sensor, type the following in your terminal:<br />
<br />
<code>echo bmp085 0x77 > /sys/class/i2c-adapter/i2c-3/new_device</code><br />
<br />
We are simply telling the BeagleBone that a BMP085 device is located at I2C location 0x77. It will then initialize the driver and interface to the device.<br />
<br />
To check if this was successful, enter:<br />
<br />
<code>dmesg | grep bmp</code><br />
<br />
You should see:<br />
<br />
[10420.903490] i2c i2c-3: new_device: Instantiated device bmp085 at 0x77<br />
[10420.927608] bmp085 3-0077: BMP085 ver. 2.0 found.<br />
[10420.927659] bmp085 3-0077: Successfully initialized bmp085!<br />
<br />
Congratulations! You're sensor is connected and ready to read the temperature and pressure at its location.<br />
<br />
To read the temperature (in degrees C), type:<br />
<br />
<code>echo scale=1 \; $(cat /sys/bus/i2c/drivers/bmp085/3-0077/temp0_input) / 10 | bc</code><br />
<br />
To read the pressure (in millibars), type:<br />
<br />
echo scale=2 \; $(cat /sys/bus/i2c/drivers/bmp085/3-0077/pressure0_input) / 100 | bc<br />
<br />
== '''Reading the Temperature and Pressure Programmatically''' ==<br />
<br />
I wrote some simple code that will read the temperature and pressure every 2 seconds and display them on the command line. The code is shown below and is also in my [https://github.com/brannojs/ECE497/blob/master/MiniProject02/pressurei2c.c Git Repository].<br />
<br />
#include <stdio.h><br />
#include <stdlib.h><br />
#include <string.h><br />
#include <errno.h><br />
#include <unistd.h><br />
#include <fcntl.h><br />
#include <poll.h><br />
#define MAX_BUF 64<br />
<br />
int main(int argc, char *argv){<br />
FILE *fp;<br />
char path[MAX_BUF];<br />
//Open a file to I2C Bus 3 and tell it that there is a BMP085 located at 0x77.<br />
snprintf(path,sizeof path, "/sys/class/i2c-adapter/i2c-3/new_device");<br />
if((fp = fopen(path,"w")) == NULL){<br />
printf("file open failed");<br />
return 1;<br />
}<br />
rewind(fp);<br />
fprintf(fp, "bmp085 0x77\n");<br />
fflush(fp);<br />
fclose(fp);<br />
while(1){<br />
sleep(2);<br />
char buf[MAX_BUF];<br />
//Attempt to open the file of the device.<br />
snprintf(path, sizeof path, "/sys/bus/i2c/drivers/bmp085/3-0077/temp0_input");<br />
if((fp = fopen(path, "r")) == NULL){<br />
printf("cannot open device file");<br />
return 1;<br />
}<br />
//Attempt to read the temperature from the device.<br />
if((fgets(buf, MAX_BUF, fp)) == NULL){<br />
printf("cannot read device");<br />
}<br />
fclose(fp);<br />
float temp = atoi(buf);<br />
float tempd = temp / 10;<br />
printf("Current Temperature: %f\n",tempd);<br />
//Attempt to open the file of the device.<br />
snprintf(path, sizeof path, "/sys/bus/i2c/drivers/bmp085/3-0077/pressure0_input");<br />
if((fp = fopen(path, "r")) == NULL){<br />
printf("cannot read");<br />
return 1;<br />
}<br />
//Attempt to read the pressure from the device.<br />
if((fgets(buf, MAX_BUF, fp)) == NULL){<br />
printf("cannot read");<br />
}<br />
fclose(fp);<br />
float pressure = atoi(buf);<br />
float pressured = pressure / 100;<br />
printf("Current Pressure: %f\n\n",pressured);<br />
} <br />
}</div>Jessebrannonhttps://elinux.org/index.php?title=Sparkfun:_BMP085_Barometric_Pressure_Sensor&diff=194018Sparkfun: BMP085 Barometric Pressure Sensor2012-11-17T00:04:11Z<p>Jessebrannon: </p>
<hr />
<div>[[Category:ECE497]]<br />
[[Category:SparkFun]]<br />
<br />
<pre style="color:red"><br />
Overview: 1, show a picture of the device that shows what pins it has.<br />
Wiring: 0, Give a specific example of how to wire it. What pins go where? Which bone header are you using? P8, P9?<br />
Code: 2<br />
git: 0 put in git<br />
Demo: 0<br />
Total: 3/10<br />
Comments: More details are needed. I think someone else in the class would have trouble<br />
reproducing what you have done.<br />
<br />
I've not seen echo bmp085 0x77 > /sys/class/i2c-adapter/i2c-3/new_device, could you give more details about what it does?<br />
</pre><br />
<br />
== '''Introduction''' ==<br />
<br />
<br />
The [https://www.sparkfun.com/products/9694 BMP085 Barometric Pressure Sensor] is a sensor that can measure the atmospheric pressure as well as the temperature at its location. It communicates with host devices via I2C.<br />
<br />
[[File:Bmp085-breakout.jpg|thumb|Image of the breakout board.]]<br />
<br />
<br />
== '''Connecting the Hardware''' ==<br />
<br />
To connect the BMP085 to a BeagleBone, first supply the Vdd and GND from the Beagle to the BMP085 Breakout Board. Then connect SDA and SCLK from the BMP085 to one of the I2C bus pins on the Beagle. The XCLR and EOC pins do not have to be connected to the BMP085. If I2C bus 3 is used, the connections are as follows: <br />
Signal | BeagleBone Pin | BMP085 Pin<br />
<br />
VCC | 3 or 4 (P9 Header) | 1<br />
GND | 1 or 2 (P9 Header) | 2<br />
SCL | 19 (P9 Header) | 5<br />
SDA | 20 (P9 Header) | 6<br />
<br />
<br />
== '''Reading the Pressure and Temperature from the Command Line''' ==<br />
<br />
The Angstrom distribution for the BeagleBone comes with a driver for the BMP085 already installed. This makes interfacing to the sensor easy. <br />
<br />
First, you need to find the I2C address of the device. Instructions on how to do this can be found [http://elinux.org/EBC_Exercise_12_I2C here]. My BMP085 showed up at I2C address 0x77. To initilialize that sensor, type the following in your terminal:<br />
<br />
<code>echo bmp085 0x77 > /sys/class/i2c-adapter/i2c-3/new_device</code><br />
<br />
We are simply telling the BeagleBone that a BMP085 device is located at I2C location 0x77. It will then initialize the driver and interface to the device.<br />
<br />
To check if this was successful, enter:<br />
<br />
<code>dmesg | grep bmp</code><br />
<br />
You should see:<br />
<br />
[10420.903490] i2c i2c-3: new_device: Instantiated device bmp085 at 0x77<br />
[10420.927608] bmp085 3-0077: BMP085 ver. 2.0 found.<br />
[10420.927659] bmp085 3-0077: Successfully initialized bmp085!<br />
<br />
Congratulations! You're sensor is connected and ready to read the temperature and pressure at its location.<br />
<br />
To read the temperature (in degrees C), type:<br />
<br />
<code>echo scale=1 \; $(cat /sys/bus/i2c/drivers/bmp085/3-0077/temp0_input) / 10 | bc</code><br />
<br />
To read the pressure (in millibars), type:<br />
<br />
echo scale=2 \; $(cat /sys/bus/i2c/drivers/bmp085/3-0077/pressure0_input) / 100 | bc<br />
<br />
== '''Reading the Temperature and Pressure Programmatically''' ==<br />
<br />
I wrote some simple code that will read the temperature and pressure every 2 seconds and display them on the command line. The code is shown below and is also in my [https://github.com/brannojs/ECE497/blob/master/MiniProject02/pressurei2c.c Git Repository].<br />
<br />
#include <stdio.h><br />
#include <stdlib.h><br />
#include <string.h><br />
#include <errno.h><br />
#include <unistd.h><br />
#include <fcntl.h><br />
#include <poll.h><br />
#define MAX_BUF 64<br />
<br />
int main(int argc, char *argv){<br />
FILE *fp;<br />
char path[MAX_BUF];<br />
snprintf(path,sizeof path, "/sys/class/i2c-adapter/i2c-3/new_device");<br />
if((fp = fopen(path,"w")) == NULL){<br />
printf("file open failed");<br />
return 1;<br />
}<br />
rewind(fp);<br />
fprintf(fp, "bmp085 0x77\n");<br />
fflush(fp);<br />
fclose(fp);<br />
while(1){<br />
sleep(2);<br />
char buf[MAX_BUF];<br />
<br />
snprintf(path, sizeof path, "/sys/bus/i2c/drivers/bmp085/3-0077/temp0_input");<br />
if((fp = fopen(path, "r")) == NULL){<br />
printf("cannot read device");<br />
return 1;<br />
}<br />
if((fgets(buf, MAX_BUF, fp)) == NULL){<br />
printf("cannot read device");<br />
}<br />
fclose(fp);<br />
float temp = atoi(buf);<br />
float tempd = temp / 10;<br />
printf("Current Temperature: %f\n",tempd);<br />
<br />
snprintf(path, sizeof path, "/sys/bus/i2c/drivers/bmp085/3-0077/pressure0_input");<br />
if((fp = fopen(path, "r")) == NULL){<br />
printf("cannot read");<br />
return 1;<br />
}<br />
if((fgets(buf, MAX_BUF, fp)) == NULL){<br />
printf("cannot read");<br />
}<br />
fclose(fp);<br />
float pressure = atoi(buf);<br />
float pressured = pressure / 100;<br />
printf("Current Pressure: %f\n\n",pressured);<br />
} <br />
}</div>Jessebrannonhttps://elinux.org/index.php?title=Sparkfun:_BMP085_Barometric_Pressure_Sensor&diff=194012Sparkfun: BMP085 Barometric Pressure Sensor2012-11-17T00:01:55Z<p>Jessebrannon: </p>
<hr />
<div>[[Category:ECE497]]<br />
[[Category:SparkFun]]<br />
<br />
<pre style="color:red"><br />
Overview: 1, show a picture of the device that shows what pins it has.<br />
Wiring: 0, Give a specific example of how to wire it. What pins go where? Which bone header are you using? P8, P9?<br />
Code: 2<br />
git: 0 put in git<br />
Demo: 0<br />
Total: 3/10<br />
Comments: More details are needed. I think someone else in the class would have trouble<br />
reproducing what you have done.<br />
<br />
I've not seen echo bmp085 0x77 > /sys/class/i2c-adapter/i2c-3/new_device, could you give more details about what it does?<br />
</pre><br />
<br />
== '''Introduction''' ==<br />
<br />
<br />
The [https://www.sparkfun.com/products/9694 BMP085 Barometric Pressure Sensor] is a sensor that can measure the atmospheric pressure as well as the temperature at its location. It communicates with host devices via I2C.<br />
<br />
[[File:Bmp085-breakout.jpg|thumb|Image of the breakout board.]]<br />
<br />
<br />
== '''Connecting the Hardware''' ==<br />
<br />
To connect the BMP085 to a BeagleBone, first supply the Vdd and GND from the Beagle to the BMP085 Breakout Board. Then connect SDA and SCLK from the BMP085 to one of the I2C bus pins on the Beagle. The XCLR and EOC pins do not have to be connected to the BMP085. If I2C bus 3 is used, the connections are as follows: <br />
Signal | BeagleBone Pin | BMP085 Pin<br />
<br />
VCC | 3 or 4 (P9 Header) | 1<br />
GND | 1 or 2 (P9 Header) | 2<br />
SCL | 19 (P9 Header) | 5<br />
SDA | 20 (P9 Header) | 6<br />
<br />
<br />
== '''Reading the Pressure and Temperature from the Command Line''' ==<br />
<br />
The Angstrom distribution for the BeagleBone comes with a driver for the BMP085 already installed. This makes interfacing to the sensor easy. <br />
<br />
First, you need to find the I2C address of the device. Instructions on how to do this can be found [http://elinux.org/EBC_Exercise_12_I2C here]. My BMP085 showed up at I2C address 0x77. To initilialize that sensor, type the following in your terminal:<br />
<br />
<code>echo bmp085 0x77 > /sys/class/i2c-adapter/i2c-3/new_device</code><br />
<br />
We are simply telling the BeagleBone that a BMP085 device is located at I2C location 0x77. It will then initialize the driver and interface to the device.<br />
<br />
To check if this was successful, enter:<br />
<br />
<code>dmesg | grep bmp</code><br />
<br />
You should see:<br />
<br />
[10420.903490] i2c i2c-3: new_device: Instantiated device bmp085 at 0x77<br />
[10420.927608] bmp085 3-0077: BMP085 ver. 2.0 found.<br />
[10420.927659] bmp085 3-0077: Successfully initialized bmp085!<br />
<br />
Congratulations! You're sensor is connected and ready to read the temperature and pressure at its location.<br />
<br />
To read the temperature (in degrees C), type:<br />
<br />
<code>echo scale=1 \; $(cat /sys/bus/i2c/drivers/bmp085/3-0077/temp0_input) / 10 | bc</code><br />
<br />
To read the pressure (in millibars), type:<br />
<br />
echo scale=2 \; $(cat /sys/bus/i2c/drivers/bmp085/3-0077/pressure0_input) / 100 | bc<br />
<br />
== '''Reading the Temperature and Pressure Programmatically''' ==<br />
<br />
I wrote some simple code that will read the temperature and pressure every 2 seconds and display them on the command line. The code is shown below.<br />
<br />
#include <stdio.h><br />
#include <stdlib.h><br />
#include <string.h><br />
#include <errno.h><br />
#include <unistd.h><br />
#include <fcntl.h><br />
#include <poll.h><br />
#define MAX_BUF 64<br />
<br />
int main(int argc, char *argv){<br />
FILE *fp;<br />
char path[MAX_BUF];<br />
snprintf(path,sizeof path, "/sys/class/i2c-adapter/i2c-3/new_device");<br />
if((fp = fopen(path,"w")) == NULL){<br />
printf("file open failed");<br />
return 1;<br />
}<br />
rewind(fp);<br />
fprintf(fp, "bmp085 0x77\n");<br />
fflush(fp);<br />
fclose(fp);<br />
while(1){<br />
sleep(2);<br />
char buf[MAX_BUF];<br />
<br />
snprintf(path, sizeof path, "/sys/bus/i2c/drivers/bmp085/3-0077/temp0_input");<br />
if((fp = fopen(path, "r")) == NULL){<br />
printf("cannot read device");<br />
return 1;<br />
}<br />
if((fgets(buf, MAX_BUF, fp)) == NULL){<br />
printf("cannot read device");<br />
}<br />
fclose(fp);<br />
float temp = atoi(buf);<br />
float tempd = temp / 10;<br />
printf("Current Temperature: %f\n",tempd);<br />
<br />
snprintf(path, sizeof path, "/sys/bus/i2c/drivers/bmp085/3-0077/pressure0_input");<br />
if((fp = fopen(path, "r")) == NULL){<br />
printf("cannot read");<br />
return 1;<br />
}<br />
if((fgets(buf, MAX_BUF, fp)) == NULL){<br />
printf("cannot read");<br />
}<br />
fclose(fp);<br />
float pressure = atoi(buf);<br />
float pressured = pressure / 100;<br />
printf("Current Pressure: %f\n\n",pressured);<br />
} <br />
}</div>Jessebrannonhttps://elinux.org/index.php?title=Sparkfun:_BMP085_Barometric_Pressure_Sensor&diff=194006Sparkfun: BMP085 Barometric Pressure Sensor2012-11-16T23:48:02Z<p>Jessebrannon: </p>
<hr />
<div>[[Category:ECE497]]<br />
[[Category:SparkFun]]<br />
<br />
<pre style="color:red"><br />
Overview: 1, show a picture of the device that shows what pins it has.<br />
Wiring: 0, Give a specific example of how to wire it. What pins go where? Which bone header are you using? P8, P9?<br />
Code: 2<br />
git: 0 put in git<br />
Demo: 0<br />
Total: 3/10<br />
Comments: More details are needed. I think someone else in the class would have trouble<br />
reproducing what you have done.<br />
<br />
I've not seen echo bmp085 0x77 > /sys/class/i2c-adapter/i2c-3/new_device, could you give more details about what it does?<br />
</pre><br />
<br />
== '''Introduction''' ==<br />
<br />
<br />
The [https://www.sparkfun.com/products/9694 BMP085 Barometric Pressure Sensor] is a sensor that can measure the atmospheric pressure as well as the temperature at its location. It communicates with host devices via I2C.<br />
<br />
[[File:Bmp085-breakout.jpg|thumb|Image of the breakout board.]]<br />
<br />
<br />
== '''Connecting the Hardware''' ==<br />
<br />
To connect the BMP085 to a BeagleBone, first supply the Vdd and GND from the Beagle to the BMP085 Breakout Board. Then connect SDA and SCLK from the BMP085 to one of the I2C bus pins on the Beagle. The XCLR and EOC pins do not have to be connected to the BMP085. If I2C bus 3 is used, the connections are as follows: <br />
Signal | BeagleBone Pin | BMP085 Pin<br />
<br />
VCC | 3 or 4 (P9 Header) | 1<br />
GND | 1 or 2 (P9 Header) | 2<br />
SCL | 19 (P9 Header) | 5<br />
SDA | 20 (P9 Header) | 6<br />
<br />
<br />
== '''Reading the Pressure and Temperature''' ==<br />
<br />
The Angstrom distribution for the BeagleBone comes with a driver for the BMP085 already installed. This makes interfacing to the sensor easy. <br />
<br />
First, you need to find the I2C address of the device. Instructions on how to do this can be found [http://elinux.org/EBC_Exercise_12_I2C here]. My BMP085 showed up at I2C address 0x77. To initilialize that sensor, type the following in your terminal:<br />
<br />
<code>echo bmp085 0x77 > /sys/class/i2c-adapter/i2c-3/new_device</code><br />
<br />
We are simply telling the BeagleBone that a BMP085 device is located at I2C location 0x77. It will then initialize the driver and interface to the device.<br />
<br />
To check if this was successful, enter:<br />
<br />
<code>dmesg | grep bmp</code><br />
<br />
You should see:<br />
<br />
[10420.903490] i2c i2c-3: new_device: Instantiated device bmp085 at 0x77<br />
[10420.927608] bmp085 3-0077: BMP085 ver. 2.0 found.<br />
[10420.927659] bmp085 3-0077: Successfully initialized bmp085!<br />
<br />
Congratulations! You're sensor is connected and ready to read the temperature and pressure at its location.<br />
<br />
To read the temperature (in degrees C), type:<br />
<br />
<code>echo scale=1 \; $(cat /sys/bus/i2c/drivers/bmp085/3-0077/temp0_input) / 10 | bc</code><br />
<br />
To read the pressure (in millibars), type:<br />
<br />
echo scale=2 \; $(cat /sys/bus/i2c/drivers/bmp085/3-0077/pressure0_input) / 100 | bc</div>Jessebrannonhttps://elinux.org/index.php?title=Sparkfun:_BMP085_Barometric_Pressure_Sensor&diff=194000Sparkfun: BMP085 Barometric Pressure Sensor2012-11-16T23:44:07Z<p>Jessebrannon: </p>
<hr />
<div>[[Category:ECE497]]<br />
[[Category:SparkFun]]<br />
<br />
<pre style="color:red"><br />
Overview: 1, show a picture of the device that shows what pins it has.<br />
Wiring: 0, Give a specific example of how to wire it. What pins go where? Which bone header are you using? P8, P9?<br />
Code: 2<br />
git: 0 put in git<br />
Demo: 0<br />
Total: 3/10<br />
Comments: More details are needed. I think someone else in the class would have trouble<br />
reproducing what you have done.<br />
<br />
I've not seen echo bmp085 0x77 > /sys/class/i2c-adapter/i2c-3/new_device, could you give more details about what it does?<br />
</pre><br />
<br />
== '''Introduction''' ==<br />
<br />
<br />
The [https://www.sparkfun.com/products/9694 BMP085 Barometric Pressure Sensor] is a sensor that can measure the atmospheric pressure as well as the temperature at its location. It communicates with host devices via I2C.<br />
<br />
[[File:Bmp085-breakout.jpg|thumb|Image of the breakout board.]]<br />
<br />
<br />
== '''Connecting the Hardware''' ==<br />
<br />
To connect the BMP085 to a BeagleBone, first supply the Vdd and GND from the Beagle to the BMP085 Breakout Board. Then connect SDA and SCLK from the BMP085 to one of the I2C bus pins on the Beagle. The XCLR and EOC pins do not have to be connected to the BMP085. If I2C bus 3 is used, the connections are as follows: <br />
Signal | BeagleBone Pin | BMP085 Pin<br />
<br />
VCC | 3 or 4 (P9 Header) | 1<br />
GND | 1 or 2 (P9 Header) | 2<br />
SCL | 19 (P9 Header) | 5<br />
SDA | 20 (P9 Header) | 6<br />
<br />
<br />
== '''Reading the Pressure and Temperature''' ==<br />
<br />
My BMP085 showed up at I2C address 0x77. To initilialize that sensor, type the following in your terminal:<br />
<br />
<code>echo bmp085 0x77 > /sys/class/i2c-adapter/i2c-3/new_device</code><br />
<br />
If this was successful, enter:<br />
<br />
<code>dmesg | grep bmp</code><br />
<br />
You should see:<br />
<br />
[10420.903490] i2c i2c-3: new_device: Instantiated device bmp085 at 0x77<br />
[10420.927608] bmp085 3-0077: BMP085 ver. 2.0 found.<br />
[10420.927659] bmp085 3-0077: Successfully initialized bmp085!<br />
<br />
Congratulations! You're sensor is connected and ready to read the temperature and pressure at its location.<br />
<br />
To read the temperature (in degrees C), type:<br />
<br />
<code>echo scale=1 \; $(cat /sys/bus/i2c/drivers/bmp085/3-0077/temp0_input) / 10 | bc</code><br />
<br />
To read the pressure (in millibars), type:<br />
<br />
echo scale=2 \; $(cat /sys/bus/i2c/drivers/bmp085/3-0077/pressure0_input) / 100 | bc</div>Jessebrannonhttps://elinux.org/index.php?title=File:Bmp085-breakout.jpg&diff=193994File:Bmp085-breakout.jpg2012-11-16T23:32:49Z<p>Jessebrannon: </p>
<hr />
<div></div>Jessebrannonhttps://elinux.org/index.php?title=EBC_Contributions_and_Project_Status&diff=193988EBC Contributions and Project Status2012-11-16T23:29:23Z<p>Jessebrannon: </p>
<hr />
<div>[[Category:ECE497 |Contributions]]<br />
{{YoderHead}}<br />
<br />
== Fall 2012 ==<br />
<br />
=== Project Status ===<br />
<br />
Please edit this page and add your project to this list.<br />
Please make the list alphabetical by family name.<br />
<br />
Take a look at what you and others have contributed.<br />
<br />
{|<br />
|- <br />
! Name<br />
! Contributions<br />
! Project<br />
! git repository<br />
|-<br />
| [[User:atniptw | Tom Atnip]]<br />
| [[Special:Contributions/atniptw|contrib]]<br />
| [[ECE497 Beagle VNS | Beagle VNS]]<br />
| [https://github.com/atniptw/ atniptw]<br />
|-<br />
| [[User:jessebrannon | Jesse Brannon]]<br />
| [[Special:Contributions/Jessebrannon|contrib]]<br />
| [[ECE497 Project Rover | Rover]]<br />
| [https://github.com/brannojs/ brannojs]<br />
|-<br />
| [[User:Xinyu1991 | Xinyu Cheng]]<br />
| [[Special:Contributions/Xinyu1991|contrib]]<br />
| [[ECE497_Project:_Kinect | Kinect]]<br />
| [https://github.com/xinyu1991/ Xinyu Cheng]<br />
|-<br />
| [[User:correlbn | Bryan Correll]]<br />
| [[Special:Contributions/correlbn|contrib]]<br />
| [[BeagleBone PRU | BeagleBone PRU]]<br />
| [https://github.com/correlbn/My-Beagle-Project/ Correlbn]<br />
|-<br />
| [[User:draneaw | Alex Drane]]<br />
| [[Special:Contributions/draneaw|contrib]]<br />
| [[ECE497: Remote Web Cam Viewer Final Project| Remote Web Cam Viewer]]<br />
| [https://github.com/draneaw/ Draneaw]<br />
|-<br />
| [[User:duganje | Josh Dugan]]<br />
| [[Special:Contributions/duganje|contrib]]<br />
| [[ECE497 Project: XBee|XBee]]<br />
| [https://github.com/duganje/ duganje]<br />
|-<br />
| [[User:Geislekj | Kevin Geisler]]<br />
| [[Special:Contributions/geislekj|contrib]]<br />
| [[ECE497 Beagle VNS | Beagle VNS]]<br />
| [https://github.com/geislekj/ geislekj]<br />
| <br />
|-<br />
| [[User:chris.good | Christopher A Good]]<br />
| [[Special:Contributions/Chris.good|contrib]]<br />
| [[ECE497 Project RoverGUI | RoverGUI]]<br />
| [https://github.com/goodca/ goodca]<br />
| <br />
|-<br />
| [[User:hansenrl | Ross Hansen]]<br />
| [[Special:Contributions/hansenrl|contrib]]<br />
| [[ECE497 Project Rover | Rover]]<br />
| [https://github.com/hansenrl/ Hansenrl]<br />
| <br />
|-<br />
| [[User:jungeml | Michael Junge]]<br />
| [[Special:Contributions/jungeml|contrib]]<br />
| [[ECE497 Project Rover | Rover]]<br />
| [https://github.com/jungeml/ Jungeml]<br />
|-<br />
| [[User:larmorgs | Greg Larmore]]<br />
| [[Special:Contributions/larmorgs|contrib]]<br />
| [[ECE497 SPI Project | SPI Project]]<br />
| [https://github.com/larmorgs Greg Larmore]<br />
|-<br />
| [[User:Lobdeljt | John Lobdell]]<br />
| <br />
| [[ECE 497 lobdeljt Project | My Beagle Project]]<br />
| [https://github.com/jtlobdell jtlobdell]<br />
|-<br />
| [[User:Lix | Xia Li]]<br />
| [[Special:Contributions/Lix|contrib]]<br />
| [[ECE497 Project: Kinect | Kinect]]<br />
| [https://github.com/1984xiali/ xiali]<br />
|-<br />
| [[User:Millerap | Andrew Miller]]<br />
| [[Special:Contributions/Millerap|contrib]]<br />
| [[BeagleBone PRU | BeagleBone PRU]]<br />
| [https://github.com/millerap millerap]<br />
|-<br />
| [[User:mmoravec | Matthew Moravec]]<br />
| [[Special:Contributions/mmoravec|contrib]]<br />
| [[ECE497 Project: XBee|XBee]]<br />
| [https://github.com/mmoravec/ mmoravec]<br />
|-<br />
| [[User:ngop | Peter Ngo]]<br />
| [[Special:Contributions/ngop|contrib]]<br />
| [[BeagleBone PRU | BeagleBone PRU]]<br />
| [https://github.com/ngop/ ngop]<br />
|-<br />
| [[User:Popenhjc | James Popenhagen]]<br />
| [[Special:Contributions/Popenhjc|contrib]]<br />
| [[BeagleBone PRU | BeagleBone PRU]]<br />
| [https://github.com/popenhjc/ popenhjc]<br />
|-<br />
| [[User:Richarsm | Sean Richardson]]<br />
| [[Special:Contributions/Richarsm|contrib]]<br />
| [[ECE497 SPI Project | SPI Project]]<br />
| [https://github.com/seanrich Sean Richardson]<br />
|-<br />
| [[User:shinnsm|Stephen Shinn]]<br />
| [[Special:Contributions/shinnsm|contrib]]<br />
| [[ECE497 Project: XBee|XBee]]<br />
| [https://github.com/shinnsm shinnsm]<br />
|-<br />
| [[User:Whiteer | Elias White]]<br />
| <br />
| [[ECE497 SLAM via ROS | My Beagle Project]]<br />
| [https://github.com/whiteer whiteer]<br />
|-<br />
| [[User:ruff | Ruffin White]]<br />
| [[Special:Contributions/ruff|contrib]]<br />
| [[ECE497 Beagle VNS | Beagle VNS]]<br />
| [https://github.com/ruffsl/ ruffsl]<br />
|-<br />
| [[User:Yoder | Mark A. Yoder]]<br />
| [[Special:Contributions/Yoder | contrib]]<br />
| [[ECE497 Project Template | My Beagle Project]]<br />
| [https://github.com/MarkAYoder MarkAYoder]<br />
|-<br />
| [[User:Astroricks | Yue Zhang]]<br />
| [[Special:Contributions/Astroricks | contrib]]<br />
| [[ECE497_Project:_Kinect | Kinect]]<br />
| [https://github.com/Astroricks/Beagle-Project Yue Zhang]<br />
|}<br />
<br />
== Winter 2011-2012 ==<br />
<br />
=== Contributions ===<br />
<br />
# [[Special:Contributions/Yuming | Yuming Cao]]<br />
# [[Special:Contributions/Yifei | Yifei Li]]<br />
# [[Special:Contributions/Harrisgw | Greg Harrison]]<br />
# [[Special:Contributions/mac | Jack Ma]]<br />
# [[Special:Contributions/Gemini91 | Guanqun Wang]]<br />
# [[Special:Contributions/Yanj | Mona Yan]]<br />
# [[Special:Contributions/Yoder | Mark A. Yoder]]<br />
# [[Special:Contributions/Yuhasmj | Michael Yuhas]]<br />
# [[Special:Contributions/Ziyi Zhang | Ziyi Zhang]]<br />
# [[Special:Contributions/Zitnikdj | David Zitnik]]<br />
# [[Special:Contributions/Zitnikdj | Alex Drane]]<br />
# [[Special:Contributions/jessebrannon | Jesse Brannon]]<br />
# [[Special:Contributions/larmorgs | Greg Larmore]]<br />
# [[Special:Contributions/jungeml | Michael Junge]]<br />
# [[Special:Contributions/millerap | Andrew Miller]]<br />
# [[Special:Contributions/correlbn | Bryan Correll]]<br />
<br />
=== Project Status ===<br />
<br />
# [[User:Yoder | Mark A. Yoder]], [[ECE497 Project Template | My Beagle Project]]<br />
# [[user:Yanj|Mona Yan]] and [[user:Harrisgw| Greg Harrison]], [[PS EYE QT PROJECT | Playstation Eye Audio with Qt]]<br />
# [[user:Caogecym | Yuming Cao]] and [[user:Ziyi Zhang | Ziyi Zhang]], [[Node.js Weather Station]]<br />
# [[user:Yifei| Yifei Li]] and [[user:Gemini91| Guanqun Wang]], [[ Kinect Project | Play games using Kinect on Beagleboard]]<br />
# [[user:Yuhasmj| Michael J. Yuhas]] and [[user:mac | Jack Ma]], [[ Multiple Partitions via U-boot | Multiple Partitions via U-boot ]]<br />
# [[user:Zitnikdj| David Zitnik]], [[ ECE497 Project: Twitter Java Application | Twitter Java Application ]]<br />
<br />
<br />
{{YoderFoot}}</div>Jessebrannonhttps://elinux.org/index.php?title=ECE497_Project_Rover&diff=192710ECE497 Project Rover2012-11-13T17:05:54Z<p>Jessebrannon: </p>
<hr />
<div>[[Category:ECE497 |Project]]<br />
{{YoderHead}}<br />
<br />
Team members: [[user:Hansenrl|Ross Hansen]], [[user:jessebrannon|Jesse Brannon]], [[User:jungeml|Michael Junge]] <br />
<br />
== Grading Template ==<br />
I'm using the following template to grade. Each slot is 10 points.<br />
0 = Missing, 5=OK, 10=Wow!<br />
<br />
<pre style="color:red"><br />
05 Executive Summary<br />
05 Installation Instructions (waiting details)<br />
00 User Instructions<br />
00 Highlights<br />
00 Theory of Operation (Looking forward to more details)<br />
00 Work Breakdown<br />
00 Future Work<br />
00 Conclusions<br />
00 Demo<br />
00 Late<br />
Comments: I'm looking forward to seeing this.<br />
<br />
Score: 10/100<br />
<br />
</pre><br />
<br />
== Executive Summary ==<br />
<br />
This project is a BeagleBone implementation of a ground-based rover platform. Through a BeagleBone mounted on an RC car, the car can be directed to turn to a specified compass heading or move forward. A user is able to control the car with predefined movement code or in real-time over WiFi. The BeagleBone can also send back helpful information to the user over Wifi, such as GPS location and compass heading. Although not complete, functionality to direct the rover along a path by defining waypoints is currently in development.<br />
<br />
This work provides highly useful code even for applications outside of this specific rover project - digital compass and GPS sensor interfacing, Python-based networking, and RC car motor control code is all written and easily extendable into other applications. Additionally, the work performed for this project in the area of RC car reverse engineering and BeagleBone USB Wi-Fi can serve as useful community knowledge for other projects.<br />
<br />
== Installation Instructions ==<br />
<br />
We bought an RC car from [http://www.toysrus.com/product/index.jsp?productId=12925248 Toys 'R Us] and modified it to become an intelligent platform by utilizing a BeagleBone. To successfully recreate our work, certain skills will be helpful: dremel-based hardware modification, soldering, experience with Beagle Bone or an equivalent embedded processor bases system, familiarity with the Python and C programming languages, and basic circuit knowledge such as power regulation from batteries.<br />
<br />
=== Modifying RC Truck/Car ===<br />
[[File:ECE497 Rover truck hardware.JPG|thumb|Figure 1 - Electronics housing]]<br />
[[File:ECE497 Rover circuitBoard.JPG|thumb|Figure 2 - Motor control PCB]]<br />
[[File:ECE497 Rover circuitBoard2.JPG|thumb|Figure 3 - Motor control pins]]<br />
<br />
As shown in Figure 1, we removed the aesthetic cover form the truck. We also cut out most of the plastic with a Dremel tool. We did this to expose the circuity below. Cutting out most of the plastic is necessary unless you are skilled enough to drill only a small hole to feed the wires through and can replace the circuit board back into place without viewing it. Figure 1 also shows, four screw slots. In order to obtain access to the circuity, you must remove the screws from their sockets. Now turn the truck so that it's undercarriage is facing up, remove the housing unit of the battery. The battery unit should be loose and thus be removed since you already removed the four place holder screws. Be careful though to not pullout or detach any wires from the their respected places as you are pulling out the circuit board. Figure 2 shows the circuit board removed from it's housing with the wires exposed. The red and black wires you see are respectively power and ground, the same for all electrical work. <br />
<br />
Figure 3 is focused on the specific connections that we soldered to the board. We choose the top left corner (where three of the connections are) because when we reverse engineered the board, this area is where the wireless signals are received and sent to the motor controllers. The fourth wire was supposed to be the pin on the right but as you can see by the picture, the circuit pad is burned off. We just followed the hard trace and soldered at the next available node. After testing, this improvised step seemed suitable for our needs. The same four pins are labeled on the circuit board as F,W,L,R. Originally, we thought these meant forward, backward, left and right. However the RC Truck is designed with tank steering so in order to go forward it theoretically should require two separate signals. We tested this theory and found out that it did in fact require two signals, thus the F,W,L,R labels are incorrect. The pins attach to relays on each motor, and correspond to "right forward", "right backward", "left forward", and "left backward", and are digital control signals. Therefore, in order to turn left you would drive the "right backward" and "left forward" pins high. Fortunately, motor conflicts are not destructive and exact pin mappings can be determined by experimentation - if you mistakenly drive the "right forward" and "right backward" pins high, for instance, the relay will click and the motors will not move, without any damage to the motors or electronics.<br />
<br />
If you want to reverse engineer this circuit board for yourself instead of just following this guide, you will need a separate 5V dc power supply as well as the 9V battery that was included, a 5V wall adapter with stripped wires will be suffient for the extra power supply. Then you should look for the wireless adapter board. Most RC electronics will have a separate wireless circuit board. Ours happened to be already physically attached to the motor controllers. Find the output signals from the wireless adapter and test which signals control which motors and direction of motors. To test this just attach the 5V to the pin on the circuit board while the truck battery is installed and switched on. Also you will need to find a ground wire to attach for common ground. We just soldered directly to the terminal on the installed battery for our ground.<br />
<br />
=== BeagleBone ===<br />
[[File:ECE497 Rover Power Circuit.jpg|thumb|Figure 4 - Power Circuit]]<br />
[[File:ECE497 Rover 5v regulator.JPG|thumb|Figure 5 - Regulator Circuit]]<br />
After several problems with the WiFi on the BeagleBone not working as expected, we decided to overwrite our Angstrom Beagle Image with Ubuntu. To install Ubuntu, we simply followed [http://www.instructables.com/id/BeagleBone-Ubuntu-OS-LXDE-GUI/ this Instructable] up to and including Step 6. There is also good information on the [http://elinux.org/BeagleBoardUbuntu BeagleBoardUbuntu] page on elinux.org. <br />
<br />
However, if you want to pursue the Angstrom route then I would suggest reading Dr. Yoder's [http://elinux.org/EBC_Exercise_02_Out-of-the-Box,_Bone Out of The Box, Bone]. ''Note: If you want WiFi to work properly, install the A5 image not the A6 image.''<br />
<br />
Whether you use the Angstrom image or Ubuntu is up to you. However, you will still need to wire the BeagleBone up so that it runs off of battery power. We bought a 7.4 Vdc 10400 mAh [http://www.all-battery.com/li-ion1865074v10400mahrechargeablebatterymodulewithpcb-31577.aspx battery]. Since the BeagleBone runs off of 5V with a possible peak current of 1.5 amps we needed a 5V regulator that can supply that power [http://www.ti.com/product/lm2576hv voltage regulator]. To be safe and avoid short-circuiting the BeagleBone, it is advisable to buy a [http://www.digikey.com/scripts/DkSearch/dksus.dll?WT.z_header=search_go&lang=en&keywords=CP3-1000-ND&x=0&y=0&cur=USD barrel connector] for proper power connection. This barrel connector replaces the need to solder wires to the hardware of the BeagleBone, thus allowing for us to safely supply power the way the BeagleBone was designed. As seen in Figure 4, the barrel connector, battery and voltage regulator with heat sink can be seen. Figure 5 is our Regulator circuit. It shows how to connect the regulator to the rest of the BeagleBone hardware.<br />
<br />
''Note: We specifically used a BeagleBone for it's smaller size and less cost due to less capabilities. However, you could use any board that has an Omap processor, such as the Beagle XM Board.''<br />
<br />
===WiFi Network===<br />
Connecting to WiFi is an important part of our project. We intended this project to receive data from a user on a mobile laptop. We decided to use WiFi to avoid following the RC truck around a field with the laptop in our hands. WiFi helps the user stay in the same place while the RC truck moves around the field. We ordered an [http://www.adafruit.com/products/814 Adafruit WiFi adapter] that Adafruit specifically sponsors for the BeagleBone. They also have an install tutorial. After several days of researching WiFi capabilities for the BeagleBone, we continually ran into many difficulties. One of the many difficulties is with 'opkg upgrade' that Adafruit says to run. DO NOT RUN 'opkg upgrade'. Depending on what software image you are running, you will receive an error that for some reason cannot be resolved. There are many reported cases on [http://forums.adafruit.com/viewforum.php?f=49&sid=1a1b1e0fba73bb5659a3446079a5f423 Adafruit's help forums]. There are also several more reported cases for the BeagleBone group on google groups. After researching and WiFi experimentation we discovered that the Adafruit WiFi adapter works well on the A6 version of the BeagleBone hardware while running A5 version of Angstrom. This is the only valid combination we could find. The A5 hardware shows and detects the adapter, but for some reason the adapter does not connect to a wireless router. When the same SD card is plugged into an A6 hardware, it connects fine without issue to a router. We also noticed that the A6 software image does not even recognize the BeagleBone following the same procedure as for the A5 software.<br />
<br />
Because of the difficulties, we decided to not use the Angstrom images supported by Beagle. We instead installed Ubuntu Operating system on our A6 hardware. With Ubuntu installed it was as easy as plug and play. All we did after installing Ubuntu was to physically plug in the adapter and it was recognized immediately. However, if you want to stay with Angstrom I would suggest following the directions in [http://elinux.org/ECE497_Beagle_Bone_WiFi ECE497 Beagle Bone WiFi].<br />
<br />
=== Software ===<br />
<br />
The code for the platform can be found on the [https://github.com/hansenrl/BeagleRover BeagleRover Github Page] and [git://github.com/hansenrl/BeagleRover.git Github Repository].<br />
<br />
A Makefile is provided, and the code can be compiled with the command "make" in the root directory of the project; this will build a main binary ''movement'' and shared libraries for movement control over WiFi. <br />
<br />
See the README for detailed instructions on installation and documentation of the code structure.<br />
<br />
== Required Parts List ==<br />
1 x [http://www.toysrus.com/product/index.jsp?productId=12925248 RC Truck]<br />
<br />
1 x [http://beagleboard.org/buy BeagleBoard] (could be Bone/XM/Board)<br />
<br />
1 x [http://www.all-battery.com/li-ion1865074v10400mahrechargeablebatterymodulewithpcb-31577.aspx Battery]<br />
<br />
1 x [http://www.ti.com/product/lm2576hv Voltage Regulator]<br />
<br />
1 x [http://www.digikey.com/scripts/DkSearch/dksus.dll?WT.z_header=search_go&lang=en&keywords=CP3-1000-ND&x=0&y=0&cur=USD Barrel Connector]<br />
<br />
1 x [http://www.adafruit.com/products/814 Adafruit WiFi adapter]<br />
<br />
1 x [https://www.sparkfun.com/products/11466 GPS]<br />
<br />
1 x [https://www.sparkfun.com/products/7915 Compass]<br />
<br />
1 x BreadBoard<br />
<br />
Various Wires<br />
<br />
Soldering Tools<br />
<br />
== User Instructions ==<br />
The rover is designed for two different operating modes.<br />
<br />
# Stand-alone control and navigation<br />
# Remote operation over Wi-Fi via Python<br />
<br />
The README file on the software [https://github.com/hansenrl/BeagleRover Github Page] includes details about running the software for each of these modes. For stand-alone operation, the compiled binary ''movement'' can be executed to run commands such as moving forward or turning to a specific heading. For remote operation, Python scripts are provided to setup a server/client interface to communicate with the BeagleBone. When communicating with the Bone over Wi-Fi, the Python script presents the user with options of what to send to the BeagleBone.<br />
<br />
Selection:<br />
1: FWD<br />
2: BCK<br />
3: TURN<br />
4: COMPASS QUERY<br />
5: GPS QUERY<br />
9: EXIT<br />
<br />
The user then inputs the selection number, and an option if necessary. For instance, the option for sending a "FWD" command is the duration in microseconds, while the option for a "TURN" command is the heading relative to magnetic north. FWD, TURN, COMPASS QUERY, and GPS QUERY are all implemented and functional, but BCK is currently unimplmented; the code is simple and implementation would be trivial, but for the end application of this software (emulating UAV movements) it was unnecessary.<br />
<br />
Upon sending the command, the BeagleBone will return feedback to the user over Wi-Fi. In the case of a movement command it will return that the command was executed successfully, and if a sensor was queried it will return the result. The Python script will then prompt the user for another command to send.<br />
<br />
== Highlights ==<br />
{{#ev:youtube|g_-srPShIiU}}<br />
<br />
In the video we demonstrate how to set up the wireless server/client communication and the functionality present over the network interface, including sensor queries and movement commands. Although these movements are accomplished over Wi-Fi, they can also be programmed for stand-alone operation. The jerky turning and vigorous stopping that the car displays in the video is due to the high traction of the tires on the track surface - reducing the traction on the tires would eliminate this.<br />
<br />
== Theory of Operation ==<br />
<br />
=== Hardware Interfaces ===<br />
[[File:ECE497 Rover gpio Pins.jpg|thumb|Figure 6 - GPIO Pin Connections]]<br />
[[File:Bone P9 pinout.jpg|thumb|Figure 7 - P9 Header Layout]]<br />
[[File:ECE497 Rover compass.jpg|thumb|Figure 8 - Compass and GPS Pin layout]]<br />
[[File:ECE497 Rover gpsCompass mount.jpg|thumb| Figure 9 - Compass, GPS, and WiFi mount]]<br />
<br />
The BeagleBone is connected to the RC car via 4 GPIO pins and a ground wire. The four GPIO pins control left forward, left reverse, right forward, and right reverse on the tank-style drive base. Tank-style means that each side is controlled independently, as opposed to a standard steering where the user controls whether the car as a whole is moving forward or reverse and turns are accomplished by rotating the front axle. Figure 6 shows how the GPIO pins on BeagleBone are connected to the motor control PCB. As seen in Figure 4 the motor control wires are white. The GPIO pins are the two orange and two yellow wires labeled in the figure.<br />
<br />
The Motor Control pin layout is listed below. These are defined in movement.c, and can be redefined easily to match a different pin configuration. These pins are connected to relays on the RC car, so the motors are either on or off. <br />
Motor Control BeagleBone Pin<br />
<br />
Right Forward 40 - P8 header (software sysfs GPIO 77)<br />
Right Reverse 44 - P8 header (software sysfs GPIO 73)<br />
Left Forward 42 - P8 header (software sysfs GPIO 75)<br />
Left Reverse 46 - P8 header (software sysfs GPIO 71)<br />
<br />
WiFi is achieved with Adafruit's [http://www.adafruit.com/products/814 USB WiFi Module]. The USB WiFi Module is connected to the only usb port on the BeagleBone.<br />
<br />
Figure 7 is the BeagleBone P9 Header layout and provides a good reference in knowing which pins in the header connect to pins on the BeagleBone. Figure 8 shows how the pins for the gps and compass are connected to the P9 header. Figure 9 shows where the Compass, GPS and WiFi module are mounted. We had to mount them outside of the box because placing them inside of the wooden box attenuated the signals excessively.<br />
<br />
The [https://www.sparkfun.com/products/11466 GPS] is connected to the BeagleBone over UART serial. The GPS pin layout is as follows:<br />
GPS BeagleBone Pin<br />
<br />
1 - TX 24 - P9 header<br />
2 - RX 26 - P9 header<br />
3 - GND 1 or 2 - P9 header<br />
4 - 3.3 V 3 or 4 - P9 header<br />
5 - NC<br />
6 - NC<br />
<br />
Over UART, the GPS sends back 6 strings in NMEA format every second. Each of these 6 strings includes some or all of the following data: Latitude, Longitude, if the GPS has a fix, UTC time, and some other data that we don't need. For more information, read the [http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Sensors/GPS/D2523T-6_SPEC_20120220.pdf GPS' datasheet]. We chose to parse the string that starts with "$GPGLL" because it included all of the information we need listed previously. <br />
<br />
The format for the $GPGLL string is:<br />
$GPGLL,Latitude,N/S,Longitude,E/W,UTC time,Fix Status,Mode Indicator,Checksum<br />
<br />
This is what the $GPGLL string looks like when the GPS does not have a fix.<br />
$GPGLL,,,,,231429.00,V,N*45 <br />
We know the GPS doesn't have a fix, because of the 'V.' The second to last comma-delimited item will be 'V' when there is no fix and 'A' when there is a fix. Also, the Latitude and Longitude fields are left blank when there is no fix, as shown.<br />
<br />
The [https://www.sparkfun.com/products/7915 compass] is connected to the BeagleBone via I2C. The Compass pin layout is as follows:<br />
Compass BeagleBone Pin<br />
<br />
1 - GND 1 or 2 - P9 Header<br />
2 - 3.3 V 3 or 4 - P9 Header<br />
3 - I2C SDA 20 - P9 Header<br />
4 - I2C SCL 19 - P9 Header<br />
<br />
The compass simply returns the current heading at a default rate of 20 Hz. <br />
<br />
=== Software ===<br />
<br />
All hardware interfacing is accomplished in C, using the standard interfaces for each protocol. Motor control is done via GPIO, the compass is I2C, and the GPS is UART. Compass interfacing is provided in a compass library ''Compass/compass.c'', GPS interfacing is provided in a GPS library ''GPSLibs/gps.c'', and the motor control is provided in ''movement.c''. Waypoint storage and helper functions are provided in a library in ''Waypoints/waypoint.c''.<br />
<br />
For stand-alone operation, ''movement.c'' is compiled with the necessary libraries as a stand-alone binary. <br />
<br />
For network operation, the Python scripts utilize compiled libraries in sharedLibs. Currently, due to the structure of how the sensors are interfaced in the movement library, all interfacing is accomplished through a library ''movementLib.so'', which provides wrapper functions to the GPS and Compass. In the future, this functionality should be better divided out into each individual sub-library. This interfacing between Python and C is done with Python [http://docs.python.org/2/library/ctypes.html CTypes]. The BeagleBone and base station communicate over Wi-Fi using TCP sockets via the Python [http://docs.python.org/2/library/socket.html Socket] and [http://docs.python.org/2/library/socketserver.html SocketServer] modules. All of these Python modules, ctypes, socket, and SocketServer, are standard in Python 2.7.<br />
<br />
== Work Breakdown ==<br />
<br />
A summary of the major development areas and the primary contributor(s) to each subsystem:<br />
<br />
* RC car hardware interfacing and mounting: ''Michael Junge''<br />
* Power subsystem development: ''Michael Junge''<br />
* Wireless communication hardware: ''Michael Junge'', ''Jesse Brannon''<br />
* GPS and Compass sensor interfacing: ''Jesse Brannon''<br />
* Movement and navigation software development: ''Jesse Brannon'', ''Ross Hansen''<br />
* Network communication software development: ''Ross Hansen''<br />
<br />
Tasks completed and in development by each team member:<br />
<br />
'''Michael Junge''' <br />
* Constructed hardware interfaces to compass sensor and drive base electronics<br />
* Investigated WiFi issues on Angstrom - determined that the Angstrom A5 image on BeagleBone A6 hardware is a known working configuration ''**still under invesgitation, won't be fully completed due to hardware/software issues between Angstrom and Beagle''<br />
* Soldered and interfaced battery subsystem to power BeagleBone<br />
<br />
'''Jesse Brannon'''<br />
* Decided and installed an Ubuntu image instead of Anstrom specifically for the WiFi functionally<br />
* Researched and purchased compass and GPS sensors<br />
* Wrote libraries to interface to compass and GPS sensor<br />
* Co-developed movement and navigation software<br />
<br />
'''Ross Hansen'''<br />
* Co-developed movement and navigation software<br />
* Developed software for network communication<br />
<br />
'''Tasks Remaining'''<br />
<br />
Although full rover functionality for movement and sensor data retrieval was completed, two additional features were currently in development at the end of the original timeframe of this project.<br />
<br />
1) Code to manage waypoints and drive the motors based off of waypoint inputs<br />
<br />
2) Improve GPS library to allow for update rate configuration<br />
<br />
These two features were not necessary for this project, but are useful for a sister project in development by the same team; so development will continue on these two tasks. The code in the BeagleRover repository will be updated with final versions of the code as it is completed.<br />
<br />
== Future Work ==<br />
<br />
This project has the possibility to branch into several interesting areas.<br />
* The BeagleBone platform has the processing power for various interesting sensory systems, such as computer vision. The RC car interface and networking platform allows for a variety of interesting applications of sensor systems, where driving decisions are made based off of sensor inputs or sensor data is relayed remotely back to a powerful processing node.<br />
<br />
* A GUI is being developed that could be used to send commands to control the rover. Work on it can be seen here: [[ECE497_Project_RoverGUI]]<br />
<br />
* This project is a two-dimensional navigation system for a ground-based rover, but could be extended for use on aerial vehicles. Additional requirements for this would include some sort of altimeter sensor interface, modification of control outputs to accommodate aerial control surfaces, and an addition of a third dimension to location and navigation code.<br />
<br />
== Conclusions ==<br />
<br />
BeagleRover is a functioning implementation of a rover intelligence platform for the BeagleBone. When mounted on an RC car, the BeagleBone can direct the car motors to move around and it can relay GPS and compass data across a Wi-Fi network.<br />
<br />
This project was highly interesting and enjoyable to work on. It incorporated a wide range of skills fundamental to embedded systems - hardware, sensor interfacing via multiple protocols, and both high and low-level software development. Although a complete project in its current status, even more exciting is the possibility for extension in the future; the basic system of network functionality, location and heading sensor data, and mobility provide an interesting platform for lots of different embedded work. Combined with the versatility of Linux running on the BeagleBone, this project provides an interesting application of the BeagleBone's potential and a flexible platform for future development.<br />
<br />
{{YoderFoot}}</div>Jessebrannonhttps://elinux.org/index.php?title=ECE497_Project_Rover&diff=192704ECE497 Project Rover2012-11-13T17:04:33Z<p>Jessebrannon: </p>
<hr />
<div>[[Category:ECE497 |Project]]<br />
{{YoderHead}}<br />
<br />
Team members: [[user:Hansenrl|Ross Hansen]], [[user:jessebrannon|Jesse Brannon]], [[User:jungeml|Michael Junge]] <br />
<br />
== Grading Template ==<br />
I'm using the following template to grade. Each slot is 10 points.<br />
0 = Missing, 5=OK, 10=Wow!<br />
<br />
<pre style="color:red"><br />
05 Executive Summary<br />
05 Installation Instructions (waiting details)<br />
00 User Instructions<br />
00 Highlights<br />
00 Theory of Operation (Looking forward to more details)<br />
00 Work Breakdown<br />
00 Future Work<br />
00 Conclusions<br />
00 Demo<br />
00 Late<br />
Comments: I'm looking forward to seeing this.<br />
<br />
Score: 10/100<br />
<br />
</pre><br />
<br />
== Executive Summary ==<br />
<br />
This project is a BeagleBone implementation of a ground-based rover platform. Through a BeagleBone mounted on an RC car, the car can be directed to turn to a specified compass heading or move forward. A user is able to control the car with predefined movement code or in real-time over WiFi. The BeagleBone can also send back helpful information to the user over Wifi, such as GPS location and compass heading. Although not complete, functionality to direct the rover along a path by defining waypoints is currently in development.<br />
<br />
This work provides highly useful code even for applications outside of this specific rover project - digital compass and GPS sensor interfacing, Python-based networking, and RC car motor control code is all written and easily extendable into other applications. Additionally, the work performed for this project in the area of RC car reverse engineering and BeagleBone USB Wi-Fi can serve as useful community knowledge for other projects.<br />
<br />
== Installation Instructions ==<br />
<br />
We bought an RC car from [http://www.toysrus.com/product/index.jsp?productId=12925248 Toys 'R Us] and modified it to become an intelligent platform by utilizing a BeagleBone. To successfully recreate our work, certain skills will be helpful: dremel-based hardware modification, soldering, experience with Beagle Bone or an equivalent embedded processor bases system, familiarity with the Python and C programming languages, and basic circuit knowledge such as power regulation from batteries.<br />
<br />
=== Modifying RC Truck/Car ===<br />
[[File:ECE497 Rover truck hardware.JPG|thumb|Figure 1 - Electronics housing]]<br />
[[File:ECE497 Rover circuitBoard.JPG|thumb|Figure 2 - Motor control PCB]]<br />
[[File:ECE497 Rover circuitBoard2.JPG|thumb|Figure 3 - Motor control pins]]<br />
<br />
As shown in Figure 1, we removed the aesthetic cover form the truck. We also cut out most of the plastic with a Dremel tool. We did this to expose the circuity below. Cutting out most of the plastic is necessary unless you are skilled enough to drill only a small hole to feed the wires through and can replace the circuit board back into place without viewing it. Figure 1 also shows, four screw slots. In order to obtain access to the circuity, you must remove the screws from their sockets. Now turn the truck so that it's undercarriage is facing up, remove the housing unit of the battery. The battery unit should be loose and thus be removed since you already removed the four place holder screws. Be careful though to not pullout or detach any wires from the their respected places as you are pulling out the circuit board. Figure 2 shows the circuit board removed from it's housing with the wires exposed. The red and black wires you see are respectively power and ground, the same for all electrical work. <br />
<br />
Figure 3 is focused on the specific connections that we soldered to the board. We choose the top left corner (where three of the connections are) because when we reverse engineered the board, this area is where the wireless signals are received and sent to the motor controllers. The fourth wire was supposed to be the pin on the right but as you can see by the picture, the circuit pad is burned off. We just followed the hard trace and soldered at the next available node. After testing, this improvised step seemed suitable for our needs. The same four pins are labeled on the circuit board as F,W,L,R. Originally, we thought these meant forward, backward, left and right. However the RC Truck is designed with tank steering so in order to go forward it theoretically should require two separate signals. We tested this theory and found out that it did in fact require two signals, thus the F,W,L,R labels are incorrect. The pins attach to relays on each motor, and correspond to "right forward", "right backward", "left forward", and "left backward", and are digital control signals. Therefore, in order to turn left you would drive the "right backward" and "left forward" pins high. Fortunately, motor conflicts are not destructive and exact pin mappings can be determined by experimentation - if you mistakenly drive the "right forward" and "right backward" pins high, for instance, the relay will click and the motors will not move, without any damage to the motors or electronics.<br />
<br />
If you want to reverse engineer this circuit board for yourself instead of just following this guide, you will need a separate 5V dc power supply as well as the 9V battery that was included, a 5V wall adapter with stripped wires will be suffient for the extra power supply. Then you should look for the wireless adapter board. Most RC electronics will have a separate wireless circuit board. Ours happened to be already physically attached to the motor controllers. Find the output signals from the wireless adapter and test which signals control which motors and direction of motors. To test this just attach the 5V to the pin on the circuit board while the truck battery is installed and switched on. Also you will need to find a ground wire to attach for common ground. We just soldered directly to the terminal on the installed battery for our ground.<br />
<br />
=== BeagleBone ===<br />
[[File:ECE497 Rover Power Circuit.jpg|thumb|Figure 4 - Power Circuit]]<br />
[[File:ECE497 Rover 5v regulator.JPG|thumb|Figure 5 - Regulator Circuit]]<br />
After several problems with the WiFi on the BeagleBone not working as expected, we decided to overwrite our Angstrom Beagle Image with Ubuntu. To install Ubuntu, we simply followed [http://www.instructables.com/id/BeagleBone-Ubuntu-OS-LXDE-GUI/ this Instructable] up to and including Step 6. There is also good information on the [http://elinux.org/BeagleBoardUbuntu BeagleBoardUbuntu] page on elinux.org. <br />
<br />
However, if you want to pursue the Angstrom route then I would suggest reading Dr. Yoder's [http://elinux.org/EBC_Exercise_02_Out-of-the-Box,_Bone Out of The Box, Bone]. ''Note: If you want WiFi to work properly, install the A5 image not the A6 image.''<br />
<br />
Whether you use the Angstrom image or Ubuntu is up to you. However, you will still need to wire the BeagleBone up so that it runs off of battery power. We bought a 7.4 Vdc 10400 mAh [http://www.all-battery.com/li-ion1865074v10400mahrechargeablebatterymodulewithpcb-31577.aspx battery]. Since the BeagleBone runs off of 5V with a possible peak current of 1.5 amps we needed a 5V regulator that can supply that power [http://www.ti.com/product/lm2576hv voltage regulator]. To be safe and avoid short-circuiting the BeagleBone, it is advisable to buy a [http://www.digikey.com/scripts/DkSearch/dksus.dll?WT.z_header=search_go&lang=en&keywords=CP3-1000-ND&x=0&y=0&cur=USD barrel connector] for proper power connection. This barrel connector replaces the need to solder wires to the hardware of the BeagleBone, thus allowing for us to safely supply power the way the BeagleBone was designed. As seen in Figure 4, the barrel connector, battery and voltage regulator with heat sink can be seen. Figure 5 is our Regulator circuit. It shows how to connect the regulator to the rest of the BeagleBone hardware.<br />
<br />
''Note: We specifically used a BeagleBone for it's smaller size and less cost due to less capabilities. However, you could use any board that has an Omap processor, such as the Beagle XM Board.''<br />
<br />
===WiFi Network===<br />
Connecting to WiFi is an important part of our project. We intended this project to receive data from a user on a mobile laptop. We decided to use WiFi to avoid following the RC truck around a field with the laptop in our hands. WiFi helps the user stay in the same place while the RC truck moves around the field. We ordered an [http://www.adafruit.com/products/814 Adafruit WiFi adapter] that Adafruit specifically sponsors for the BeagleBone. They also have an install tutorial. After several days of researching WiFi capabilities for the BeagleBone, we continually ran into many difficulties. One of the many difficulties is with 'opkg upgrade' that Adafruit says to run. DO NOT RUN 'opkg upgrade'. Depending on what software image you are running, you will receive an error that for some reason cannot be resolved. There are many reported cases on [http://forums.adafruit.com/viewforum.php?f=49&sid=1a1b1e0fba73bb5659a3446079a5f423 Adafruit's help forums]. There are also several more reported cases for the BeagleBone group on google groups. After researching and WiFi experimentation we discovered that the Adafruit WiFi adapter works well on the A6 version of the BeagleBone hardware while running A5 version of Angstrom. This is the only valid combination we could find. The A5 hardware shows and detects the adapter, but for some reason the adapter does not connect to a wireless router. When the same SD card is plugged into an A6 hardware, it connects fine without issue to a router. We also noticed that the A6 software image does not even recognize the BeagleBone following the same procedure as for the A5 software.<br />
<br />
Because of the difficulties, we decided to not use the Angstrom images supported by Beagle. We instead installed Ubuntu Operating system on our A6 hardware. With Ubuntu installed it was as easy as plug and play. All we did after installing Ubuntu was to physically plug in the adapter and it was recognized immediately. However, if you want to stay with Angstrom I would suggest following the directions in [http://elinux.org/ECE497_Beagle_Bone_WiFi ECE497 Beagle Bone WiFi].<br />
<br />
=== Software ===<br />
<br />
The code for the platform can be found on the [https://github.com/hansenrl/BeagleRover BeagleRover Github Page] and [git://github.com/hansenrl/BeagleRover.git Github Repository].<br />
<br />
A Makefile is provided, and the code can be compiled with the command "make" in the root directory of the project; this will build a main binary ''movement'' and shared libraries for movement control over WiFi. <br />
<br />
See the README for detailed instructions on installation and documentation of the code structure.<br />
<br />
== Required Parts List ==<br />
1 x [http://www.toysrus.com/product/index.jsp?productId=12925248 RC Truck]<br />
<br />
1 x [http://beagleboard.org/buy BeagleBoard] (could be Bone/XM/Board)<br />
<br />
1 x [http://www.all-battery.com/li-ion1865074v10400mahrechargeablebatterymodulewithpcb-31577.aspx Battery]<br />
<br />
1 x [http://www.ti.com/product/lm2576hv Voltage Regulator]<br />
<br />
1 x [http://www.digikey.com/scripts/DkSearch/dksus.dll?WT.z_header=search_go&lang=en&keywords=CP3-1000-ND&x=0&y=0&cur=USD Barrel Connector]<br />
<br />
1 x [http://www.adafruit.com/products/814 Adafruit WiFi adapter]<br />
<br />
1 x [https://www.sparkfun.com/products/11466 GPS]<br />
<br />
1 x [https://www.sparkfun.com/products/7915 Compass]<br />
<br />
1 x BreadBoard<br />
<br />
Various Wires<br />
<br />
Soldering Tools<br />
<br />
== User Instructions ==<br />
The rover is designed for two different operating modes.<br />
<br />
# Stand-alone control and navigation<br />
# Remote operation over Wi-Fi via Python<br />
<br />
The README file on the software [https://github.com/hansenrl/BeagleRover Github Page] includes details about running the software for each of these modes. For stand-alone operation, the compiled binary ''movement'' can be executed to run commands such as moving forward or turning to a specific heading. For remote operation, Python scripts are provided to setup a server/client interface to communicate with the BeagleBone. When communicating with the Bone over Wi-Fi, the Python script presents the user with options of what to send to the BeagleBone.<br />
<br />
Selection:<br />
1: FWD<br />
2: BCK<br />
3: TURN<br />
4: COMPASS QUERY<br />
5: GPS QUERY<br />
9: EXIT<br />
<br />
The user then inputs the selection number, and an option if necessary. For instance, the option for sending a "FWD" command is the duration in microseconds, while the option for a "TURN" command is the heading relative to magnetic north. FWD, TURN, COMPASS QUERY, and GPS QUERY are all implemented and functional, but BCK is currently unimplmented; the code is simple and implementation would be trivial, but for the end application of this software (emulating UAV movements) it was unnecessary.<br />
<br />
Upon sending the command, the BeagleBone will return feedback to the user over Wi-Fi. In the case of a movement command it will return that the command was executed successfully, and if a sensor was queried it will return the result. The Python script will then prompt the user for another command to send.<br />
<br />
== Highlights ==<br />
{{#ev:youtube|g_-srPShIiU}}<br />
<br />
In the video we demonstrate how to set up the wireless server/client communication and the functionality present over the network interface, including sensor queries and movement commands. Although these movements are accomplished over Wi-Fi, they can also be programmed for stand-alone operation. The jerky turning and vigorous stopping that the car displays in the video is due to the high traction of the tires on the track surface - reducing the traction on the tires would eliminate this.<br />
<br />
== Theory of Operation ==<br />
<br />
=== Hardware Interfaces ===<br />
[[File:ECE497 Rover gpio Pins.jpg|thumb|Figure 6 - GPIO Pin Connections]]<br />
[[File:Bone P9 pinout.jpg|thumb|Figure 7 - P9 Header Layout]]<br />
[[File:ECE497 Rover compass.jpg|thumb|Figure 8 - Compass and GPS Pin layout]]<br />
[[File:ECE497 Rover gpsCompass mount.jpg|thumb| Figure 9 - Compass, GPS, and WiFi mount]]<br />
<br />
The BeagleBone is connected to the RC car via 4 GPIO pins and a ground wire. The four GPIO pins control left forward, left reverse, right forward, and right reverse on the tank-style drive base. Tank-style means that each side is controlled independently, as opposed to a standard steering where the user controls whether the car as a whole is moving forward or reverse and turns are accomplished by rotating the front axle. Figure 6 shows how the GPIO pins on BeagleBone are connected to the motor control PCB. As seen in Figure 4 the motor control wires are white. The GPIO pins are the two orange and two yellow wires labeled in the figure.<br />
<br />
The Motor Control pin layout is listed below. These are defined in movement.c, and can be redefined easily to match a different pin configuration. These pins are connected to relays on the RC car, so the motors are either on or off. <br />
Motor Control BeagleBone Pin<br />
<br />
Right Forward 40 - P8 header (software sysfs GPIO 77)<br />
Right Reverse 44 - P8 header (software sysfs GPIO 73)<br />
Left Forward 42 - P8 header (software sysfs GPIO 75)<br />
Left Reverse 46 - P8 header (software sysfs GPIO 71)<br />
<br />
WiFi is achieved with Adafruit's [http://www.adafruit.com/products/814 USB WiFi Module]. The USB WiFi Module is connected to the only usb port on the BeagleBone.<br />
<br />
Figure 7 is the BeagleBone P9 Header layout and provides a good reference in knowing which pins in the header connect to pins on the BeagleBone. Figure 8 shows how the pins for the gps and compass are connected to the P9 header. Figure 9 shows where the Compass, GPS and WiFi module are mounted. We had to mount them outside of the box because placing them inside of the wooden box attenuated the signals excessively.<br />
<br />
The [https://www.sparkfun.com/products/11466 GPS] is connected to the BeagleBone over UART serial. The GPS pin layout is as follows:<br />
GPS BeagleBone Pin<br />
<br />
1 - TX 24 - P9 header<br />
2 - RX 26 - P9 header<br />
3 - GND 1 or 2 - P9 header<br />
4 - 3.3 V 3 or 4 - P9 header<br />
5 - NC<br />
6 - NC<br />
<br />
Over UART, the GPS sends back 6 strings in NMEA format every second. Each of these 6 strings includes some or all of the following data: Latitude, Longitude, if the GPS has a fix, UTC time, and some other data that we don't need. For more information, read the [http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Sensors/GPS/D2523T-6_SPEC_20120220.pdf GPS' datasheet]. We chose to parse the string that starts with "$GPGLL" because it included all of the information we need listed previously. <br />
<br />
The format for the $GPGLL string is:<br />
$GPGLL,Latitude,N/S,Longitude,E/W,UTC time,Fix Status,Mode Indicator,Checksum<br />
<br />
This is what the $GPGLL string looks like when the GPS does not have a fix.<br />
$GPGLL,,,,,231429.00,V,N*45 <br />
We know the GPS doesn't have a fix, because of the 'V.' The second to last comma-delimited item will be 'V' when there is no fix and 'A' when there is a fix. Also, the Latitude and Longitude fields are left blank when there is no fix, as shown.<br />
<br />
The [https://www.sparkfun.com/products/7915 compass] is connected to the BeagleBone via I2C. The Compass pin layout is as follows:<br />
Compass BeagleBone Pin<br />
<br />
1 - GND 1 or 2 - P9 Header<br />
2 - 3.3 V 3 or 4 - P9 Header<br />
3 - I2C SDA 20 - P9 Header<br />
4 - I2C SCL 19 - P9 Header<br />
<br />
=== Software ===<br />
<br />
All hardware interfacing is accomplished in C, using the standard interfaces for each protocol. Motor control is done via GPIO, the compass is I2C, and the GPS is UART. Compass interfacing is provided in a compass library ''Compass/compass.c'', GPS interfacing is provided in a GPS library ''GPSLibs/gps.c'', and the motor control is provided in ''movement.c''. Waypoint storage and helper functions are provided in a library in ''Waypoints/waypoint.c''.<br />
<br />
For stand-alone operation, ''movement.c'' is compiled with the necessary libraries as a stand-alone binary. <br />
<br />
For network operation, the Python scripts utilize compiled libraries in sharedLibs. Currently, due to the structure of how the sensors are interfaced in the movement library, all interfacing is accomplished through a library ''movementLib.so'', which provides wrapper functions to the GPS and Compass. In the future, this functionality should be better divided out into each individual sub-library. This interfacing between Python and C is done with Python [http://docs.python.org/2/library/ctypes.html CTypes]. The BeagleBone and base station communicate over Wi-Fi using TCP sockets via the Python [http://docs.python.org/2/library/socket.html Socket] and [http://docs.python.org/2/library/socketserver.html SocketServer] modules. All of these Python modules, ctypes, socket, and SocketServer, are standard in Python 2.7.<br />
<br />
== Work Breakdown ==<br />
<br />
A summary of the major development areas and the primary contributor(s) to each subsystem:<br />
<br />
* RC car hardware interfacing and mounting: ''Michael Junge''<br />
* Power subsystem development: ''Michael Junge''<br />
* Wireless communication hardware: ''Michael Junge'', ''Jesse Brannon''<br />
* GPS and Compass sensor interfacing: ''Jesse Brannon''<br />
* Movement and navigation software development: ''Jesse Brannon'', ''Ross Hansen''<br />
* Network communication software development: ''Ross Hansen''<br />
<br />
Tasks completed and in development by each team member:<br />
<br />
'''Michael Junge''' <br />
* Constructed hardware interfaces to compass sensor and drive base electronics<br />
* Investigated WiFi issues on Angstrom - determined that the Angstrom A5 image on BeagleBone A6 hardware is a known working configuration ''**still under invesgitation, won't be fully completed due to hardware/software issues between Angstrom and Beagle''<br />
* Soldered and interfaced battery subsystem to power BeagleBone<br />
<br />
'''Jesse Brannon'''<br />
* Decided and installed an Ubuntu image instead of Anstrom specifically for the WiFi functionally<br />
* Researched and purchased compass and GPS sensors<br />
* Wrote libraries to interface to compass and GPS sensor<br />
* Co-developed movement and navigation software<br />
<br />
'''Ross Hansen'''<br />
* Co-developed movement and navigation software<br />
* Developed software for network communication<br />
<br />
'''Tasks Remaining'''<br />
<br />
Although full rover functionality for movement and sensor data retrieval was completed, two additional features were currently in development at the end of the original timeframe of this project.<br />
<br />
1) Code to manage waypoints and drive the motors based off of waypoint inputs<br />
<br />
2) Improve GPS library to allow for update rate configuration<br />
<br />
These two features were not necessary for this project, but are useful for a sister project in development by the same team; so development will continue on these two tasks. The code in the BeagleRover repository will be updated with final versions of the code as it is completed.<br />
<br />
== Future Work ==<br />
<br />
This project has the possibility to branch into several interesting areas.<br />
* The BeagleBone platform has the processing power for various interesting sensory systems, such as computer vision. The RC car interface and networking platform allows for a variety of interesting applications of sensor systems, where driving decisions are made based off of sensor inputs or sensor data is relayed remotely back to a powerful processing node.<br />
<br />
* A GUI is being developed that could be used to send commands to control the rover. Work on it can be seen here: [[ECE497_Project_RoverGUI]]<br />
<br />
* This project is a two-dimensional navigation system for a ground-based rover, but could be extended for use on aerial vehicles. Additional requirements for this would include some sort of altimeter sensor interface, modification of control outputs to accommodate aerial control surfaces, and an addition of a third dimension to location and navigation code.<br />
<br />
== Conclusions ==<br />
<br />
BeagleRover is a functioning implementation of a rover intelligence platform for the BeagleBone. When mounted on an RC car, the BeagleBone can direct the car motors to move around and it can relay GPS and compass data across a Wi-Fi network.<br />
<br />
This project was highly interesting and enjoyable to work on. It incorporated a wide range of skills fundamental to embedded systems - hardware, sensor interfacing via multiple protocols, and both high and low-level software development. Although a complete project in its current status, even more exciting is the possibility for extension in the future; the basic system of network functionality, location and heading sensor data, and mobility provide an interesting platform for lots of different embedded work. Combined with the versatility of Linux running on the BeagleBone, this project provides an interesting application of the BeagleBone's potential and a flexible platform for future development.<br />
<br />
{{YoderFoot}}</div>Jessebrannonhttps://elinux.org/index.php?title=ECE497_Project_Rover&diff=192686ECE497 Project Rover2012-11-13T17:01:26Z<p>Jessebrannon: </p>
<hr />
<div>[[Category:ECE497 |Project]]<br />
{{YoderHead}}<br />
<br />
Team members: [[user:Hansenrl|Ross Hansen]], [[user:jessebrannon|Jesse Brannon]], [[User:jungeml|Michael Junge]] <br />
<br />
== Grading Template ==<br />
I'm using the following template to grade. Each slot is 10 points.<br />
0 = Missing, 5=OK, 10=Wow!<br />
<br />
<pre style="color:red"><br />
05 Executive Summary<br />
05 Installation Instructions (waiting details)<br />
00 User Instructions<br />
00 Highlights<br />
00 Theory of Operation (Looking forward to more details)<br />
00 Work Breakdown<br />
00 Future Work<br />
00 Conclusions<br />
00 Demo<br />
00 Late<br />
Comments: I'm looking forward to seeing this.<br />
<br />
Score: 10/100<br />
<br />
</pre><br />
<br />
== Executive Summary ==<br />
<br />
This project is a BeagleBone implementation of a ground-based rover platform. Through a BeagleBone mounted on an RC car, the car can be directed to turn to a specified compass heading or move forward. A user is able to control the car with predefined movement code or in real-time over WiFi. The BeagleBone can also send back helpful information to the user over Wifi, such as GPS location and compass heading. Although not complete, functionality to direct the rover along a path by defining waypoints is currently in development.<br />
<br />
This work provides highly useful code even for applications outside of this specific rover project - digital compass and GPS sensor interfacing, Python-based networking, and RC car motor control code is all written and easily extendable into other applications. Additionally, the work performed for this project in the area of RC car reverse engineering and BeagleBone USB Wi-Fi can serve as useful community knowledge for other projects.<br />
<br />
== Installation Instructions ==<br />
<br />
We bought an RC car from [http://www.toysrus.com/product/index.jsp?productId=12925248 Toys 'R Us] and modified it to become an intelligent platform by utilizing a BeagleBone. To successfully recreate our work, certain skills will be helpful: dremel-based hardware modification, soldering, experience with Beagle Bone or an equivalent embedded processor bases system, familiarity with the Python and C programming languages, and basic circuit knowledge such as power regulation from batteries.<br />
<br />
=== Modifying RC Truck/Car ===<br />
[[File:ECE497 Rover truck hardware.JPG|thumb|Figure 1 - Electronics housing]]<br />
[[File:ECE497 Rover circuitBoard.JPG|thumb|Figure 2 - Motor control PCB]]<br />
[[File:ECE497 Rover circuitBoard2.JPG|thumb|Figure 3 - Motor control pins]]<br />
<br />
As shown in Figure 1, we removed the aesthetic cover form the truck. We also cut out most of the plastic with a Dremel tool. We did this to expose the circuity below. Cutting out most of the plastic is necessary unless you are skilled enough to drill only a small hole to feed the wires through and can replace the circuit board back into place without viewing it. Figure 1 also shows, four screw slots. In order to obtain access to the circuity, you must remove the screws from their sockets. Now turn the truck so that it's undercarriage is facing up, remove the housing unit of the battery. The battery unit should be loose and thus be removed since you already removed the four place holder screws. Be careful though to not pullout or detach any wires from the their respected places as you are pulling out the circuit board. Figure 2 shows the circuit board removed from it's housing with the wires exposed. The red and black wires you see are respectively power and ground, the same for all electrical work. <br />
<br />
Figure 3 is focused on the specific connections that we soldered to the board. We choose the top left corner (where three of the connections are) because when we reverse engineered the board, this area is where the wireless signals are received and sent to the motor controllers. The fourth wire was supposed to be the pin on the right but as you can see by the picture, the circuit pad is burned off. We just followed the hard trace and soldered at the next available node. After testing, this improvised step seemed suitable for our needs. The same four pins are labeled on the circuit board as F,W,L,R. Originally, we thought these meant forward, backward, left and right. However the RC Truck is designed with tank steering so in order to go forward it theoretically should require two separate signals. We tested this theory and found out that it did in fact require two signals, thus the F,W,L,R labels are incorrect. The pins attach to relays on each motor, and correspond to "right forward", "right backward", "left forward", and "left backward", and are digital control signals. Therefore, in order to turn left you would drive the "right backward" and "left forward" pins high. Fortunately, motor conflicts are not destructive and exact pin mappings can be determined by experimentation - if you mistakenly drive the "right forward" and "right backward" pins high, for instance, the relay will click and the motors will not move, without any damage to the motors or electronics.<br />
<br />
If you want to reverse engineer this circuit board for yourself instead of just following this guide, you will need a separate 5V dc power supply as well as the 9V battery that was included, a 5V wall adapter with stripped wires will be suffient for the extra power supply. Then you should look for the wireless adapter board. Most RC electronics will have a separate wireless circuit board. Ours happened to be already physically attached to the motor controllers. Find the output signals from the wireless adapter and test which signals control which motors and direction of motors. To test this just attach the 5V to the pin on the circuit board while the truck battery is installed and switched on. Also you will need to find a ground wire to attach for common ground. We just soldered directly to the terminal on the installed battery for our ground.<br />
<br />
=== BeagleBone ===<br />
[[File:ECE497 Rover Power Circuit.jpg|thumb|Figure 4 - Power Circuit]]<br />
[[File:ECE497 Rover 5v regulator.JPG|thumb|Figure 5 - Regulator Circuit]]<br />
After several problems with the WiFi on the BeagleBone not working as expected, we decided to overwrite our Angstrom Beagle Image with Ubuntu. To install Ubuntu, we simply followed [http://www.instructables.com/id/BeagleBone-Ubuntu-OS-LXDE-GUI/ this Instructable] up to and including Step 6. There is also good information on the [http://elinux.org/BeagleBoardUbuntu BeagleBoardUbuntu] page on elinux.org. <br />
<br />
However, if you want to pursue the Angstrom route then I would suggest reading Dr. Yoder's [http://elinux.org/EBC_Exercise_02_Out-of-the-Box,_Bone Out of The Box, Bone]. ''Note: If you want WiFi to work properly, install the A5 image not the A6 image.''<br />
<br />
Whether you use the Angstrom image or Ubuntu is up to you. However, you will still need to wire the BeagleBone up so that it runs off of battery power. We bought a 7.4 Vdc 10400 mAh [http://www.all-battery.com/li-ion1865074v10400mahrechargeablebatterymodulewithpcb-31577.aspx battery]. Since the BeagleBone runs off of 5V with a possible peak current of 1.5 amps we needed a 5V regulator that can supply that power [http://www.ti.com/product/lm2576hv voltage regulator]. To be safe and avoid short-circuiting the BeagleBone, it is advisable to buy a [http://www.digikey.com/scripts/DkSearch/dksus.dll?WT.z_header=search_go&lang=en&keywords=CP3-1000-ND&x=0&y=0&cur=USD barrel connector] for proper power connection. This barrel connector replaces the need to solder wires to the hardware of the BeagleBone, thus allowing for us to safely supply power the way the BeagleBone was designed. As seen in Figure 4, the barrel connector, battery and voltage regulator with heat sink can be seen. Figure 5 is our Regulator circuit. It shows how to connect the regulator to the rest of the BeagleBone hardware.<br />
<br />
''Note: We specifically used a BeagleBone for it's smaller size and less cost due to less capabilities. However, you could use any board that has an Omap processor, such as the Beagle XM Board.''<br />
<br />
===WiFi Network===<br />
Connecting to WiFi is an important part of our project. We intended this project to receive data from a user on a mobile laptop. We decided to use WiFi to avoid following the RC truck around a field with the laptop in our hands. WiFi helps the user stay in the same place while the RC truck moves around the field. We ordered an [http://www.adafruit.com/products/814 Adafruit WiFi adapter] that Adafruit specifically sponsors for the BeagleBone. They also have an install tutorial. After several days of researching WiFi capabilities for the BeagleBone, we continually ran into many difficulties. One of the many difficulties is with 'opkg upgrade' that Adafruit says to run. DO NOT RUN 'opkg upgrade'. Depending on what software image you are running, you will receive an error that for some reason cannot be resolved. There are many reported cases on [http://forums.adafruit.com/viewforum.php?f=49&sid=1a1b1e0fba73bb5659a3446079a5f423 Adafruit's help forums]. There are also several more reported cases for the BeagleBone group on google groups. After researching and WiFi experimentation we discovered that the Adafruit WiFi adapter works well on the A6 version of the BeagleBone hardware while running A5 version of Angstrom. This is the only valid combination we could find. The A5 hardware shows and detects the adapter, but for some reason the adapter does not connect to a wireless router. When the same SD card is plugged into an A6 hardware, it connects fine without issue to a router. We also noticed that the A6 software image does not even recognize the BeagleBone following the same procedure as for the A5 software.<br />
<br />
Because of the difficulties, we decided to not use the Angstrom images supported by Beagle. We instead installed Ubuntu Operating system on our A6 hardware. With Ubuntu installed it was as easy as plug and play. All we did after installing Ubuntu was to physically plug in the adapter and it was recognized immediately. However, if you want to stay with Angstrom I would suggest following the directions in [http://elinux.org/ECE497_Beagle_Bone_WiFi ECE497 Beagle Bone WiFi].<br />
<br />
=== Software ===<br />
<br />
The code for the platform can be found on the [https://github.com/hansenrl/BeagleRover BeagleRover Github Page] and [git://github.com/hansenrl/BeagleRover.git Github Repository].<br />
<br />
A Makefile is provided, and the code can be compiled with the command "make" in the root directory of the project; this will build a main binary ''movement'' and shared libraries for movement control over WiFi. <br />
<br />
See the README for detailed instructions on installation and documentation of the code structure.<br />
<br />
== Required Parts List ==<br />
1 x [http://www.toysrus.com/product/index.jsp?productId=12925248 RC Truck]<br />
<br />
1 x [http://beagleboard.org/buy BeagleBoard] (could be Bone/XM/Board)<br />
<br />
1 x [http://www.all-battery.com/li-ion1865074v10400mahrechargeablebatterymodulewithpcb-31577.aspx Battery]<br />
<br />
1 x [http://www.ti.com/product/lm2576hv Voltage Regulator]<br />
<br />
1 x [http://www.digikey.com/scripts/DkSearch/dksus.dll?WT.z_header=search_go&lang=en&keywords=CP3-1000-ND&x=0&y=0&cur=USD Barrel Connector]<br />
<br />
1 x [http://www.adafruit.com/products/814 Adafruit WiFi adapter]<br />
<br />
1 x [https://www.sparkfun.com/products/11466 GPS]<br />
<br />
1 x [https://www.sparkfun.com/products/7915 Compass]<br />
<br />
1 x BreadBoard<br />
<br />
Various Wires<br />
<br />
Soldering Tools<br />
<br />
== User Instructions ==<br />
The rover is designed for two different operating modes.<br />
<br />
# Stand-alone control and navigation<br />
# Remote operation over Wi-Fi via Python<br />
<br />
The README file on the software [https://github.com/hansenrl/BeagleRover Github Page] includes details about running the software for each of these modes. For stand-alone operation, the compiled binary ''movement'' can be executed to run commands such as moving forward or turning to a specific heading. For remote operation, Python scripts are provided to setup a server/client interface to communicate with the BeagleBone. When communicating with the Bone over Wi-Fi, the Python script presents the user with options of what to send to the BeagleBone.<br />
<br />
Selection:<br />
1: FWD<br />
2: BCK<br />
3: TURN<br />
4: COMPASS QUERY<br />
5: GPS QUERY<br />
9: EXIT<br />
<br />
The user then inputs the selection number, and an option if necessary. For instance, the option for sending a "FWD" command is the duration in microseconds, while the option for a "TURN" command is the heading relative to magnetic north. FWD, TURN, COMPASS QUERY, and GPS QUERY are all implemented and functional, but BCK is currently unimplmented; the code is simple and implementation would be trivial, but for the end application of this software (emulating UAV movements) it was unnecessary.<br />
<br />
Upon sending the command, the BeagleBone will return feedback to the user over Wi-Fi. In the case of a movement command it will return that the command was executed successfully, and if a sensor was queried it will return the result. The Python script will then prompt the user for another command to send.<br />
<br />
== Highlights ==<br />
{{#ev:youtube|g_-srPShIiU}}<br />
<br />
In the video we demonstrate how to set up the wireless server/client communication and the functionality present over the network interface, including sensor queries and movement commands. Although these movements are accomplished over Wi-Fi, they can also be programmed for stand-alone operation. The jerky turning and vigorous stopping that the car displays in the video is due to the high traction of the tires on the track surface - reducing the traction on the tires would eliminate this.<br />
<br />
== Theory of Operation ==<br />
<br />
=== Hardware Interfaces ===<br />
[[File:ECE497 Rover gpio Pins.jpg|thumb|Figure 6 - GPIO Pin Connections]]<br />
[[File:Bone P9 pinout.jpg|thumb|Figure 7 - P9 Header Layout]]<br />
[[File:ECE497 Rover compass.jpg|thumb|Figure 8 - Compass and GPS Pin layout]]<br />
[[File:ECE497 Rover gpsCompass mount.jpg|thumb| Figure 9 - Compass, GPS, and WiFi mount]]<br />
<br />
The BeagleBone is connected to the RC car via 4 GPIO pins and a ground wire. The four GPIO pins control left forward, left reverse, right forward, and right reverse on the tank-style drive base. Tank-style means that each side is controlled independently, as opposed to a standard steering where the user controls whether the car as a whole is moving forward or reverse and turns are accomplished by rotating the front axle. Figure 6 shows how the GPIO pins on BeagleBone are connected to the motor control PCB. As seen in Figure 4 the motor control wires are white. The GPIO pins are the two orange and two yellow wires labeled in the figure.<br />
<br />
The Motor Control pin layout is listed below. These are defined in movement.c, and can be redefined easily to match a different pin configuration. These pins are connected to relays on the RC car, so the motors are either on or off. <br />
Motor Control BeagleBone Pin<br />
<br />
Right Forward 40 - P8 header (software sysfs GPIO 77)<br />
Right Reverse 44 - P8 header (software sysfs GPIO 73)<br />
Left Forward 42 - P8 header (software sysfs GPIO 75)<br />
Left Reverse 46 - P8 header (software sysfs GPIO 71)<br />
<br />
WiFi is achieved with Adafruit's [http://www.adafruit.com/products/814 USB WiFi Module]. The USB WiFi Module is connected to the only usb port on the BeagleBone.<br />
<br />
Figure 7 is the BeagleBone P9 Header layout and provides a good reference in knowing which pins in the header connect to pins on the BeagleBone. Figure 8 shows how the pins for the gps and compass are connected to the P9 header. Figure 9 shows where the Compass, GPS and WiFi module are mounted. We had to mount them outside of the box because placing them inside of the wooden box attenuated the signals excessively.<br />
<br />
The [https://www.sparkfun.com/products/11466 GPS] is connected to the BeagleBone over UART serial. The GPS pin layout is as follows:<br />
GPS BeagleBone Pin<br />
<br />
1 - TX 24 - P9 header<br />
2 - RX 26 - P9 header<br />
3 - GND 1 or 2 - P9 header<br />
4 - 3.3 V 3 or 4 - P9 header<br />
5 - NC<br />
6 - NC<br />
<br />
Over UART, the GPS sends back 6 strings in NMEA format every second. Each of these 6 strings includes some or all of the following data: Latitude, Longitude, if the GPS has a fix, UTC time, and some other data that we don't need. For more information, read the [http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Sensors/GPS/D2523T-6_SPEC_20120220.pdf GPS' datasheet]. We chose to parse the string that starts with "$GPGLL" because it included all of the information we need listed previously. <br />
<br />
This is what the $GPGLL string looks like when the GPS does not have a fix.<br />
$GPGLL,,,,,231429.00,V,N*45 <br />
We know the GPS doesn't have a fix, because of the 'V.' The second to last comma-delimited item will be 'V' when there is no fix and 'A' when there is a fix. Also, the Latitude and Longitude fields are left blank when there is no fix, as shown.<br />
<br />
The [https://www.sparkfun.com/products/7915 compass] is connected to the BeagleBone via I2C. The Compass pin layout is as follows:<br />
Compass BeagleBone Pin<br />
<br />
1 - GND 1 or 2 - P9 Header<br />
2 - 3.3 V 3 or 4 - P9 Header<br />
3 - I2C SDA 20 - P9 Header<br />
4 - I2C SCL 19 - P9 Header<br />
<br />
=== Software ===<br />
<br />
All hardware interfacing is accomplished in C, using the standard interfaces for each protocol. Motor control is done via GPIO, the compass is I2C, and the GPS is UART. Compass interfacing is provided in a compass library ''Compass/compass.c'', GPS interfacing is provided in a GPS library ''GPSLibs/gps.c'', and the motor control is provided in ''movement.c''. Waypoint storage and helper functions are provided in a library in ''Waypoints/waypoint.c''.<br />
<br />
For stand-alone operation, ''movement.c'' is compiled with the necessary libraries as a stand-alone binary. <br />
<br />
For network operation, the Python scripts utilize compiled libraries in sharedLibs. Currently, due to the structure of how the sensors are interfaced in the movement library, all interfacing is accomplished through a library ''movementLib.so'', which provides wrapper functions to the GPS and Compass. In the future, this functionality should be better divided out into each individual sub-library. This interfacing between Python and C is done with Python [http://docs.python.org/2/library/ctypes.html CTypes]. The BeagleBone and base station communicate over Wi-Fi using TCP sockets via the Python [http://docs.python.org/2/library/socket.html Socket] and [http://docs.python.org/2/library/socketserver.html SocketServer] modules. All of these Python modules, ctypes, socket, and SocketServer, are standard in Python 2.7.<br />
<br />
== Work Breakdown ==<br />
<br />
A summary of the major development areas and the primary contributor(s) to each subsystem:<br />
<br />
* RC car hardware interfacing and mounting: ''Michael Junge''<br />
* Power subsystem development: ''Michael Junge''<br />
* Wireless communication hardware: ''Michael Junge'', ''Jesse Brannon''<br />
* GPS and Compass sensor interfacing: ''Jesse Brannon''<br />
* Movement and navigation software development: ''Jesse Brannon'', ''Ross Hansen''<br />
* Network communication software development: ''Ross Hansen''<br />
<br />
Tasks completed and in development by each team member:<br />
<br />
'''Michael Junge''' <br />
* Constructed hardware interfaces to compass sensor and drive base electronics<br />
* Investigated WiFi issues on Angstrom - determined that the Angstrom A5 image on BeagleBone A6 hardware is a known working configuration ''**still under invesgitation, won't be fully completed due to hardware/software issues between Angstrom and Beagle''<br />
* Soldered and interfaced battery subsystem to power BeagleBone<br />
<br />
'''Jesse Brannon'''<br />
* Decided and installed an Ubuntu image instead of Anstrom specifically for the WiFi functionally<br />
* Researched and purchased compass and GPS sensors<br />
* Wrote libraries to interface to compass and GPS sensor<br />
* Co-developed movement and navigation software<br />
<br />
'''Ross Hansen'''<br />
* Co-developed movement and navigation software<br />
* Developed software for network communication<br />
<br />
'''Tasks Remaining'''<br />
<br />
Although full rover functionality for movement and sensor data retrieval was completed, two additional features were currently in development at the end of the original timeframe of this project.<br />
<br />
1) Code to manage waypoints and drive the motors based off of waypoint inputs<br />
<br />
2) Improve GPS library to allow for update rate configuration<br />
<br />
These two features were not necessary for this project, but are useful for a sister project in development by the same team; so development will continue on these two tasks. The code in the BeagleRover repository will be updated with final versions of the code as it is completed.<br />
<br />
== Future Work ==<br />
<br />
This project has the possibility to branch into several interesting areas.<br />
* The BeagleBone platform has the processing power for various interesting sensory systems, such as computer vision. The RC car interface and networking platform allows for a variety of interesting applications of sensor systems, where driving decisions are made based off of sensor inputs or sensor data is relayed remotely back to a powerful processing node.<br />
<br />
* A GUI is being developed that could be used to send commands to control the rover. Work on it can be seen here: [[ECE497_Project_RoverGUI]]<br />
<br />
* This project is a two-dimensional navigation system for a ground-based rover, but could be extended for use on aerial vehicles. Additional requirements for this would include some sort of altimeter sensor interface, modification of control outputs to accommodate aerial control surfaces, and an addition of a third dimension to location and navigation code.<br />
<br />
== Conclusions ==<br />
<br />
BeagleRover is a functioning implementation of a rover intelligence platform for the BeagleBone. When mounted on an RC car, the BeagleBone can direct the car motors to move around and it can relay GPS and compass data across a Wi-Fi network.<br />
<br />
This project was highly interesting and enjoyable to work on. It incorporated a wide range of skills fundamental to embedded systems - hardware, sensor interfacing via multiple protocols, and both high and low-level software development. Although a complete project in its current status, even more exciting is the possibility for extension in the future; the basic system of network functionality, location and heading sensor data, and mobility provide an interesting platform for lots of different embedded work. Combined with the versatility of Linux running on the BeagleBone, this project provides an interesting application of the BeagleBone's potential and a flexible platform for future development.<br />
<br />
{{YoderFoot}}</div>Jessebrannonhttps://elinux.org/index.php?title=ECE497_Project_Rover&diff=192680ECE497 Project Rover2012-11-13T17:00:31Z<p>Jessebrannon: </p>
<hr />
<div>[[Category:ECE497 |Project]]<br />
{{YoderHead}}<br />
<br />
Team members: [[user:Hansenrl|Ross Hansen]], [[user:jessebrannon|Jesse Brannon]], [[User:jungeml|Michael Junge]] <br />
<br />
== Grading Template ==<br />
I'm using the following template to grade. Each slot is 10 points.<br />
0 = Missing, 5=OK, 10=Wow!<br />
<br />
<pre style="color:red"><br />
05 Executive Summary<br />
05 Installation Instructions (waiting details)<br />
00 User Instructions<br />
00 Highlights<br />
00 Theory of Operation (Looking forward to more details)<br />
00 Work Breakdown<br />
00 Future Work<br />
00 Conclusions<br />
00 Demo<br />
00 Late<br />
Comments: I'm looking forward to seeing this.<br />
<br />
Score: 10/100<br />
<br />
</pre><br />
<br />
== Executive Summary ==<br />
<br />
This project is a BeagleBone implementation of a ground-based rover platform. Through a BeagleBone mounted on an RC car, the car can be directed to turn to a specified compass heading or move forward. A user is able to control the car with predefined movement code or in real-time over WiFi. The BeagleBone can also send back helpful information to the user over Wifi, such as GPS location and compass heading. Although not complete, functionality to direct the rover along a path by defining waypoints is currently in development.<br />
<br />
This work provides highly useful code even for applications outside of this specific rover project - digital compass and GPS sensor interfacing, Python-based networking, and RC car motor control code is all written and easily extendable into other applications. Additionally, the work performed for this project in the area of RC car reverse engineering and BeagleBone USB Wi-Fi can serve as useful community knowledge for other projects.<br />
<br />
== Installation Instructions ==<br />
<br />
We bought an RC car from [http://www.toysrus.com/product/index.jsp?productId=12925248 Toys 'R Us] and modified it to become an intelligent platform by utilizing a BeagleBone. To successfully recreate our work, certain skills will be helpful: dremel-based hardware modification, soldering, experience with Beagle Bone or an equivalent embedded processor bases system, familiarity with the Python and C programming languages, and basic circuit knowledge such as power regulation from batteries.<br />
<br />
=== Modifying RC Truck/Car ===<br />
[[File:ECE497 Rover truck hardware.JPG|thumb|Figure 1 - Electronics housing]]<br />
[[File:ECE497 Rover circuitBoard.JPG|thumb|Figure 2 - Motor control PCB]]<br />
[[File:ECE497 Rover circuitBoard2.JPG|thumb|Figure 3 - Motor control pins]]<br />
<br />
As shown in Figure 1, we removed the aesthetic cover form the truck. We also cut out most of the plastic with a Dremel tool. We did this to expose the circuity below. Cutting out most of the plastic is necessary unless you are skilled enough to drill only a small hole to feed the wires through and can replace the circuit board back into place without viewing it. Figure 1 also shows, four screw slots. In order to obtain access to the circuity, you must remove the screws from their sockets. Now turn the truck so that it's undercarriage is facing up, remove the housing unit of the battery. The battery unit should be loose and thus be removed since you already removed the four place holder screws. Be careful though to not pullout or detach any wires from the their respected places as you are pulling out the circuit board. Figure 2 shows the circuit board removed from it's housing with the wires exposed. The red and black wires you see are respectively power and ground, the same for all electrical work. <br />
<br />
Figure 3 is focused on the specific connections that we soldered to the board. We choose the top left corner (where three of the connections are) because when we reverse engineered the board, this area is where the wireless signals are received and sent to the motor controllers. The fourth wire was supposed to be the pin on the right but as you can see by the picture, the circuit pad is burned off. We just followed the hard trace and soldered at the next available node. After testing, this improvised step seemed suitable for our needs. The same four pins are labeled on the circuit board as F,W,L,R. Originally, we thought these meant forward, backward, left and right. However the RC Truck is designed with tank steering so in order to go forward it theoretically should require two separate signals. We tested this theory and found out that it did in fact require two signals, thus the F,W,L,R labels are incorrect. The pins attach to relays on each motor, and correspond to "right forward", "right backward", "left forward", and "left backward", and are digital control signals. Therefore, in order to turn left you would drive the "right backward" and "left forward" pins high. Fortunately, motor conflicts are not destructive and exact pin mappings can be determined by experimentation - if you mistakenly drive the "right forward" and "right backward" pins high, for instance, the relay will click and the motors will not move, without any damage to the motors or electronics.<br />
<br />
If you want to reverse engineer this circuit board for yourself instead of just following this guide, you will need a separate 5V dc power supply as well as the 9V battery that was included, a 5V wall adapter with stripped wires will be suffient for the extra power supply. Then you should look for the wireless adapter board. Most RC electronics will have a separate wireless circuit board. Ours happened to be already physically attached to the motor controllers. Find the output signals from the wireless adapter and test which signals control which motors and direction of motors. To test this just attach the 5V to the pin on the circuit board while the truck battery is installed and switched on. Also you will need to find a ground wire to attach for common ground. We just soldered directly to the terminal on the installed battery for our ground.<br />
<br />
=== BeagleBone ===<br />
[[File:ECE497 Rover Power Circuit.jpg|thumb|Figure 4 - Power Circuit]]<br />
[[File:ECE497 Rover 5v regulator.JPG|thumb|Figure 5 - Regulator Circuit]]<br />
After several problems with the WiFi on the BeagleBone not working as expected, we decided to overwrite our Angstrom Beagle Image with Ubuntu. To install Ubuntu, we simply followed [http://www.instructables.com/id/BeagleBone-Ubuntu-OS-LXDE-GUI/ this Instructable] up to and including Step 6. There is also good information on the [http://elinux.org/BeagleBoardUbuntu BeagleBoardUbuntu] page on elinux.org. <br />
<br />
However, if you want to pursue the Angstrom route then I would suggest reading Dr. Yoder's [http://elinux.org/EBC_Exercise_02_Out-of-the-Box,_Bone Out of The Box, Bone]. ''Note: If you want WiFi to work properly, install the A5 image not the A6 image.''<br />
<br />
Whether you use the Angstrom image or Ubuntu is up to you. However, you will still need to wire the BeagleBone up so that it runs off of battery power. We bought a 7.4 Vdc 10400 mAh [http://www.all-battery.com/li-ion1865074v10400mahrechargeablebatterymodulewithpcb-31577.aspx battery]. Since the BeagleBone runs off of 5V with a possible peak current of 1.5 amps we needed a 5V regulator that can supply that power [http://www.ti.com/product/lm2576hv voltage regulator]. To be safe and avoid short-circuiting the BeagleBone, it is advisable to buy a [http://www.digikey.com/scripts/DkSearch/dksus.dll?WT.z_header=search_go&lang=en&keywords=CP3-1000-ND&x=0&y=0&cur=USD barrel connector] for proper power connection. This barrel connector replaces the need to solder wires to the hardware of the BeagleBone, thus allowing for us to safely supply power the way the BeagleBone was designed. As seen in Figure 4, the barrel connector, battery and voltage regulator with heat sink can be seen. Figure 5 is our Regulator circuit. It shows how to connect the regulator to the rest of the BeagleBone hardware.<br />
<br />
''Note: We specifically used a BeagleBone for it's smaller size and less cost due to less capabilities. However, you could use any board that has an Omap processor, such as the Beagle XM Board.''<br />
<br />
===WiFi Network===<br />
Connecting to WiFi is an important part of our project. We intended this project to receive data from a user on a mobile laptop. We decided to use WiFi to avoid following the RC truck around a field with the laptop in our hands. WiFi helps the user stay in the same place while the RC truck moves around the field. We ordered an [http://www.adafruit.com/products/814 Adafruit WiFi adapter] that Adafruit specifically sponsors for the BeagleBone. They also have an install tutorial. After several days of researching WiFi capabilities for the BeagleBone, we continually ran into many difficulties. One of the many difficulties is with 'opkg upgrade' that Adafruit says to run. DO NOT RUN 'opkg upgrade'. Depending on what software image you are running, you will receive an error that for some reason cannot be resolved. There are many reported cases on [http://forums.adafruit.com/viewforum.php?f=49&sid=1a1b1e0fba73bb5659a3446079a5f423 Adafruit's help forums]. There are also several more reported cases for the BeagleBone group on google groups. After researching and WiFi experimentation we discovered that the Adafruit WiFi adapter works well on the A6 version of the BeagleBone hardware while running A5 version of Angstrom. This is the only valid combination we could find. The A5 hardware shows and detects the adapter, but for some reason the adapter does not connect to a wireless router. When the same SD card is plugged into an A6 hardware, it connects fine without issue to a router. We also noticed that the A6 software image does not even recognize the BeagleBone following the same procedure as for the A5 software.<br />
<br />
Because of the difficulties, we decided to not use the Angstrom images supported by Beagle. We instead installed Ubuntu Operating system on our A6 hardware. With Ubuntu installed it was as easy as plug and play. All we did after installing Ubuntu was to physically plug in the adapter and it was recognized immediately. However, if you want to stay with Angstrom I would suggest following the directions in [http://elinux.org/ECE497_Beagle_Bone_WiFi ECE497 Beagle Bone WiFi].<br />
<br />
=== Software ===<br />
<br />
The code for the platform can be found on the [https://github.com/hansenrl/BeagleRover BeagleRover Github Page] and [git://github.com/hansenrl/BeagleRover.git Github Repository].<br />
<br />
A Makefile is provided, and the code can be compiled with the command "make" in the root directory of the project; this will build a main binary ''movement'' and shared libraries for movement control over WiFi. <br />
<br />
See the README for detailed instructions on installation and documentation of the code structure.<br />
<br />
== Required Parts List ==<br />
1 x [http://www.toysrus.com/product/index.jsp?productId=12925248 RC Truck]<br />
<br />
1 x [http://beagleboard.org/buy BeagleBoard] (could be Bone/XM/Board)<br />
<br />
1 x [http://www.all-battery.com/li-ion1865074v10400mahrechargeablebatterymodulewithpcb-31577.aspx Battery]<br />
<br />
1 x [http://www.ti.com/product/lm2576hv Voltage Regulator]<br />
<br />
1 x [http://www.digikey.com/scripts/DkSearch/dksus.dll?WT.z_header=search_go&lang=en&keywords=CP3-1000-ND&x=0&y=0&cur=USD Barrel Connector]<br />
<br />
1 x [http://www.adafruit.com/products/814 Adafruit WiFi adapter]<br />
<br />
1 x [https://www.sparkfun.com/products/11466 GPS]<br />
<br />
1 x [https://www.sparkfun.com/products/7915 Compass]<br />
<br />
1 x BreadBoard<br />
<br />
Various Wires<br />
<br />
Soldering Tools<br />
<br />
== User Instructions ==<br />
The rover is designed for two different operating modes.<br />
<br />
# Stand-alone control and navigation<br />
# Remote operation over Wi-Fi via Python<br />
<br />
The README file on the software [https://github.com/hansenrl/BeagleRover Github Page] includes details about running the software for each of these modes. For stand-alone operation, the compiled binary ''movement'' can be executed to run commands such as moving forward or turning to a specific heading. For remote operation, Python scripts are provided to setup a server/client interface to communicate with the BeagleBone. When communicating with the Bone over Wi-Fi, the Python script presents the user with options of what to send to the BeagleBone.<br />
<br />
Selection:<br />
1: FWD<br />
2: BCK<br />
3: TURN<br />
4: COMPASS QUERY<br />
5: GPS QUERY<br />
9: EXIT<br />
<br />
The user then inputs the selection number, and an option if necessary. For instance, the option for sending a "FWD" command is the duration in microseconds, while the option for a "TURN" command is the heading relative to magnetic north. FWD, TURN, COMPASS QUERY, and GPS QUERY are all implemented and functional, but BCK is currently unimplmented; the code is simple and implementation would be trivial, but for the end application of this software (emulating UAV movements) it was unnecessary.<br />
<br />
Upon sending the command, the BeagleBone will return feedback to the user over Wi-Fi. In the case of a movement command it will return that the command was executed successfully, and if a sensor was queried it will return the result. The Python script will then prompt the user for another command to send.<br />
<br />
== Highlights ==<br />
{{#ev:youtube|g_-srPShIiU}}<br />
<br />
In the video we demonstrate how to set up the wireless server/client communication and the functionality present over the network interface, including sensor queries and movement commands. Although these movements are accomplished over Wi-Fi, they can also be programmed for stand-alone operation. The jerky turning and vigorous stopping that the car displays in the video is due to the high traction of the tires on the track surface - reducing the traction on the tires would eliminate this.<br />
<br />
== Theory of Operation ==<br />
<br />
=== Hardware Interfaces ===<br />
[[File:ECE497 Rover gpio Pins.jpg|thumb|Figure 6 - GPIO Pin Connections]]<br />
[[File:Bone P9 pinout.jpg|thumb|Figure 7 - P9 Header Layout]]<br />
[[File:ECE497 Rover compass.jpg|thumb|Figure 8 - Compass and GPS Pin layout]]<br />
[[File:ECE497 Rover gpsCompass mount.jpg|thumb| Figure 9 - Compass, GPS, and WiFi mount]]<br />
<br />
The BeagleBone is connected to the RC car via 4 GPIO pins and a ground wire. The four GPIO pins control left forward, left reverse, right forward, and right reverse on the tank-style drive base. Tank-style means that each side is controlled independently, as opposed to a standard steering where the user controls whether the car as a whole is moving forward or reverse and turns are accomplished by rotating the front axle. Figure 6 shows how the GPIO pins on BeagleBone are connected to the motor control PCB. As seen in Figure 4 the motor control wires are white. The GPIO pins are the two orange and two yellow wires labeled in the figure.<br />
<br />
The Motor Control pin layout is listed below. These are defined in movement.c, and can be redefined easily to match a different pin configuration. These pins are connected to relays on the RC car, so the motors are either on or off. <br />
Motor Control BeagleBone Pin<br />
<br />
Right Forward 40 - P8 header (software sysfs GPIO 77)<br />
Right Reverse 44 - P8 header (software sysfs GPIO 73)<br />
Left Forward 42 - P8 header (software sysfs GPIO 75)<br />
Left Reverse 46 - P8 header (software sysfs GPIO 71)<br />
<br />
WiFi is achieved with Adafruit's [http://www.adafruit.com/products/814 USB WiFi Module]. The USB WiFi Module is connected to the only usb port on the BeagleBone.<br />
<br />
Figure 7 is the BeagleBone P9 Header layout and provides a good reference in knowing which pins in the header connect to pins on the BeagleBone. Figure 8 shows how the pins for the gps and compass are connected to the P9 header. Figure 9 shows where the Compass, GPS and WiFi module are mounted. We had to mount them outside of the box because placing them inside of the wooden box attenuated the signals excessively.<br />
<br />
The [https://www.sparkfun.com/products/11466 GPS] is connected to the BeagleBone over UART serial. The GPS pin layout is as follows:<br />
GPS BeagleBone Pin<br />
<br />
1 - TX 24 - P9 header<br />
2 - RX 26 - P9 header<br />
3 - GND 1 or 2 - P9 header<br />
4 - 3.3 V 3 or 4 - P9 header<br />
5 - NC<br />
6 - NC<br />
<br />
Over UART, the GPS sends back 6 strings in NMEA format. Each of these 6 strings includes some or all of the following data: Latitude, Longitude, if the GPS has a fix, UTC time, and some other data that we don't need. For more information, read the [http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Sensors/GPS/D2523T-6_SPEC_20120220.pdf GPS' datasheet]. We chose to parse the string that starts with "$GPGLL" because it included all of the information we need listed previously. <br />
<br />
This is what the $GPGLL string looks like when the GPS does not have a fix.<br />
$GPGLL,,,,,231429.00,V,N*45 <br />
We know the GPS doesn't have a fix, because of the 'V.' The second to last comma-delimited item will be 'V' when there is no fix and 'A' when there is a fix. Also, the Latitude and Longitude fields are left blank when there is no fix, as shown.<br />
<br />
The [https://www.sparkfun.com/products/7915 compass] is connected to the BeagleBone via I2C. The Compass pin layout is as follows:<br />
Compass BeagleBone Pin<br />
<br />
1 - GND 1 or 2 - P9 Header<br />
2 - 3.3 V 3 or 4 - P9 Header<br />
3 - I2C SDA 20 - P9 Header<br />
4 - I2C SCL 19 - P9 Header<br />
<br />
=== Software ===<br />
<br />
All hardware interfacing is accomplished in C, using the standard interfaces for each protocol. Motor control is done via GPIO, the compass is I2C, and the GPS is UART. Compass interfacing is provided in a compass library ''Compass/compass.c'', GPS interfacing is provided in a GPS library ''GPSLibs/gps.c'', and the motor control is provided in ''movement.c''. Waypoint storage and helper functions are provided in a library in ''Waypoints/waypoint.c''.<br />
<br />
For stand-alone operation, ''movement.c'' is compiled with the necessary libraries as a stand-alone binary. <br />
<br />
For network operation, the Python scripts utilize compiled libraries in sharedLibs. Currently, due to the structure of how the sensors are interfaced in the movement library, all interfacing is accomplished through a library ''movementLib.so'', which provides wrapper functions to the GPS and Compass. In the future, this functionality should be better divided out into each individual sub-library. This interfacing between Python and C is done with Python [http://docs.python.org/2/library/ctypes.html CTypes]. The BeagleBone and base station communicate over Wi-Fi using TCP sockets via the Python [http://docs.python.org/2/library/socket.html Socket] and [http://docs.python.org/2/library/socketserver.html SocketServer] modules. All of these Python modules, ctypes, socket, and SocketServer, are standard in Python 2.7.<br />
<br />
== Work Breakdown ==<br />
<br />
A summary of the major development areas and the primary contributor(s) to each subsystem:<br />
<br />
* RC car hardware interfacing and mounting: ''Michael Junge''<br />
* Power subsystem development: ''Michael Junge''<br />
* Wireless communication hardware: ''Michael Junge'', ''Jesse Brannon''<br />
* GPS and Compass sensor interfacing: ''Jesse Brannon''<br />
* Movement and navigation software development: ''Jesse Brannon'', ''Ross Hansen''<br />
* Network communication software development: ''Ross Hansen''<br />
<br />
Tasks completed and in development by each team member:<br />
<br />
'''Michael Junge''' <br />
* Constructed hardware interfaces to compass sensor and drive base electronics<br />
* Investigated WiFi issues on Angstrom - determined that the Angstrom A5 image on BeagleBone A6 hardware is a known working configuration ''**still under invesgitation, won't be fully completed due to hardware/software issues between Angstrom and Beagle''<br />
* Soldered and interfaced battery subsystem to power BeagleBone<br />
<br />
'''Jesse Brannon'''<br />
* Decided and installed an Ubuntu image instead of Anstrom specifically for the WiFi functionally<br />
* Researched and purchased compass and GPS sensors<br />
* Wrote libraries to interface to compass and GPS sensor<br />
* Co-developed movement and navigation software<br />
<br />
'''Ross Hansen'''<br />
* Co-developed movement and navigation software<br />
* Developed software for network communication<br />
<br />
'''Tasks Remaining'''<br />
<br />
Although full rover functionality for movement and sensor data retrieval was completed, two additional features were currently in development at the end of the original timeframe of this project.<br />
<br />
1) Code to manage waypoints and drive the motors based off of waypoint inputs<br />
<br />
2) Improve GPS library to allow for update rate configuration<br />
<br />
These two features were not necessary for this project, but are useful for a sister project in development by the same team; so development will continue on these two tasks. The code in the BeagleRover repository will be updated with final versions of the code as it is completed.<br />
<br />
== Future Work ==<br />
<br />
This project has the possibility to branch into several interesting areas.<br />
* The BeagleBone platform has the processing power for various interesting sensory systems, such as computer vision. The RC car interface and networking platform allows for a variety of interesting applications of sensor systems, where driving decisions are made based off of sensor inputs or sensor data is relayed remotely back to a powerful processing node.<br />
<br />
* A GUI is being developed that could be used to send commands to control the rover. Work on it can be seen here: [[ECE497_Project_RoverGUI]]<br />
<br />
* This project is a two-dimensional navigation system for a ground-based rover, but could be extended for use on aerial vehicles. Additional requirements for this would include some sort of altimeter sensor interface, modification of control outputs to accommodate aerial control surfaces, and an addition of a third dimension to location and navigation code.<br />
<br />
== Conclusions ==<br />
<br />
BeagleRover is a functioning implementation of a rover intelligence platform for the BeagleBone. When mounted on an RC car, the BeagleBone can direct the car motors to move around and it can relay GPS and compass data across a Wi-Fi network.<br />
<br />
This project was highly interesting and enjoyable to work on. It incorporated a wide range of skills fundamental to embedded systems - hardware, sensor interfacing via multiple protocols, and both high and low-level software development. Although a complete project in its current status, even more exciting is the possibility for extension in the future; the basic system of network functionality, location and heading sensor data, and mobility provide an interesting platform for lots of different embedded work. Combined with the versatility of Linux running on the BeagleBone, this project provides an interesting application of the BeagleBone's potential and a flexible platform for future development.<br />
<br />
{{YoderFoot}}</div>Jessebrannonhttps://elinux.org/index.php?title=ECE497_Project_Rover&diff=192644ECE497 Project Rover2012-11-13T16:48:25Z<p>Jessebrannon: </p>
<hr />
<div>[[Category:ECE497 |Project]]<br />
{{YoderHead}}<br />
<br />
Team members: [[user:Hansenrl|Ross Hansen]], [[user:jessebrannon|Jesse Brannon]], [[User:jungeml|Michael Junge]] <br />
<br />
== Grading Template ==<br />
I'm using the following template to grade. Each slot is 10 points.<br />
0 = Missing, 5=OK, 10=Wow!<br />
<br />
<pre style="color:red"><br />
05 Executive Summary<br />
05 Installation Instructions (waiting details)<br />
00 User Instructions<br />
00 Highlights<br />
00 Theory of Operation (Looking forward to more details)<br />
00 Work Breakdown<br />
00 Future Work<br />
00 Conclusions<br />
00 Demo<br />
00 Late<br />
Comments: I'm looking forward to seeing this.<br />
<br />
Score: 10/100<br />
<br />
</pre><br />
<br />
== Executive Summary ==<br />
<br />
This project is a BeagleBone implementation of a ground-based rover platform. Through a BeagleBone mounted on an RC car, the car can be directed to turn to a specified compass heading or move forward. A user is able to control the car with predefined movement code or in real-time over WiFi. The BeagleBone can also send back helpful information to the user over Wifi, such as GPS location and compass heading. Although not complete, functionality to direct the rover along a path by defining waypoints is currently in development.<br />
<br />
This work provides highly useful code even for applications outside of this specific rover project - digital compass and GPS sensor interfacing, Python-based networking, and RC car motor control code is all written and easily extendable into other applications. Additionally, the work performed for this project in the area of RC car reverse engineering and BeagleBone USB Wi-Fi can serve as useful community knowledge for other projects.<br />
<br />
== Installation Instructions ==<br />
<br />
We bought an RC car from [http://www.toysrus.com/product/index.jsp?productId=12925248 Toys 'R Us] and modified it to become an intelligent platform by utilizing a BeagleBone. To successfully recreate our work, certain skills will be helpful: dremel-based hardware modification, soldering, experience with Beagle Bone or an equivalent embedded processor bases system, familiarity with the Python and C programming languages, and basic circuit knowledge such as power regulation from batteries.<br />
<br />
=== Modifying RC Truck/Car ===<br />
[[File:ECE497 Rover truck hardware.JPG|thumb|Figure 1 - Electronics housing]]<br />
[[File:ECE497 Rover circuitBoard.JPG|thumb|Figure 2 - Motor control PCB]]<br />
[[File:ECE497 Rover circuitBoard2.JPG|thumb|Figure 3 - Motor control pins]]<br />
<br />
As shown in Figure 1, we removed the aesthetic cover form the truck. We also cut out most of the plastic with a Dremel tool. We did this to expose the circuity below. Cutting out most of the plastic is necessary unless you are skilled enough to drill only a small hole to feed the wires through and can replace the circuit board back into place without viewing it. Figure 1 also shows, four screw slots. In order to obtain access to the circuity, you must remove the screws from their sockets. Now turn the truck so that it's undercarriage is facing up, remove the housing unit of the battery. The battery unit should be loose and thus be removed since you already removed the four place holder screws. Be careful though to not pullout or detach any wires from the their respected places as you are pulling out the circuit board. Figure 2 shows the circuit board removed from it's housing with the wires exposed. The red and black wires you see are respectively power and ground, the same for all electrical work. <br />
<br />
Figure 3 is focused on the specific connections that we soldered to the board. We choose the top left corner (where three of the connections are) because when we reverse engineered the board, this area is where the wireless signals are received and sent to the motor controllers. The fourth wire was supposed to be the pin on the right but as you can see by the picture, the circuit pad is burned off. We just followed the hard trace and soldered at the next available node. After testing, this improvised step seemed suitable for our needs. The same four pins are labeled on the circuit board as F,W,L,R. Originally, we thought these meant forward, backward, left and right. However the RC Truck is designed with tank steering so in order to go forward it theoretically should require two separate signals. We tested this theory and found out that it did in fact require two signals, thus the F,W,L,R labels are incorrect. The pins attach to relays on each motor, and correspond to "right forward", "right backward", "left forward", and "left backward", and are digital control signals. Therefore, in order to turn left you would drive the "right backward" and "left forward" pins high. Fortunately, motor conflicts are not destructive and exact pin mappings can be determined by experimentation - if you mistakenly drive the "right forward" and "right backward" pins high, for instance, the relay will click and the motors will not move, without any damage to the motors or electronics.<br />
<br />
If you want to reverse engineer this circuit board for yourself instead of just following this guide, you will need a separate 5V dc power supply as well as the 9V battery that was included, a 5V wall adapter with stripped wires will be suffient for the extra power supply. Then you should look for the wireless adapter board. Most RC electronics will have a separate wireless circuit board. Ours happened to be already physically attached to the motor controllers. Find the output signals from the wireless adapter and test which signals control which motors and direction of motors. To test this just attach the 5V to the pin on the circuit board while the truck battery is installed and switched on. Also you will need to find a ground wire to attach for common ground. We just soldered directly to the terminal on the installed battery for our ground.<br />
<br />
=== BeagleBone ===<br />
[[File:ECE497 Rover Power Circuit.jpg|thumb|Figure 4 - Power Circuit]]<br />
[[File:ECE497 Rover 5v regulator.JPG|thumb|Figure 5 - Regulator Circuit]]<br />
After several problems with the WiFi on the BeagleBone not working as expected, we decided to overwrite our Angstrom Beagle Image with Ubuntu. To install Ubuntu, we simply followed [http://www.instructables.com/id/BeagleBone-Ubuntu-OS-LXDE-GUI/ this Instructable] up to and including Step 6. There is also good information on the [http://elinux.org/BeagleBoardUbuntu BeagleBoardUbuntu] page on elinux.org. <br />
<br />
However, if you want to pursue the Angstrom route then I would suggest reading Dr. Yoder's [http://elinux.org/EBC_Exercise_02_Out-of-the-Box,_Bone Out of The Box, Bone]. ''Note: If you want WiFi to work properly, install the A5 image not the A6 image.''<br />
<br />
Whether you use the Angstrom image or Ubuntu is up to you. However, you will still need to wire the BeagleBone up so that it runs off of battery power. We bought a 7.4 Vdc 10400 mAh [http://www.all-battery.com/li-ion1865074v10400mahrechargeablebatterymodulewithpcb-31577.aspx battery]. Since the BeagleBone runs off of 5V with a possible peak current of 1.5 amps we needed a 5V regulator that can supply that power [http://www.ti.com/product/lm2576hv voltage regulator]. To be safe and avoid short-circuiting the BeagleBone, it is advisable to buy a [http://www.digikey.com/scripts/DkSearch/dksus.dll?WT.z_header=search_go&lang=en&keywords=CP3-1000-ND&x=0&y=0&cur=USD barrel connector] for proper power connection. This barrel connector replaces the need to solder wires to the hardware of the BeagleBone, thus allowing for us to safely supply power the way the BeagleBone was designed. As seen in Figure 4, the barrel connector, battery and voltage regulator with heat sink can be seen. Figure 5 is our Regulator circuit. It shows how to connect the regulator to the rest of the BeagleBone hardware.<br />
<br />
''Note: We specifically used a BeagleBone for it's smaller size and less cost due to less capabilities. However, you could use any board that has an Omap processor, such as the Beagle XM Board.''<br />
<br />
===WiFi Network===<br />
Connecting to WiFi is an important part of our project. We intended this project to receive data from a user on a mobile laptop. We decided to use WiFi to avoid following the RC truck around a field with the laptop in our hands. WiFi helps the user stay in the same place while the RC truck moves around the field. We ordered an [http://www.adafruit.com/products/814 Adafruit WiFi adapter] that Adafruit specifically sponsors for the BeagleBone. They also have an install tutorial. After several days of researching WiFi capabilities for the BeagleBone, we continually ran into many difficulties. One of the many difficulties is with 'opkg upgrade' that Adafruit says to run. DO NOT RUN 'opkg upgrade'. Depending on what software image you are running, you will receive an error that for some reason cannot be resolved. There are many reported cases on [http://forums.adafruit.com/viewforum.php?f=49&sid=1a1b1e0fba73bb5659a3446079a5f423 Adafruit's help forums]. There are also several more reported cases for the BeagleBone group on google groups. After researching and WiFi experimentation we discovered that the Adafruit WiFi adapter works well on the A6 version of the BeagleBone hardware while running A5 version of Angstrom. This is the only valid combination we could find. The A5 hardware shows and detects the adapter, but for some reason the adapter does not connect to a wireless router. When the same SD card is plugged into an A6 hardware, it connects fine without issue to a router. We also noticed that the A6 software image does not even recognize the BeagleBone following the same procedure as for the A5 software.<br />
<br />
Because of the difficulties, we decided to not use the Angstrom images supported by Beagle. We instead installed Ubuntu Operating system on our A6 hardware. With Ubuntu installed it was as easy as plug and play. All we did after installing Ubuntu was to physically plug in the adapter and it was recognized immediately. However, if you want to stay with Angstrom I would suggest following the directions in [http://elinux.org/ECE497_Beagle_Bone_WiFi ECE497 Beagle Bone WiFi].<br />
<br />
=== Software ===<br />
<br />
The code for the platform can be found on the [https://github.com/hansenrl/BeagleRover BeagleRover Github Page] and [git://github.com/hansenrl/BeagleRover.git Github Repository].<br />
<br />
A Makefile is provided, and the code can be compiled with the command "make" in the root directory of the project; this will build a main binary ''movement'' and shared libraries for movement control over WiFi. <br />
<br />
See the README for detailed instructions on installation and documentation of the code structure.<br />
<br />
== Required Parts List ==<br />
1 x [http://www.toysrus.com/product/index.jsp?productId=12925248 RC Truck]<br />
<br />
1 x [http://beagleboard.org/buy BeagleBoard] (could be Bone/XM/Board)<br />
<br />
1 x [http://www.all-battery.com/li-ion1865074v10400mahrechargeablebatterymodulewithpcb-31577.aspx Battery]<br />
<br />
1 x [http://www.ti.com/product/lm2576hv Voltage Regulator]<br />
<br />
1 x [http://www.digikey.com/scripts/DkSearch/dksus.dll?WT.z_header=search_go&lang=en&keywords=CP3-1000-ND&x=0&y=0&cur=USD Barrel Connector]<br />
<br />
1 x [http://www.adafruit.com/products/814 Adafruit WiFi adapter]<br />
<br />
1 x [https://www.sparkfun.com/products/11466 GPS]<br />
<br />
1 x [https://www.sparkfun.com/products/7915 Compass]<br />
<br />
1 x BreadBoard<br />
<br />
Various Wires<br />
<br />
Soldering Tools<br />
<br />
== User Instructions ==<br />
The rover is designed for two different operating modes.<br />
<br />
# Stand-alone control and navigation<br />
# Remote operation over Wi-Fi via Python<br />
<br />
The README file on the software [https://github.com/hansenrl/BeagleRover Github Page] includes details about running the software for each of these modes. For stand-alone operation, the compiled binary ''movement'' can be executed to run commands such as moving forward or turning to a specific heading. For remote operation, Python scripts are provided to setup a server/client interface to communicate with the BeagleBone. When communicating with the Bone over Wi-Fi, the Python script presents the user with options of what to send to the BeagleBone.<br />
<br />
Selection:<br />
1: FWD<br />
2: BCK<br />
3: TURN<br />
4: COMPASS QUERY<br />
5: GPS QUERY<br />
9: EXIT<br />
<br />
The user then inputs the selection number, and an option if necessary. For instance, the option for sending a "FWD" command is the duration in microseconds, while the option for a "TURN" command is the heading relative to magnetic north. FWD, TURN, COMPASS QUERY, and GPS QUERY are all implemented and functional, but BCK is currently unimplmented; the code is simple and implementation would be trivial, but for the end application of this software (emulating UAV movements) it was unnecessary.<br />
<br />
Upon sending the command, the BeagleBone will return feedback to the user over Wi-Fi. In the case of a movement command it will return that the command was executed successfully, and if a sensor was queried it will return the result. The Python script will then prompt the user for another command to send.<br />
<br />
== Highlights ==<br />
{{#ev:youtube|g_-srPShIiU}}<br />
<br />
In the video we demonstrate how to set up the wireless server/client communication and the functionality present over the network interface, including sensor queries and movement commands. Although these movements are accomplished over Wi-Fi, they can also be programmed for stand-alone operation. The jerky turning and vigorous stopping that the car displays in the video is due to the high traction of the tires on the track surface - reducing the traction on the tires would eliminate this.<br />
<br />
== Theory of Operation ==<br />
<br />
=== Hardware Interfaces ===<br />
[[File:ECE497 Rover gpio Pins.jpg|thumb|Figure 6 - GPIO Pin Connections]]<br />
[[File:Bone P9 pinout.jpg|thumb|Figure 7 - P9 Header Layout]]<br />
[[File:ECE497 Rover compass.jpg|thumb|Figure 8 - Compass and GPS Pin layout]]<br />
[[File:ECE497 Rover gpsCompass mount.jpg|thumb| Figure 9 - Compass, GPS, and WiFi mount]]<br />
<br />
The BeagleBone is connected to the RC car via 4 GPIO pins and a ground wire. The four GPIO pins control left forward, left reverse, right forward, and right reverse on the tank-style drive base. Tank-style means that each side is controlled independently, as opposed to a standard steering where the user controls whether the car as a whole is moving forward or reverse and turns are accomplished by rotating the front axle. Figure 6 shows how the GPIO pins on BeagleBone are connected to the motor control PCB. As seen in Figure 4 the motor control wires are white. The GPIO pins are the two orange and two yellow wires labeled in the figure.<br />
<br />
The Motor Control pin layout is listed below. These are defined in movement.c, and can be redefined easily to match a different pin configuration. These pins are connected to relays on the RC car, so the motors are either on or off. <br />
Motor Control BeagleBone Pin<br />
<br />
Right Forward 40 - P8 header (software sysfs GPIO 77)<br />
Right Reverse 44 - P8 header (software sysfs GPIO 73)<br />
Left Forward 42 - P8 header (software sysfs GPIO 75)<br />
Left Reverse 46 - P8 header (software sysfs GPIO 71)<br />
<br />
WiFi is achieved with Adafruit's [http://www.adafruit.com/products/814 USB WiFi Module]. The USB WiFi Module is connected to the only usb port on the BeagleBone.<br />
<br />
Figure 7 is the BeagleBone P9 Header layout and provides a good reference in knowing which pins in the header connect to pins on the BeagleBone. Figure 8 shows how the pins for the gps and compass are connected to the P9 header. Figure 9 shows where the Compass, GPS and WiFi module are mounted. We had to mount them outside of the box because placing them inside of the wooden box attenuated the signals excessively.<br />
<br />
The [https://www.sparkfun.com/products/11466 GPS] is connected to the BeagleBone over UART serial. The GPS pin layout is as follows:<br />
GPS BeagleBone Pin<br />
<br />
1 - TX 24 - P9 header<br />
2 - RX 26 - P9 header<br />
3 - GND 1 or 2 - P9 header<br />
4 - 3.3 V 3 or 4 - P9 header<br />
5 - NC<br />
6 - NC<br />
<br />
The [https://www.sparkfun.com/products/7915 compass] is connected to the BeagleBone via I2C. The Compass pin layout is as follows:<br />
Compass BeagleBone Pin<br />
<br />
1 - GND 1 or 2 - P9 Header<br />
2 - 3.3 V 3 or 4 - P9 Header<br />
3 - I2C SDA 20 - P9 Header<br />
4 - I2C SCL 19 - P9 Header<br />
<br />
=== Software ===<br />
<br />
All hardware interfacing is accomplished in C, using the standard interfaces for each protocol. Motor control is done via GPIO, the compass is I2C, and the GPS is UART. Compass interfacing is provided in a compass library ''Compass/compass.c'', GPS interfacing is provided in a GPS library ''GPSLibs/gps.c'', and the motor control is provided in ''movement.c''. Waypoint storage and helper functions are provided in a library in ''Waypoints/waypoint.c''.<br />
<br />
For stand-alone operation, ''movement.c'' is compiled with the necessary libraries as a stand-alone binary. <br />
<br />
For network operation, the Python scripts utilize compiled libraries in sharedLibs. Currently, due to the structure of how the sensors are interfaced in the movement library, all interfacing is accomplished through a library ''movementLib.so'', which provides wrapper functions to the GPS and Compass. In the future, this functionality should be better divided out into each individual sub-library. This interfacing between Python and C is done with Python [http://docs.python.org/2/library/ctypes.html CTypes]. The BeagleBone and base station communicate over Wi-Fi using TCP sockets via the Python [http://docs.python.org/2/library/socket.html Socket] and [http://docs.python.org/2/library/socketserver.html SocketServer] modules. All of these Python modules, ctypes, socket, and SocketServer, are standard in Python 2.7.<br />
<br />
== Work Breakdown ==<br />
<br />
A summary of the major development areas and the primary contributor(s) to each subsystem:<br />
<br />
* RC car hardware interfacing and mounting: ''Michael Junge''<br />
* Power subsystem development: ''Michael Junge''<br />
* Wireless communication hardware: ''Michael Junge'', ''Jesse Brannon''<br />
* GPS and Compass sensor interfacing: ''Jesse Brannon''<br />
* Movement and navigation software development: ''Jesse Brannon'', ''Ross Hansen''<br />
* Network communication software development: ''Ross Hansen''<br />
<br />
Tasks completed and in development by each team member:<br />
<br />
'''Michael Junge''' <br />
* Constructed hardware interfaces to compass sensor and drive base electronics<br />
* Investigated WiFi issues on Angstrom - determined that the Angstrom A5 image on BeagleBone A6 hardware is a known working configuration ''**still under invesgitation, won't be fully completed due to hardware/software issues between Angstrom and Beagle''<br />
* Soldered and interfaced battery subsystem to power BeagleBone<br />
<br />
'''Jesse Brannon'''<br />
* Decided and installed an Ubuntu image instead of Anstrom specifically for the WiFi functionally<br />
* Researched and purchased compass and GPS sensors<br />
* Wrote libraries to interface to compass and GPS sensor<br />
* Co-developed movement and navigation software<br />
<br />
'''Ross Hansen'''<br />
* Co-developed movement and navigation software<br />
* Developed software for network communication<br />
<br />
'''Tasks Remaining'''<br />
<br />
Although full rover functionality for movement and sensor data retrieval was completed, two additional features were currently in development at the end of the original timeframe of this project.<br />
<br />
1) Code to manage waypoints and drive the motors based off of waypoint inputs<br />
<br />
2) Improve GPS library to allow for update rate configuration<br />
<br />
These two features were not necessary for this project, but are useful for a sister project in development by the same team; so development will continue on these two tasks. The code in the BeagleRover repository will be updated with final versions of the code as it is completed.<br />
<br />
== Future Work ==<br />
<br />
This project has the possibility to branch into several interesting areas.<br />
* The BeagleBone platform has the processing power for various interesting sensory systems, such as computer vision. The RC car interface and networking platform allows for a variety of interesting applications of sensor systems, where driving decisions are made based off of sensor inputs or sensor data is relayed remotely back to a powerful processing node.<br />
<br />
* A GUI is being developed that could be used to send commands to control the rover. Work on it can be seen here: [[ECE497_Project_RoverGUI]]<br />
<br />
* This project is a two-dimensional navigation system for a ground-based rover, but could be extended for use on aerial vehicles. Additional requirements for this would include some sort of altimeter sensor interface, modification of control outputs to accommodate aerial control surfaces, and an addition of a third dimension to location and navigation code.<br />
<br />
== Conclusions ==<br />
<br />
BeagleRover is a functioning implementation of a rover intelligence platform for the BeagleBone. When mounted on an RC car, the BeagleBone can direct the car motors to move around and it can relay GPS and compass data across a Wi-Fi network.<br />
<br />
This project was highly interesting and enjoyable to work on. It incorporated a wide range of skills fundamental to embedded systems - hardware, sensor interfacing via multiple protocols, and both high and low-level software development. Although a complete project in its current status, even more exciting is the possibility for extension in the future; the basic system of network functionality, location and heading sensor data, and mobility provide an interesting platform for lots of different embedded work. Combined with the versatility of Linux running on the BeagleBone, this project provides an interesting application of the BeagleBone's potential and a flexible platform for future development.<br />
<br />
{{YoderFoot}}</div>Jessebrannonhttps://elinux.org/index.php?title=ECE497_Project_Rover&diff=192626ECE497 Project Rover2012-11-13T16:32:06Z<p>Jessebrannon: </p>
<hr />
<div>[[Category:ECE497 |Project]]<br />
{{YoderHead}}<br />
<br />
Team members: [[user:Hansenrl|Ross Hansen]], [[user:jessebrannon|Jesse Brannon]], [[User:jungeml|Michael Junge]] <br />
<br />
== Grading Template ==<br />
I'm using the following template to grade. Each slot is 10 points.<br />
0 = Missing, 5=OK, 10=Wow!<br />
<br />
<pre style="color:red"><br />
05 Executive Summary<br />
05 Installation Instructions (waiting details)<br />
00 User Instructions<br />
00 Highlights<br />
00 Theory of Operation (Looking forward to more details)<br />
00 Work Breakdown<br />
00 Future Work<br />
00 Conclusions<br />
00 Demo<br />
00 Late<br />
Comments: I'm looking forward to seeing this.<br />
<br />
Score: 10/100<br />
<br />
</pre><br />
<br />
== Executive Summary ==<br />
<br />
This project is a BeagleBone implementation of a ground-based rover platform. Through a BeagleBone mounted on an RC car, the car can be directed to turn to a specified compass heading or move forward. A user is able to control the car with predefined movement code or in real-time over WiFi. The BeagleBone can also send back helpful information to the user over Wifi, such as GPS location and compass heading. Although not complete, functionality to direct the rover along a path by defining waypoints is currently in development.<br />
<br />
This work provides highly useful code even for applications outside of this specific rover project - digital compass and GPS sensor interfacing, Python-based networking, and RC car motor control code is all written and easily extendable into other applications. Additionally, the work performed for this project in the area of RC car reverse engineering and BeagleBone USB Wi-Fi can serve as useful community knowledge for other projects.<br />
<br />
== Installation Instructions ==<br />
<br />
We bought an RC car from [http://www.toysrus.com/product/index.jsp?productId=12925248 Toys 'R Us] and modified it to become an intelligent platform by utilizing a BeagleBone. To successfully recreate our work, certain skills will be helpful: dremel-based hardware modification, soldering, experience with Beagle Bone or an equivalent embedded processor bases system, familiarity with the Python and C programming languages, and basic circuit knowledge such as power regulation from batteries.<br />
<br />
=== Modifying RC Truck/Car ===<br />
[[File:ECE497 Rover truck hardware.JPG|thumb|Figure 1 - Electronics housing]]<br />
[[File:ECE497 Rover circuitBoard.JPG|thumb|Figure 2 - Motor control PCB]]<br />
[[File:ECE497 Rover circuitBoard2.JPG|thumb|Figure 3 - Motor control pins]]<br />
<br />
As shown in Figure 1, we removed the aesthetic cover form the truck. We also cut out most of the plastic with a Dremel tool. We did this to expose the circuity below. Cutting out most of the plastic is necessary unless you are skilled enough to drill only a small hole to feed the wires through and can replace the circuit board back into place without viewing it. Figure 1 also shows, four screw slots. In order to obtain access to the circuity, you must remove the screws from their sockets. Now turn the truck so that it's undercarriage is facing up, remove the housing unit of the battery. The battery unit should be loose and thus be removed since you already removed the four place holder screws. Be careful though to not pullout or detach any wires from the their respected places as you are pulling out the circuit board. Figure 2 shows the circuit board removed from it's housing with the wires exposed. The red and black wires you see are respectively power and ground, the same for all electrical work. <br />
<br />
Figure 3 is focused on the specific connections that we soldered to the board. We choose the top left corner (where three of the connections are) because when we reverse engineered the board, this area is where the wireless signals are received and sent to the motor controllers. The fourth wire was supposed to be the pin on the right but as you can see by the picture, the circuit pad is burned off. We just followed the hard trace and soldered at the next available node. After testing, this improvised step seemed suitable for our needs. The same four pins are labeled on the circuit board as F,W,L,R. Originally, we thought these meant forward, backward, left and right. However the RC Truck is designed with tank steering so in order to go forward it theoretically should require two separate signals. We tested this theory and found out that it did in fact require two signals, thus the F,W,L,R labels are incorrect. The pins attach to relays on each motor, and correspond to "right forward", "right backward", "left forward", and "left backward", and are digital control signals. Therefore, in order to turn left you would drive the "right backward" and "left forward" pins high. Fortunately, motor conflicts are not destructive and exact pin mappings can be determined by experimentation - if you mistakenly drive the "right forward" and "right backward" pins high, for instance, the relay will click and the motors will not move, without any damage to the motors or electronics.<br />
<br />
If you want to reverse engineer this circuit board for yourself instead of just following this guide, you will need a separate 5V dc power supply as well as the 9V battery that was included, a 5V wall adapter with stripped wires will be suffient for the extra power supply. Then you should look for the wireless adapter board. Most RC electronics will have a separate wireless circuit board. Ours happened to be already physically attached to the motor controllers. Find the output signals from the wireless adapter and test which signals control which motors and direction of motors. To test this just attach the 5V to the pin on the circuit board while the truck battery is installed and switched on. Also you will need to find a ground wire to attach for common ground. We just soldered directly to the terminal on the installed battery for our ground.<br />
<br />
=== BeagleBone ===<br />
[[File:ECE497 Rover Power Circuit.jpg|thumb|Figure 4 - Power Circuit]]<br />
[[File:ECE497 Rover 5v regulator.JPG|thumb|Figure 5 - Regulator Circuit]]<br />
After several problems with the WiFi on the BeagleBone not working as expected, we decided to overwrite our Angstrom Beagle Image with Ubuntu. We followed the [http://elinux.org/BeagleBoardUbuntu BeagleBoardUbuntu] page on elinux.org. <br />
<br />
However, if you are a purist Beagle user and want to pursue the Angstrom route then I would suggest reading Dr. Yoder's [http://elinux.org/EBC_Exercise_02_Out-of-the-Box,_Bone Out of The Box, Bone]. ''Note: If you want WiFi to work properly, install the A5 image not the A6 image.''<br />
<br />
Whether you use the Angstrom image or Ubuntu is up to you. However, you will still need to wire the BeagleBone up so that it runs off of battery power. We bought a 7.4 Vdc 10400 mAh [http://www.all-battery.com/li-ion1865074v10400mahrechargeablebatterymodulewithpcb-31577.aspx battery]. Since the BeagleBone runs off of 5V with a possible peak current of 1.5 amps we needed a 5V regulator that can supply that power [http://www.ti.com/product/lm2576hv voltage regulator]. To be safe and avoid short-circuiting the BeagleBone, it is advisable to buy a [http://www.digikey.com/scripts/DkSearch/dksus.dll?WT.z_header=search_go&lang=en&keywords=CP3-1000-ND&x=0&y=0&cur=USD barrel connector] for proper power connection. This barrel connector replaces the need to solder wires to the hardware of the BeagleBone, thus allowing for us to safely supply power the way the BeagleBone was designed. As seen in Figure 4, the barrel connector, battery and voltage regulator with heat sink can be seen. Figure 5 is our Regulator circuit. It shows how to connect the regulator to the rest of the BeagleBone hardware.<br />
<br />
''Note: We specifically used a BeagleBone for it's smaller size and less cost due to less capabilities. However, you could use any board that has an Omap processor, such as the Beagle XM Board.''<br />
<br />
===WiFi Network===<br />
Connecting to WiFi is an important part of our project. We intended this project to receive data from a user on a mobile laptop. We decided to use WiFi to avoid following the RC truck around a field with the laptop in our hands. WiFi helps the user stay in the same place while the RC truck moves around the field. We ordered an [http://www.adafruit.com/products/814 Adafruit WiFi adapter] that Adafruit specifically sponsors for the BeagleBone. They also have an install tutorial. After several days of researching WiFi capabilities for the BeagleBone, we continually ran into many difficulties. One of the many difficulties is with 'opkg upgrade' that Adafruit says to run. DO NOT RUN 'opkg upgrade'. Depending on what software image you are running, you will receive an error that for some reason cannot be resolved. There are many reported cases on [http://forums.adafruit.com/viewforum.php?f=49&sid=1a1b1e0fba73bb5659a3446079a5f423 Adafruit's help forums]. There are also several more reported cases for the BeagleBone group on google groups. After researching and WiFi experimentation we discovered that the Adafruit WiFi adapter works well on the A6 version of the BeagleBone hardware while running A5 version of Angstrom. This is the only valid combination we could find. The A5 hardware shows and detects the adapter, but for some reason the adapter does not connect to a wireless router. When the same SD card is plugged into an A6 hardware, it connects fine without issue to a router. We also noticed that the A6 software image does not even recognize the BeagleBone following the same procedure as for the A5 software.<br />
<br />
Because of the difficulties, we decided to not use the Angstrom images supported by Beagle. We instead installed Ubuntu Operating system on our A6 hardware. With Ubuntu installed it was as easy as plug and play. All we did after installing Ubuntu was to physically plug in the adapter and it was recognized immediately. However, if you want to stay with Angstrom I would suggest following the directions in [http://elinux.org/ECE497_Beagle_Bone_WiFi ECE497 Beagle Bone WiFi].<br />
<br />
=== Software ===<br />
<br />
The code for the platform can be found on the [https://github.com/hansenrl/BeagleRover BeagleRover Github Page] and [git://github.com/hansenrl/BeagleRover.git Github Repository].<br />
<br />
A Makefile is provided, and the code can be compiled with the command "make" in the root directory of the project; this will build a main binary ''movement'' and shared libraries for movement control over WiFi. <br />
<br />
See the README for detailed instructions on installation and documentation of the code structure.<br />
<br />
== Required Parts List ==<br />
1 x [http://www.toysrus.com/product/index.jsp?productId=12925248 RC Truck]<br />
<br />
1 x [http://beagleboard.org/buy BeagleBoard] (could be Bone/XM/Board)<br />
<br />
1 x [http://www.all-battery.com/li-ion1865074v10400mahrechargeablebatterymodulewithpcb-31577.aspx Battery]<br />
<br />
1 x [http://www.ti.com/product/lm2576hv Voltage Regulator]<br />
<br />
1 x [http://www.digikey.com/scripts/DkSearch/dksus.dll?WT.z_header=search_go&lang=en&keywords=CP3-1000-ND&x=0&y=0&cur=USD Barrel Connector]<br />
<br />
1 x [http://www.adafruit.com/products/814 Adafruit WiFi adapter]<br />
<br />
1 x [https://www.sparkfun.com/products/11466 GPS]<br />
<br />
1 x [https://www.sparkfun.com/products/7915 Compass]<br />
<br />
1 x BreadBoard<br />
<br />
Various Wires<br />
<br />
Soldering Tools<br />
<br />
== User Instructions ==<br />
The rover is designed for two different operating modes.<br />
<br />
# Stand-alone control and navigation<br />
# Remote operation over Wi-Fi via Python<br />
<br />
The README file on the software [https://github.com/hansenrl/BeagleRover Github Page] includes details about running the software for each of these modes. For stand-alone operation, the compiled binary ''movement'' can be executed to run commands such as moving forward or turning to a specific heading. For remote operation, Python scripts are provided to setup a server/client interface to communicate with the BeagleBone. When communicating with the Bone over Wi-Fi, the Python script presents the user with options of what to send to the BeagleBone.<br />
<br />
Selection:<br />
1: FWD<br />
2: BCK<br />
3: TURN<br />
4: COMPASS QUERY<br />
5: GPS QUERY<br />
9: EXIT<br />
<br />
The user then inputs the selection number, and an option if necessary. For instance, the option for sending a "FWD" command is the duration in microseconds, while the option for a "TURN" command is the heading relative to magnetic north. FWD, TURN, COMPASS QUERY, and GPS QUERY are all implemented and functional, but BCK is currently unimplmented; the code is simple and implementation would be trivial, but for the end application of this software (emulating UAV movements) it was unnecessary.<br />
<br />
Upon sending the command, the BeagleBone will return feedback to the user over Wi-Fi. In the case of a movement command it will return that the command was executed successfully, and if a sensor was queried it will return the result. The Python script will then prompt the user for another command to send.<br />
<br />
== Highlights ==<br />
{{#ev:youtube|g_-srPShIiU}}<br />
<br />
In the video we demonstrate how to set up the wireless server/client communication and the functionality present over the network interface, including sensor queries and movement commands. Although these movements are accomplished over Wi-Fi, they can also be programmed for stand-alone operation. The jerky turning and vigorous stopping that the car displays in the video is due to the high traction of the tires on the track surface - reducing the traction on the tires would eliminate this.<br />
<br />
== Theory of Operation ==<br />
<br />
=== Hardware Interfaces ===<br />
[[File:ECE497 Rover gpio Pins.jpg|thumb|Figure 6 - GPIO Pin Connections]]<br />
[[File:Bone P9 pinout.jpg|thumb|Figure 7 - P9 Header Layout]]<br />
[[File:ECE497 Rover compass.jpg|thumb|Figure 8 - Compass and GPS Pin layout]]<br />
[[File:ECE497 Rover gpsCompass mount.jpg|thumb| Figure 9 - Compass, GPS, and WiFi mount]]<br />
<br />
The BeagleBone is connected to the RC car via 4 GPIO pins and a ground wire. The four GPIO pins control left forward, left reverse, right forward, and right reverse on the tank-style drive base. Tank-style means that each side is controlled independently, as opposed to a standard steering where the user controls whether the car as a whole is moving forward or reverse and turns are accomplished by rotating the front axle. Figure 6 shows how the GPIO pins on BeagleBone are connected to the motor control PCB. As seen in Figure 4 the motor control wires are white. The GPIO pins are the two orange and two yellow wires labeled in the figure.<br />
<br />
The Motor Control pin layout is listed below. These are defined in movement.c, and can be redefined easily to match a different pin configuration. These pins are connected to relays on the RC car, so the motors are either on or off. <br />
Motor Control BeagleBone Pin<br />
<br />
Right Forward 40 - P8 header (software sysfs GPIO 77)<br />
Right Reverse 44 - P8 header (software sysfs GPIO 73)<br />
Left Forward 42 - P8 header (software sysfs GPIO 75)<br />
Left Reverse 46 - P8 header (software sysfs GPIO 71)<br />
<br />
WiFi is achieved with Adafruit's [http://www.adafruit.com/products/814 USB WiFi Module]. The USB WiFi Module is connected to the only usb port on the BeagleBone.<br />
<br />
Figure 7 is the BeagleBone P9 Header layout and provides a good reference in knowing which pins in the header connect to pins on the BeagleBone. Figure 8 shows how the pins for the gps and compass are connected to the P9 header. Figure 9 shows where the Compass, GPS and WiFi module are mounted. We had to mount them outside of the box because placing them inside of the wooden box attenuated the signals excessively.<br />
<br />
The [https://www.sparkfun.com/products/11466 GPS] is connected to the BeagleBone over UART serial. The GPS pin layout is as follows:<br />
GPS BeagleBone Pin<br />
<br />
1 - TX 24 - P9 header<br />
2 - RX 26 - P9 header<br />
3 - GND 1 or 2 - P9 header<br />
4 - 3.3 V 3 or 4 - P9 header<br />
5 - NC<br />
6 - NC<br />
<br />
The [https://www.sparkfun.com/products/7915 compass] is connected to the BeagleBone via I2C. The Compass pin layout is as follows:<br />
Compass BeagleBone Pin<br />
<br />
1 - GND 1 or 2 - P9 Header<br />
2 - 3.3 V 3 or 4 - P9 Header<br />
3 - I2C SDA 20 - P9 Header<br />
4 - I2C SCL 19 - P9 Header<br />
<br />
=== Software ===<br />
<br />
All hardware interfacing is accomplished in C, using the standard interfaces for each protocol. Motor control is done via GPIO, the compass is I2C, and the GPS is UART. Compass interfacing is provided in a compass library ''Compass/compass.c'', GPS interfacing is provided in a GPS library ''GPSLibs/gps.c'', and the motor control is provided in ''movement.c''. Waypoint storage and helper functions are provided in a library in ''Waypoints/waypoint.c''.<br />
<br />
For stand-alone operation, ''movement.c'' is compiled with the necessary libraries as a stand-alone binary. <br />
<br />
For network operation, the Python scripts utilize compiled libraries in sharedLibs. Currently, due to the structure of how the sensors are interfaced in the movement library, all interfacing is accomplished through a library ''movementLib.so'', which provides wrapper functions to the GPS and Compass. In the future, this functionality should be better divided out into each individual sub-library. This interfacing between Python and C is done with Python [http://docs.python.org/2/library/ctypes.html CTypes]. The BeagleBone and base station communicate over Wi-Fi using TCP sockets via the Python [http://docs.python.org/2/library/socket.html Socket] and [http://docs.python.org/2/library/socketserver.html SocketServer] modules. All of these Python modules, ctypes, socket, and SocketServer, are standard in Python 2.7.<br />
<br />
== Work Breakdown ==<br />
<br />
A summary of the major development areas and the primary contributor(s) to each subsystem:<br />
<br />
* RC car hardware interfacing and mounting: ''Michael Junge''<br />
* Power subsystem development: ''Michael Junge''<br />
* Wireless communication hardware: ''Michael Junge'', ''Jesse Brannon''<br />
* GPS and Compass sensor interfacing: ''Jesse Brannon''<br />
* Movement and navigation software development: ''Jesse Brannon'', ''Ross Hansen''<br />
* Network communication software development: ''Ross Hansen''<br />
<br />
Tasks completed and in development by each team member:<br />
<br />
'''Michael Junge''' <br />
* Constructed hardware interfaces to compass sensor and drive base electronics<br />
* Investigated WiFi issues on Angstrom - determined that the Angstrom A5 image on BeagleBone A6 hardware is a known working configuration ''**still under invesgitation, won't be fully completed due to hardware/software issues between Angstrom and Beagle''<br />
* Soldered and interfaced battery subsystem to power BeagleBone<br />
<br />
'''Jesse Brannon'''<br />
* Decided and installed an Ubuntu image instead of Anstrom specifically for the WiFi functionally<br />
* Researched and purchased compass and GPS sensors<br />
* Wrote libraries to interface to compass and GPS sensor<br />
* Co-developed movement and navigation software<br />
<br />
'''Ross Hansen'''<br />
* Co-developed movement and navigation software<br />
* Developed software for network communication<br />
<br />
'''Tasks Remaining'''<br />
<br />
Although full rover functionality for movement and sensor data retrieval was completed, two additional features were currently in development at the end of the original timeframe of this project.<br />
<br />
1) Code to manage waypoints and drive the motors based off of waypoint inputs<br />
<br />
2) Improve GPS library to allow for update rate configuration<br />
<br />
These two features were not necessary for this project, but are useful for a sister project in development by the same team; so development will continue on these two tasks. The code in the BeagleRover repository will be updated with final versions of the code as it is completed.<br />
<br />
== Future Work ==<br />
<br />
This project has the possibility to branch into several interesting areas.<br />
* The BeagleBone platform has the processing power for various interesting sensory systems, such as computer vision. The RC car interface and networking platform allows for a variety of interesting applications of sensor systems, where driving decisions are made based off of sensor inputs or sensor data is relayed remotely back to a powerful processing node.<br />
<br />
* A GUI is being developed that could be used to send commands to control the rover. Work on it can be seen here: [[ECE497_Project_RoverGUI]]<br />
<br />
* This project is a two-dimensional navigation system for a ground-based rover, but could be extended for use on aerial vehicles. Additional requirements for this would include some sort of altimeter sensor interface, modification of control outputs to accommodate aerial control surfaces, and an addition of a third dimension to location and navigation code.<br />
<br />
== Conclusions ==<br />
<br />
BeagleRover is a functioning implementation of a rover intelligence platform for the BeagleBone. When mounted on an RC car, the BeagleBone can direct the car motors to move around and it can relay GPS and compass data across a Wi-Fi network.<br />
<br />
This project was highly interesting and enjoyable to work on. It incorporated a wide range of skills fundamental to embedded systems - hardware, sensor interfacing via multiple protocols, and both high and low-level software development. Although a complete project in its current status, even more exciting is the possibility for extension in the future; the basic system of network functionality, location and heading sensor data, and mobility provide an interesting platform for lots of different embedded work. Combined with the versatility of Linux running on the BeagleBone, this project provides an interesting application of the BeagleBone's potential and a flexible platform for future development.<br />
<br />
{{YoderFoot}}</div>Jessebrannonhttps://elinux.org/index.php?title=ECE497_Project_Rover&diff=192620ECE497 Project Rover2012-11-13T16:31:32Z<p>Jessebrannon: </p>
<hr />
<div>[[Category:ECE497 |Project]]<br />
{{YoderHead}}<br />
<br />
Team members: [[user:Hansenrl|Ross Hansen]], [[user:jessebrannon|Jesse Brannon]], [[User:jungeml|Michael Junge]] <br />
<br />
== Grading Template ==<br />
I'm using the following template to grade. Each slot is 10 points.<br />
0 = Missing, 5=OK, 10=Wow!<br />
<br />
<pre style="color:red"><br />
05 Executive Summary<br />
05 Installation Instructions (waiting details)<br />
00 User Instructions<br />
00 Highlights<br />
00 Theory of Operation (Looking forward to more details)<br />
00 Work Breakdown<br />
00 Future Work<br />
00 Conclusions<br />
00 Demo<br />
00 Late<br />
Comments: I'm looking forward to seeing this.<br />
<br />
Score: 10/100<br />
<br />
</pre><br />
<br />
== Executive Summary ==<br />
<br />
This project is a BeagleBone implementation of a ground-based rover platform. Through a BeagleBone mounted on an RC car, the car can be directed to turn to a specified compass heading or move forward. A user is able to control the car with predefined movement code or in real-time over WiFi. The BeagleBone can also send back helpful information to the user over Wifi, such as GPS location and compass heading. Although not complete, functionality to direct the rover along a path by defining waypoints is currently in development.<br />
<br />
This work provides highly useful code even for applications outside of this specific rover project - digital compass and GPS sensor interfacing, Python-based networking, and RC car motor control code is all written and easily extendable into other applications. Additionally, the work performed for this project in the area of RC car reverse engineering and BeagleBone USB Wi-Fi can serve as useful community knowledge for other projects.<br />
<br />
== Installation Instructions ==<br />
<br />
We bought an RC car from [http://www.toysrus.com/product/index.jsp?productId=12925248 Toys 'R Us] and modified it to become an intelligent platform by utilizing a BeagleBone. To successfully recreate our work, certain skills will be helpful: dremel-based hardware modification, soldering, experience with Beagle Bone or an equivalent embedded processor bases system, familiarity with the Python and C programming languages, and basic circuit knowledge such as power regulation from batteries.<br />
<br />
=== Modifying RC Truck/Car ===<br />
[[File:ECE497 Rover truck hardware.JPG|thumb|Figure 1 - Electronics housing]]<br />
[[File:ECE497 Rover circuitBoard.JPG|thumb|Figure 2 - Motor control PCB]]<br />
[[File:ECE497 Rover circuitBoard2.JPG|thumb|Figure 3 - Motor control pins]]<br />
<br />
As shown in Figure 1, we removed the aesthetic cover form the truck. We also cut out most of the plastic with a Dremel tool. We did this to expose the circuity below. Cutting out most of the plastic is necessary unless you are skilled enough to drill only a small hole to feed the wires through and can replace the circuit board back into place without viewing it. Figure 1 also shows, four screw slots. In order to obtain access to the circuity, you must remove the screws from their sockets. Now turn the truck so that it's undercarriage is facing up, remove the housing unit of the battery. The battery unit should be loose and thus be removed since you already removed the four place holder screws. Be careful though to not pullout or detach any wires from the their respected places as you are pulling out the circuit board. Figure 2 shows the circuit board removed from it's housing with the wires exposed. The red and black wires you see are respectively power and ground, the same for all electrical work. <br />
<br />
Figure 3 is focused on the specific connections that we soldered to the board. We choose the top left corner (where three of the connections are) because when we reverse engineered the board, this area is where the wireless signals are received and sent to the motor controllers. The fourth wire was supposed to be the pin on the right but as you can see by the picture, the circuit pad is burned off. We just followed the hard trace and soldered at the next available node. After testing, this improvised step seemed suitable for our needs. The same four pins are labeled on the circuit board as F,W,L,R. Originally, we thought these meant forward, backward, left and right. However the RC Truck is designed with tank steering so in order to go forward it theoretically should require two separate signals. We tested this theory and found out that it did in fact require two signals, thus the F,W,L,R labels are incorrect. The pins attach to relays on each motor, and correspond to "right forward", "right backward", "left forward", and "left backward", and are digital control signals. Therefore, in order to turn left you would drive the "right backward" and "left forward" pins high. Fortunately, motor conflicts are not destructive and exact pin mappings can be determined by experimentation - if you mistakenly drive the "right forward" and "right backward" pins high, for instance, the relay will click and the motors will not move, without any damage to the motors or electronics.<br />
<br />
If you want to reverse engineer this circuit board for yourself instead of just following this guide, you will need a separate 5V dc power supply as well as the 9V battery that was included, a 5V wall adapter with stripped wires will be suffient for the extra power supply. Then you should look for the wireless adapter board. Most RC electronics will have a separate wireless circuit board. Ours happened to be already physically attached to the motor controllers. Find the output signals from the wireless adapter and test which signals control which motors and direction of motors. To test this just attach the 5V to the pin on the circuit board while the truck battery is installed and switched on. Also you will need to find a ground wire to attach for common ground. We just soldered directly to the terminal on the installed battery for our ground.<br />
<br />
=== BeagleBone ===<br />
[[File:ECE497 Rover Power Circuit.jpg|thumb|Figure 4 - Power Circuit]]<br />
[[File:ECE497 Rover 5v regulator.JPG|thumb|Figure 5 - Regulator Circuit]]<br />
After several problems with the WiFi on the BeagleBone not working as expected, we decided to overwrite our Angstrom Beagle Image with Ubuntu. We followed the [http://elinux.org/BeagleBoardUbuntu BeagleBoardUbuntu] page on elinux.org. <br />
<br />
However, if you are a purist Beagle user and want to pursue the Angstrom route then I would suggest reading Dr. Yoder's [http://elinux.org/EBC_Exercise_02_Out-of-the-Box,_Bone Out of The Box, Bone]. ''Note: If you want WiFi to work properly, install the A5 image not the A6 image.''<br />
<br />
Whether you use the Angstrom image or Ubuntu is up to you. However, you will still need to wire the BeagleBone up so that it runs off of battery power. We bought a 7.4 Vdc 10400 mAh [http://www.all-battery.com/li-ion1865074v10400mahrechargeablebatterymodulewithpcb-31577.aspx battery]. Since the BeagleBone runs off of 5V with a possible peak current of 1.5 amps we needed a 5V regulator that can supply that power [http://www.ti.com/product/lm2576hv voltage regulator]. To be safe and avoid short-circuiting the BeagleBone, it is advisable to buy a [http://www.digikey.com/scripts/DkSearch/dksus.dll?WT.z_header=search_go&lang=en&keywords=CP3-1000-ND&x=0&y=0&cur=USD barrel connector] for proper power connection. This barrel connector replaces the need to solder wires to the hardware of the BeagleBone, thus allowing for us to safely supply power the way the BeagleBone was designed. As seen in Figure 4, the barrel connector, battery and voltage regulator with heat sink can be seen. Figure 5 is our Regulator circuit. It shows how to connect the regulator to the rest of the BeagleBone hardware.<br />
<br />
''Note: We specifically used a BeagleBone for it's smaller size and less cost due to less capabilities. However, you could use any board that has an Omap processor, such as the Beagle XM Board.''<br />
<br />
===WiFi Network===<br />
Connecting to WiFi is an important part of our project. We intended this project to receive data from a user on a mobile laptop. We decided to use WiFi to avoid following the RC truck around a field with the laptop in our hands. WiFi helps the user stay in the same place while the RC truck moves around the field. We ordered an [http://www.adafruit.com/products/814 Adafruit WiFi adapter] that Adafruit specifically sponsors for the BeagleBone. They also have an install tutorial. After several days of researching WiFi capabilities for the BeagleBone, we continually ran into many difficulties. One of the many difficulties is with 'opkg upgrade' that Adafruit says to run. DO NOT RUN 'opkg upgrade'. Depending on what software image you are running, you will receive an error that for some reason cannot be resolved. There are many reported cases on [http://forums.adafruit.com/viewforum.php?f=49&sid=1a1b1e0fba73bb5659a3446079a5f423 Adafruit's help forums]. There are also several more reported cases for the BeagleBone group on google groups. After researching and WiFi experimentation we discovered that the Adafruit WiFi adapter works well on the A6 version of the BeagleBone hardware while running A5 version of Angstrom. This is the only valid combination we could find. The A5 hardware shows and detects the adapter, but for some reason the adapter does not connect to a wireless router. When the same SD card is plugged into an A6 hardware, it connects fine without issue to a router. We also noticed that the A6 software image does not even recognize the BeagleBone following the same procedure as for the A5 software.<br />
<br />
Because of the difficulties, we decided to not use the Angstrom images supported by Beagle. We instead installed Ubuntu Operating system on our A6 hardware. With Ubuntu installed it was as easy as plug and play. All we did after installing Ubuntu was to physically plug in the adapter and it was recognized immediately. However, if you want to stay with Angstrom I would suggest following the directions in [http://elinux.org/ECE497_Beagle_Bone_WiFi ECE497 Beagle Bone WiFi].<br />
<br />
=== Software ===<br />
<br />
The code for the platform can be found on the [https://github.com/hansenrl/BeagleRover BeagleRover Github Page] and [git://github.com/hansenrl/BeagleRover.git Github Repository].<br />
<br />
A Makefile is provided, and the code can be compiled with the command "make" in the root directory of the project; this will build a main binary ''movement'' and shared libraries for movement control over WiFi. <br />
<br />
See the README for detailed instructions on installation and documentation of the code structure.<br />
<br />
== Required Parts List ==<br />
1 x [http://www.toysrus.com/product/index.jsp?productId=12925248 RC Truck]<br />
<br />
1 x [http://beagleboard.org/buy BeagleBoard] (could be Bone/XM/Board)<br />
<br />
1 x [http://www.all-battery.com/li-ion1865074v10400mahrechargeablebatterymodulewithpcb-31577.aspx Battery]<br />
<br />
1 x [http://www.ti.com/product/lm2576hv Voltage Regulator]<br />
<br />
1 x [http://www.digikey.com/scripts/DkSearch/dksus.dll?WT.z_header=search_go&lang=en&keywords=CP3-1000-ND&x=0&y=0&cur=USD Barrel Connector]<br />
<br />
1 x [http://www.adafruit.com/products/814 Adafruit WiFi adapter]<br />
<br />
1 x [https://www.sparkfun.com/products/11466 GPS]<br />
<br />
1 x [https://www.sparkfun.com/products/7915 Compass]<br />
<br />
1 x BreadBoard<br />
<br />
Various Wires<br />
<br />
Soldering Tools<br />
<br />
== User Instructions ==<br />
The rover is designed for two different operating modes.<br />
<br />
# Stand-alone control and navigation<br />
# Remote operation over Wi-Fi via Python<br />
<br />
The README file on the software [https://github.com/hansenrl/BeagleRover Github Page] includes details about running the software for each of these modes. For stand-alone operation, the compiled binary ''movement'' can be executed to run commands such as moving forward or turning to a specific heading. For remote operation, Python scripts are provided to setup a server/client interface to communicate with the BeagleBone. When communicating with the Bone over Wi-Fi, the Python script presents the user with options of what to send to the BeagleBone.<br />
<br />
Selection:<br />
1: FWD<br />
2: BCK<br />
3: TURN<br />
4: COMPASS QUERY<br />
5: GPS QUERY<br />
9: EXIT<br />
<br />
The user then inputs the selection number, and an option if necessary. For instance, the option for sending a "FWD" command is the duration in microseconds, while the option for a "TURN" command is the heading relative to magnetic north. FWD, TURN, COMPASS QUERY, and GPS QUERY are all implemented and functional, but BCK is currently unimplmented; the code is simple and implementation would be trivial, but for the end application of this software (emulating UAV movements) it was unnecessary.<br />
<br />
Upon sending the command, the BeagleBone will return feedback to the user over Wi-Fi. In the case of a movement command it will return that the command was executed successfully, and if a sensor was queried it will return the result. The Python script will then prompt the user for another command to send.<br />
<br />
== Highlights ==<br />
{{#ev:youtube|g_-srPShIiU}}<br />
<br />
In the video we demonstrate how to set up the wireless server/client communication and the functionality present over the network interface, including sensor queries and movement commands. Although these movements are accomplished over Wi-Fi, they can also be programmed for stand-alone operation. The jerky turning and vigorous stopping that the car displays in the video is due to the high traction of the tires on the track surface - reducing the traction on the tires would eliminate this.<br />
<br />
== Theory of Operation ==<br />
<br />
=== Hardware Interfaces ===<br />
[[File:ECE497 Rover gpio Pins.jpg|thumb|Figure 6 - GPIO Pin Connections]]<br />
[[File:Bone P9 pinout.jpg|thumb|Figure 7 - P9 Header Layout]]<br />
[[File:ECE497 Rover compass.jpg|thumb|Figure 8 - Compass and GPS Pin layout]]<br />
[[File:ECE497 Rover gpsCompass mount.jpg|thumb| Figure 9 - Compass, GPS, and WiFi mount]]<br />
<br />
The BeagleBone is connected to the RC car via 4 GPIO pins and a ground wire. The four GPIO pins control left forward, left reverse, right forward, and right reverse on the tank-style drive base. Tank-style means that each side is controlled independently, as opposed to a standard steering where the user controls whether the car as a whole is moving forward or reverse and turns are accomplished by rotating the front axle. Figure 6 shows how the GPIO pins on BeagleBone are connected to the motor control PCB. As seen in Figure 4 the motor control wires are white. The GPIO pins are the two orange and two yellow wires labeled in the figure.<br />
<br />
The Motor Control pin layout is listed below. These are defined in movement.c, and can be redefined easily to match a different pin configuration. These pins are connected to relays on the RC car, so the motors are either on or off. <br />
Motor Control BeagleBone Pin<br />
<br />
Right Forward 40 - P8 header (software sysfs GPIO 77)<br />
Right Reverse 44 - P8 header (software sysfs GPIO 73)<br />
Left Forward 42 - P8 header (software sysfs GPIO 75)<br />
Left Reverse 46 - P8 header (software sysfs GPIO 71)<br />
<br />
WiFi is achieved with Adafruit's [http://www.adafruit.com/products/814 USB WiFi Module]. The USB WiFi Module is connected to the only usb port on the BeagleBone.<br />
<br />
Figure 7 is the BeagleBone P9 Header layout and provides a good reference in knowing which pins in the header connect to pins on the BeagleBone. Figure 8 shows how the pins for the gps and compass are connected to the P9 header. Figure 9 shows where the Compass, GPS and WiFi module are mounted. We had to mount them outside of the box because placing them inside of the wooden box attenuated the signals excessively.<br />
<br />
The [https://www.sparkfun.com/products/11466 GPS] is connected to the BeagleBone over UART serial. The GPS pin layout is as follows:<br />
GPS BeagleBone Pin<br />
<br />
1 - TX 24 - P9 header<br />
2 - RX 26 - P9 header<br />
3 - GND 1 or 2 - P9 header<br />
4 - 3.3 V 3 or 4 - P9 header<br />
5 - NC<br />
6 - NC<br />
<br />
The [https://www.sparkfun.com/products/7915 compass] is connected to the BeagleBone via I2C. The Compass pin layout is as follows:<br />
Compass BeagleBone Pin<br />
<br />
1 - GND 1 or 2 - P9 Header<br />
2 - 3.3 V 3 or 4 - P9 Header<br />
3 - I2C SDA 20 - P9 Header<br />
4 - I2C SCL 19 - P9 Header<br />
<br />
=== Software ===<br />
<br />
All hardware interfacing is accomplished in C, using the standard interfaces for each protocol. Motor control is done via GPIO, the compass is I2C, and the GPS is UART. Compass interfacing is provided in a compass library ''Compass/compass.c'', GPS interfacing is provided in a GPS library ''GPSLibs/gps.c'', and the motor control is provided in ''movement.c''. Waypoint storage and helper functions are provided in a library in ''Waypoints/waypoint.c''.<br />
<br />
For stand-alone operation, ''movement.c'' is compiled with the necessary libraries as a stand-alone binary. <br />
<br />
For network operation, the Python scripts utilize compiled libraries in sharedLibs. Currently, due to the structure of how the sensors are interfaced in the movement library, all interfacing is accomplished through a library ''movementLib.so'', which provides wrapper functions to the GPS and Compass. In the future, this functionality should be better divided out into each individual sub-library. This interfacing between Python and C is done with Python [http://docs.python.org/2/library/ctypes.html CTypes]. The BeagleBone and base station communicate over Wi-Fi using TCP sockets via the Python [http://docs.python.org/2/library/socket.html Socket] and [http://docs.python.org/2/library/socketserver.html SocketServer] modules. All of these Python modules, ctypes, socket, and SocketServer, are standard in Python 2.7.<br />
<br />
== Work Breakdown ==<br />
<br />
A summary of the major development areas and the primary contributor(s) to each subsystem:<br />
<br />
* RC car hardware interfacing and mounting: ''Michael Junge''<br />
* Power subsystem development: ''Michael Junge''<br />
* Wireless communication hardware: ''Michael Junge'', ''Jesse Brannon''<br />
* GPS and Compass sensor interfacing: ''Jesse Brannon''<br />
* Movement and navigation software development: ''Jesse Brannon'', ''Ross Hansen''<br />
* Network communication software development: ''Ross Hansen''<br />
<br />
Tasks completed and in development by each team member:<br />
<br />
'''Michael Junge''' <br />
* Constructed hardware interfaces to compass sensor and drive base electronics<br />
* Investigated WiFi issues on Angstrom - determined that the Angstrom A5 image on BeagleBone A6 hardware is a known working configuration ''**still under invesgitation, won't be fully completed due to hardware/software issues between Angstrom and Beagle''<br />
* Soldered and interfaced battery subsystem to power BeagleBone<br />
<br />
'''Jesse Brannon'''<br />
* Decided and installed an Ubuntu image instead of Anstrom specifically for the WiFi functionally<br />
* Researched and purchased compass and GPS sensors<br />
* Wrote libraries to interface to compass and GPS sensor<br />
* Co-developed movement and navigation software<br />
<br />
'''Ross Hansen'''<br />
* Co-developed movement and navigation software<br />
* Developed software for network communication<br />
<br />
'''Tasks Remaining'''<br />
<br />
Although full rover functionality for movement and sensor data retrieval was completed, two additional features were currently in development at the end of the original timeframe of this project.<br />
<br />
1) Code to manage waypoints and drive the motors based off of waypoint inputs<br />
<br />
2) Improve GPS library to allow for update rate configuration<br />
<br />
These two features were not necessary for this project, but are useful for a sister project in development by the same team; so development will continue on these two tasks. The code in the BeagleRover repository will be updated with final versions of the code as it is completed.<br />
<br />
== Future Work ==<br />
<br />
This project has the possibility to branch into several interesting areas.<br />
* The BeagleBone platform has the processing power for various interesting sensory systems, such as computer vision. The RC car interface and networking platform allows for a variety of interesting applications of sensor systems, where driving decisions are made based off of sensor inputs or sensor data is relayed remotely back to a powerful processing node.<br />
<br />
* A GUI is being developed that could be used to send commands to control the rover. Work on it can be seen here: [[ECE497_Project_RoverGUI]]<br />
<br />
* This project is a two-dimensional navigation system for a ground-based rover, but could be extended for use on aerial vehicles. Additional requirements for this would include some sort of altimeter sensor interface, modification of control outputs to accommodate aerial control surfaces, and an addition of a third dimension to location and navigation code.<br />
<br />
== Conclusions ==<br />
<br />
BeagleRover is a functioning implementation of a rover intelligence platform for the BeagleBone. When mounted on an RC car, the BeagleBone can direct the car motors to move around and it can relay GPS and compass data across a Wi-Fi network.<br />
<br />
This project was highly interesting and enjoyable to work on. It incorporated a wide range of skills fundamental to embedded systems - hardware, sensor interfacing via multiple protocols, and both high and low-level software development. Although a complete project in its current status, even more exciting is the possibility for extension in the future; the basic system of network functionality, location and heading sensor data, and mobility provide an interesting platform for lots of different embedded work. Combined with the versatility of Linux running on the BeagleBone, this project provides an interesting application of the BeagleBone's potential and a flexible platform for future development.<br />
<br />
{{YoderFoot}}</div>Jessebrannonhttps://elinux.org/index.php?title=ECE497_Project_Rover&diff=192614ECE497 Project Rover2012-11-13T16:30:47Z<p>Jessebrannon: </p>
<hr />
<div>[[Category:ECE497 |Project]]<br />
{{YoderHead}}<br />
<br />
Team members: [[user:Hansenrl|Ross Hansen]], [[user:jessebrannon|Jesse Brannon]], [[User:jungeml|Michael Junge]] <br />
<br />
== Grading Template ==<br />
I'm using the following template to grade. Each slot is 10 points.<br />
0 = Missing, 5=OK, 10=Wow!<br />
<br />
<pre style="color:red"><br />
05 Executive Summary<br />
05 Installation Instructions (waiting details)<br />
00 User Instructions<br />
00 Highlights<br />
00 Theory of Operation (Looking forward to more details)<br />
00 Work Breakdown<br />
00 Future Work<br />
00 Conclusions<br />
00 Demo<br />
00 Late<br />
Comments: I'm looking forward to seeing this.<br />
<br />
Score: 10/100<br />
<br />
</pre><br />
<br />
== Executive Summary ==<br />
<br />
This project is a BeagleBone implementation of a ground-based rover platform. Through a BeagleBone mounted on an RC car, the car can be directed to turn to a specified compass heading or move forward. A user is able to control the car with predefined movement code or in real-time over WiFi. The BeagleBone can also send back helpful information to the user over Wifi, such as GPS location and compass heading. Although not complete, functionality to direct the rover along a path by defining waypoints is currently in development.<br />
<br />
This work provides highly useful code even for applications outside of this specific rover project - digital compass and GPS sensor interfacing, Python-based networking, and RC car motor control code is all written and easily extendable into other applications. Additionally, the work performed for this project in the area of RC car reverse engineering and BeagleBone USB Wi-Fi can serve as useful community knowledge for other projects.<br />
<br />
== Installation Instructions ==<br />
<br />
We bought an RC car from [http://www.toysrus.com/product/index.jsp?productId=12925248 Toys 'R Us] and modified it to become an intelligent platform by utilizing a BeagleBone. To successfully recreate our work, certain skills will be helpful: dremel-based hardware modification, soldering, experience with Beagle Bone or an equivalent embedded processor bases system, familiarity with the Python and C programming languages, and basic circuit knowledge such as power regulation from batteries.<br />
<br />
=== Modifying RC Truck/Car ===<br />
[[File:ECE497 Rover truck hardware.JPG|thumb|Figure 1 - Electronics housing]]<br />
[[File:ECE497 Rover circuitBoard.JPG|thumb|Figure 2 - Motor control PCB]]<br />
[[File:ECE497 Rover circuitBoard2.JPG|thumb|Figure 3 - Motor control pins]]<br />
<br />
As shown in Figure 1, we removed the aesthetic cover form the truck. We also cut out most of the plastic with a Dremel tool. We did this to expose the circuity below. Cutting out most of the plastic is necessary unless you are skilled enough to drill only a small hole to feed the wires through and can replace the circuit board back into place without viewing it. Figure 1 also shows, four screw slots. In order to obtain access to the circuity, you must remove the screws from their sockets. Now turn the truck so that it's undercarriage is facing up, remove the housing unit of the battery. The battery unit should be loose and thus be removed since you already removed the four place holder screws. Be careful though to not pullout or detach any wires from the their respected places as you are pulling out the circuit board. Figure 2 shows the circuit board removed from it's housing with the wires exposed. The red and black wires you see are respectively power and ground, the same for all electrical work. <br />
<br />
Figure 3 is focused on the specific connections that we soldered to the board. We choose the top left corner (where three of the connections are) because when we reverse engineered the board, this area is where the wireless signals are received and sent to the motor controllers. The fourth wire was supposed to be the pin on the right but as you can see by the picture, the circuit pad is burned off. We just followed the hard trace and soldered at the next available node. After testing, this improvised step seemed suitable for our needs. The same four pins are labeled on the circuit board as F,W,L,R. Originally, we thought these meant forward, backward, left and right. However the RC Truck is designed with tank steering so in order to go forward it theoretically should require two separate signals. We tested this theory and found out that it did in fact require two signals, thus the F,W,L,R labels are incorrect. The pins attach to relays on each motor, and correspond to "right forward", "right backward", "left forward", and "left backward", and are digital control signals. Therefore, in order to turn left you would drive the "right backward" and "left forward" pins high. Fortunately, motor conflicts are not destructive and exact pin mappings can be determined by experimentation - if you mistakenly drive the "right forward" and "right backward" pins high, for instance, the relay will click and the motors will not move, without any damage to the motors or electronics.<br />
<br />
If you want to reverse engineer this circuit board for yourself instead of just following this guide, you will need a separate 5V dc power supply as well as the 9V battery that was included, a 5V wall adapter with stripped wires will be suffient for the extra power supply. Then you should look for the wireless adapter board. Most RC electronics will have a separate wireless circuit board. Ours happened to be already physically attached to the motor controllers. Find the output signals from the wireless adapter and test which signals control which motors and direction of motors. To test this just attach the 5V to the pin on the circuit board while the truck battery is installed and switched on. Also you will need to find a ground wire to attach for common ground. We just soldered directly to the terminal on the installed battery for our ground.<br />
<br />
=== BeagleBone ===<br />
[[File:ECE497 Rover Power Circuit.jpg|thumb|Figure 4 - Power Circuit]]<br />
[[File:ECE497 Rover 5v regulator.JPG|thumb|Figure 5 - Regulator Circuit]]<br />
After several problems with the WiFi on the BeagleBone not working as expected, we decided to overwrite our Angstrom Beagle Image with Ubuntu. We followed the [http://elinux.org/BeagleBoardUbuntu BeagleBoardUbuntu] page on elinux.org. <br />
<br />
However, if you are a purist Beagle user and want to pursue the Angstrom route then I would suggest reading Dr. Yoder's [http://elinux.org/EBC_Exercise_02_Out-of-the-Box,_Bone Out of The Box, Bone]. ''Note: If you want WiFi to work properly, install the A5 image not the A6 image.''<br />
<br />
Whether you use the Angstrom image or Ubuntu is up to you. However, you will still need to wire the BeagleBone up so that it runs off of battery power. We bought a 7.4 Vdc 10400 mAh [http://www.all-battery.com/li-ion1865074v10400mahrechargeablebatterymodulewithpcb-31577.aspx battery]. Since the BeagleBone runs off of 5V with a possible peak current of 1.5 amps we needed a 5V regulator that can supply that power [http://www.ti.com/product/lm2576hv voltage regulator]. To be safe and avoid short-circuiting the BeagleBone, it is advisable to buy a [http://www.digikey.com/scripts/DkSearch/dksus.dll?WT.z_header=search_go&lang=en&keywords=CP3-1000-ND&x=0&y=0&cur=USD barrel connector] for proper power connection. This barrel connector replaces the need to solder wires to the hardware of the BeagleBone, thus allowing for us to safely supply power the way the BeagleBone was designed. As seen in Figure 4, the barrel connector, battery and voltage regulator with heat sink can be seen. Figure 5 is our Regulator circuit. It shows how to connect the regulator to the rest of the BeagleBone hardware.<br />
<br />
''Note: We specifically used a BeagleBone for it's smaller size and less cost due to less capabilities. However, you could use any board that has an Omap processor, such as the Beagle XM Board.''<br />
<br />
===WiFi Network===<br />
Connecting to WiFi is an important part of our project. We intended this project to receive data from a user on a mobile laptop. We decided to use WiFi to avoid following the RC truck around a field with the laptop in our hands. WiFi helps the user stay in the same place while the RC truck moves around the field. We ordered an [http://www.adafruit.com/products/814 Adafruit WiFi adapter] that Adafruit specifically sponsors for the BeagleBone. They also have an install tutorial. After several days of researching WiFi capabilities for the BeagleBone, we continually ran into many difficulties. One of the many difficulties is with 'opkg upgrade' that Adafruit says to run. DO NOT RUN 'opkg upgrade'. Depending on what software image you are running, you will receive an error that for some reason cannot be resolved. There are many reported cases on [http://forums.adafruit.com/viewforum.php?f=49&sid=1a1b1e0fba73bb5659a3446079a5f423 Adafruit's help forums]. There are also several more reported cases for the BeagleBone group on google groups. After researching and WiFi experimentation we discovered that the Adafruit WiFi adapter works well on the A6 version of the BeagleBone hardware while running A5 version of Angstrom. This is the only valid combination we could find. The A5 hardware shows and detects the adapter, but for some reason the adapter does not connect to a wireless router. When the same SD card is plugged into an A6 hardware, it connects fine without issue to a router. We also noticed that the A6 software image does not even recognize the BeagleBone following the same procedure as for the A5 software.<br />
<br />
Because of the difficulties, we decided to not use the Angstrom images supported by Beagle. We instead installed Ubuntu Operating system on our A6 hardware. With Ubuntu installed it was as easy as plug and play. All we did after installing Ubuntu was to physically plug in the adapter and it was recognized immediately. However, if you want to stay with Angstrom I would suggest following the directions in [http://elinux.org/ECE497_Beagle_Bone_WiFi ECE497 Beagle Bone WiFi].<br />
<br />
=== Software ===<br />
<br />
The code for the platform can be found on the [https://github.com/hansenrl/BeagleRover BeagleRover Github Page] and [git://github.com/hansenrl/BeagleRover.git Github Repository].<br />
<br />
A Makefile is provided, and the code can be compiled with the command "make" in the root directory of the project; this will build a main binary ''movement'' and shared libraries for movement control over WiFi. <br />
<br />
See the README for detailed instructions on installation and documentation of the code structure.<br />
<br />
== Required Parts List ==<br />
1 x [http://www.toysrus.com/product/index.jsp?productId=12925248 RC Truck]<br />
<br />
1 x [http://beagleboard.org/buy BeagleBoard] (could be Bone/XM/Board)<br />
<br />
1 x [http://www.all-battery.com/li-ion1865074v10400mahrechargeablebatterymodulewithpcb-31577.aspx Battery]<br />
<br />
1 x [http://www.ti.com/product/lm2576hv Voltage Regulator]<br />
<br />
1 x [http://www.digikey.com/scripts/DkSearch/dksus.dll?WT.z_header=search_go&lang=en&keywords=CP3-1000-ND&x=0&y=0&cur=USD Barrel Connector]<br />
<br />
1 x [http://www.adafruit.com/products/814 Adafruit WiFi adapter]<br />
<br />
1 x [https://www.sparkfun.com/products/11466 GPS]<br />
<br />
1 x [https://www.sparkfun.com/products/7915 Compass]<br />
<br />
1 x BreadBoard<br />
<br />
Various Wires<br />
<br />
Soldering Tools<br />
<br />
== User Instructions ==<br />
The rover is designed for two different operating modes.<br />
<br />
# Stand-alone control and navigation<br />
# Remote operation over Wi-Fi via Python<br />
<br />
The README file on the software [https://github.com/hansenrl/BeagleRover Github Page] includes details about running the software for each of these modes. For stand-alone operation, the compiled binary ''movement'' can be executed to run commands such as moving forward or turning to a specific heading. For remote operation, Python scripts are provided to setup a server/client interface to communicate with the BeagleBone. When communicating with the Bone over Wi-Fi, the Python script presents the user with options of what to send to the BeagleBone.<br />
<br />
Selection:<br />
1: FWD<br />
2: BCK<br />
3: TURN<br />
4: COMPASS QUERY<br />
5: GPS QUERY<br />
9: EXIT<br />
<br />
The user then inputs the selection number, and an option if necessary. For instance, the option for sending a "FWD" command is the duration in microseconds, while the option for a "TURN" command is the heading relative to magnetic north. FWD, TURN, COMPASS QUERY, and GPS QUERY are all implemented and functional, but BCK is currently unimplmented; the code is simple and implementation would be trivial, but for the end application of this software (emulating UAV movements) it was unnecessary.<br />
<br />
Upon sending the command, the BeagleBone will return feedback to the user over Wi-Fi. In the case of a movement command it will return that the command was executed successfully, and if a sensor was queried it will return the result. The Python script will then prompt the user for another command to send.<br />
<br />
== Highlights ==<br />
{{#ev:youtube|g_-srPShIiU}}<br />
<br />
In the video we demonstrate how to set up the wireless server/client communication and the functionality present over the network interface, including sensor queries and movement commands. Although these movements are accomplished over Wi-Fi, they can also be programmed for stand-alone operation. The jerky turning and vigorous stopping that the car displays in the video is due to the high traction of the tires on the track surface - reducing the traction on the tires would eliminate this.<br />
<br />
== Theory of Operation ==<br />
<br />
=== Hardware Interfaces ===<br />
[[File:ECE497 Rover gpio Pins.jpg|thumb|Figure 6 - GPIO Pin Connections]]<br />
[[File:Bone P9 pinout.jpg|thumb|Figure 7 - P9 Header Layout]]<br />
[[File:ECE497 Rover compass.jpg|thumb|Figure 8 - Compass and GPS Pin layout]]<br />
[[File:ECE497 Rover gpsCompass mount.jpg|thumb| Figure 9 - Compass, GPS, and WiFi mount]]<br />
<br />
The BeagleBone is connected to the RC car via 4 GPIO pins and a ground wire. The four GPIO pins control left forward, left reverse, right forward, and right reverse on the tank-style drive base. Tank-style means that each side is controlled independently, as opposed to a standard steering where the user controls whether the car as a whole is moving forward or reverse and turns are accomplished by rotating the front axle. Figure 6 shows how the GPIO pins on BeagleBone are connected to the motor control PCB. As seen in Figure 4 the motor control wires are white. The GPIO pins are the two orange and two yellow wires labeled in the figure.<br />
<br />
The Motor Control pin layout is listed below. These are defined in movement.c, and can be redefined easily to match a different pin configuration. These pins are connected to relays on the RC car, so the motors are either on or off. <br />
Motor Control BeagleBone Pin<br />
<br />
Right Forward 40 - P8 header (software sysfs GPIO 77)<br />
Right Reverse 44 - P8 header (software sysfs GPIO 73)<br />
Left Forward 42 - P8 header (software sysfs GPIO 75)<br />
Left Reverse 46 - P8 header (software sysfs GPIO 71)<br />
<br />
WiFi is achieved with Adafruit's [http://www.adafruit.com/products/814 USB WiFi Module]. The USB WiFi Module is connected to the only usb port on the BeagleBone.<br />
<br />
Figure 7 is the BeagleBone P9 Header layout and provides a good reference in knowing which pins in the header connect to pins on the BeagleBone. Figure 8 shows how the pins for the gps and compass are connected to the P9 header. Figure 9 shows where the Compass, GPS and WiFi module are mounted. We had to mount them outside of the box because placing them inside of the wooden box attenuated the signals excessively.<br />
<br />
The [https://www.sparkfun.com/products/11466 GPS] is connected to the BeagleBone over UART serial. The GPS pin layout is as follows:<br />
GPS BeagleBone Pin<br />
<br />
1 - TX 24 - P9 header<br />
2 - RX 26 - P9 header<br />
3 - GND 1 or 2 - P9 header<br />
4 - 3.3 V 3 or 4 - P9 header<br />
5 - NC<br />
6 - NC<br />
<br />
The [https://www.sparkfun.com/products/7915 compass] is connected to the BeagleBone via I2C. The Compass pin layout is as follows:<br />
Compass BeagleBone Pin<br />
<br />
1 - GND 1 or 2 - P9 Header<br />
2 - 3.3 V 3 or 4 - P9 Header<br />
3 - I2C SDA 20 - P9 Header<br />
4 - I2C SCL 19 - P9 Header<br />
<br />
=== Software ===<br />
<br />
All hardware interfacing is accomplished in C, using the standard interfaces for each protocol. Motor control is done via GPIO, the compass is I2C, and the GPS is UART. Compass interfacing is provided in a compass library ''Compass/compass.c'', GPS interfacing is provided in a GPS library ''GPSLibs/gps.c'', and the motor control is provided in ''movement.c''. Waypoint storage and helper functions are provided in a library in ''Waypoints/waypoint.c''.<br />
<br />
For stand-alone operation, ''movement.c'' is compiled with the necessary libraries as a stand-alone binary. <br />
<br />
For network operation, the Python scripts utilize compiled libraries in sharedLibs. Currently, due to the structure of how the sensors are interfaced in the movement library, all interfacing is accomplished through a library ''movementLib.so'', which provides wrapper functions to the GPS and Compass. In the future, this functionality should be better divided out into each individual sub-library. This interfacing between Python and C is done with Python [http://docs.python.org/2/library/ctypes.html CTypes]. The BeagleBone and base station communicate over Wi-Fi using TCP sockets via the Python [http://docs.python.org/2/library/socket.html Socket] and [http://docs.python.org/2/library/socketserver.html SocketServer] modules. All of these Python modules, ctypes, socket, and SocketServer, are standard in Python 2.7.<br />
<br />
== Work Breakdown ==<br />
<br />
A summary of the major development areas and the primary contributor(s) to each subsystem:<br />
<br />
* RC car hardware interfacing and mounting: ''Michael Junge''<br />
* Power subsystem development: ''Michael Junge''<br />
* Wireless communication hardware: ''Michael Junge'', ''Jesse Brannon''<br />
* GPS and Compass sensor interfacing: ''Jesse Brannon''<br />
* Movement and navigation software development: ''Jesse Brannon'', ''Ross Hansen''<br />
* Network communication software development: ''Ross Hansen''<br />
<br />
Tasks completed and in development by each team member:<br />
<br />
'''Michael Junge''' <br />
* Constructed hardware interfaces to compass sensor and drive base electronics<br />
* Investigated WiFi issues on Angstrom - determined that the Angstrom A5 image on BeagleBone A6 hardware is a known working configuration ''**still under invesgitation, won't be fully completed due to hardware/software issues between Angstrom and Beagle''<br />
* Soldered and interfaced battery subsystem to power BeagleBone<br />
<br />
'''Jesse Brannon'''<br />
* Decided and installed an Ubuntu image instead of Anstrom specifically for the WiFi functionally<br />
* Researched and purchased compass and GPS sensors<br />
* Wrote libraries to interface to compass and GPS sensor<br />
* Co-developed movement and navigation software<br />
<br />
'''Ross Hansen'''<br />
* Co-developed movement and navigation software<br />
* Developed software for network communication<br />
<br />
'''Tasks Remaining'''<br />
<br />
Although full rover functionality for movement and sensor data retrieval was completed, two additional features were currently in development at the end of the original timeframe of this project.<br />
<br />
1) Code to manage waypoints and drive the motors based off of waypoint inputs<br />
<br />
2) Improve GPS library to allow for update rate configuration<br />
<br />
These two features were not necessary for this project, but are useful for a sister project in development by the same team; so development will continue on these two tasks. The code in the BeagleRover repository will be updated with final versions of the code as it is completed.<br />
<br />
== Future Work ==<br />
<br />
This project has the possibility to branch into several interesting areas.<br />
* The BeagleBone platform has the processing power for various interesting sensory systems, such as computer vision. The RC car interface and networking platform allows for a variety of interesting applications of sensor systems, where driving decisions are made based off of sensor inputs or sensor data is relayed remotely back to a powerful processing node.<br />
<br />
* A GUI is being developed that could be used to send commands to control the rover. Work on it can be seen here: [[ECE497_Project_RoverGUI]]<br />
<br />
* This project is a two-dimensional navigation system for a ground-based rover, but could be extended for use on aerial vehicles. Additional requirements for this would include some sort of altimeter sensor interface, modification of control outputs to accommodate aerial control surfaces, and an addition of a third dimension to location and navigation code.<br />
<br />
== Conclusions ==<br />
<br />
BeagleRover is a functioning implementation of a rover intelligence platform for the BeagleBone. When mounted on an RC car, the BeagleBone can direct the car motors to move around and it can relay GPS and compass data across a Wi-Fi network.<br />
<br />
This project was highly interesting and enjoyable to work on. It incorporated a wide range of skills fundamental to embedded systems - hardware, sensor interfacing via multiple protocols, and both high and low-level software development. Although a complete project in its current status, even more exciting is the possibility for extension in the future; the basic system of network functionality, location and heading sensor data, and mobility provide an interesting platform for lots of different embedded work. Combined with the versatility of Linux running on the BeagleBone, this project provides an interesting application of the BeagleBone's potential and a flexible platform for future development.<br />
<br />
{{YoderFoot}}</div>Jessebrannonhttps://elinux.org/index.php?title=ECE497_Project_Rover&diff=180938ECE497 Project Rover2012-10-15T00:21:01Z<p>Jessebrannon: </p>
<hr />
<div>[[Category:ECE497 |Project]]<br />
{{YoderHead}}<br />
<br />
Team members: [[user:Hansenrl|Ross Hansen]], [[user:jessebrannon|Jesse Brannon]], (List all the team members here with link to their eLinux User page. Use my format.<br />
<br />
== Executive Summary ==<br />
<br />
Give two sentence intro to the project.<br />
<br />
Give two sentences telling what works.<br />
<br />
Give two sentences telling what isn't working.<br />
<br />
End with a two sentence conclusion.<br />
<br />
The sentence count is approximate and only to give an idea of the expected length.<br />
<br />
== Installation Instructions ==<br />
<br />
Give step by step instructions on how to install your project on the SPEd2 image. <br />
<br />
* Include your [https://github.com/ github] path as a link like this: [https://github.com/MarkAYoder/gitLearn https://github.com/MarkAYoder/gitLearn]. <br />
* Include any additional packages installed via '''opkg'''.<br />
* Include kernel mods.<br />
* If there is extra hardware needed, include links to where it can be obtained.<br />
<br />
== User Instructions ==<br />
<br />
Once everything is installed, how do you use the program? Give details here, so if you have a long user manual, link to it here.<br />
<br />
== Highlights ==<br />
<br />
Here is where you brag about what your project can do.<br />
<br />
Include a [http://www.youtube.com/ YouTube] demo.<br />
<br />
== Theory of Operation ==<br />
<br />
Give a high level overview of the structure of your software. Are you using GStreamer? Show a diagram of the pipeline. Are you running multiple tasks? Show what they do and how they interact.<br />
<br />
== Work Breakdown ==<br />
<br />
List the major tasks in your project and who did what.<br />
<br />
Also list here what doesn't work yet and when you think it will be finished and who is finishing it.<br />
<br />
== Future Work ==<br />
<br />
Suggest addition things that could be done with this project.<br />
<br />
== Conclusions ==<br />
<br />
Give some concluding thoughts about the project. Suggest some future additions that could make it even more interesting.<br />
<br />
{{YoderFoot}}</div>Jessebrannonhttps://elinux.org/index.php?title=Sparkfun:_BMP085_Barometric_Pressure_Sensor&diff=174620Sparkfun: BMP085 Barometric Pressure Sensor2012-09-27T15:51:48Z<p>Jessebrannon: </p>
<hr />
<div>== '''Introduction''' ==<br />
<br />
<br />
The [https://www.sparkfun.com/products/9694 BMP085 Barometric Pressure Sensor] is a sensor that can measure the atmospheric pressure as well as the temperature at its location. It communicates with host devices via I2C.<br />
<br />
<br />
== '''Connecting the Hardware''' ==<br />
<br />
To connect the BMP085 to a BeagleBone, first supply the Vdd and GND from the Beagle to the BMP085 Breakout Board. Then connect SDA and SCLK from the BMP085 to one of the I2C bus pins on the Beagle. The XCLR and EOC pins do not have to be connected to the BMP085.<br />
<br />
<br />
== '''Reading the Pressure and Temperature''' ==<br />
<br />
My BMP085 showed up at I2C address 0x77. To initilialize that sensor, type the following in your terminal:<br />
<br />
<code>echo bmp085 0x77 > /sys/class/i2c-adapter/i2c-3/new_device</code><br />
<br />
If this was successful, enter:<br />
<br />
<code>dmesg | grep bmp</code><br />
<br />
You should see:<br />
<br />
[10420.903490] i2c i2c-3: new_device: Instantiated device bmp085 at 0x77<br />
[10420.927608] bmp085 3-0077: BMP085 ver. 2.0 found.<br />
[10420.927659] bmp085 3-0077: Successfully initialized bmp085!<br />
<br />
Congratulations! You're sensor is connected and ready to read the temperature and pressure at its location.<br />
<br />
To read the temperature (in degrees C), type:<br />
<br />
<code>echo scale=1 \; $(cat /sys/bus/i2c/drivers/bmp085/3-0077/temp0_input) / 10 | bc</code><br />
<br />
To read the pressure (in millibars), type:<br />
<br />
echo scale=2 \; $(cat /sys/bus/i2c/drivers/bmp085/3-0077/pressure0_input) / 100 | bc<br />
<br />
[[Category:ECE497]][[Category:SparkFun]]</div>Jessebrannonhttps://elinux.org/index.php?title=Sparkfun:_BMP085_Barometric_Pressure_Sensor&diff=174566Sparkfun: BMP085 Barometric Pressure Sensor2012-09-27T15:48:41Z<p>Jessebrannon: </p>
<hr />
<div>== '''Introduction''' ==<br />
<br />
<br />
The [https://www.sparkfun.com/products/9694 BMP085 Barometric Pressure Sensor] is a sensor that can measure the atmospheric pressure as well as the temperature at its location. It communicates with host devices via I2C.<br />
<br />
<br />
== '''Connecting the Hardware''' ==<br />
<br />
To connect the BMP085 to a BeagleBone, first supply the Vdd and GND from the Beagle to the BMP085 Breakout Board. Then connect SDA and SCLK from the BMP085 to one of the I2C bus pins on the Beagle. The XCLR and EOC pins do not have to be connected to the BMP085.<br />
<br />
<br />
== '''Reading the Pressure and Temperature''' ==<br />
<br />
My BMP085 showed up at I2C address 0x77. To initilialize that sensor, type the following in your terminal:<br />
<br />
<code>echo bmp085 0x77 > /sys/class/i2c-adapter/i2c-3/new_device</code><br />
<br />
If this was successful, enter:<br />
<br />
<code>dmesg | grep bmp</code><br />
<br />
You should see:<br />
<br />
[10420.903490] i2c i2c-3: new_device: Instantiated device bmp085 at 0x77<br />
[10420.927608] bmp085 3-0077: BMP085 ver. 2.0 found.<br />
[10420.927659] bmp085 3-0077: Successfully initialized bmp085!<br />
<br />
Congratulations! You're sensor is connected and ready to read the temperature and pressure at its location.<br />
<br />
To read the temperature (in degrees C), type:<br />
<br />
<code>echo scale=1 \; $(cat /sys/bus/i2c/drivers/bmp085/3-0077/temp0_input) / 10 | bc</code><br />
<br />
To read the pressure (in millibars), type:<br />
<br />
echo scale=2 \; $(cat /sys/bus/i2c/drivers/bmp085/3-0077/pressure0_input) / 100 | bc<br />
<br />
[[Category:ECE497]][[Category:Sparkfun]]</div>Jessebrannonhttps://elinux.org/index.php?title=Sparkfun:_BMP085_Barometric_Pressure_Sensor&diff=172958Sparkfun: BMP085 Barometric Pressure Sensor2012-09-24T06:13:43Z<p>Jessebrannon: </p>
<hr />
<div>== '''Introduction''' ==<br />
<br />
<br />
The [https://www.sparkfun.com/products/9694 BMP085 Barometric Pressure Sensor] is a sensor that can measure the atmospheric pressure as well as the temperature at its location. It communicates with host devices via I2C.<br />
<br />
<br />
== '''Connecting the Hardware''' ==<br />
<br />
To connect the BMP085 to a BeagleBone, first supply the Vdd and GND from the Beagle to the BMP085 Breakout Board. Then connect SDA and SCLK from the BMP085 to one of the I2C bus pins on the Beagle. The XCLR and EOC pins do not have to be connected to the BMP085.<br />
<br />
<br />
== '''Reading the Pressure and Temperature''' ==<br />
<br />
My BMP085 showed up at I2C address 0x77. To initilialize that sensor, type the following in your terminal:<br />
<br />
<code>echo bmp085 0x77 > /sys/class/i2c-adapter/i2c-3/new_device</code><br />
<br />
If this was successful, enter:<br />
<br />
<code>dmesg | grep bmp</code><br />
<br />
You should see:<br />
<br />
[10420.903490] i2c i2c-3: new_device: Instantiated device bmp085 at 0x77<br />
[10420.927608] bmp085 3-0077: BMP085 ver. 2.0 found.<br />
[10420.927659] bmp085 3-0077: Successfully initialized bmp085!<br />
<br />
Congratulations! You're sensor is connected and ready to read the temperature and pressure at its location.<br />
<br />
To read the temperature (in degrees C), type:<br />
<br />
<code>echo scale=1 \; $(cat /sys/bus/i2c/drivers/bmp085/3-0077/temp0_input) / 10 | bc</code><br />
<br />
To read the pressure (in millibars), type:<br />
<br />
echo scale=2 \; $(cat /sys/bus/i2c/drivers/bmp085/3-0077/pressure0_input) / 100 | bc<br />
<br />
[[Category:ECE497]]</div>Jessebrannonhttps://elinux.org/index.php?title=Sparkfun:_BMP085_Barometric_Pressure_Sensor&diff=172952Sparkfun: BMP085 Barometric Pressure Sensor2012-09-24T06:13:20Z<p>Jessebrannon: </p>
<hr />
<div>== '''Introduction''' ==<br />
<br />
<br />
The [https://www.sparkfun.com/products/9694 BMP085 Barometric Pressure Sensor] is a sensor that can measure the atmospheric pressure as well as the temperature at its location. It communicates with host devices via I2C.<br />
<br />
<br />
== '''Connecting the Hardware''' ==<br />
<br />
To connect the BMP085 to a BeagleBone, first supply the Vdd and GND from the Beagle to the BMP085 Breakout Board. Then connect SDA and SCLK from the BMP085 to one of the I2C bus pins on the Beagle. The XCLR and EOC pins do not have to be connected to the BMP085.<br />
<br />
<br />
== '''Reading the Pressure and Temperature''' ==<br />
<br />
My BMP085 showed up at I2C address 0x77. To initilialize that sensor, type the following in your terminal:<br />
<br />
<code>echo bmp085 0x77 > /sys/class/i2c-adapter/i2c-3/new_device</code><br />
<br />
If this was successful, enter:<br />
<br />
<code>dmesg | grep bmp</code><br />
<br />
You should see:<br />
<br />
[10420.903490] i2c i2c-3: new_device: Instantiated device bmp085 at 0x77<br />
[10420.927608] bmp085 3-0077: BMP085 ver. 2.0 found.<br />
[10420.927659] bmp085 3-0077: Successfully initialized bmp085!<br />
<br />
Congratulations! You're sensor is connected and ready to read the temperature and pressure at its location.<br />
<br />
To read the temperature (in degrees C), type:<br />
<br />
<code>echo scale=1 \; $(cat /sys/bus/i2c/drivers/bmp085/3-0077/temp0_input) / 10 | bc</code><br />
<br />
To read the pressure (in millibars), type:<br />
<br />
echo scale=2 \; $(cat /sys/bus/i2c/drivers/bmp085/3-0077/pressure0_input) / 100 | bc<br />
<br />
[Category:ECE497]</div>Jessebrannonhttps://elinux.org/index.php?title=Sparkfun:_BMP085_Barometric_Pressure_Sensor&diff=172946Sparkfun: BMP085 Barometric Pressure Sensor2012-09-24T06:12:06Z<p>Jessebrannon: </p>
<hr />
<div>== '''Introduction''' ==<br />
<br />
<br />
The [https://www.sparkfun.com/products/9694 BMP085 Barometric Pressure Sensor] is a sensor that can measure the atmospheric pressure as well as the temperature at its location. It communicates with host devices via I2C.<br />
<br />
<br />
== '''Connecting the Hardware''' ==<br />
<br />
To connect the BMP085 to a BeagleBone, first supply the Vdd and GND from the Beagle to the BMP085 Breakout Board. Then connect SDA and SCLK from the BMP085 to one of the I2C bus pins on the Beagle. The XCLR and EOC pins do not have to be connected to the BMP085.<br />
<br />
<br />
== '''Reading the Pressure and Temperature''' ==<br />
<br />
My BMP085 showed up at I2C address 0x77. To initilialize that sensor, type the following in your terminal:<br />
<br />
<code>echo bmp085 0x77 > /sys/class/i2c-adapter/i2c-3/new_device</code><br />
<br />
If this was successful, enter:<br />
<br />
<code>dmesg | grep bmp</code><br />
<br />
You should see:<br />
<br />
[10420.903490] i2c i2c-3: new_device: Instantiated device bmp085 at 0x77<br />
[10420.927608] bmp085 3-0077: BMP085 ver. 2.0 found.<br />
[10420.927659] bmp085 3-0077: Successfully initialized bmp085!<br />
<br />
Congratulations! You're sensor is connected and ready to read the temperature and pressure at its location.<br />
<br />
To read the temperature (in degrees C), type:<br />
<br />
<code>echo scale=1 \; $(cat /sys/bus/i2c/drivers/bmp085/3-0077/temp0_input) / 10 | bc</code><br />
<br />
To read the pressure (in millibars), type:<br />
<br />
echo scale=2 \; $(cat /sys/bus/i2c/drivers/bmp085/3-0077/pressure0_input) / 100 | bc</div>Jessebrannonhttps://elinux.org/index.php?title=Sparkfun:_BMP085_Barometric_Pressure_Sensor&diff=172880Sparkfun: BMP085 Barometric Pressure Sensor2012-09-24T05:55:40Z<p>Jessebrannon: Created page with "== '''Introduction''' == The [https://www.sparkfun.com/products/9694 BMP085 Barometric Pressure Sensor] is a sensor that can measure the atmospheric pressure as well as the tem..."</p>
<hr />
<div>== '''Introduction''' ==<br />
<br />
<br />
The [https://www.sparkfun.com/products/9694 BMP085 Barometric Pressure Sensor] is a sensor that can measure the atmospheric pressure as well as the temperature at its location. It communicates with host devices via I2C.<br />
<br />
<br />
== '''Connecting the Hardware''' ==<br />
<br />
To connect the BMP085 to a BeagleBone, first supply the Vdd and GND from the Beagle to the BMP085 Breakout Board. Then connect SDA and SCLK from the BMP085 to one of the I2C bus pins on the Beagle. The XCLR and EOC pins do not have to be connected to the BMP085.<br />
<br />
<br />
== '''Reading the Pressure and Temperature''' ==<br />
<br />
My BMP085 showed up at I2C address 0x77. To initilialize that sensor, type the following in your terminal:<br />
<br />
echo bmp085 0x77 > /sys/class/i2c-adapter/i2c-3/new_device</div>Jessebrannonhttps://elinux.org/index.php?title=EBC_Contributions_and_Project_Status&diff=171446EBC Contributions and Project Status2012-09-21T02:30:18Z<p>Jessebrannon: /* Project Status */</p>
<hr />
<div>[[Category:ECE497 |Contributions]]<br />
{{YoderHead}}<br />
<br />
== Fall 2012 ==<br />
<br />
=== Project Status ===<br />
<br />
Please edit this page and add your project to this list. Copy my [[ECE497 Project Template]] to your own eLinux page and include the title of your project in the name of the page. <br />
<br />
Please make the list alphabetical by family name.<br />
<br />
Take a look at what you and others have contributed.<br />
<br />
{|<br />
|- <br />
! Name<br />
! Contributions<br />
! Project<br />
! git repository<br />
|-<br />
| [[User:atniptw | Tom Atnip]]<br />
| <br />
| [[ECE497 Project Template | My Beagle Project]]<br />
| [https://github.com/atniptw/ atniptw]<br />
|-<br />
| [[User:larmorgs | Greg Larmore]]<br />
| <br />
| [[ECE497 Project Template | My Beagle Project]]<br />
| [https://github.com/larmorgs/ larmorgs]<br />
|-<br />
| [[User:jessebrannon | Jesse Brannon]]<br />
| <br />
| [[ECE497 Project Template | My Beagle Project]]<br />
| [https://github.com/brannojs/ brannojs]<br />
|-<br />
| [[User:Xinyu1991 | Xinyu Cheng]]<br />
| <br />
| [[ECE497 Project Template | My Beagle Project]]<br />
| [https://github.com/xinyu1991]<br />
|-<br />
| [[User:correlbn | Bryan Correll]]<br />
| [[Special:Contributions/correlbn|contrib]]<br />
| [[ECE497 Correlbn Project | My Beagle Project]]<br />
| [https://github.com/correlbn/My-Beagle-Project/ Correlbn]<br />
|-<br />
| [[User:draneaw | Alex Drane]]<br />
| <br />
| [[ECE497 draneaw Project | My Beagle Project]]<br />
| [https://github.com/draneaw/My-Beagle-Project draneaw]<br />
|-<br />
| [[User:duganje | Josh Dugan]]<br />
| <br />
| [[ECE497 duganje Project | My Beagle Project]]<br />
| [https://github.com/duganje/ duganje]<br />
|-<br />
| [[User:Geislekj | Kevin Geisler]]<br />
| <br />
| [[ECE497 Project Template | My Beagle Project]]<br />
| [https://github.com/geislekj/ geislekj]<br />
| <br />
|-<br />
| [[User:chris.good | Christopher A Good]]<br />
| <br />
| [[ECE497 Project Template | My Beagle Project]]<br />
| [https://github.com/goodca/ goodca]<br />
| <br />
|-<br />
| [[User:hansenrl | Ross Hansen]]<br />
| [[Special:Contributions/hansenrl|contrib]]<br />
| [[ECE497 hansenrl Project | My Beagle Project]]<br />
| [https://github.com/hansenrl/ Hansenrl]<br />
| <br />
|-<br />
| [[User:jungeml | Michael Junge]]<br />
| [[Special:Contributions/jungeml|contrib]]<br />
| [[ECE497 jungeml Project | My Beagle Project]]<br />
| [https://github.com/jungeml/ Jungeml]<br />
|-<br />
|<br />
|-<br />
| [[User:Lix | Xia Li]]<br />
| [[Special:Contributions/Lix|contrib]]<br />
| [[ECE497 Lix Project | My Beagle Project]]<br />
| [https://github.com/1984xiali/ xiali]<br />
|-<br />
| [[User:mmoravec | Matthew Moravec]]<br />
| <br />
| [[ECE497 mmoravec Project | My Beagle Project]]<br />
|<br />
|-<br />
| [[User:ngop | Peter Ngo]]<br />
| <br />
| [[ECE497 ngop Project | My Beagle Project]]<br />
| [https://github.com/ngop/ ngop]<br />
|<br />
|-<br />
| [[User:shinnsm|Stephen Shinn]]<br />
| [[Special:Contributions/shinnsm|contrib]]<br />
| Project TBD<br />
| [https://github.com/shinnsm shinnsm]<br />
|-<br />
| [[User:Yoder | Mark A. Yoder]]<br />
| [[Special:Contributions/Yoder | contrib]]<br />
| [[ECE497 Project Template | My Beagle Project]]<br />
| [https://github.com/MarkAYoder MarkAYoder]<br />
|-<br />
| [[User:Popenhjc | James Popenhagen]]<br />
| <br />
| [[ECE497 popenhjc Project | My Beagle Project]]<br />
| [https://github.com/popenhjc/ popenhjc]<br />
|-<br />
| [[User:Whiteer | Elias White]]<br />
| <br />
| [[ECE497 whiteer Project | My Beagle Project]]<br />
| [https://github.com/whiteer whiteer]<br />
|-<br />
| [[User:ruff | Ruffin White]]<br />
| <br />
| [[ECE497 Project Template | My Beagle Project]]<br />
| [https://github.com/ruffsl/ ruffsl]<br />
|<br />
|-<br />
| [[User:Richarsm | Sean Richardson]]<br />
| <br />
| [[ECE497 richarsm Project | My Beagle Project]]<br />
| [https://github.com/seanrich Sean Richardson]<br />
|-<br />
| [[User:Millerap | Andrew Miller]]<br />
|<br />
| [[ECE 497 millerap Project | My Beagle Project]]<br />
| [https://github.com/millerap millerap]<br />
|-| <br />
| [[User:Astroricks | Yue Zhang]]<br />
| <br />
| [[ECE497 Yue Zhang Project | My Beagle Project]]<br />
| [https://github.com/Astroricks/Beagle-Project Yue Zhang]<br />
|-<br />
| [[User:Lobdeljt | John Lobdell]]<br />
| <br />
| [[ECE 497 lobdeljt Project | My Beagle Project]]<br />
| [https://github.com/jtlobdell jtlobdell]<br />
|-<br />
|<br />
|}<br />
<br />
== Winter 2011-2012 ==<br />
<br />
=== Contributions ===<br />
<br />
# [[Special:Contributions/Yuming | Yuming Cao]]<br />
# [[Special:Contributions/Yifei | Yifei Li]]<br />
# [[Special:Contributions/Harrisgw | Greg Harrison]]<br />
# [[Special:Contributions/mac | Jack Ma]]<br />
# [[Special:Contributions/Gemini91 | Guanqun Wang]]<br />
# [[Special:Contributions/Yanj | Mona Yan]]<br />
# [[Special:Contributions/Yoder | Mark A. Yoder]]<br />
# [[Special:Contributions/Yuhasmj | Michael Yuhas]]<br />
# [[Special:Contributions/Ziyi Zhang | Ziyi Zhang]]<br />
# [[Special:Contributions/Zitnikdj | David Zitnik]]<br />
# [[Special:Contributions/Zitnikdj | Alex Drane]]<br />
# [[Special:Contributions/jessebrannon | Jesse Brannon]]<br />
# [[Special:Contributions/larmorgs | Greg Larmore]]<br />
# [[Special:Contributions/jungeml | Michael Junge]]<br />
# [[Special:Contributions/millerap | Andrew Miller]]<br />
# [[Special:Contributions/correlbn | Bryan Correll]]<br />
<br />
=== Project Status ===<br />
<br />
# [[User:Yoder | Mark A. Yoder]], [[ECE497 Project Template | My Beagle Project]]<br />
# [[user:Yanj|Mona Yan]] and [[user:Harrisgw| Greg Harrison]], [[PS EYE QT PROJECT | Playstation Eye Audio with Qt]]<br />
# [[user:Caogecym | Yuming Cao]] and [[user:Ziyi Zhang | Ziyi Zhang]], [[Node.js Weather Station]]<br />
# [[user:Yifei| Yifei Li]] and [[user:Gemini91| Guanqun Wang]], [[ Kinect Project | Play games using Kinect on Beagleboard]]<br />
# [[user:Yuhasmj| Michael J. Yuhas]] and [[user:mac | Jack Ma]], [[ Multiple Partitions via U-boot | Multiple Partitions via U-boot ]]<br />
# [[user:Zitnikdj| David Zitnik]], [[ ECE497 Project: Twitter Java Application | Twitter Java Application ]]<br />
<br />
<br />
{{YoderFoot}}</div>Jessebrannonhttps://elinux.org/index.php?title=EBC_Mini_Project_02&diff=169448EBC Mini Project 022012-09-13T16:35:08Z<p>Jessebrannon: /* Sparkfun */</p>
<hr />
<div>[[Category:ECE497 |Mini02]]<br />
{{YoderHead}}<br />
<br />
Pick one of the senors from the [https://www.sparkfun.com/products/11016 SparkFun Sensor Kit] or from [http://adafruit.com Adafruit] and interface it to the Bone. Create a wiki page describing how to use the sensor.<br />
<br />
Add your name next to the sensor/display you want to use and pick it up from me.<br />
<br />
== Sparkfun ==<br />
<br />
{|<br />
! Name<br />
! Sensor<br />
! Description<br />
|-<br />
| <br />
| HMC5883L - Triple-Axis Magnetometer Breakout Board<br />
| An accurate, simple-to-use digital magnetometer with an I2C interface.<br />
|-<br />
| Ross Hansen<br />
| ADXL335 - Triple-Axis Accelerometer Breakout Board<br />
| Senses acceleration along all three axes, with a range of up to ±3g. Fully analog interface.<br />
ITG-3200<br />
|-<br />
| <br />
| Triple-Axis Gyro Breakout Board<br />
| Senses angular velocity along three axes of rotation. Fully digital interface with a range of up to ±2000°/s.<br />
|-<br />
| <br />
| Large Piezo Vibration Sensor - With Mass<br />
| A flexible film able to sense for vibration, touch, shock, etc. When the film moves back and forth an AC wave is created, with a voltage of up to ±90.<br />
|-<br />
| Mark A. Yoder<br />
| Reed Switch<br />
| Senses magnetic fields, makes for a great non-contact switch.<br />
|-<br />
| Mark A. Yoder<br />
| 0.25" Magnet Square<br />
| Plays nicely with the reed switch. Embed the magnet into stuffed animals or inside a box to create a hidden actuator to the reed switch.<br />
|-<br />
| <br />
| 0.5" Force Sensitive Resistor<br />
| A force sensing resistor with a 0.5" diameter sensing area. Great for sensing pressure (i.e. if it's being squeezed).<br />
|-<br />
| <br />
| PIR Motion Sensor<br />
| Easy-to-use motion detector with an analog interface. Power it with 5-12VDC, and you'll be alerted of any movement.<br />
|-<br />
| <br />
| Ultrasonic Rangefinder - Maxbotix LV-EZ1<br />
| Distance sensor with both analog and RS-232 interfaces, providing sonar range information from 6 to 254 inches.<br />
|-<br />
| <br />
| HIH-4030 Humidity Sensor<br />
| A high precision humidity sensor with an analog output.<br />
|-<br />
| Andrew Miller<br />
| IR Receiver Breakout Board<br />
| An analog interfaced IR receiver, sensitive to a wide range of IR waves. Great for 'listening' to TV remotes.<br />
|-<br />
| <br />
| Mini Photocell<br />
| The photocell will vary its resistance based on how much light it's exposed to. Will vary from 1kΩ in the light to 10kΩ in the dark.<br />
|-<br />
| <br />
| Optical Detector/Phototransistor<br />
| An all-in-one infrared emitter and detector. Ideal for sensing black-to-white transitions or can be used to detect nearby objects.<br />
|-<br />
| Jesse Brannon<br />
| BMP085 Barometric Pressure Sensor<br />
| Low power, high precision barometric pressure sensor with I2C output.<br />
|-<br />
| <br />
| Flex Sensor<br />
| As the sensor is flexed, the resistance across the sensor increases. Useful for sensing motion or positioning<br />
|-<br />
| <br />
| SoftPot<br />
| These are very thin variable potentiometers. By pressing on various positions along the strip, you vary the resistance<br />
|}<br />
<br />
== Adafruit ==<br />
<br />
{|<br />
! Name<br />
! Device<br />
! Description<br />
|-<br />
| Matthew Moravec<br />
| [https://www.adafruit.com/products/512 Analog 2-axis Thumb Joystick]<br />
| Analog 2-axis Thumb Joystick with Select Button + Breakout Board<br />
|-<br />
| <br />
| [https://www.adafruit.com/products/377 Rotary Encoder]<br />
| This rotary encoder is a high quality 24-pulse encoder, with detents and a nice feel. This encoder also has a push-button built into it so you can press onto the knob to close a separate switch. One side has a 3 pin connector (ground and two coding pins) and the other side has two pins for a normally-open switch.<br />
|-<br />
| <br />
| [https://www.adafruit.com/products/333 Touch screen (Nintendo DSL digitizer)]<br />
| This resistive touch screen can be used with a stylus or fingertip and is easy to use with a microcontroller. <br />
600 ohms across X pins, 300 ohms across Y pins<br />
4 wire resistive display, on a 0.5mm FPC connector<br />
|-<br />
| <br />
| [https://www.adafruit.com/products/871 Mini 8x8 LED Matrix w/I2C - Yellow]<br />
|<br />
|-<br />
|Mike Junge<br />
|[https://www.adafruit.com/products/959 Mini 8x8 LED Matrix w/I2C - Blue]<br />
|<br />
|-<br />
|<br />
|[https://www.adafruit.com/products/870 Mini 8x8 LED Matrix w/I2C - Red]<br />
|<br />
|-<br />
|Alex Drane<br />
|[https://www.adafruit.com/products/902 Bicolor LED Square Pixel Matrix]<br />
| The matrices use a driver chip that does all the heavy lifting for you: They have a built in clock so they multiplex the display. They use constant-current drivers for ultra-bright, consistent color, 1/16 step display dimming, all via a simple I2C interface.<br />
|-<br />
| <br />
| [https://www.adafruit.com/products/812 Green 7-segment clock display]<br />
| These displays are multiplexed, common-cathode. What that means it that you can use a 74HC595. Sorry, I didn't order the version with i2c.<br />
|-<br />
| <br />
| [https://www.adafruit.com/products/306 Digital Addressable RGB LED]<br />
| These LED strips are fun and glowy. There are 32 RGB LEDs per meter, and you can control each LED individually! We have 5 meters worth!<br />
|-<br />
| <br />
|-<br />
|Xia Li<br />
| [https://www.adafruit.com/products/555 16x24 Red LED Matrix Panel]<br />
| These LED panels take care of all the work of making a big matrix display. Each panel has six 8x8 red matrix modules, for a 16x24 matrix. The panel has a HT1632C chip on the back with does all the multiplexing work for you and has a 3-pin SPI-like serial interface to talk to it and set LEDs on or off (you cannot set the LED to be individually dimmed, as in 'grayscale'). There's a few extras as well, such as being able to change the brightness of the entire display, or blink the entire display at 1 Hz.<br />
|}<br />
<br />
{{YoderFoot}}</div>Jessebrannonhttps://elinux.org/index.php?title=ECE497_Contributions_and_Project_Status_here&diff=169298ECE497 Contributions and Project Status here2012-09-13T10:55:51Z<p>Jessebrannon: added my repo</p>
<hr />
<div>{|<br />
|- <br />
! Name<br />
! git repository<br />
|-<br />
| [[User:hansenrl | Ross Hansen]]<br />
| [https://github.com/hansenrl/ece497.git MiniProject01]<br />
|-<br />
| [[User:atniptw | Tom Atnip]]<br />
| [https://github.com/atniptw/ECE497 ECE497_Repo]<br />
|-<br />
| [[User:larmorgs | Greg Larmore]]<br />
| [https://github.com/larmorgs/ece497 ECE497_Repo]<br />
|-<br />
| [[User:jessebrannon | Jesse Brannon]]<br />
| [https://github.com/brannojs/ece497 ECE497_Repo]<br />
|-<br />
|| [[User:duganje | Josh Dugan]]<br />
| [https://github.com/duganje/ECE497_duganje ECE497_duganje]<br />
|-<br />
| [[User:popenhjc | James Popenhagen]]<br />
|[https://github.com/popenhjc/popenhjc_ECE497 MiniProject01]<br />
|-<br />
| [[User:jungeml | Mike Junge]]<br />
| [https://github.com/jungeml MiniProject01]<br />
|-<br />
| [[User:shinnsm|Stephen Shinn]]<br />
| [https://github.com/shinnsm/ECE497 ECE497 Repo]<br />
|}</div>Jessebrannonhttps://elinux.org/index.php?title=EBC_Contributions_and_Project_Status&diff=165650EBC Contributions and Project Status2012-08-31T04:41:56Z<p>Jessebrannon: /* Project Status */</p>
<hr />
<div>[[Category:ECE497 |Contributions]]<br />
{{YoderHead}}<br />
<br />
== Fall 2012 ==<br />
<br />
=== Project Status ===<br />
<br />
Please edit this page and add your project to this list. Copy my [[ECE497 Project Template]] to your own eLinux page and include the title of your project in the name of the page. <br />
<br />
Please make the list alphabetical by family name.<br />
<br />
Take a look at what you and others have contributed.<br />
<br />
{|<br />
|- <br />
! Name<br />
! Contributions<br />
! Project<br />
! git repository<br />
|-<br />
| [[User:atniptw | Tom Atnip]]<br />
| <br />
| [[ECE497 Project Template | My Beagle Project]]<br />
| <br />
|-<br />
| [[User:larmorgs | Greg Larmore]]<br />
| <br />
| [[ECE497 Project Template | My Beagle Project]]<br />
| <br />
|-<br />
| [[User:jessebrannon | Jesse Brannon]]<br />
| <br />
| [[ECE497 Project Template | My Beagle Project]]<br />
| <br />
|-<br />
| [[User:duganje | Josh Dugan]]<br />
| <br />
| [[ECE497 duganje Project | My Beagle Project]]<br />
| <br />
|-<br />
| [[User:hansenrl | Ross Hansen]]<br />
| <br />
| [[ECE497 hansenrl Project | My Beagle Project]]<br />
| <br />
|-<br />
| [[User:mmoravec | Matthew Moravec]]<br />
| <br />
| [[ECE497 mmoravec Project | My Beagle Project]]<br />
|<br />
|-<br />
| [[User:ngop | Peter Ngo]]<br />
| <br />
| [[ECE497 ngop Project | My Beagle Project]]<br />
|<br />
|-<br />
| [[User:shinnsm|Stephen Shinn]]<br />
| [[Special:Contributions/shinnsm|contrib]]<br />
| Project TBD<br />
| [https://github.com/shinnsm shinnsm]<br />
|-<br />
| [[User:ruff | Ruffin White]]<br />
| <br />
| [[ECE497 ruff Project | My Beagle Project]]<br />
|<br />
|-<br />
| [[User:Yoder | Mark A. Yoder]]<br />
| [[Special:Contributions/Yoder | contrib]]<br />
| [[ECE497 Project Template | My Beagle Project]]<br />
| [https://github.com/MarkAYoder MarkAYoder]<br />
|-<br />
| [[User:Popenhjc | James Popenhagen]]<br />
| <br />
| [[ECE497 popenhjc Project | My Beagle Project]]<br />
|<br />
|-<br />
|}<br />
<br />
== Winter 2011-2012 ==<br />
<br />
=== Contributions ===<br />
<br />
# [[Special:Contributions/Yuming | Yuming Cao]]<br />
# [[Special:Contributions/Yifei | Yifei Li]]<br />
# [[Special:Contributions/Harrisgw | Greg Harrison]]<br />
# [[Special:Contributions/mac | Jack Ma]]<br />
# [[Special:Contributions/Gemini91 | Guanqun Wang]]<br />
# [[Special:Contributions/Yanj | Mona Yan]]<br />
# [[Special:Contributions/Yoder | Mark A. Yoder]]<br />
# [[Special:Contributions/Yuhasmj | Michael Yuhas]]<br />
# [[Special:Contributions/Ziyi Zhang | Ziyi Zhang]]<br />
# [[Special:Contributions/Zitnikdj | David Zitnik]]<br />
# [[Special:Contributions/Zitnikdj | Alex Drane]]<br />
# [[Special:Contributions/jessebrannon | Jesse Brannon]]<br />
<br />
=== Project Status ===<br />
<br />
# [[User:Yoder | Mark A. Yoder]], [[ECE497 Project Template | My Beagle Project]]<br />
# [[user:Yanj|Mona Yan]] and [[user:Harrisgw| Greg Harrison]], [[PS EYE QT PROJECT | Playstation Eye Audio with Qt]]<br />
# [[user:Caogecym | Yuming Cao]] and [[user:Ziyi Zhang | Ziyi Zhang]], [[Node.js Weather Station]]<br />
# [[user:Yifei| Yifei Li]] and [[user:Gemini91| Guanqun Wang]], [[ Kinect Project | Play games using Kinect on Beagleboard]]<br />
# [[user:Yuhasmj| Michael J. Yuhas]] and [[user:mac | Jack Ma]], [[ Multiple Partitions via U-boot | Multiple Partitions via U-boot ]]<br />
# [[user:Zitnikdj| David Zitnik]], [[ ECE497 Project: Twitter Java Application | Twitter Java Application ]]<br />
<br />
<br />
{{YoderFoot}}</div>Jessebrannonhttps://elinux.org/index.php?title=EBC_Editing_a_Wiki&diff=165644EBC Editing a Wiki2012-08-31T04:40:15Z<p>Jessebrannon: /* Fall 2012 */</p>
<hr />
<div>[[Category:ECE497]]<br />
{{YoderHead}}<br />
<br />
Here is a wiki you can practice editing. Before you can edit it you will have to create an login. Pick something that will make it easy for me to identify you as part of my class. Then just add your name and date on the end of the table.<br />
<br />
You can get help here: [[Help:Contents]].<br />
<br />
If you need help with syntax check out the [[Editing Quickstart Guide|eLinux guide]] or the [http://en.wikipedia.org/wiki/Wikipedia:Cheatsheet Wikipedia Cheatsheet].<br />
<br />
== Fall 2012 ==<br />
<br />
{|<br />
|-<br />
| [[user:Yoder | Mark A. Yoder]]<br />
| 18-July-2012<br />
|-<br />
| [[user:atniptw | Tom Atnip]]<br />
| 20-July-2012<br />
|-<br />
| [[user:bssachin45 | B S Sachin]]<br />
| 25-July-2012<br />
|-<br />
| [[user:ruff | Ruffin White]]<br />
| 16-August-2012<br />
|-<br />
| [[user:Popenhjc | James Popenhagen]]<br />
| 30-August-2012<br />
|-<br />
| [[user:mmoravec | Matthew Moravec]]<br />
| 30-August-2012<br />
|-<br />
| [[user:ngop | Peter Ngo]]<br />
| 30-August-2012<br />
|-<br />
| [[user:duganje | Josh Dugan]]<br />
| 30-August-2012<br />
|-<br />
| [[user:hansenrl | Ross Hansen]]<br />
| 30-August-2012<br />
|-<br />
| [[User:shinnsm|Stephen Shinn]]<br />
| 30-August-2012<br />
|-<br />
| [[User:draneaw|Alex Drane]]<br />
| 30-August-2012<br />
|-<br />
| [[User:larmorgs|Greg Larmore]]<br />
| 31-August-2012<br />
|-<br />
| [[User:jessebrannon|Jesse Brannon]]<br />
| 31-August-2012<br />
|}<br />
<br />
== Winter 2011-2012 ==<br />
<br />
{|<br />
|-<br />
| [[user:Yoder | Mark A. Yoder]]<br />
| 21-Nov-2011<br />
|-<br />
| [[user:Yuming | Yuming Cao]]<br />
| 21-Nov-2011<br />
|-<br />
| [[user:Yuhasmj | Michael Yuhas]]<br />
| 21-Nov-2011<br />
|-<br />
| [[user:Yifei | Yifei Li]]<br />
| 22-Nov-2011<br />
|-<br />
| [[user:Ziyi Zhang | Ziyi Zhang]]<br />
| 24-Nov-2011<br />
|-<br />
|[[user: mac | Jack Ma]]<br />
| 28-Nov-2011<br />
|-<br />
| [[user:Zitnikdj | David Zitnik]]<br />
| 25-Nov-2011<br />
|-<br />
| [[user:Harrisgw | Greg Harrison]]<br />
| 26-Nov-2011<br />
|-<br />
| [[user:Yanj | Mona J Yan]]<br />
| 27-Nov-2011<br />
|-<br />
| [[user:Gemini91 | Guanqun Wang]]<br />
| 28-Nov-2011<br />
|-<br />
| [[user:vsn1985 | Narayanan VS]]<br />
| 28-Nov-2011<br />
|}<br />
<br />
{{YoderFoot}}</div>Jessebrannonhttps://elinux.org/index.php?title=User:Jessebrannon&diff=165638User:Jessebrannon2012-08-31T04:38:52Z<p>Jessebrannon: </p>
<hr />
<div>I am a Senior at Rose-Hulman. I am currently in the Embedded Linux class.<br />
<br />
[[Category:ECE497]]</div>Jessebrannonhttps://elinux.org/index.php?title=User:Jessebrannon&diff=165632User:Jessebrannon2012-08-31T04:37:28Z<p>Jessebrannon: Created page with "I am a Senior at Rose-Hulman. I am currently in the Embedded Linux class."</p>
<hr />
<div>I am a Senior at Rose-Hulman. I am currently in the Embedded Linux class.</div>Jessebrannonhttps://elinux.org/index.php?title=EBC_Contributions_and_Project_Status&diff=165626EBC Contributions and Project Status2012-08-31T04:34:17Z<p>Jessebrannon: /* Contributions */</p>
<hr />
<div>[[Category:ECE497 |Contributions]]<br />
{{YoderHead}}<br />
<br />
== Fall 2012 ==<br />
<br />
=== Project Status ===<br />
<br />
Please edit this page and add your project to this list. Copy my [[ECE497 Project Template]] to your own eLinux page and include the title of your project in the name of the page. <br />
<br />
Please make the list alphabetical by family name.<br />
<br />
Take a look at what you and others have contributed.<br />
<br />
{|<br />
|- <br />
! Name<br />
! Contributions<br />
! Project<br />
! git repository<br />
|-<br />
| [[User:atniptw | Tom Atnip]]<br />
| <br />
| [[ECE497 Project Template | My Beagle Project]]<br />
| <br />
|-<br />
| [[User:larmorgs | Greg Larmore]]<br />
| <br />
| [[ECE497 Project Template | My Beagle Project]]<br />
| <br />
|-<br />
| [[User:duganje | Josh Dugan]]<br />
| <br />
| [[ECE497 duganje Project | My Beagle Project]]<br />
| <br />
|-<br />
| [[User:hansenrl | Ross Hansen]]<br />
| <br />
| [[ECE497 hansenrl Project | My Beagle Project]]<br />
| <br />
|-<br />
| [[User:mmoravec | Matthew Moravec]]<br />
| <br />
| [[ECE497 mmoravec Project | My Beagle Project]]<br />
|<br />
|-<br />
| [[User:ngop | Peter Ngo]]<br />
| <br />
| [[ECE497 ngop Project | My Beagle Project]]<br />
|<br />
|-<br />
| [[User:shinnsm|Stephen Shinn]]<br />
| [[Special:Contributions/shinnsm|contrib]]<br />
| Project TBD<br />
| [https://github.com/shinnsm shinnsm]<br />
|-<br />
| [[User:ruff | Ruffin White]]<br />
| <br />
| [[ECE497 ruff Project | My Beagle Project]]<br />
|<br />
|-<br />
| [[User:Yoder | Mark A. Yoder]]<br />
| [[Special:Contributions/Yoder | contrib]]<br />
| [[ECE497 Project Template | My Beagle Project]]<br />
| [https://github.com/MarkAYoder MarkAYoder]<br />
|-<br />
| [[User:Popenhjc | James Popenhagen]]<br />
| <br />
| [[ECE497 popenhjc Project | My Beagle Project]]<br />
|<br />
|-<br />
|}<br />
<br />
== Winter 2011-2012 ==<br />
<br />
=== Contributions ===<br />
<br />
# [[Special:Contributions/Yuming | Yuming Cao]]<br />
# [[Special:Contributions/Yifei | Yifei Li]]<br />
# [[Special:Contributions/Harrisgw | Greg Harrison]]<br />
# [[Special:Contributions/mac | Jack Ma]]<br />
# [[Special:Contributions/Gemini91 | Guanqun Wang]]<br />
# [[Special:Contributions/Yanj | Mona Yan]]<br />
# [[Special:Contributions/Yoder | Mark A. Yoder]]<br />
# [[Special:Contributions/Yuhasmj | Michael Yuhas]]<br />
# [[Special:Contributions/Ziyi Zhang | Ziyi Zhang]]<br />
# [[Special:Contributions/Zitnikdj | David Zitnik]]<br />
# [[Special:Contributions/Zitnikdj | Alex Drane]]<br />
# [[Special:Contributions/jessebrannon | Jesse Brannon]]<br />
<br />
=== Project Status ===<br />
<br />
# [[User:Yoder | Mark A. Yoder]], [[ECE497 Project Template | My Beagle Project]]<br />
# [[user:Yanj|Mona Yan]] and [[user:Harrisgw| Greg Harrison]], [[PS EYE QT PROJECT | Playstation Eye Audio with Qt]]<br />
# [[user:Caogecym | Yuming Cao]] and [[user:Ziyi Zhang | Ziyi Zhang]], [[Node.js Weather Station]]<br />
# [[user:Yifei| Yifei Li]] and [[user:Gemini91| Guanqun Wang]], [[ Kinect Project | Play games using Kinect on Beagleboard]]<br />
# [[user:Yuhasmj| Michael J. Yuhas]] and [[user:mac | Jack Ma]], [[ Multiple Partitions via U-boot | Multiple Partitions via U-boot ]]<br />
# [[user:Zitnikdj| David Zitnik]], [[ ECE497 Project: Twitter Java Application | Twitter Java Application ]]<br />
<br />
<br />
{{YoderFoot}}</div>Jessebrannon