Our first project in class is to create a rolling robot.
Above is our plan to create a rolling robot.
We learned what a circuit diagram is. They are drawings meant to represent electrical circuits using symbols
The purpose of a circuit diagram is to communicate information about an electrical circuit quickly without having to make a long description.
We practiced making circuit diagrams and circuit pictures using different websites, like tinker-cad.
We were asked to research three different examples of a rolling robot to help give us an idea of how to build it when it is our turn to try. The pictures below show what I found through my research. The links to the websites are in the titles of the sections.
This recourse shows how to build a rolling robot, and uses many supplies similar to the ones I have access to. It is helpful to see an example of how to do it when creating a robot, and this shows the idea of using a piece of plastic as a body to build off of, called a chassis.
This resource is a step by step instruction on how to build a Lego car. It provides ideas on what items to use, and how to improvise if something doesn't fit, or doesn't work, and will be helpful when making my robot, it also gave the idea of using a steel ball in the from to help deal with the balance issues of only having two wheels.
This resource was a video of a person building a rolling robot with some similar materials to mine. Although the supplies are not identical, there were similarities, and the video can give ideas about how to set up the robot, and where to place the similar pieces on my robot when I build it.
We made this circuit diagram to represent the servos we set up
After wiring and coding the servos, I took a video of the moving servos, here is a link to the code used
I decided to start with a configuration similar to the third idea I found as a prototype, except using cardboard as the base, and replacing the motors with servos, and the sensors will not have the stand. There might also be some alterations in positioning.
Here is a circuit picture that I used when wiring my robot
Here is an updated circuit diagram of my rolling robot
Here is a video of my robot moving and turning.
Here is the Arduino code
To the left is a video of the course my robot will take.
To the left is a video of my robot traversing the course. To the right is an explanation of my robot.
To ensure that I don't mess up the wiring later on, I put a label on each wire marking where it is supposed to be. This will be helpful when troubleshooting and adding parts to the robot.
This is a circuit picture of how to wire the Arduino nano and ultrasonic sensor. There is a link to the website I found in the heading. The website contains a video showing the sensor being used, a circuit picture to show the wiring, and an explanation and example of how to code the sensor using Arduino. The wiring diagram shows that from the Trig and Echo ports, the wires should connect to a spot designated int he code, the VCC port should connect to 5V on the Arduino, and the two GNDs should connect to each other.
This is a document that contains the data sheet for the ultrasonic sensor in the link titled Source 1. It also contains a a description of how it senses the distance of objects in the link titled Source 2. The sensor emits a short ultrasonic pulse, that is reflected back by an object. This is received by the sensor and converted into an electrical signal.
In class, our teacher tested our ability to code our robots, and gave us an assignment to code. Mine was:
90 degree standard turn to the left
Forward for 5 seconds.
Stop for three seconds
Backwards for three seconds
For extra credit:
a full 360 tank turn to the right and
a full tank 360 degree tank turn to the left.
#include <Servo.h>
Servo myservoL;
Servo myservoR;
void setup()
{
myservoL.attach(9);
myservoR.attach(10);
}
void loop() {
//90 degree standard turn to the left
myservoR.write(0);
myservoL.write(90);
delay(3400);
//Forward for 5 seconds.
myservoR.write(0);
myservoL.write(180);
delay(2500);
//180 degree tank turn to the left
myservoR.write(0);
myservoL.write(0);
delay(3250);
//Stop for three seconds
myservoR.write(90);
myservoL.write(90);
delay(3000);
//Backwards three seconds
myservoR.write(180);
myservoL.write(0);
delay(3000);
//For extra credit: After the above commands get your robot to do
//a full 360 tank turn to the right and
myservoR.write(180);
myservoL.write(180);
delay(7500);
//a full tank 360 degree tank turn to the left.
myservoR.write(0);
myservoL.write(0);
delay(7500);
}
Above is a circuit picture of my Ultrasonic sensor and my Arduino
Above is a video of my sensor displaying the results of a hand moving in front of it. The sensor works by emitting a short ultrasonic burst, and when it reflects back, it can determine the distance it traveled.
Sensor Code
A function in coding is a set of commands that can be referenced easily for repetitive motions.
An example of real-life functions is to the left
I made sure that my sensor was facing the front of the robot, with an unobstructed view forward.
To the left is a real-life example of an if/else statement.
An if/else statement is a set of commands that is only used when certain conditions are met
In class we coded our robots to avoid obstacles by backing up and turning. To the left is a video of my robot reacting to objects in its path.
To the left is an updated circuit picture. It shows the wiring and parts of my robot, and is color-coded. The wires for power are all red, the ground wires are all black, the servo wires that connect to the Arduino are both yellow, and the remaining wires on the ultrasonic sensor are green and blue.
All Electronic Components Must be Enclosed (includes everything but the servo horns and the wheels).
Function requirements/constraints
Needs to function (can’t bee too heavy).
No slipping allowed.
The weight must balance equally-- needs to be stable, not having the body of the robot touching the ground.
Select materials that are rigid enough for their intended function (not sagging).
Usability Constraints
Have some type of easily removable door/cover/etc?
Easy battery Access
Easy access to Arduino 5V
Easy access to breadboard Red Row
Easy access to the reset button.
Easy access to the “B” end of the arduino A-B Cable port.
Aesthetic Requirements/Constraints
Size--not bigger than a microwave.
Covering is colorful and neatly crafted / uses any materials that you have at home.
Craftsmanship--
Neat
Clean Glue edges
Pieces and parts match up (edges fit together).
This is a picture of a robot that was made out of wood. Although it does not fit my constraints, it is an example of a robot that is similar to the one I want to make, and the way that they fit the "eyes" of the sensor into the robot without it standing out.
This is a video showing how to make the robot. Again, it does not perfectly fit my materials of constraints, but it is a good example of how to fit pieces together well, and make the electronics not stand out.
This is a robot that has very little to do with my assignment, but it does show another way to incorporate the ultrasonic sensor, and so could be useful.
Below are three possible designs for my robot
Below is a more detailed drawing of my chosen design, that includes arrows, explaining how it meets the constraints
I began cutting and then assembling the cardboard shell of my newly designed robot
Some pieces needed to be shortened to fit in the shell
I finished the shell of the robot. The top is open, but there will be a covering for it that will also hang onto the sides
Avbove is a video of me describing how my robot fits the constraints
Above is a video of my robot functioning and avoiding obstacles
To the left is a video of my Cardboard Automata. It coverts rotational motion into linear motion by turning an egg-shaped piece of cardboard. This pushes another component up, and will allow it to fall when the point turns away. This converts the rotational movement of the egg into linear motion for the straight piece. This is a cam, a device used for converting rotational motion into linear motion. My creative piece is a drawing of a Dalek attached to the linear moving part, so that it moves up and down with the rotation.