Proposal for a low-cost robot for education in Africa

Submitted for the AFRON robot challenge

Alexander Reben

http://www.areben.com/

Sheng-ying Pao

Click here to sign-up for news and updates

Note: This document may be best viewed in a smaller non-full-screen browser window

Table of Contents

Table of Contents

Introduction

Robot Design

Overview

Bill of Materials

Classroom Kit

Chassis

Creativity

Cardboard

Zip Ties

Found Materials

Wiring

Cables

Breadboard

Power

USB

Regulation

Batteries

Microcontroller

Compiler

Locomotion

Motors

Wheels

Control

Sensors

Light

IR

Button

Resistors

Output

LED

Sound

Computer control

Sample programs

Motor Control

Edge Avoidance

Light Following

Graph

Introduction

        The low-cost ($10) robot challenge is not just about buying parts for a robot that are below a price point, it is about a holistic program for educating people about science, technology and creativity. The robot acts as a literal and figurative vehicle to foster interest in STEM fields and inspire confidence in those who build it that they too can do great things with technology.  Because of this, my proposal outlines not only robot construction but I also encourage development of a curriculum to teach, a business strategy to support and a social network to connect. I believe that only with all of these aspects covered that a program like this will be possible. Just handing a kit of parts to a person without the proper support behind it can be as damaging through frustration as it can be helpful. If this project progresses further, these will be the next steps.

Robot Design

Overview

        Due to the nature of this use case, the robot built needed to be not only simple, but configurable to each student’s needs. Many considerations were taken including: cost per part, part usefulness, experience, reliability and value. The first consideration (since the robot is required to be programmable) was the microcontroller board. While initial reaction may be to go with the well-known Arduino, it would be impossible to get into this cost point. We also steered away from any custom PCBs because of several factors. One, they are not only costly to produce but costly to assemble in any reasonably low quantity. Two, by pre-configuring the circuit on a custom PCB we would limit the creativeness inherent in assembling the circuit yourself. Three, if more sensing or modification wanted to be made to the robot, it would require specialized tools. Similarly, if something broke on a custom board, the whole board would need to be sent for repair. Besides programming, an important part of this education is learning about electronics. Another consideration was our reluctance to go the surplus route. Surplus, while cheap, is unreliable both in terms of stock and in terms of the components themselves.

         We feel our design has a few unique characteristics that will set it apart from others. These include the lack of custom manufacturing or PCB assembly, the inclusion of a USB serial UART with every kit and an expandable “kit” format revolving around a breadboard with will allow students to obtain deeper knowledge with electronics. The use of “modules”, while speeding up development, encourages students to ignore the underlying electronics and only focus on programming. If the focus was to be on programming, there are much better and cheaper ways than robots to teach just that skill.

In this design we are entering in two of the competition categories: tethered and untethered. Because of our flexible design, the only difference is that the untethered robot uses a battery pack and slightly exceeds the competition budget. Therefore, when you consider each design, keep that in mind.

Take note that our prototype tethered robot that was actually built has parts that total $10 (see BOM). We are quite excited that an actual programmable robot was built that met this constraint fully. The total cost has been verified directly through communication with suppliers and manufacturers in China.

Bill of Materials

        The bill of materials can be found at this link:

https://docs.google.com/spreadsheet/pub?key=0AkV6hvBz3HIjdFlsVEFOdEtBSFRtOVJLUlN2ZGxNdWc&output=html

Classroom Kit

        The classroom kit for the un-tethered robot simply consists of a AA battery charger. For the tethered robot, a classroom kit is unnecessary as each kit is fully equipped with everything needed save for a pen, chopstick or other pointed object to make holes in the cardboard. If the students want to customize their robot, found materials and simple tools such as scissors and tape are useful. Obviously, computers are assumed to be available in the classroom.

Chassis

Creativity

        When considering a robot chassis for children, it is important to allow for a wide berth of creativity. Creativity and personalization is what motivates people to make a project their own. A robot with a fixed chassis that looks like the next person’s removes such motivation. Therefore, our kit’s chassis needed to be made in such a way that it was easily modifiable and customizable using local materials.  You will also notice that there are no exact instruction on how to assemble the robot, we want to leave this to the student. We believe this is where much of the excitement comes from with the lego mindstorm kits, the “it can be anything you want” attitude. Note that is is also the reason that there are no dimensional drawing included, as the robot’s dimensions are variable.

