Friday, January 31, 2014

Arduino powered Roomba Robot

I have taken a iRobot Roomba vacuum cleaner apart and made an Arduino Powered robot out of it.  There is a serial port on the Roomba, but mine was dead so I wanted to do a complete rebuild.  I am using a L298 motor controller IC.  The Arduino is on the back right corner in the picture below.

At first I was just interested in how much power the Roomba has.  It easily got around with about 20 pounds of added weight and could push chairs out of its way.  My long term goal is to make a life sized robo-raptor and this would make a nice foot.  I have videos of a 2 foot long robo-raptor also under control of an Arduino.

Here are the videos:
http://www.youtube.com/watch?v=6Kd9IM1UDb8

http://www.youtube.com/watch?v=f9-WJ3wGICo

Thursday, January 9, 2014

Arduino powered Robo-Raptor

I have been working on rebuilding a Robo Raptor to be controlled by an Arduino.  It is a key project in my latest book "Arduino Robotics Projects" available on Amazon.

Here is a link to the video on YouTube:
http://youtu.be/O8E3QBfjXO0

Here is a picture of the Arduino and motor control shield attached to the robo raptor:

Here is a picture taken from the video of it in demo mode:
After that picture was taken I managed to get it working on its batteries.

Here is the code for the demo.

// Robo-Raptor Demo
// demonstrates several actions the robo raptor can take.
// Written December 2013 by Bob Davis

#include AFMotor.h
#include Servo.h
// create servo object to control a servo 
Servo myservo;
// mororr moves the right leg
// create motor #2, 64KHz pwm
AF_DCMotor motorr(2, MOTOR12_64KHZ);
// motorl moves the left leg
// create motor #4, 64KHz pwm
AF_DCMotor motorl(4, MOTOR12_64KHZ);
// motorw wiggles the tail, head moves too
// create motor #1, 64KHz pwm
AF_DCMotor motorw(1, MOTOR12_64KHZ);
// motorh moves the head up and down
// create motor #3, 64KHz pwm
AF_DCMotor motorh(3, MOTOR12_64KHZ);
char INBYTE;
// Set A6 as an output pin for speaker
int SpkrPin = 19;
int roar;

void setup() {
  motorr.setSpeed(255);     // set the speed to 255/255
  motorl.setSpeed(255);     // set the speed to 255/255
  motorw.setSpeed(255);     // set the speed to 255/255
  motorh.setSpeed(255);     // set the speed to 255/255
  pinMode(SpkrPin, OUTPUT);
  // The servo is on pin 9 
  myservo.attach(9); 
}

void loop() {
  // Sequence of Motor control commands:
  // wait for tail switch to get started
  // wiggle tail back and forth
  // raise and lower head three times
  // take a few steps walking forward
  // make a roaring sound 

  // Wait for tail switch to start demo
  while (analogRead(A0) != '0'){}

  // wiggle tail
  motorw.run(BACKWARD);    // wiggle right
  delay(200);  // pause
  motorw.run(RELEASE);     // stopped
  delay(300);
  motorw.run(FORWARD);     // wiggle left
  delay(200);  // pause
  motorw.run(RELEASE);     // stopped
  delay(300);
  motorw.run(BACKWARD);    // wiggle right
  delay(200);  // pause
  motorw.run(RELEASE);     // stopped
  delay(300);
  motorw.run(FORWARD);     // wiggle left
  delay(200);  // pause
  motorw.run(RELEASE);     // stopped
  delay(300);
  motorw.run(BACKWARD);    // wiggle right
  delay(200);  // pause
  motorw.run(RELEASE);     // stopped
  delay(300);
  motorw.run(FORWARD);     // wiggle left
  delay(200);  // pause
  motorw.run(RELEASE);     // stopped
  delay(300);

  // raise and lower head
  motorh.run(FORWARD);     // raise head
  delay(300);  // pause
  motorh.run(BACKWARD);    // lower head
  delay(300);  // pause
  motorh.run(RELEASE);     // stopped
  delay(500);
  motorh.run(FORWARD);     // raise head
  delay(300);  // pause
  motorh.run(BACKWARD);    // lower head
  delay(300);  // pause
  motorh.run(RELEASE);     // stopped
  delay(500);
  motorh.run(FORWARD);     // raise head
  delay(300);  // pause
  motorh.run(BACKWARD);    // lower head
  delay(300);  // pause
  motorh.run(RELEASE);     // stopped
  delay(500);
   
  // walk straight forward
  motorr.run(FORWARD);     // right foot forward
  delay(300);  // pause
  motorr.run(BACKWARD);    // right foot backward
  delay(300);  // pause
  motorr.run(RELEASE);     // stop right foot
  delay(300);  // pause
  motorl.run(FORWARD);     // left foot forward
  delay(300);  // pause
  motorl.run(BACKWARD);    // left foot backward
  delay(300);  // pause
  motorl.run(RELEASE);     // stop left foot
  delay(300);  // pause
  motorr.run(FORWARD);     // right foot forward
  delay(300);  // pause
  motorr.run(BACKWARD);    // right foot backward
  delay(300);  // pause
  motorr.run(RELEASE);     // stop right foot
  delay(300);  // pause
  motorl.run(FORWARD);     // left foot forward
  delay(300);  // pause
  motorl.run(BACKWARD);    // left foot backward
  delay(300);  // pause
  motorl.run(RELEASE);     // stop left foot
  delay(300);  // pause
  motorr.run(FORWARD);     // right foot forward
  delay(300);  // pause
  motorr.run(BACKWARD);    // right foot backward
  delay(300);  // pause
  motorr.run(RELEASE);     // stop right foot
  delay(300);  // pause
  motorl.run(FORWARD);     // left foot forward
  delay(300);  // pause
  motorl.run(BACKWARD);    // left foot backward
  delay(300);  // pause
  motorl.run(RELEASE);     // stop left foot
  delay(300);  // pause

  //open mouth
  myservo.write(0); 
  delay(300);

  // roar
  for (roar=200; roar > 0; roar--) {
    digitalWrite(SpkrPin, HIGH);   // sets the speaker on
    delay(random(10));        // waits for a fraction of a second
    digitalWrite(SpkrPin, LOW);    // sets the speaker off
    delay(random(10));        // waits for a fraction of a second
  }
  //close mouth
  myservo.write(90); 
  delay(300);


}


