When I started taking Engineering concept we were doing online school due to Covid-19. For our first assignment, we had to make sure we had all of our items in our kit. After that, we had to take a picture and label all the different items that were included in our kit. The image beside shows the different parts and labels to show what they are.
Today we learned what circuit diagrams are. They are a graphical representation of an electrical circuit.
The purpose of a circuit diagram is for engineers to communicate circuit designs and connections.
A circuit picture uses simple images to represent the elements of a system using realistic pictures.
Today we talked about what our project will be about. We will be designing a rolling robot which is made out of the items in our kits.
This is our plan on how we will start making our rolling robot project.
This resource shows introductions on how to make your robot work by using your keyboard. This uses everything in our kit. I can see that the Arduino, breadboard, and batteries are mounted on the cardboard base and there is a lid that covers it so it looks clean. And as the wheels, this has plastic wheels. If I wanted to make this myself I could use an amazon box as the base. And wheels I could use cardboard to make my wheels or use my brother's legos as wheels.
In this resource, it uses the majority of our supplies in our kits. And in this example to the aurdino, breadboard, and batteries are mounted on the acrylic board. If I was to make this I would have to come up with my way to make the wheels and base since I don't have acrylic. I could use old cardboard boxes to make the base instead of acrylic. And for the wheels, I could use anything that's round. But I would make the wheels smaller since they are pretty big.
In the resource, it shows instruction on how to make an easy Arduino robot. In the example, the breadboard and ultrasonic distance sensor are on the front of the robot on a piece of plastic. And the Arduino is on the back of it with the servo below it. If I was to make this project I would have to make the base and the wheels out of something else since I don't have any of those items. I would also use cardboard-like in the other 2 examples for both the base and the wheels.
I'm going to build my prototype by using this photo. And I am going to use cardboard to put the arduino on top of the batteries instead of plastic.
This is the circuit picture of what the arduino looks like when you have two servos.
This is the circuit diagram of what it looks like for two servos running on batteries.
Here is the video of my two servos being able to move.
#include <Servo.h> // you will only need this line once, and it refers to a library that control servos
Servo myservo; // just defines a device called servo that is controlled by the servo library
Servo myservo2;
void setup() //this is where you set things up (only occurs once)
{
myservo.attach(9); // my servo is controlled by pin 9
myservo2.attach(11);
}
void loop() { //anything within void loops happens indfinitely
myservo.write(0); // turn my servo clockwise at full speed
delay(2000); //for 2 seconds
myservo2.write(180);
delay(2000);
<Servo.h>
Servo myservoRight;
Servo myservoLeft;
void setup()
{
myservoRight.attach(9);
myservoLeft.attach(11);
}
void loop() {
myservoRight.write(0);
myservoLeft.write(180);
delay(2000);
}
This is a circuit picture of what the arduino looks like when it has four battery packs and two moving servos.
This is a circuit diagram of what it looks like with a battery pack and 2 servos.
Here is a video of my robot traversing its path running on only batteries.
#include <Servo.h>
Servo myservoRight;
Servo myservoLeft;
void setup() {
myservoRight.attach(9);
myservoLeft.attach(11);
}
void loop() {
//stop
myservoRight.write(90);
myservoLeft.write(90);
delay(9000);
//straight
myservoRight.write(0);
myservoLeft.write(180);
delay(2500);
//left turn
myservoRight.write(0);
myservoLeft.write(90);
delay(875);
//straight
myservoRight.write(0);
myservoLeft.write(180);
delay(5000);
//right turn
myservoRight.write(90);
myservoLeft.write(180);
delay(1000);
//straight
myservoRight.write(0);
myservoLeft.write(180);
delay(8000);
//right turn
myservoRight.write(90);
myservoLeft.write(180);
delay(1000);
//straight
myservoRight.write(0);
myservoLeft.write(180);
delay(7750);
//right turn
myservoRight.write(90);
myservoLeft.write(180);
delay(1000);
//straight
myservoRight.write(0);
myservoLeft.write(180);
delay(7500);
}
This is a circuit picture of what the arduino looks like when it has a sensor that is plugged up.
This video shows what my sensor looks like plugged up and how it tells what distance there is. It works by being able to emit an ultrasound and it travels through the air and if there is an object on its path It will bounce back and sense it.
const int trigPin = 9;
const int echoPin = 11;
long duration;
int distance;
void setup() {
// put your setup code here, to run once:
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
Serial.begin(9600);
}
void loop() {
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance= duration*0.034/2;
Serial.print("Distance: ");
Serial.println(distance);
delay(2000);
This is a circuit picture of what the arduino looks like when it has a both a sensor and a servo
This is a circuit diagram of what it looks like with a battery pack, servos, and sensor all pugged in.
This video shows how my robot using the sensor to avoid 5 different obstacles in my room.
#include <Servo.h>
Servo Left;
Servo Right;
const int trigPin = 5;
const int echoPin = 6;
// defines variables
long duration;
int distance;
void setup()
{
Left.attach(11);
Right.attach(9);
pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output
pinMode(echoPin, INPUT); // Sets the echoPin as an Input
Serial.begin(9600); // Starts the serial communication
}
void loop()
{
// Clears the trigPin
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
// Sets the trigPin on HIGH state for 10 micro seconds
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
// Reads the echoPin, returns the sound wave travel time in microseconds
duration = pulseIn(echoPin, HIGH);
// Calculating the distance
distance = duration * 0.034 / 2;
// Prints the distance on the Serial Monitor
Serial.print("Distance: ");
Serial.println(distance);
if (distance > 10) {
Left.write(180);//left forward
Right.write(0);//right forward
delay(1000);
Left.write(90); //stop
Right.write(90);//stop
delay(500);
Left.write(180);//forward
Right.write(90);
} else {
Left.write(180);
} Right.write(0); }
This video shows the robot starting off moving forward for 3 Seconds. Then it makes a left tank turn (90 degrees). Then goes backwards for 5 seconds. Then it takes a standard 180 degree right turn. Then finishes off by going forward for 7 seconds.
#include <Servo.h>
Servo myservoRight;
Servo myservoLeft;
void setup() {
myservoRight.attach(9);
myservoLeft.attach(11);
}
void loop() {
// put your main code here, to run repeatedly:
//forward 3 seconds
myservoRight.write(0);
myservoLeft.write(180);
delay(3000);
// left tank turn 90 degrees
myservoRight.write(0);
myservoLeft.write(0);
delay (2000);
//backwards 5 seconds
myservoRight.write(180);
myservoLeft.write(0);
delay(5000);
//standard 180 degree right turn
myservoRight.write(90);
myservoLeft.write(180);
delay(2000);
//forward 7 seconds
myservoRight.write(0);
myservoLeft.write(180);
delay(7000);
}
The pencil and avocado part of the cardboard automaton is what is doing rational motion. And the rod does a linear motion. The character that I made was an alien that has 2 little arms and an oversized upper body. Which also has no legs.
This is what we will be doing for our second project.
These are our goals in order to learn about gears and how they work.
These are the constraints in order for our gears to be completed.
To make this shape I first started off by making a circle that matches the dimensions of .5 inches in height and width. And the second circle with a diameter of .75. Use ctrl-shift-a and select both circles and use vertical/horizontal aliment. Then made a circle with the width and height of 2. Copy that circle then subtracted 1/8 in on each side which makes the circle 1.75. And use path difference to make it one piece. I put the 2 tinier circles on the bigger circle. Then I drew a rectangle and use shift-ctrl-(-) to subtract the circle so I could make a semi-circle. Then I went to edit clone, reate tile clone.
Each cam has a motor behind itself to move it in a rotational motion. The cams are touching/engaging with the bolt to make the poles move in a linear motion. Which makes the numbers move up and down. This design wouldn't work without gravity because nothing else is pulling the objects down.
From the drive shaft on the front layer, there are 3 gears that are connected. While on the bottom layer there are 2 gears that are connected. The two big gears that are on top of each other are moving in opposing directions of each other.
This is my functional prototype for our project. We were required to plan our project by using the items in the kit. We decided what motions and direction we wanted to use. I decided to use rotation direction.
This here is my working final gearbox. It is run by using a hand crank. The bottom layer of my gearbox has 4 gears, on the other hand the top layer has 5 gears. The tiniest gear is the gear that moves in opposing directions. And the medium gear is the gear that moves on the top layer, but doesn't have a corresponding gear to the bottom layer. My driving gear is the gear which has the handle on top of it, and it is used to control the entire gear box.
This is the layout of the circuit which will control the gearbox so it can move without touching it. The circuit uses a hobby motor which would control the gear box.