Welcome

This blog details my finding in building and setting up a small web connected humanoid robot.
The first objective of this project is to fully control and monitor the robot from internet.
This will be done by adding a single board computer running a full Linux system connected to the Robovie Nano robot by the serial port and connected to the web by wifi.
Beside web remote control, I will take advantage of the complete Linux system to add some higher functions to this robot (environment analysis, navigation, speech & video recognition,...).

There are several constraints in this project.

At first a limited weight and space . The Nano is a very small robot and the available space is quite narrow (6 x 3 x 2 cm in the back) .
The added weight load must be under 100 gms (Linux board + battery + wlan+ audio + webcam + sensors ) if we want to keep fluid motions and good autonomy.
Due to theses constraints I have to work with a minimal processing power. I am using a Bifferboard from Bifferos running a full Debian Distro at 150Mhz.

The tasks and progress are:

Build Debian kernel & rootf : (done) Debian Squeeze with headers. Linux 2.6.32.2
Wlan (done)
Remote motions control (done)
Remote master slave control : (done)
Video streaming - 2 ways : (done)
Vision/Blob recognitions (not started)
Sound streaming - 2 ways (wip) - can play stream, can record sound
Speech Synthesis (done) - flite working well, espeak is choppy but still usable
Speech Recognition (wip)
Remote Sensors monitoring (done) Battery level, accelerometer, distance, temperature
Lcd usb display (done) - hacked 1.5" key chain
Oled i2c display (wip)
Auto charging (not started)

Monday, February 14, 2011

BIFFERBOARD

This is a fantastic little board, affordable (35 pounds) , very light and compact. it has only 150Mhz processor but it is the price to pay for a minimum  power consumption size and cheap price.

Here are the specifications.

150MHz CPU, Intel 486SX instruction set, MMU.
1 watt power consumption (200mA @5v)
68mm x 28mm x 21mm (weight 28g)
32MB SDRAM/8MB Flash
OHCI/EHCI USB 2.0
10/100 ethernet
Serial console 115200 baud (can be used as 2 GPIO)
4-pin JTAG (can be used as GPIO)
2 permanent GPIO (1 LED, 1 button)

To buy it: http://bifferos.bizhat.com/
Wiki: http://sites.google.com/site/bifferboard/
Group: http://groups.google.com/group/bifferboard



It tooks me a lot of time to build the Debian Distro with the header and all the features and tuning I wanted.
I am now running Debian Squeeze on a Linux 2.6.32.2 kernel.
Basically all the modules are enabled and a wide range of USB devices are  recognised and will work out of the box (bluetooth dongle, Serial ftdi, several Webcams, wifi adapters, USB audio,....).
I used Stuart Hopkins' Debian kernel/rootfs build and installation scripts :

http://www.linux-depot.com/?p=projects&s=bifferboard


(note 1: the .debs links are broken in the rootfs scripts, so you need to compile your own .debs and update the script links)
(note 2: for the 2.6.32.2 kernel build you need to add the relevant config files and patches, you can download them from the Bifferboard repository)

I also collected many good infos from Graham blog below:

http://www.sunspot.co.uk/Projects/Bifferboard/biff_index.html


You can download my Kernel image and Debian rootfs with the header from the links below:

https://docs.google.com/leaf?id=0B6rYc4n12uHTMGViYTcyOGItMDkyZi00YTdiLTljNTEtMjBjMWU3YTNhZDAy&hl=en_US


To install :


Untar the files (all the files are compressed in one folder)

1- flash the kernel.
python bb_upload8.py /dev/ttyUSB0  image_name


2- format your usb disk
mkfs.ext3 /dev/sdx1 (change x with the letter of your usb disk)
tune2fs -c 0 -i 0  /dev/sdx1


3-copy the rootfs folder content to the usb disk


Login = root, Password = root

Notes:

STARTUP SCRIPT:

I added a startup script (clovis_startup.sh) in /etc/init.d (to start the gpio, I2c, wlan,..)
If you modifiy it then type the following at a console line:
update-rc.d -f  clovis_startup.sh remove
update-rc.d -f clovis_startup.sh defaults



BOOT TIME:
between 40s and 1min 20 (depending if you leave or note Lighttpd, i2c, gpio, alsa...)


BUTTON GPIO  to reset WLAN (2 s) or Poweroff (5 s)
Script to add in /etc/rc.local as:    /home/gpio/button2.sh &
(start it with ./rc.local once)
#!/bin/sh
#button2.sh
#Script to add in /etc/rc.local as:    /home/gpio/button2.sh &
#(start it with ./rc.local once)
echo 15 > /sys/class/gpio/unexport #flikker the red led 2 times
echo 15 > /sys/class/gpio/export
echo 16 > /sys/class/gpio/unexport
echo 16 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio16/direction
echo 1 > /sys/class/gpio/gpio16/value
while : ; do
BUTTON1=`cat /sys/class/gpio/gpio15/value`
if [ "$BUTTON1" = "0" ]; then
   sleep 3
BUTTON2=`cat /sys/class/gpio/gpio15/value`
   if [ "$BUTTON2" = "1" ]; then
echo !!WLAN REBOOT!! > /tmp/lcd4linux.fifo #print !!WLAN REBOOT!! on the lcd screen
echo 0 > /sys/class/gpio/gpio16/value
sleep 1
echo 1 > /sys/class/gpio/gpio16/value

/sbin/ifdown wlan2
/sbin/ifup wlan2

echo wlan rebooted > /tmp/lcd4linux.fifo #print "wlan rebooted" on the lcd screen

   else
echo !!POWEROFF!! > /tmp/lcd4linux.fifo
echo 1 > /sys/class/gpio/gpio16/value
/sbin/poweroff
   fi
fi
sleep 1
done
exit 0

4 comments:

  1. Hi, your rootfs is not available on Google docs. Are you able to post a new link?

    Cheers and thanks in advance.

    ReplyDelete
  2. Hello again, I have used the links now but when untarred and flashed the vmlinux does not boot.

    ReplyDelete
  3. Hi...
    Same here.
    boot type error - boot_flag not found

    ReplyDelete
  4. Try the new link (untar as root):

    https://docs.google.com/leaf?id=0B6rYc4n12uHTMGViYTcyOGItMDkyZi00YTdiLTljNTEtMjBjMWU3YTNhZDAy&hl=en_US

    Note: I never succeed to flash my Bifferboard through Vmlinuz, it only worked from an Unbuntu station

    ReplyDelete