Toshiba L645 Disassembly and fan cleaning.


I recently had a Toshiba L645 come in for a power jack replacement and a fan cleaning.  The power jack comes as a cable assembly that has to be ordered to fit the laptop.  There are some tricks to getting it apart.  There are screws in the battery compartment holding the trim that covers the screws that holds in the keyboard.  There is a screw inside of the memory compartment that holds the CD ROM drive in, and once it is removed there is a screw located above where the drive was.

1 – Remove the 12 bottom screws.
2 – Remove the 2 screws for the hard drive drawer, and remove hard drive.
3 – Remove the battery and remove 5 screws located below the battery.
            The two smaller screws hold the keyboard bezel cover in place.
4 – Remove three keyboard bezel, the screws above the keyboard, and the keyboard.
5 – Remove the seven screws under the keyboard, the right two are shorter.
6 – Remove the 3 screws and the memory cover, inside there is the CD ROM screw.
7 – Remove the CD-ROM drive and the screw hidden above it.
8 – Unscrew and/or unplug the wireless network card.
9 – Unplug the mouse, speakers and power switch, remove the top cover of the laptop.
10 – Un-tape and unplug the video cable, and the USB/VGA jack cable.
11 – Remove three motherboard screws marked with white arrows, and one fan screw.
12 – Remove motherboard with the fan assembly.
13 – Remove 4 super tiny screws and remove the fan cover to clean the fan.

As you can see in the picture the fan was fairly clogged with dust.  A small paint brush can remove the dust.  The picture quality is not that great, I was using my cell phone camera.

When I reassembled it the screen did not work.  The screen plug looked like it was plugged in but it was not inserted properly.  You might want to mark the tape that holds it in with a marker prior to unplugging it so you know if you have it back together correctly.

This picture shows the 5 screws that are located below the battery.  Two of them hold the cover that gives access to the keyboard screws.

Wednesday, January 8, 2014

Three color RGB 8x8 LED Array

I recently obtained an 8 by 8 three color RGB LED array to play with.  I set it up with three 74595 shift registers and an arduino.  It was really easy to get it working.  Here is a link to the company that sells the LED array.
http://www.icstation.com



Here is the video of it working on youtube:
http://youtu.be/wdONGo4giHs

I might eventually post the code but it follows my code that was used for the two color 8x8 arrays that is found in my book "Arduino LED Projects".

Here is a blue smiley face (with white hair) using the RGB array:

Here is a red, green, and blue flag using the RGB array:

I am contemplating making a larger RGB sign so I can do scrolling text in full color.
This is the schematic diagram: