BB8 Drawing Turtle
Este proyecto trata acerca de un carrito que dibujo en base a un determinado código, caracterizado como BB8 de la saga Star Wars
BB8 Project Arduino UNO
ITESM CEM
Julieta Noemí Rivera Fonseca A00908715
María José López Ponce de León A00967886
Luz Beatriz Velázquez Delgado A01165911
Ilse Silva Vázquez A01165927
Interfaces Físicas
FINAL PROJECT:
BB-8 TURTLE
Definitively Star Wars is really important for a lot of generations and now we are living a new Star Wars era thanks to the Episode VII and the whole movies that are been produced for the next years. For this project we wanted to create something with all the knowledge we have thanks to the course and of course we wanted to use the Star Wars theme.
Our inspiration were all the drawbots we find on the Internet, but we also wanted to create our very own BB-8 inspired by a real life size BB-8 created with an Arduino, because let’s be honest, who doesn’t love BB-8? We didn’t change the original creation but to achieve the final product was really satisfying.
1. How does our BB-8 Turtle works?
With the help of two stepper motors we make the three wheels move and the sharpie that draws in the floor moves thanks to a servo we used in the front of our BB-8 Turtle. BB-8 can draw different figures thanks to the different Arduino codes we wrote: a circle, a triangle and a mandala.
2. Parts of our BB-8 Turtle
• Two stepper motors
• Three wheels
• One Arduino Uno
• One breadboard
• One 1 Ohm resistance
• Red LED strips
• One servo
• Wires
• Circular wooden board
• Two polystyrene domes of different sizes
• Two small polystyrene balls of different sizes
• One sharpie
• Two 9V batteries with they adaptors
• Acrylic paint (orange, white, black and grey)
3. Wiring it all together:
The connection of the LEDs is made the 9 volt battery cable series lights. And for the connection of the servo it is made with Pin and battery.
4. Arduino codes:
• Mandala:
#include
Servo myservo;
#define E1 5
#define E2 6
#define I1 8
#define I2 9
#define I3 10
#define I4 11
int fin=0
void setup() {
pinMode(E1, OUTPUT);
pinMode(E2, OUTPUT);
pinMode(I1, OUTPUT);
pinMode(I2, OUTPUT);
pinMode(I3, OUTPUT);
pinMode(I4, OUTPUT);
myservo.attach(3);
}
void loop() {
if (fin==0){
myservo.write(5);
delay(1000);
analogWrite(E1, 255);
analogWrite(E2, 255);
digitalWrite(I1, HIGH);
digitalWrite(I2, LOW);
digitalWrite(I3, LOW);
digitalWrite(I4, LOW);
delay(4010);
digitalWrite(I1, LOW);
digitalWrite(I2, LOW);
digitalWrite(I3, HIGH);
digitalWrite(I4, LOW);
delay(4010);
digitalWrite(I1, HIGH);
digitalWrite(I2, LOW);
digitalWrite(I3, LOW);
digitalWrite(I4, LOW);
delay(4010);
digitalWrite(I1, LOW);
digitalWrite(I2, LOW);
digitalWrite(I3, HIGH);
digitalWrite(I4, LOW);
delay(4030);
digitalWrite(I1, HIGH);
digitalWrite(I2, LOW);
digitalWrite(I3, LOW);
digitalWrite(I4, LOW);
delay(4010);
digitalWrite(I1, LOW);
digitalWrite(I2, LOW);
digitalWrite(I3, HIGH);
digitalWrite(I4, LOW);
delay(4030);
digitalWrite(I1, HIGH);
digitalWrite(I2, LOW);
digitalWrite(I3, LOW);
digitalWrite(I4, LOW);
delay(4010);
digitalWrite(I1, LOW);
digitalWrite(I2, LOW);
digitalWrite(I3, HIGH);
digitalWrite(I4, LOW);
delay(4030);
fin++;
}
else{
myservo.write(90);//Sube Lápiz
digitalWrite(I1, LOW);
digitalWrite(I2, LOW);
digitalWrite(I3, LOW);
digitalWrite(I4, LOW);
}
}
• Triángulo:
#include
Servo myservo;
#define E1 5
#define E2 6
#define I1 8
#define I2 9
#define I3 10
#define I4 11
int fin=0
void setup() {
pinMode(E1, OUTPUT);
pinMode(E2, OUTPUT);
pinMode(I1, OUTPUT);
pinMode(I2, OUTPUT);
pinMode(I3, OUTPUT);
pinMode(I4, OUTPUT);
myservo.attach(3);
}
void loop() {
if (fin==0){
myservo.write(5);
delay(1000);
analogWrite(E1, 255);
analogWrite(E2, 255);
digitalWrite(I1, HIGH);
digitalWrite(I2, LOW);
digitalWrite(I3, HIGH);
digitalWrite(I4, LOW);
delay(2000);
digitalWrite(I1, HIGH);
digitalWrite(I2, LOW);
digitalWrite(I3, LOW);
digitalWrite(I4, LOW);
delay(1500);
digitalWrite(I1, HIGH);
digitalWrite(I2, LOW);
digitalWrite(I3, HIGH);
digitalWrite(I4, LOW);
delay(2000);
digitalWrite(I1, HIGH);
digitalWrite(I2, LOW);
digitalWrite(I3, LOW);
digitalWrite(I4, LOW);
delay(1500);
digitalWrite(I1, HIGH);
digitalWrite(I2, LOW);
digitalWrite(I3, HIGH);
digitalWrite(I4, LOW);
delay(2000);
digitalWrite(I1, HIGH);
digitalWrite(I2, LOW);
digitalWrite(I3, LOW);
digitalWrite(I4, LOW);
delay(1500);
digitalWrite(I1, HIGH);
digitalWrite(I2, LOW);
digitalWrite(I3, HIGH);
digitalWrite(I4, LOW);
delay(2000);
digitalWrite(I1, HIGH);
digitalWrite(I2, LOW);
digitalWrite(I3, LOW);
digitalWrite(I4, LOW);
delay(1500);
fin++;
}else{
myservo.write(90);//Sube Lápiz
digitalWrite(I1, LOW);
digitalWrite(I2, LOW);
digitalWrite(I3, LOW);
digitalWrite(I4, LOW);
}
}
• Círculo:
#include
Servo myservo;
#define E1 5
#define E2 6
#define I1 8
#define I2 9
#define I3 10
#define I4 11
int fin=0
void setup() {
pinMode(E1, OUTPUT);
pinMode(E2, OUTPUT);
pinMode(I1, OUTPUT);
pinMode(I2, OUTPUT);
pinMode(I3, OUTPUT);
pinMode(I4, OUTPUT);
myservo.attach(3);
}
void loop() {
if (fin==0){
myservo.write(5);
delay(1000);
analogWrite(E1, 255);
analogWrite(E2, 255);
digitalWrite(I1, HIGH);
digitalWrite(I2, LOW);
digitalWrite(I3, LOW);
digitalWrite(I4, LOW);
delay(4010);
digitalWrite(I1, HIGH);
digitalWrite(I2, LOW);
digitalWrite(I3, LOW);
digitalWrite(I4, LOW);
delay(2000);
fin++;
}else{
myservo.write(90);//Sube Lápiz
digitalWrite(I1, LOW);
digitalWrite(I2, LOW);
digitalWrite(I3, LOW);
digitalWrite(I4, LOW);
}
}
5. Designing our BB-8 Turtle:
The design of our BB-8 was really easy. Using the BB-8 droid designed by Sphero as a base we painted the patterns in the polystyrene domes and put the small dome on the top of the biggest one. After that we just add some details with a sharpie and put both of his eyes with the two small polystyrene balls and in order to give it light so we can see him in the dark we put around the domes the LED strips. At the end we cover the breadboard with all the wires and the Arduino with the biggest dome.
6. What we learned:
It wasn’t easy, but we really love the final result. We understand better how the stepper motor and the servo works and also how to draw a more complicated figure in the floor, not just a simple one. Of course we had some difficult times with the wires when the LEDS didn’t work, but at least we could find what was the error and see how to fix it, something that we learn in the process of creating our very own BB-8 Turtle.
7. Final thoughts:
Definitively we worked as a team and help each other in what we better know, because as always maybe one of us is better with the wiring or the codes, or maybe with the design, but that is that it’s important in a team, to help each other so we can achieve what we are looking for. We think that we can still work in the codes in order to create more complicated figures but we are really happy with the final product of our final project.
8. Gifs:
• http://i1373.photobucket.com/albums/ag397/majolpl90/Gif7_zpscrragk1v.gif
• http://i1373.photobucket.com/albums/ag397/majolpl90/Gif3_zpsl5gpxbr7.gif
• http://i1373.photobucket.com/albums/ag397/majolpl90/Gif6_zpszyzx4ll5.gif
• http://i1373.photobucket.com/albums/ag397/majolpl90/Gif2_zpsp8hxv3ld.gif
• http://i1373.photobucket.com/albums/ag397/majolpl90/Gif1_zpsum4wp03j.gif
• http://i1373.photobucket.com/albums/ag397/majolpl90/Gif9_zpslyq27jmo.gif
9. Bibliography:
ASCAS. (2016). Autodesk, Ink. Instructables.com. DIY Life-Size Phone Controlled BB8 Droid. Recuperado el 10 de abril de 2016, de: https://www.instructables.com/id/DIY-Life-Size-Phone-Controlled-BB8-Droid/?ALLSTEPS
Sternchen, C. (2015). Youtube.com. Carrito controlado por vía bluetooth utilizando arduino uno. Recuperado el 13 de abril de 2016, de: https://www.youtube.com/watch?v=D6n69O2XYO0
Scarmenman. (2016). Autodesk, Ink. Instructables.com. Arduino Bluetooth Controled RC Car. Recuperado el 13 de abril de 2016, de: https://www.instructables.com/id/Arduino-Bluetooth-Controled-RC-Car/