Cardboard

        Cardboard was chosen as the primary chassis material. This was done for several reasons:

        

Image of an African student making a cardboard robot

Image showing a completed cardboard robot chassis

Image showing sensors mounted through cardboard. Note the ease of which sensors can be mounted and moved.

Zip Ties

Zip ties are the primary structural medium which the kit is assembled with. They are easy to use, cheap and versatile. Their strength also allows them to be used in creative ways to keep costs down. They perform the following functions:

Image showing bundle of zipties

Image showing ziptie used to secure motor to chassis.

Image of mounting configuration of internal parts

Found Materials

The chassis and overall design of the robot allows for the addition of materials. The other materials can be decorative or add function to the robot. For example, other materials could be attached to the motors to make a winch or an arm.

Wiring

Cables

The cables chosen are terminated with female connectors on each end. This allows them to plug directly into the microcontroller’s male pins. The kit also comes with a strip of header pins, the student breaks off a header pin and inserts it into the wire to create a male end. This is done to allow the wire to be inserted into the breadboard. The female ended wires also allow for components to be directly inserted into them. This allows the student to easily route sensors or other devices easily.

Image of wire bundle

Image of header pins. Note that they are longer than usual and symmetric on both sides.

Image showing an IR LED and IR phototransistor directly plugged into the wires.

Breadboard

        A breadboard is included as a standard means to make connections and build circuits. Because this is such a standard way to prototype, there are many resources available to teach students how to use it.

Image of breadboard

Power

USB


        During tethered operation the robot is powered through USB. A normal computer USB port has enough current to drive the robot. A USB cable is included with the kit for this purpose (and for programming / control).

Image of USB cable included with the kit

Regulation

Power is regulated using the onboard 3.3v regulator of the microcontroller. This regulator can provide power to both the sensors and motors. The regulator features safety features such as overcurrent protection and temperature cutoff. This prevents damage should the student connect something incorrectly.

 

Image showing microcontroller. Power regulation is located next to the USB port.

Batteries

Batteries power the untethered robot. The batteries used are NIMH and are charged using the charger in the classroom kit. Note that these batteries are the main difference between our submission for tethered and untethered. THe batteries are placed into a battery holder which features a USB connector and power switch. The student simply loads the holder with batteries and connects the USB cable to it for power.

Image showing battery holder. Note the USB connector and power switch.

Microcontroller

The microcontroller is the brains of the robot. The board used is the low-cost Launchpad development platform. This board contains not only broken out headers but voltage regulation, hardware UART serial and programming built in. Because of this, the robot is able to not only think on its own, but it is also able to communicate with a computer which adds extra functionality through software such as processing. The cost of the board also includes a USB cable, extra microcontroller and crystal.

        As discussed previously, the on-board voltage regulator also contains failsafes, such a overcurrent protection and thermal shutdown. This provides for a margin of safety if a student were to connect something incorrectly.

Schematics and other information can be found at:

http://www.msp430launchpad.com/2010/07/schematic-images-and-explanation.html


Launchpad with pinout functions shown

Compiler

        the open source “Energia” compiler was chosen due to its free nature and the fact that it has the same layout and same functions as the popular Arduino. This compiler also supports libraries and other add-ons.

Energia screenshot

Locomotion

Motors

The motors used are gearboxes to allow for higher torque. They have “D” shafts which allow for direct coupling with wheels. They also have toolless motor changing allowing damaged motors to be easily replaced.

Image of motors and gearboxes. Note that the motors from the factory will have wires pre-soldered on (not pictured here)

Wheels

        The wheels provided fit snuggly onto the shafts of the motors. They are covered in rubber for traction and have spacing on the spokes which allow students to ziptie other materials on there. This would allow for their use in applications other than locomotion.

Image of rubber rimmed wheels.

Control

