AUTOMATON # 254623-51


Move your Robot from anyware…

I have done several projects, I was working on that will use the Beagle Bone Black. This is a nice platform for embedded developers, especially for relative novices like me. It’s a 1ghz ARM-based single board computer.

This is step by step guide to make Linux based internet controlled  robot with web cam using beagle bone black.

Required materials

* Beagle Bone Black (here)
* Webcam
* USB wifi Dongle
* 4Gb Memory Card (SDHC Class 10 )
* H-Bridge / L293d Motor Driver
* 8 AA size batteries with 2400mAh
* 7.4 v Lithium-iron  battery
* USB TTL Serial Cable (Such as the FTDI TTL-232R-3V3)
* Voltage Regulator (LM7805)

Once you have all of the necessary components, you should perform the following steps:

Step 1.

First step is to make a power supply using AA batteries and 7805 which can power up BB

on robot. The 7805 isn’t very efficient, but it does keep the voltage down to 5v. Evidently,

the BBB really doesn’t want anything more than about 5.25v input. The schematic is

something like this:Figure 1 bbb-battery-schematic                                                       Figure 1 bbb-battery-schematic

Step 2.

After powering bbb, you need SD Card which has Ubuntu OS. There is lots of links are

available to make boot able SD card for bbb, you can follow this link.

Step 3.

At this stage you are ready with battery arrangement  and SC card, now its time to connect

serial port to bbb. JTAG and serial were cut down in to USB on bbb. But serial port is

available via the J1 header.Connect the USB TTL serial cable to J1. The following

connections are relevant:

pin            Function

1                  GND

2                   Rx

3                   Tx

Connect USB with the host machine.

Step 4.

The bbb uses a serial debug port to communicate with the host machine.

The commands discussed in this Step are meant to be performed by a privileged user

account. This requires the root login or prepending each command with sudo.

* Start minicom on your host machine in configuration mode. As root:
# minicom -o -s -w
A menu of configuration should appear. Use the Down-arrow key to scroll down and select the Serial port setup option, and press Enter.
Verify that the listed serial port is the same one that is connected to bbb. If it is not, press A, and enter the correct device. This is /dev/ttyUSB0 on my Linux distributions.
Set the Bps/Par/Bits option by pressing the letter E and using the next menu to set the appropriate values. You press the key that corresponds to the value 115200, then press Enter.
Set Hardware flow control to No using the F key.
Set Software flow control to No using the G key.
Press Enter to return to the main configuration menu, and then press Esc to exit this menu.
Reset the board, and wait for a moment. If you do not see output from the board, press Enter several times until you see the prompt. If you do not see any output from the board, and have verified that the serial terminal connection is setup correctly.

At this step, you will get console of your bbb on minicom at your host machine.

Step 5.

Run following command to install required packages on bbb.

$ sudo apt-get update
$ sudo apt-get install libv4l-dev libjpeg8-dev subversion imagemagick libapache2-mod-php5 php5 apache2 git

MPEG-STREAMR package is used to stream live feed taken from webcam.

Open terminal & checkout mpeg-streamr repository by typing following command in terminal.

$ svn co MJPG-streamer

After this you will get MJPG-streamer folder.


cd MJPG-streamer/mjpg-streamer
$ sudo make USE_LIBV4L2=true

This will build source code of MJPG-streamer and executable and shared libraries in this

folder. The folder contains below files.

* mjpg_streamer (binary)

Step 6.

Download the codes from this link. You will get bbbRobot.tar.gz file. Extract the file on the host machine.Copy all files to Apache server folder “/var/www” folder on bbb.

step 7

Now to navigate robot, it is essential to control motors via gpio. To toggle gpio from web page you have to provide sudo permission to you “/var/www” floder.The command below will add sudo rights to “/var/www” folder.

sudo echo “www ALL=(ALL) NOPASSWD: ALL” >> /etc/sudoers

step 8

Now, its time to connect bbb to the wifi router. This link will give you list of commands to

connect bbb with wifi  via command line.

step 9

For live streaming of web cam, it is essential to change ip address in control.html file in the

source code. In line  “”  ,  replace only ip address(

highlighted by bold characters ) .

Now, its time to word on assembling the robot and connect motors with H-bridge.

Step 10.

Here, I will uset P9 header GPIO pins 12, 14, 15 and  16 on bbb.

We will connect GPIO pins 12,14 with L293 IC to control Left Motors and 15, 16 pins with L293 IC to control Right Motors. 7.4 v Lithium-iron battery  is used to power up L293.

Step 11.

This is the final step to test your robot using some internet browser.

Power up bbb and L293. Wait until bbb get booted successfully.After booting of bbb, open

your browser in laptop and type following :

<bbb ip address>/bbbRobot.php

Here in my case,

Enjoy  your internet operated toy !!

(Courtesy of Bhargav Shah  Ahmedabad )

About RAM Chandrakausika राम च 51

Ram51 is a researcher in the various fields of Musicology, Philosophy and History as well as old languages. One of his first topics is the wide scope of Indo-arabic cultures as represented in various art-forms religion and history. Below a list of selected Research topics which sum up partitionally the task of anthropological Frameworks in totaliter : Sanskrit Hinduism and Mythology Hindustani Music, The Muqhal Empire Gharanas from North India Kashmir Sufiyana The Kashmir Santoor Traditional Folk Music from USA Philosophy in Orient and Okzident Genealogy of musical instruments Ethnomusicology, Arabic Maqams, No Theatre fromJapan, North american poetry, Cultural heritage of mankind and Islamic architecture... View all posts by RAM Chandrakausika राम च 51

You must be logged in to post a comment.

%d bloggers like this: