Motor drivers

After testing out the motor drivers during the weekend, we found out that the robot needs a motor driver for each motor. The circuit diagram for that would be:

  • Pin X will be pin 11 on the driver on the left and pin 5 on the driver on the right
  • Pin Y will be pin 10 on the driver on the left and pin 3 on the driver on the right
  • the motors will share the pins on the board
  • dont forget that this is the schematic for motor driver SN754410NE
  • for the left side you just copy the same settings for the motors
  • This circuit does not implement PWM which you need to advance in your project
if you need any help post a comment here or talk to me in class

Moving the Robot

i wrote this code to move the robot forward and back

I set it up in functions so people would be able to see what code is doing what

int motor_left[] = {3, 5};          //the pins for the left motor
int motor_right[] = {10, 11};         //the pins for the right motor

void setup() {
  //setting up the pins as output
  pinMode(motor_left[0], OUTPUT);
  pinMode(motor_left[1], OUTPUT);
  pinMode(motor_right[0], OUTPUT);
  pinMode(motor_right[1], OUTPUT);


void loop() {
      //moving the robot then waiting for the delay to pass
      delay (2000);
      delay (2000);
      delay (2000);
      delay (2000);

void goForward()
      digitalWrite(motor_left[0], HIGH);
      digitalWrite(motor_left[1], LOW);
      digitalWrite(motor_right[0], HIGH);
      digitalWrite(motor_right[1], LOW);
void Stop()
      digitalWrite(motor_left[0], LOW);
      digitalWrite(motor_left[1], LOW);
      digitalWrite(motor_right[0], LOW);
      digitalWrite(motor_right[1], LOW);

void goBackward()
      digitalWrite(motor_left[0], LOW);
      digitalWrite(motor_left[1], HIGH);
      digitalWrite(motor_right[0], LOW);
      digitalWrite(motor_right[1], HIGH);

Java Examples




i created other copies of the examples that are easier to use and to import to eclipse


that’s the link for the new examples and here is how to get them into eclipse or motodev (i used motodev and they are exactly the same)

these are the steps to get the projects to work:

Starting Off With Processing

The first part we are working on is getting the art we plan on drawing using our robots to be compiled and done in processing and then moved into a simulation in java.

So for the grid i made it into a 10 x 10 grid each box being 10 x 10 pixels. The idea I was hoping to accomplish as a first step is getting the robot to draw 2 parallel squares.

The code i used to generate the grid as well as the boxes in processing was

int nbOfHorizontalLines = 10;
int nbOfVerticalLines = 10;

void setup()
  size (500,500);

void draw()
  background (100,100,100);

  float distanceBetweenHorizontalLines = (float)height/nbOfHorizontalLines;          //giving the distance between the lines a constant value
  float distanceBetweenVerticalLines = (float)width/nbOfVerticalLines;

  for(int i = 0; i < nbOfHorizontalLines; i++)
    line(0, i*distanceBetweenHorizontalLines, width, i*distanceBetweenHorizontalLines);


  for(int i = 0; i < nbOfVerticalLines; i++)
    line (i*distanceBetweenVerticalLines,0,i*distanceBetweenVerticalLines, height);
  rect(200, 50, 100, 100);
  rect(200, 200, 100, 100);

Architectural Information on ATmega16

We start of with it being a RISC (Reduced Instruction Set Computer) Architecture. By that it means it has a small amount of simple built in instructions (131 instructions to be exact) but using those functions together allows it to perform the complex instructions. Having a register-based having both the operand and the operation are stored in the register making it perform the operations without referring to memory. Being based on the Harvard Architecture equips the chips with dedicated memories and buses for the program and the data. With all those features being packed in the chip giving the capability of running one instruction per cycle.

The chip is one of the most commonly used prototyping because of the way it is built. the user can interface directly with the ports allowing the user to manipulate them to his liking and practically removing many of the interfacing restrictions.

The Construction of our Robots!!

During the class we worked in groups of two to build our robots to either be stationary bots or mobots (moving robots). our group was chosen to work on the stationary robot. and here are a few pictures we took of the process.

StatoBot Before Assembly

Some Solutions to the Chess Bots

There were several unsolved problems, some of which:

1- Getting the 45 degree turns to work.

2- Getting the motors to move the right space every time.

which can be solved by using an encoder. By adding a photo-transistor and a very small led allowing us to count the turns on each wheel. By doing that we will know how to move the robot exactly as needed. They would two of the major problems in the project and allow money to be spent elsewhere.

that is a link to them but they can be easily built for a lower price if the price was too high.

Hello world!

Welcome to my blog about Robots.This blog was a project for a class. This site will cover things about robotics and the advancement of the class.

its a pleasure to have you here and see you next time,