magnetic bots

17
http://www.instructables.com/id/Wallbots-Autonomous-Magnetic-Robots-that-Traverse/ Home Sign Up! Browse Community Submit All Art Craft Food Games Green Home Kids Life Music Offbeat Outdoors Pets Photo Ride Science Tech Wallbots: Autonomous Magnetic Robots that Traverse Vertical Surfaces by staceyk on May 8, 2009 Table of Contents License: Attribution Non-commercial Share Alike (by-nc-sa) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Intro: Wallbots: Autonomous Magnetic Robots that Traverse Vertical Surfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 step 1: Gather Materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 step 2: Hack the Servo Motors to Allow for Continuous Rotation (Part 1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 step 3: Hack the Servo Motors to Allow for Continuous Rotation (Part 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 step 4: Flip the rotation of one of the motors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 step 5: Re-assemble the motors back together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 step 6: Attach the Magnetic Wheels to Each Motor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 step 7: Connect the Servos to the Arduino Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 step 8: Attach the Photoresistors to the Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 step 9: Connect the RGB LED to the Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 step 10: Connect the Battery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 step 11: Upload the Code onto the Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 step 12: Create the robot casing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Upload: ilyas-paghdiwala

Post on 10-Oct-2014

49 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Magnetic Bots

http://www.instructables.com/id/Wallbots-Autonomous-Magnetic-Robots-that-Traverse/

Home   Sign Up!   Browse   Community   Submit

   All     Art     Craft     Food     Games     Green     Home     Kids     Life     Music     Offbeat     Outdoors     Pets     Photo     Ride     Science     Tech

Wallbots: Autonomous Magnetic Robots that Traverse Vertical Surfacesby staceyk on May 8, 2009

Table of Contents

License:   Attribution Non-commercial Share Alike (by-nc-sa) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Intro:   Wallbots: Autonomous Magnetic Robots that Traverse Vertical Surfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

step 1:   Gather Materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

