The following contents of my Engineering bag are batteries, a Arduino, a Bluetooth module, jumper cables, and a bread board etc. They can be used to make LED lights go on and off with the proper code. The A- B cable connects to your computer.
Today we learned that out project will be about automation! We are going to design a rolling robot.
Above is how we will progress through the project. We will us what we learn in this rolling robot project for our next project too
Circuit Diagrams are graphical representations of circuits and how they are built and what parts they consist of.
Circuit pictures are a good method to show how a circuit is connected between all of its parts in a more detailed realistic format.
This motor works with an Arduino nano and it requires two servos. It has four legs the walk and hold up the Arduino on its back. It also requires four batteries. I have all of the supplies for this so it would be a great choice
https://www.instructables.com/id/simpleWalker-4-legged-2-servo-walking-robot/
This robot it essentially a box with our wheels that holds the servo and the Arduino. Replacing the plastic parts with card board around the house would be easy.
https://www.dexterindustries.com/new-dexter-industries-gopigo-servo-mount/
This robots main goal is to avoid all obstacles! It has a motion sensor for knowing when to turn the other way
It is a circuit diagram of the desired design. Representing the Arduino uno connected the wires to the two servos.
This is a circuit picture and its like a realistic diagram to show with the piece of the circuit look like. The large blue piece in picture is an Arduino and the large white piece is a bread board.
I chose this configuration because everything is secure because it is similar to a box but i plan on making only half of it box like to leave space for me o work with the wiring but also have a secure Arduino uno and battery packs.
Circuit picture for my battery packs that needed to be reconnected in a more secure way.
My robots ability to turn left and forward and repeat is shown in this video.
This is the path that my robot is going to take, it is forward, right tank turn, forward, left tank turn, forward, left tank turn forward right tank turn. Making it's way around my kitchen table.
My robot has finally traversed its path around my kitchen table. In the video i move a chair out of the way because usually the chairs are removed from the table. I'm so excited it did it finally.
My robot Instructions:
Forward three seconds
180 degree tank turn to the right
Backwards three seconds
90 degree standard turn to the left
Forward for 5 seconds.
This is my code and my robot completing the code that It is supposed to do. In the screenshot i have labeled my code so you can see what section does what. Above that is my Arduino setup which has the servos labeled and my selected pin.
Below is the copied URL for the website. It gives instructions for how to assemble and visual aids. It needs and bread board, ultra sonic sensor and works with two servos.
https://create.arduino.cc/projecthub/Manikantsavadatti/diy-ultrasonic-radar-system-1f4d1c
An ultra sonic sensor is a piece that emitted ultras sonic sound waves and when the hit an object in front of the sensor they are reflected as electrical signals. It uses those signals to measure how far away the object is.
Here are all my wires labeled so if they become disconnected I can put them back without hassle
Here is my motion sensor placed a the front of my robot like it's eyes
#include <Servo.h>
Servo Left;
Servo Right;
const int trigPin = 9;
const int echoPin = 10;
// defines variables
long duration;
int distance;
void setup()
{
Left.attach(11);
Right.attach(10);
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 Forward() {
Left.write(180);
Right.write(0);
}
void Lefttankturn() {
Left.write(0);
Right.write(0);
}
void Righttankturn() {
Left.write(180);
Right.write(180);
}
void Backward() {
Left.write(0);
Right.write(180);
}
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) {
Backward();
delay(1000);
Righttankturn();
delay(1000);
}
else(Forward);
}
The robot reacts when the phone get close to the sensor so that it can avoid obstacles.
Size is not bigger than microwave
Covering it colorful/ uses at home materials
Craftsmanship, neat, clean glue edges, pieces and parts match up
Easy access to battery, Arduino 5V, Breadboard and reset button
A type of easy removable door, cover
Reasonable weight for functionality
No slipping aloud.
This robot has all a lot of the same components as mine and the battery pack on top encloses the wiring, Arduino and etc. I can use the battery pack as a removeable door for easy access to the inner workings of the robot.
Even though this robot is missing a lot of requirements it was good inspiration for me because I started to think about using my enclosure like a box that opens with the ultrasonic sensor looking out.
I noticed this robot because of the small wheel in the front. My robot tilts and it doesn't look appealing. This could also effect my design if i put everything in a box. So i need to level it out for a proper robot.
In my final design I have a roof that opens on top and in the front and back are doors that open for easy access to my Arduino Uno and if my sensor is in use the doors can be let open so it can sense properly. I also added a wheel to the front to help keep my robot from leaning.
Sketch one: My original robot with one wheel and front wall.
Sketch two: A box with a lid that has my breadboard on the ceiling and completely new inside arrangement
Sketch three: Very similar to my final design but with one extra front wheel and less openings.
This is the side of my shell and it keeps the battery packs in one place is connected to a arch of cardboard
This angle shows the top of the box and how it covers all of the free wires and hardware. It also shows the doors and how they shut
These doors open for the sensor to be able to use its ultrasonic waves on anything in front of the robot.
The front doors, the inside hardware, the top door and why i made them the way they are.
The back of my automata shows the linear aspect resting on the rotational piece.
A rock on the linear strip of cardboard weighs it down so when the rotational piece is spun it will drag against the strip causing linear motion
The Creative aspect or my automata is a picture of bees who go up and down when the pencil is turned
the rotational piece is an oval the s longer on one side so when its spun the resting strip will be higher and then lower.
I am still experimenting with the tools and learning how to group shapes but i understand copying and pasting and how to use the graident tool. Coloring is also easy for me. The only thing i need to improve on is mostly adding in the groups. The eyes are groups.
I am gonna make it have four uniquley shaped holes on the inside made up of a circle hole and triangle hole
This is the gear I created on Inkscape. I first added the original gear with no holes. Next I used the circle and rectangle tools to design the cut I would want in my gear. Then I locked them in by selecting them all with dragging my mouse.
This works by an electronic/mechanical device that powers the rotational movement of the cams on the lowest row on the device and considering the unique curvature of the cams when the rectangular piece above rests on the curved cams below it is pushed up and down in a linear vertical motion as the cam rotates. The rectangular pieces connect to LEDs that will also move in a linear pattern too cause them to look like "Dancing".
In the example all gears are moving in a rotational motion but they are interacting in layers. I believe that the two largest gears are not actually directly interacting with one another. This is because all the power is coming from Ms. White cranking one of the gears which connects to another gear directly below that one. That gear turns another two other gears to the left and right below the glass. Then the gear to the furthest on the right under the glass connects to a gear above the glass which pushes the largest gear. The gear to the furthest on the left is below the glass and the biggest gear is above the glass so they can move in the opposite direction of each other without directly affecting one another.
Today we were required t plan our final project using the items in out kit. First we had too decide which direction to pursue. I decided to pursue two rotational opposing a linear.
It works by the middle shaft rotating them both but a smaller gear at the bottom moves one of the gears in another direction.
/* Control Speed of a DC Motor from serial monitor
More info: http://www.ardumotive.com/how-to-drive-a-dc-motor-with-transistor.html
Dev: Vasilakis Michalis // Date: 13/7/2015 // www.ardumotive.com */
//Transistor 'Base' pin or input pin of motor driver ic to Arduino PWM Digital Pin 3
const int motorPin = 3;
int Speed; //Variable to store Speed, by defaul 0 PWM
int flag;
void setup()
{
pinMode(motorPin, OUTPUT); //Set pin 3 as an OUTPUT
Serial.begin(9600); //Init serial communication
//Print a message:
Serial.println("Give a number from 50 to 255."); //Why minimun value 50? Because with values below 50 the motor doesn't spin ;)
Serial.println(""); //Blank line
}
void loop()
{
//Check if incoming data is available:
if (Serial.available() > 0)
{
// If it is, we'll use parseInt() to pull out only numbers:
Speed = Serial.parseInt();
flag=0;
}
//Valid range is from 50 to 255
if (Speed>=50 && Speed<=255){
//Send PWM value with analogWrite to Arduino pin 3 and print a message to serial monitor
analogWrite(motorPin, Speed);
//Print message only once
if (flag==0){
//Print PWM value
Serial.print("Motor spinning with ");
Serial.print(Speed);
Serial.println(" PWM");
flag=1;
}
}
delay(1000);
}
//
All of the holes in this piece of acyrlic represt the holes that are going to be where the gear stacks are and are spaced so all gears will work together to create my opposing motions, and my motion censor holes are cut out for the"eyes" t see when someone approoaches and start the motor
All gears are layed out on the wood to be ready for cutout and all spacers and cranks are included to be cut out to make the gears turn manuelly as well.
Principles of design were incorporated through the artistic design of the gears and their unique patterns as well as how the gears were designed to move smoothly between each other.
const int motorPin = 3;
int Speed; //Variable to store Speed, by defaul 0 PWM
int flag; //Variable to store Flag
const int trigPin = 9; //defines the pin that sends the pulse
const int echoPin = 10; //defines the pin that receives the pulse
long duration; //defines variable for how long it takes for the sound to return
int distance; //defines variable for distance away
void setup()
{
pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output
pinMode(echoPin, INPUT); // Sets the echoPin as an Input
pinMode(motorPin, OUTPUT); //Set pin 3 as an OUTPUT
Serial.begin(9600); //Init serial communication
//Print a message:
Serial.println("Give a number from 50 to 255."); //Why minimun value 50? Because with values below 50 the motor doesn't spin ;)
Serial.println(""); //Blank line
}
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);
//Check if incoming data is available:
// if (Serial.available() > 0)
// {
// // If it is, we'll use parseInt() to pull out only numbers:
// Speed = Serial.parseInt();
// flag = 0;
// }
//Valid range is from 50 to 255
if (distance <= 10);
{
//Send PWM value with analogWrite to Arduino pin 3 and print a message to serial monitor
Speed = 100;
analogWrite(motorPin, Speed);
// Place additional code here to make your motor have at least 5 speeds.
}
Serial.print("Motor spinning with ");
Serial.print(Speed);
Serial.println(" PWM");
// flag = 1;
}