May 22, 2012

A Quick Prototype

I built the robot outlined below, but ran into issues with CPU scheduling and motor response.  There are a number of steps that can be taken to mitigate this (such as prioritization or using a real-time kernel), but I decided that for my application, I'd like have more functionality in the motor controller software.  I'm currently working on a new voltage regulator / motor controller board and will be implementing my control software on it.  The SparkFun controller is very easy to use and this configuration may work for someone else, so here are my notes from the build.

The robot consists of the following parts:
  1. BeagleBone
  2. Magician Chassis
  3. Serial Controlled Motor Driver
  4. Logic Level Converter
  5. 7905 5v regulator, 0.33pf and 0.1pf capacitors
  6. 6 AA batteries in a battery holder
  7. breadboard
  8. lots of wire

The assembly is relatively straightforward, although getting the level converter and serial port working took a bit of research.  Thankfully these subjects are thoroughly covered on GigaMegaBlog.

Here is a wiring diagram.  (Fritzing didn't have the serial motor controller, but the part I substituted has a similar layout):

You can download my Fritzing file from here if you want to take a closer look.

Once the robot is assembled and wired, we can power it up and begin testing.  One important point covered on GigaMegaBlog is that the default software configuration for the serial pins will need to be changed.  You can do this by running the following commands as root:

echo 20 > /sys/kernel/debug/omap_mux/uart1_rxd
echo 0 > /sys/kernel/debug/omap_mux/uart1_txd

Another important point is that serial port 1 is located at /dev/ttyO1 (that's capital 'O', not zero).  For testing, I fired up minicom for the first time in at least 10 years, and configured it to use the correct tty without hardware flow control.  Now you can simply enter the motor controller commands listed in here, i.e.


and press enter.  You should now have motor one spinning in the forward direction at half throttle... somewhat like this (please pardon the ethernet tether):

May 3, 2012

BeagleBone Disk Performance

The microSD card that came with my BeagleBone was a Kingston 4GB, and it has stood up well to frequent re-imaging and on-device development.  When I decided to get a second card, I did a little research and chose the SanDisk 4GB microSDHC (model SDSDQY-004G-A11A).  I also picked up a Team 16G USB flash drive (model TG016GF108N3), which I use for build directories.

Here are the results from running Bonnie++ on the BeagleBone:

While the huge performance increase of the usb drive dominates the graph, system performance during normal usage (loading applications and and saving files) feels dramatically better with the new microSD.