Motor control is achieved through an H-Bridge IC. This IC allows for bi-directional motor control and PWM of control signals. By PWMing control signals, motor speed can be adjusted. Furthermore, the outputs on this IC are flyback diode protected reducing the need for external components for protection.

Image of motor control IC

Sensors

        Sensors are an important component of a robot. The robot needs to sense its environment in order to react to it.

Light

Light is a stimulus that is familiar to us. Having a robot sense light is a good way to have it explore its environment. THe robot kit includes CdS cells a.k.a. LDRs or Light Dependent Resistors. This these devices the robot can do things such as find the brightest place in a room or follow a flashlight beam.

Image of LDRs

IR

IR or infrared is a wavelength of light that we can’t see. However, it is good for detecting obstacles or seeing contrast. The kit includes IR transmit - receive pairs. THe IR transmitter sends IR light while the IR phototransistor detects this light. In this way the robot can detect obstacles, avoid ledges or do line-following.

Image of IR transmitters

Image of IR receivers. Note the dark color which blocks visible light

Button

        A button is present mounted on the microcontroller. This button can be used to set modes or for other manual input into the program.

Resistors

        Resistors are included to current limit the IR LEDs, act as pull-ups for sensors and as voltage dividers for the CdS sensors.

Image of resistors.

Output

LED

        Two LEDs are present on the microcontroller board. These LEDs can be used to provide feedback to the student. They can also be used for debugging purposes.

Sound

Using the included piezo transducer, simple tones can be played from the robot.

In tethered mode, the robot can speak through a computing using processing and a text to speech library using computer speakers.

Image of piezo transducer

Computer control

        Through the included USB cable, a computer can communicate with the robot using serial. Since the microcontroller has an onboard hardware UART, communication is east. THis allows for more powerful programs to be written and for the robot to be remotely controlled.

Sample programs

        Since the focus of this document is not teaching, we have only compiled a few proof-of-concept demos. Since this project uses ordinary components, there are many other resources out there to garner project ideas from. The following programs are only intended to give a glimpse into the capabilities of this platform.

Motor Control

The instructions to wire up the breadboard can be found at:

http://itp.nyu.edu/physcomp/Labs/DCMotorControl

Since this kit uses standard components and no custom boards, there is already a wealth of information available as to how to wire things up and how they work. Furthermore, since Energia cod is compatible with Arduino, the same code can be used as well. This gives this design a giant leg up when it comes to documentation.

The program for this setup is a “robot shimmy”

Video for this action can be seen here

Code is as follows:

void setup() {                

  pinMode(9, OUTPUT);    

  pinMode(10, OUTPUT);    

  pinMode(11, OUTPUT);    

  pinMode(12, OUTPUT);    

  pinMode(7, OUTPUT);

  digitalWrite(7, HIGH);

  pinMode(6, INPUT);  

}

void loop() {

  if(analogRead(A4) > 10)

  {

    digitalWrite(9, HIGH);

    digitalWrite(10, LOW);  

    digitalWrite(11, HIGH);  

    digitalWrite(12, LOW);  

  }  

  else

  {

    digitalWrite(9, LOW);

    digitalWrite(10, LOW);  

    digitalWrite(11, LOW);  

    digitalWrite(12, LOW);

  }

}

Edge Avoidance

In this program, the robot uses an IR led and phototransistor to sense a table edge and stop when approached. The phototransistor is pulled-up and attached to A4 analog 4.

Video can be found here:

http://www.youtube.com/watch?v=wgy5BULUyQg

Image of detector mounted

void setup() {                

  pinMode(9, OUTPUT);    

  pinMode(10, OUTPUT);    

  pinMode(11, OUTPUT);    

  pinMode(12, OUTPUT);    

  pinMode(7, OUTPUT);  

}

void loop() {

  if(analogRead(A4) > 10)

  {

    digitalWrite(9, HIGH);

    digitalWrite(10, LOW);  

    digitalWrite(11, HIGH);  

    digitalWrite(12, LOW);  

  }  

  else

  {

    digitalWrite(9, LOW);

    digitalWrite(10, LOW);  

    digitalWrite(11, LOW);  

    digitalWrite(12, LOW);

  }

}