step 2:   Hack the Servo Motors to Allow for Continuous Rotation (Part 1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

step 3:   Hack the Servo Motors to Allow for Continuous Rotation (Part 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

step 4:   Flip the rotation of one of the motors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

step 5:   Re-assemble the motors back together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

step 6:   Attach the Magnetic Wheels to Each Motor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

step 7:   Connect the Servos to the Arduino Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

step 8:   Attach the Photoresistors to the Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

step 9:   Connect the RGB LED to the Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

step 10:   Connect the Battery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

step 11:   Upload the Code onto the Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

step 12:   Create the robot casing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Page 2: Magnetic Bots

http://www.instructables.com/id/Wallbots-Autonomous-Magnetic-Robots-that-Traverse/

License:   Attribution Non-commercial Share Alike (by-nc-sa)

Intro:  Wallbots: Autonomous Magnetic Robots that Traverse Vertical SurfacesThis Instructable will teach you how to create magnetic robots that traverse vertical surfaces. These robots can move on any metallic walls, including elevators,whiteboards, refrigerators or metal doors.

The robots are outfitted with several light sensors, allowing them to respond to simple user interactions. My implementation supports 3 robot 'personalities', which can bechanged by covering the topmost light sensor:Red robots move fast, going towards objects (such as human hands or other robots)Green robots move slower, turning away from objectsYellow robots move the slowest, and stop completely when motion or objects are detected

This instructable details my first prototype. In the future I plan to build in more complex, autonomous behaviors. I will use these robots to engage people in public spacessuch as elevators or hallways. In doing so, I hope to facilitate creative interaction between people and technology in mundane, everyday settings.

Stacey [email protected] Computer Interaction InstituteCarnegie Mellon University

for Making Things Interactive, Spring '09

*** UPDATE ***I recently made another version of this project using continuous servo's from sparkfun and a custom-cut PCB. The new robot is much much sturdier:http://www.youtube.com/watch?v=DtwVwc91XYs

step 1: Gather MaterialsTo make one robot, you will need:

2 servo motors http://www.rctoys.com/rc-toys-and-parts/DF-SRV-6G/RC-PARTS-DRAGANFLY-SERVOS.html?utm_source=googlebase_froogle&utm_medium=US&utm_term=DF-SRV-6G4 light sensors http://www.goldmine-elec-products.com/prodinfo.asp?number=G140254 2.2 K resistors4 10K resistors1 100 ohm resistors1 Arduino Mini http://www.arduino.cc/en/Main/ArduinoBoardMini6 magnetic disks http://www.kjmagnetics.com/proddetail.asp?prod=R82011 RGB LED http://www.superbrightleds.com/pdfs/RGB-1WS.pdf1 lightweight Battery http://www.sparkfun.com/commerce/product_info.php?products_id=731Some hard wire (not easily bendable)

Page 3: Magnetic Bots

http://www.instructables.com/id/Wallbots-Autonomous-Magnetic-Robots-that-Traverse/

Electric TapeWireShrink TubingCardboard or paperHot glue or epoxy

You will also need access to:Soldering IronHot glue gun (or epoxy)ScissorsWire CuttersExacto Knife

Image Notes1. light sensors2. servo motor3. 10K resistor4. 100ohm resistor5. 2.2K resistor6. hard wire7. magnetic disks8. arduino mini9. rgb led10. shrink tubing

step 2: Hack the Servo Motors to Allow for Continuous Rotation (Part 1)Off-the shelf servos allow for fixed motion. We want continuous rotation in order to control robot movement. You will need to make 2 simple modifications to each servo:remove the physical rotation barriers, and hack the potentiometer into always receiving a constant signal.

The black part of the motor is designed to stop movement after 180 degrees. This is done physically- there are two plastic knobs that prevent continuous movement.

1. Pry open the servo case2. Take apart the gears3. Cut the wires off from the black casing (the next step explains what to do with them)4. Clip off the small plastic bearings that hinder continuos rotation

Page 4: Magnetic Bots

http://www.instructables.com/id/Wallbots-Autonomous-Magnetic-Robots-that-Traverse/

Image Notes1. black casing that prevents continuous motion

Image Notes1. Gear casing removed from the wires

Image Notes1. clip this2. clip this

Image Notes1. the piece of the case that prevents motion has been clipped

Page 5: Magnetic Bots

http://www.instructables.com/id/Wallbots-Autonomous-Magnetic-Robots-that-Traverse/

step 3: Hack the Servo Motors to Allow for Continuous Rotation (Part 2)Now 'trick' the potentiometer into always getting continuous signal1. Cut the red, green and yellow wires from the black casing (you should have done this in the previous step)2. Solder a 2.2K resistor between the green wire and yellow wire.3. Solder a 2.2K resistor between the red wire and the yellow wire.

Image Notes1. 2.2K resistor2. 2.2K resisotr

step 4: Flip the rotation of one of the motorsServos usually rotate in the same direction given the same analog signal. We'll need to arrange them symmetrically on the robot, so we'll have to reverse one of them.This can be done in code or hardware (I did hardware b/c I'm lazy with code).

To do a hardware direction reverse:1. cut the red and blue wires that go from the motor to the motor's board2. solder the red to the blue, and the blue to the red (criss-cross the wires)

Page 6: Magnetic Bots

http://www.instructables.com/id/Wallbots-Autonomous-Magnetic-Robots-that-Traverse/

Image Notes1. red-> blue (flipped)2. blue -> red (flipped)

step 5: Re-assemble the motors back togetherThis step is easy! Gently tuck the wires back into the case of the servos as much as you can and re-assemble the gears. I couldn't get the casing to fit after I added theresistors, so I taped everything back with electric tape.

step 6: Attach the Magnetic Wheels to Each MotorI used hot glue to do the 'attaching'- but any type of strong adhesive should work.

1. Cut 2 equal pieces of the hard wire. It should be about 1 inch long for each wheel.2. Hot glue each wire into the top gear of each servo. Make sure the wire is centered.3. Hot glue 3 magnetic disks onto the end of each wire*. Make sure the disks are centered.

*actually, I've found that once the magnets are glued on, working with the servos becomes really annoying- the stick to everything. You may want to hold off and do thisat the very end.

Page 7: Magnetic Bots

http://www.instructables.com/id/Wallbots-Autonomous-Magnetic-Robots-that-Traverse/

Image Notes1. hot glue2. hot glue

Image Notes1. hot glue2. hot glue

step 7: Connect the Servos to the Arduino BoardI'm using the Arduino Servo library, so I use pins 9 and 10 to drive the motors. So my setup looks like this:

Pin 9 -> Orange wire of Servo 1Pin 10 -> Orange wire of Servo 2

Ground -> Black wires of Servos 1 and 2VCC -> Red wires of Servos 1 and 2

Page 8: Magnetic Bots

http://www.instructables.com/id/Wallbots-Autonomous-Magnetic-Robots-that-Traverse/

Image Notes1. pin 102. pin 93. Raw (vcc)4. Ground

step 8: Attach the Photoresistors to the ArduinoAttach each photoresistor (light sensor) to the Arduino. There are 4 sensors, for the left, right, front and top of the robot.

The circuit diagram for each light sensor is shown below. One wire of the sensor goes to VCC (power). The other wire connects to the 10K and 100 ohm Resistors. The10K resistor connects to ground. the 100ohm resistor connects to the input pin. The input (green wire) of each sensor goes to Analog Pins on the mini (A0, A1, A2, A3).

In my code, I have set it up like this:Analog 0 -> Top SensorAnalog 1 -> Left SensorAnalog 2 -> Front SensorAnalog 3 -> Right Sensor

Image Notes1. 100 ohm resistor2. 10K resistor3. Power (VCC)4. Analog In on the arduino (pins A0-A3)5. Ground

Page 9: Magnetic Bots

http://www.instructables.com/id/Wallbots-Autonomous-Magnetic-Robots-that-Traverse/

Image Notes1. Analog Pins 0-3, connecting to the light sensors

step 9: Connect the RGB LED to the ArduinoYou can use any RGB LED, and connect it to any of the PWM pins on the Arduino. I'm only using Green and Red Colors, so my setup is:

Red-> Pin 5Green -> Pin 6Ground -> Ground

You may want to put a resistor between each pin and the LED (on the order of 200 ohms). I didn't do this bc my LED can take much higher current than the arduino cansupply, so it will not burn out.

Image Notes1. Red->Pin 52. Green - > pin 63. Ground -> Ground

step 10: Connect the BatteryBasically, any battery that supplies around 3-4volts will work, the lighter the better. I used the sparkfun Lithium battery. Attaching it is easy. Ground goes to ground, powergoes to raw VCC on the arduino.

Page 10: Magnetic Bots

http://www.instructables.com/id/Wallbots-Autonomous-Magnetic-Robots-that-Traverse/

step 11: Upload the Code onto the ArduinoI'm pasting my code below. Each sensor is sampled, and the robot moves depending on which sensor detects a human hand, and whether or not it's red, green, or yellow(if it should move away or towards objects).

/*Wallbots CodeStacey KuznetsovMay 6, 2009for Making Things Interactive, Spring '09

This is the basic code to drive robotic movement of 2 sevo motors based on inputfrom 4 light sensors. Motion supports several settings, based on the robot mode.Red robots move fast, towards objects (when light sensors detect darkness)Green robots move at medium speed, away from objects (away from darker areas)Yellow robots move slowerly, and stop to blink when objects are detected

The purpose of these robots is to move on walls using magnetic wheels.Supported movement includes right, left and forward directions. Severalspeeds are implemented based on the robot mode.

The light sensors auto-calibrate on reboot or when the top sensor is coveredfor more than 3 seconds.

*/

#include <Servo.h>

// Right and left servosServo servo1;Servo servo2;

// Light Sensorsint topSensor = 0; //700int leftSensor = 1; /// Threshhold is 400int frontSensor = 2; //400int rightSensor = 3; //300

// Hardcoded thresholds (not used because we auto-calibrate)int topThreshhold = 400;int leftThreshhold = 550;int frontThreshhold = 200;int rightThreshhold = 650;

// Current robot type (red gree or yellow)int STATE = 0;

// State valuesint RED = 0;int GREEN = 1;int ORANGE = 2;

// Pins to drive the top tri-color LEDint redPin = 5;int greenPin = 6;

// Values to hold sensor readingsint front;int right;int left;int top;

// Auto-calibrate light sensor thresholdsvoid calibrate() {Serial.println("CALIBRATING");long int val = 0;for (int i = 0; i<5; i++) {val += analogRead(frontSensor);delay(10);}frontThreshhold = (val /5) - 80;val = 0;

for (int i = 0; i<5; i++) {val = val + analogRead(topSensor);Serial.println(analogRead(topSensor));Serial.println(val);delay(10);}

topThreshhold = (val /5) -200;

val = 0;for (int i = 0; i<5; i++) {val += analogRead(rightSensor);}

Page 11: Magnetic Bots

http://www.instructables.com/id/Wallbots-Autonomous-Magnetic-Robots-that-Traverse/

rightThreshhold = (val /5) - 100;val = 0;for (int i = 0; i<5; i++) {val += analogRead(leftSensor);}leftThreshhold = (val /5) - 100;

// Print threshold values for debugSerial.print("top: ");Serial.println(topThreshhold);Serial.print("right: ");Serial.println(rightThreshhold);Serial.print("left: ");Serial.println(leftThreshhold);Serial.print("front: ");Serial.println(frontThreshhold);

}

void setup(){// turn on pin 13 for debugpinMode(13, OUTPUT);digitalWrite(13, HIGH);// setup sensor pinsfor (int i = 0; i<4; i++) {pinMode(i, INPUT);}Serial.begin(9600);calibrate();// generate a random stateSTATE = random(0, 3);setColor(STATE);}

// MOTOR FUNCTIONS

void turnLeft(){Serial.println("LEFT");

start();delay(20);for (int i = 0; i<20; i++) {servo2.write(179);servo1.write(1);delay(20);}stop();delay(20);}

void turnRight() {Serial.println("RIGHT");start();delay(20);for (int i = 0; i<20; i++) {

servo2.write(1);servo1.write(179);delay(20);}stop();delay(20);}

void goForward(int del = 20) {Serial.println("FORWARD");start();delay(20);for (int i = 0; i<20; i++) {servo1.write(179);servo2.write(179);delay(del);}stop();delay(20);}

void stop() {servo1.detach();servo2.detach();delay(10);}

Page 12: Magnetic Bots

http://www.instructables.com/id/Wallbots-Autonomous-Magnetic-Robots-that-Traverse/

void start() {servo1.attach(10);servo2.attach(9);

}

// Set the color of the top tri-color LED based on the current statevoid setColor(int color) {if (color == RED) {digitalWrite(greenPin, 0);analogWrite(redPin, 180);}else if (color == GREEN) {digitalWrite(redPin, 0);analogWrite(greenPin, 180);}else if (color == ORANGE) {analogWrite(redPin, 100);analogWrite(greenPin, 100);}}

// Blink the yellow color (when robot is confused)void blinkOrange() {for (int i = 0; i<5; i++) {analogWrite(redPin, 100);analogWrite(greenPin, 100);delay(300);digitalWrite(redPin, 0);digitalWrite(greenPin, 0);delay(300);}

analogWrite(redPin, 100);analogWrite(greenPin, 100);

}

void loop(){

top = analogRead(topSensor);long int time = millis();while (analogRead(topSensor) < topThreshhold) {delay(10); // while there is an arm wave from the user don't do anything}if ((millis() - time) > 3000) {// if the sensor was covered for more than 3 seconds, re-calibratecalibrate();}

// if the top sensor was covered, we change stateif (top < topThreshhold) {STATE = (STATE+1) %3;setColor(STATE);Serial.print("CHANGED STATE: ");Serial.println(STATE);}

// Read the other sensorsright = analogRead(rightSensor);left = analogRead(leftSensor);front = analogRead(frontSensor);

if (STATE == RED) {// go towards objectsif (front < frontThreshhold) {goForward();} else if (right < rightThreshhold) {turnRight();} else if (left<leftThreshhold) {turnLeft();} else {goForward();}}if (STATE == GREEN) {// go away from objectsif (front < frontThreshhold) {int dir = random(0,2);if (dir == 0 && right > rightThreshhold) {turnRight();} else if (dir == 1 && left > leftThreshhold) {turnLeft();}

Page 13: Magnetic Bots

http://www.instructables.com/id/Wallbots-Autonomous-Magnetic-Robots-that-Traverse/

} else if (right < rightThreshhold) {if (left > leftThreshhold) {turnLeft();} else {goForward();}} else if (left<leftThreshhold) {if (right > rightThreshhold) {turnRight();} else {goForward();}} else {goForward();}delay(200);}

if (STATE == ORANGE) {// only move if there are no hand motions- otherwise blinkint dir = random(0, 3);if (left<leftThreshhold || right<rightThreshhold ||front<leftThreshhold) {blinkOrange();} else {if (dir == 0) {goForward();} else if (dir == 1) {turnRight();} else if (dir == 2) {turnLeft();}delay(1000);}delay(10);}}

step 12: Create the robot casingSince this robot will move vertically, it is important to make the casing as light as possible. I used cardboard, but paper or lightweight plastic will work too.

Before doing this step, make sure the code works and you can tell which servo is right and which is left.

I hot-glued the servos onto the cardboard base, and arranged the sensors to be on top, right, left, or front of the robot. I then created 'walls' of the case with morecardboard. I cut out the holes to fit light sensors and motor gears. The top of my robot is just a piece of paper!

... and you're done!

Image Notes1. left servo2. right servo3. top sensor4. front sensor5. left sensor6. right sensor7. rgb LED8. arduino9. Ground (-) wire for the battery10. VCC (+) wire for the battery)

Image Notes1. hole for the photo resistor2. space for the servo gears

Page 14: Magnetic Bots

http://www.instructables.com/id/Wallbots-Autonomous-Magnetic-Robots-that-Traverse/

Related Instructables

Hexabot: Builda heavy dutysix-leggedrobot! byrpantaleo

My AutonomousHomeMadeWall-E Robot(slideshow) bydjsures

Build a VerySmall Robot:Make TheWorld'sSmallestWheeled RobotWith A Gripper.by mikey77

Building SmallRobots: MakingOne Cubic InchMicro-SumoRobots andSmaller bymikey77

Robots (guide)by InstructablesGuides

My AutonomousCookie MonsterRobot(slideshow) bydjsures

Ard-e: The robotwith an Arduinoas a brain byimadami

Electro-Graf byQ-Branch

Advertisements

Comments36 comments Add Comment

 Cynar says:  Aug 6, 2010. 12:18 PM  REPLYIf you added a larger flat magnet in the middle of the robot it would give you a bit more weight to play with(just need to be careful of slippage). Good showthough :-)

 louisr90 says:  Jun 15, 2009. 11:04 PM  REPLYhow exactly would u upload the code the the control circuit and is there anyway for u to make a "kit" that other people could buy

 staceyk says:  Aug 6, 2010. 11:13 AM  REPLYYea i have a pcb, and bunch of extra boards i printed back in the day. it's pretty easy to put together

 PS118 says:  May 11, 2009. 10:50 AM  REPLYThese things are so cute! I think it's a travesty that this one wasn't "featured". BTW, How much does one cost? Also, since they travel on whiteboards, itcould be fun to give them a marker "tail" so they make designs in their travels.

 pocketspy says:  Aug 6, 2010. 9:52 AM  REPLYI like the marker idea. If you could use a smart board like Mimeo, that my ex, an art teacher uses, you could have them create art and 'save' it to yourcomputer.

Page 15: Magnetic Bots

http://www.instructables.com/id/Wallbots-Autonomous-Magnetic-Robots-that-Traverse/

 rak says:  Aug 5, 2010. 9:23 AM  REPLYI love the marker tail idea! That would be so cute. Cost wise: the servos he uses are $10 each. An arduino like his is in the range of $20. Add headers(the connectors), the leds and photocells, and shipping, and I would say that each one cost him around $70. I could make it quite a bit cheaper though,just by using a different microcontroller and buying cheaper servos in bulk.

 peanutgnome says:  Aug 5, 2010. 3:57 PM  REPLYthe opposite would be fun too - add an eraser and these would be like the Roomba robotic vacuums, but for the whiteboard. Turn them on when youleave at night and come in to a clean board in the morning!

 rak says:  Aug 5, 2010. 4:11 PM  REPLYlol. Wow this is a fun thread to be participating in! Given the processing power of arduino, I would get some proximity sensors and maybe acompass sensor, so that this thing can go up until it senses the edge, turn to the right and go for a bit, then go down and do the next row, and soon. Only thing is that you would need to install a ledge at the top much like the one on the bottom that holds the markers.

 staceyk says:  Aug 5, 2010. 9:34 PM  REPLYI recently made another version of this using continuous servo's from sparkfun (http://www.sparkfun.com/commerce/product_info.php?products_id=9347  - $13)

Some pictures here

And a demo video

I  used a custom-cut PCP, which cost me $89 for about 20ish boards?So I think the price per one is$26 for servos$5 magnets$20 arduino$5 for the custom cut board$2-3 for wires, LED's, resistors, etc

So about $60 just for the robot itself. Then, the price goes up depending on what sensors/lights/etc you put on it. Photocells are less than adollar, so  is a hall effect sensor- which you can use to detect when the robot is about to climb off a magnetic surface.

 rak says:  Aug 5, 2010. 9:43 PM  REPLYperfect timing, posting that video. I must say, using the hall effect sensor as you have just described is pretty genius. I had not thought ofthat. I am definitely going to be making something like this bot in the future, as soon as I can clear some time to do so. I would make thepcbs by hand, and I use the raw atemega chip + oscillator right on the pcb to save money. Not much to say for the servos. Also helps thatI have a fully stocked workshop for everything else.

 Cynar says:  Aug 6, 2010. 11:27 AM  REPLYhttp://www.dealextreme.com/details.dx/sku.35764 Good little miniture servo that might be helpful

 staceyk says:  Aug 6, 2010. 11:11 AM  REPLYhow do you print your own pcb?

 rlmagidson says:  Nov 24, 2009. 9:52 AM  REPLYI've read in many projects about the "how" of hacking servos, but I don't really get the "why." Why is it better to hack a servo than just buy a (cheaper) motorthat already allows for full rotation?Thanks for taking the time to educate me.- Russ

 rak says:  Aug 5, 2010. 9:20 AM  REPLYServos are an easier alternative to using dc motors such as hobby or gear motors. They feature a built in gearbox and drive circuitry. Say a servo costs10 bucks. If you get a hobby motor for $1 , you still need gears and drive circuitry. The common L293D dual motor drive chip (aka dual half bridge) costsabout 5 bucks. Not to mention this requires more pins of your microcontroller (like arduino) vs. a servo only requiring one. A gear motor (with a built ingear box) will typically cost more than a servo itself. So... servos are quick, cheap(er), and are generally more convenient. In a project like this, there's nospace to build 2 gearboxes with about a 120:1 gear ratio each. It also leaves a lot less room for error. I can't tell you how many robots I've built where thefatal error was an ever so tiny flaw in the gear train.

 nak says:  Aug 5, 2010. 12:12 PM  REPLYyep

 fluffy111 says:  Nov 28, 2009. 7:40 AM  REPLYBecouse it has got already build in drive transfer and you only mount wheels when you hack servo.

Page 16: Magnetic Bots

http://www.instructables.com/id/Wallbots-Autonomous-Magnetic-Robots-that-Traverse/

 Munchys says:  Aug 5, 2010. 10:06 AM  REPLYThey look like moving led stop/street lights

 AndyGadget says:  May 8, 2009. 3:26 PM  REPLYIt would be fascinating to have a LED at the back of each robot and give them an occasional light homing behaviour. You could than have a 'crocodile' ofmagnetic minibots.

 rak says:  Aug 5, 2010. 9:24 AM  REPLYSo now we can move this project into swarm robotics with infrared leds and recievers as the primary form of communication.

 marc.cryan says:  Aug 5, 2010. 7:41 AM  REPLYWell done!

 kinomix says:  Aug 4, 2010. 11:03 PM  REPLYI think its awesome

 killerdark says:  Aug 4, 2010. 10:39 PM  REPLYWell done!

 crossfire says:  Aug 4, 2010. 8:31 PM  REPLYI love it! Can you make a kit for it?

 noik says:  Aug 4, 2010. 9:15 AM  REPLYskills

 kcls says:  Aug 4, 2010. 5:30 AM  REPLYCool!

 shawntherobot says:  Oct 8, 2009. 11:22 AM  REPLYyou should enter this into the arduino contest

 afw11 says:  Jun 13, 2009. 6:24 PM  REPLYWhich LED did you use? Is the light sensor threshold different for each one? If so, how do you find it?

 afw11 says:  Jun 13, 2009. 6:35 PM  REPLYAlso, in the last picture, where is the battery?

 robot797 says:  May 13, 2009. 3:19 AM  REPLYdo you sell them i wanna buy 2 of them

 magicpocket says:  May 10, 2009. 7:10 AM  REPLYBeauty

 Bongmaster says:  May 9, 2009. 2:15 AM  REPLYwhat changes would need to be made if u were to use LEDs for the light sensors? (due to me only having one LDR). i understand the LED wouldnt be a verygood light sensor but it can be one aparenty :)

 munchman says:  May 9, 2009. 3:09 PM  REPLYYou can't use an LED in place of an LDR, an LED only emits light, it cannot detect it.

Page 17: Magnetic Bots

http://www.instructables.com/id/Wallbots-Autonomous-Magnetic-Robots-that-Traverse/

 Bongmaster says:  May 10, 2009. 3:29 AM  REPLYactually it can. even tho its not made to do so. its prolly not that good at it tho, but they have been used in applications like LED tables that react tomovement, the LEDs that are used as the sensors are used in between the ones that give light. check the arduino site, there are examples.

 DemonDomen says:  May 8, 2009. 2:36 PM  REPLYYou should use a board to mount the electronics. You will use less wire, it will be more robust and possibly take up less space.

 jeff-o says:  May 9, 2009. 10:41 AM  REPLYIt's fine for a prototype, but yeah, a custom PCB would be most excellent.

 Bongmaster says:  May 8, 2009. 4:06 PM  REPLYkool looks like the kind of code i need for my R2 :3