BeagleBone Black: MicroSD Boot + Ubuntu

After using the Raspberry Pi and becoming more comfortable using/navigating embedded Linux devices, we decided to try using the BeagleBone Black. This powerful computer is faster than the Raspberry Pi and has more than twice the amount of available pins. This added availability of pins means that we won't have to use micro controllers as sensors. We also thought that we could test the USB video capabilities of the BeagleBone Black, as it is supposed to be a lot faster than the Raspberry Pi. Before we delve into using any sensors, cameras, or motor controllers using the BeagleBone, we need to configure it.

The BeagleBone comes pre-installed with Angstrom on its internal memory (eMMC). After following the instructions on Getting Started you might realize that there is not much memory available. Although the preinstalled Cloud9 IDE and USB web-server are cool (and in my opinion, much more friendly for young "Makers" than the Pi), the device does not have the room for the programs we want to run. To fix this issue we decided to boot off of a microSD card.

We also decided to use a different image on the BeagleBone. After trying for hours to get a basic GPS working on Angstrom, we decided that it was not worth it. A few hours later we had Ubuntu installed and running on the BeagleBone. Although neither image is perfect, Ubuntu is cross-compatible (somewhat) with the Raspberry Pi (Debian) installations and more widely used than Angstrom. In a few years Angstrom will be a reasonable image, but for now it does not have the support Ubuntu does. Below is the Ubuntu image we're using:

Ubuntu Saucy (13.10)

B.N. - Make sure to use an Ubuntu image with an updated Bone kernel...if not the entirety of the BeagleBone's capabilities might not be avaliable. For example the Ubuntu Raring (13.01) image does not come with the updated Bone kernel and therefore cannot use the PWM pins available.

MicroSD Boot:

Although the directions for booting off of an external SD card are straightforward it might take a few tries before it works. 

1. Plug in the BeagleBone to your laptop. You should see a new device pop-up on your computer. If you open this file you will see the FAT partition of the BeagleBone's eMMC (the entire folder is the FAT partition). Delete the MLO file near the bottom of the file. This will now force the BeagleBone to boot off of an external SD rather than its internal memory. All of this information can be found here.

2. Flash the Ubuntu Saucy image from this page (it's the file under the 1. heading). To do this download the image, unzip it, and use a disk flasher or the command line to flash the image onto the SD card.

3. After the install is complete, plug in the microSD and power the BeagleBone. The indicator lights should light up and begin flashing, with one of the lights flashing in it's "heart-beat" rhythm.  Either plug the Bone into a screen or into your network using USB. Use Mac's ssh feature in terminal or PuTTY to login to the BBB. From there, you can follow the quick installs below to completely setup the BeagleBone.

Software Setup:

If everything goes as planned the BeagleBone will be doing quite a lot of computing for our project. This will be everything from controlling the steppers on the float, to the ESC's in the sub, to temperature, GPS, and various other sensors. Below is a quick list of commands we used to prime our BeagleBone for further software development and hardware capabilities:

1. Set a static IP address in order to make everything easier. This is almost exactly like the Pi. Again, this video gives a good (although long) explanation of networking on embedded devices. The setup pictured below also works (located in /etc/network/interfaces)

2. Update and then upgrade the BeagleBone from the command line:

3. Install git. This is useful to have and we will need it to download some software:

4. Install the Java Runtime Environment on the BeagleBone:

5. Install Python dependencies and Adafruit instillation requirements:

6. Install Adafruit's BBIO Python library for easy PWM and GPIO control:

Future posts on the BeagleBone will use the BBIO library. For example we will be using the GPIO function to run a stepper motor and the PWM function for our ESCs.

***REMEMBER: You will need to expand the filesystem of the BeagleBone in order to make the full size of your SD card useable. Read this page which will show you how to expand your filesystem. 

No comments:

Post a Comment