Light Following

        Two CdS cells attached to A4 and A5 in a voltage divider configuration are mounted to the end of the robot. The robot turns to the side with the most light and if both sources of light are equal, it moves forward. This behaviour allows the robot to follow a light. Note that a similar program can be used with the IR detection pair to do line following.

void setup() {                

  pinMode(9, OUTPUT);    

  pinMode(10, OUTPUT);    

  pinMode(11, OUTPUT);    

  pinMode(12, OUTPUT);      

}

void loop() {

  if(analogRead(A4) > analogRead(A5))

  {

    digitalWrite(9, LOW);

    digitalWrite(10, HIGH);  

    digitalWrite(11, HIGH);  

    digitalWrite(12, LOW);  

  }  

  if(analogRead(A4) < analogRead(A5))

  {

    digitalWrite(9, HIGH);

    digitalWrite(10, LOW);  

    digitalWrite(11, LOW);  

    digitalWrite(12, HIGH);  

  }

  else

  {

    digitalWrite(9, HIGH);

    digitalWrite(10, HIGH);  

    digitalWrite(11, HIGH);  

    digitalWrite(12, HIGH);

  }

Graph

Program to read an analog sensor (such as a CdS cell) and graph the result on a computer. Good for testing sensors. Please note that this is an example program included with Energia and written by Davis Mellis

/*

  Graph

 

 A simple example of communication from the Arduino board to the computer:

 the value of analog input 0 is sent out the serial port.  We call this "serial"

 communication because the connection appears to both the Arduino and the

 computer as a serial port, even though it may actually use

 a USB cable. Bytes are sent one after another (serially) from the Arduino

 to the computer.

 

 You can use the Arduino serial monitor to view the sent data, or it can

 be read by Processing, PD, Max/MSP, or any other program capable of reading

 data from a serial port.  The Processing code below graphs the data received

 so you can see the value of the analog input changing over time.

 

 The circuit:

 Any analog input sensor is attached to analog in pin 0.

 

 created 2006

 by David A. Mellis

 modified 30 Aug 2011

 by Tom Igoe and Scott Fitzgerald

 

 This example code is in the public domain.

 http://www.arduino.cc/en/Tutorial/Graph

 */

void setup() {

  // initialize the serial communication:

  Serial.begin(9600);

}

void loop() {

  // send the value of analog input 0:

  Serial.println(analogRead(A0));

  // wait a bit for the analog-to-digital converter

  // to stabilize after the last reading:

  delay(10);

}

/* Processing code for this example

 

 // Graphing sketch

 

 

 // This program takes ASCII-encoded strings

 // from the serial port at 9600 baud and graphs them. It expects values in the

 // range 0 to 1023, followed by a newline, or newline and carriage return

 

 // Created 20 Apr 2005

 // Updated 18 Jan 2008

 // by Tom Igoe

 // This example code is in the public domain.

 

 import processing.serial.*;

 

 Serial myPort;        // The serial port

 int xPos = 1;         // horizontal position of the graph

 

 void setup () {

 // set the window size:

 size(400, 300);        

 

 // List all the available serial ports

 println(Serial.list());

 // I know that the first port in the serial list on my mac

 // is always my  Arduino, so I open Serial.list()[0].

 // Open whatever port is the one you're using.

 myPort = new Serial(this, Serial.list()[0], 9600);

 // don't generate a serialEvent() unless you get a newline character:

 myPort.bufferUntil('\n');

 // set inital background:

 background(0);

 }

 void draw () {

 // everything happens in the serialEvent()

 }

 

 void serialEvent (Serial myPort) {

 // get the ASCII string:

 String inString = myPort.readStringUntil('\n');

 

 if (inString != null) {

 // trim off any whitespace:

 inString = trim(inString);

 // convert to an int and map to the screen height:

 float inByte = float(inString);

 inByte = map(inByte, 0, 1023, 0, height);

 

 // draw the line:

 stroke(127,34,255);

 line(xPos, height, xPos, height - inByte);

 

 // at the edge of the screen, go back to the beginning:

 if (xPos >= width) {

 xPos = 0;

 background(0);

 }

 else {

 // increment the horizontal position:

 xPos++;

 }

 }

 }

 

 */