I have always been interested in music and technology, and over the summer I decided to start figuring out just how guitars work. My first idea was to research the circuitry to better understand the internal function. Currently, while I work out what materials I need, I have created a CAD model to depict an electric guitar similar to my own.
Today, we started the process of coding Servos virtually to see how they work. We found the code on the Arduino website, and used it to move the virtual tool back and forth.
Here is the code I used for today:
Today, we took the code from the online Arduino on Tinkercad and applied it to the Arduinos in front of us. Although the port management was difficult, I enjoyed it when it worked.
Servo myservo; // create servo object to control a servo
// twelve servo objects can be created on most boards
int pos = 0; // variable to store the servo position
void setup() {
myservo.attach(9); // attaches the servo on pin 9 to the servo object
}
void loop() {
for (pos = 0; pos <= 180; pos += 1) { // goes from 0 degrees to 180 degrees
// in steps of 1 degree
myservo.write(pos); // tell servo to go to position in variable 'pos'
delay(4); // waits 15ms for the servo to reach the position
}
for (pos = 180; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
myservo.write(pos); // tell servo to go to position in variable 'pos'
delay(15); // waits 15ms for the servo to reach the position
}
}
After making one real-life Servo run, I placed more wires on the same place on the breadboard for a second to work just the same.
By changing the pin position and delay time of the second Servo, I changed the time at which it direction switch occurred. This allowed for the Servos to move independently.
Today in class we wired our Arduinos and Servos into a different power source: AA battery packs. It took us wiring the packs together and in a separate positive and negative space to control power, then placing wires close to the Arduino to control the motion using previously saved code.
After creating independently moving servos that were powered by batteries instead of computers, our class worked on designing cardboard bodies to house our breadboards, Arduinos, and batteries. We made our motors mobile with wooden wheels and worked on giving everything stability.
Using my new robot to test, I edited my code to make the different motors move in either the same or opposite directions. Doing this in different combinations allowed me to move my robot in different directions.
Today we started to code an autonomous route through a path. Here is the progress I made
#include <Servo.h>
Servo myservo; // create servo object to control a servo
Servo milesservo;
int pos = 0;
// twelve servo objects can be created on most boards
void setup() {
myservo.attach(8); // attaches the servo on pin 9 to the servo object
milesservo.attach(9); // attaches second servo on pin 9 to the servo object
}
void loop() {
myservo.write(0);
milesservo.write(180);
delay(5500);
myservo.write(0);
milesservo.write(0); //right turn
delay(1000);
myservo.write(0);
milesservo.write(180);
delay(5500);
myservo.write(0);
milesservo.write(0); //right turn
delay(1000);
myservo.write(0);
milesservo.write(180);
delay(3500);
myservo.write(180); //left turn
milesservo.write(180);
delay(750);
myservo.write(0);
milesservo.write(180);
delay(2500);
myservo.write(180);
milesservo.write(180);
delay(750);
myservo.write(0);
milesservo.write(180);
delay(5500);
myservo.write(0);
milesservo.write(0);
delay(750);
myservo.write(0);
milesservo.write(180);
delay(5500);
}
After many more attempts later down the line, I was able to code my robot to autonomously complete the course. This took a lot of editing my code, mainly changing the delay to reflect the number of fractions a second my robot moved forward or turned. Matters got even more challenging when my robot's body grew unstable, so I created a new leg for balance.
After learning to code our robot autonomously, we wanted to start adding sensors that could control our robot without us. The first step was wiring an Ultrasonic Sensor that could recognize the distance between itself and another object in motion.
Here is a diagram of how I wired it, using Tinkercad.
/*
* Ultrasonic Sensor HC-SR04 and Arduino Tutorial
*
* by Dejan Nedelkovski,
* www.HowToMechatronics.com
*
*/
// defines pins numbers
const int trigPin = 9;
const int echoPin = 10;
// defines variables
long duration;
int distance;
void setup() {
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);
}
#include <Servo.h>
Servo myservo;
Servo milesservo;
const int trigPin = 2;
const int echoPin = 3;
// defines variables
long duration;
int distance;
void setup() {
myservo.attach(8); // attaches the servo on pin 9 to the servo object
milesservo.attach(9); // attaches second servo on pin 9 to the servo object
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() {
myservo.write(0);
milesservo.write(180);
}
void right() {
myservo.write(0);
milesservo.write(0);
}
void left() {
myservo.write(180); //left turn
milesservo.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 > 3) {
right();
delay(1250);
forward();
delay(1250);
}
After bonding together different parts that made up gearboxes, I used wood glue to create a functional gear box. This drastically increases the speed of the wheels with both parent and child gear.
Design Checklist
After careful deliberation, an entire previous design, and a reassessment of my wiring and detachable parts, I came back with a new robot, in full, Superman-style colors. This version improves on convenience to reach places that often need adjustment, like the breadboard or battery packs.
I think that this version is more unique because although it also is shaped like a letter, its color scheme resembles a superhero.
LED Brightness Control
In an effort to take my robot from moving autonomously to user-controlled, we tested our Bluetooth modulus's ability to send and receive information by coding it to change the LED when a button on the phone app Dabble was pressed.
In order to make sure that my robot could function when faced with obstacle, I tested my stability by programming my robot to crash into a wall in a diagonal direction, where my openings are most vulnerable.
My robot's design was in the shape of the letter M. It featured the complimentary colors of blue and red with a splash of yellow to subvert artistic expectations. I created a cape to stabilize movement. I also made openings so that it was easy to make adjustments to the interior.
Today, in class, we were introduced to the next engineering project that we voted for: a lockbox where we have to CAD design skills to create the parts for a box with a unique lock.
The table saw makes straight cuts and it is primarily used for cutting wood primarily across its length, also known as a rip cuts.
The table saw makes straight cuts. Today we used the table to cut 2x4s into flatter pieces so that we can use them for our Lockboxes
Do:
Wear eye protection and safety glasses.
Remove any loose clothing
Unplug when finished.
Use either the rip fence of miter gauge
Use the feather board and a push stick to avoid touching the wood
Don't:
Put your fingers near the opening.
Pass any material but wood through the planer.
Pass wood with nails/screws through the planer.
The planer makes trimmings to the thickness of wood pieces by feeding them through sharp metal teeth repeatedly
With the wood planer we were able to regulate the thickness of all of our wood pieces to 1/2 an inch.
Do:
Wear eye protection and safety glasses.
Adjust the cutting thickness to within 1/16" of the material thickness prior to cutting.
Unplug when finished.
Attach the vacuum before use.
Wear safety goggles.
Don't:
Put your fingers near the opening.
Pass any material but wood through the planer.
Pass wood with nails/screws through the planer.
It cuts across the height of the wood. This type of cut is called a cross cut. It can also cut at angles. For example, this is used to makes frames.
Using the measuring tool on the miter saw, I cut 12 pieces of wood according to dimensions on a cut list we assembled for the box project. There were ten 7-inch pieces, and two 6-inch pieces.
Do:
Watch the GlowForge the entire time it cuts your material.
Unplug when finished.
Attach the vacuum before use.
Clean out cut pieces
Don't:
Put your fingers near the opening.
Pass improper materials through the forge.
It uses a high-heat laser beam to cut across and through materials made of materials such as cardboard and wood. It is connected to a website where users can specify the medium's thickness and dimensions.
I used the GlowForge to carve out a figure the shape of a lock into a cardboard plane. I used this in the prototype version of my keypad lock as the plane representing my top board.
Do:
Wear eye protection and safety glasses.
Firmly secure the material with you hand outside of the hand placement line and up against the fence
Unplug the saw (in the classroom) after use.
Vacuum after use.
Reduce exposer to blade
Don't:
Touch or manually move the blade guard
Cut material that requires you hand to be inside of the hand placement line (material is too short for this application).
Plug in the saw with the cord across the body
Measure while material is on the saw.
It uses input from a CAD file to cut, or carve parts/pieces. This is the most expensive tool in the Tinkerlab.
Vcarve Pro is used to develop simple design for cutting/engraving.
Onshape files are used for more complex designs.
Shopbot software actually controls the machine and runs the CAD files.
Using the measuring tool on the miter saw, I cut 12 pieces of wood according to dimensions on a cut list we assembled for the box project. There were ten 7-inch pieces, and two 6-inch pieces.
Do:
Wear safety glasses.
Keep you sander moving at all time.
Be careful not to place slander on you skin.
Don't:
Operate the sander without first asking the teacher.
Touch the sand paper while sander is operating.
Put the sander on surfaces that can be damaged by the sander.
Smooths out flaws and prepares wood for staining( smooths out wood surfaces). It can even resolves edges that didn't perfectly match up.
Using the measuring tool on the miter saw, I cut 12 pieces of wood according to dimensions on a cut list we assembled for the box project. There were ten 7-inch pieces, and two 6-inch pieces.
Uses liquid to blend into the grain of the wood with color, and is different from paint since it goes and changes the actual substance rather than being on top of the wood
Using the measuring tool on the miter saw, I cut 12 pieces of wood according to dimensions on a cut list we assembled for the box project. There were ten 7-inch pieces, and two 6-inch pieces.
Do:
Wear gloves.
Always stain over a drop cloth
Put a small amount of stain on your rag.
Use cotton cloth to apply stain
Don't:
Mix stains
Leave staining materials out. Always put them away.
Leave stain rags out. (Leave them in your container)
Waste gloves (Place them inside out inside of your ziploc bag to reuse for the remainder of the project).
How does it work?
A spring bolt lock works by drilling a whole into the surface, then screwing and attaching a spring to the base of both holes, then inserting a center guide pen, twisting the joint together. When that is done, one spring threads into the other, and the two springs pull on each other to successively tighten and create an internal clamp.
Is it feasible to make in class (could be made out of a different material) and why?
If we have access to springs, this could made in class. The other elements are 3D shapes of varying complexity that would work just as well made of wood as metal, so if we also had access to spring, it would work.
Does it meet the constraints for the project and why?
If we were to make a copy of the spring-bolt lock in the photo, it could work with the constraints by designing each shape on the base individually as three smaller, more simplistic shapes. However, if we printed the base rod as a whole composite shape, it would fail to meet constraints because our locks must include three digitally designed and manufactured parts. In short, it is a stretch, but theoretically it could.
How does it work?
A cylindrical pin lock works when a key is able to perfectly manuever through several internal shafts that go through the case and plugs and force all of the shaft to line up with the shear line. Each shafts has a spring, driver pin, and key pin.
Is it feasible to make in class (could be made out of a different material) and why?
This could be made in class using small parts of metal, if we access to lots of spring.
Does it meet the constraints for the project and why?
This meets the constraints of the project because each shaft will need to be made differently, in addition to the key that matches up with all of these.
How does it work?
A mortise lock works by attaching several metal parts to a main latch apparatus that engages a spindle and spring to creating a chain reaction when force is put down upon on the lever.
Is it feasible to make in class (could be made out of a different material) and why?
It is possible to make in class, but creating just one would be a tedious process based on not only creating every individual (that number exceeding 30) but placing small manufactured parts into others without compromising them, then putting them all together in a tight space. Realistically, no.
Does it meet the constraints for the project and why?
It could meet constraints of the project we had access to metal. The number of parts that would need to be manufactured would greatly exceed the minimum of 3.
How does it work?
Fingerprint locks operate by scanning and converting your fingerprint data into a numerical template. Whenever anyone places their finger on the sensor, it matches the data obtained through the finger with the pre-saved values. If a match is found, access is granted and the door opens, usually using motors to move magnets that "lock and "unlock" it.
Is it feasible to make in class (could be made out of a different material) and why?
This is feasible to make using Arduino versions of the technology, such as the Arduino Uno bodies, just one step above our current Nanos, and an Adafruit fingerprint sensor.
Does it meet the constraints for the project and why?
Although it is relatively easy to create, because this can be done with previously manufactured appliances, it fails to meet our constraints of at least 3 manufactured parts via 3D-printing.
After completing initial researching stages for four locks, I was having a hard time finding one lock that would both fit project constraints and be feasible to make. However, upon further research, I have found that the barrel bolt lock fits both of these needs and is able to easily be constructed with wood instead of metal.
Barrel bolt locks work by attaching two metal apparatuses on different sides of the door, a sliding bar and a hole fitting it. This way, when the hole is filled by the bar, the door is stuck by the lever and nothing can come in or out until the the bar is removed.
In order to create the barrel bolt, we will need:
At least a 4*6 of a malleable material (wood, metal, or both) that can be carved and printed
At least 6 screws
Drilling tools
There are three unique versions of rotors. One is controlled by a rotor and turns in either lateral direction. The other two catch on until they are aligned with the long gaps (to the right). They then use the actuator to lock and unlock. To create this, I sketched a center point circle for the overarching shape, then traced a rectangle and a rectangle and an arc respectively, then matched this with my dimensions.
This piece has a bolt done across to congruent version to lock the rotors in place after they are all aligned. When turned by control of the dowel, the actuator piece has the function of locking and unlocking. To create this, I first created a mirror line and sketched most of the bottom and long diagonal lines. I created more lines, a long arc and a center point circle. I then changed the distance and sizes according to dimensions.
These make up the front and back walls of the lock. The circles inside represent holes in which the dowel fit into. Without this part, the lock would have no boundaries. For the front planar, it was a simpler process of sketching a rectangle from the corner. For the back, I created another corner rectangle, then an arc inside of that, cutting the excess with trim tools. Finally, I put center point circles inside.
After we finished designing and printing out all of the parts needed, we assembled them using a combination of wood glue and nails for the connecting dowels. This video is a description of its function, which includes three rotors being aligned with the bolt on the actuator which puts both in a stuck, or "locked position, where the movement of each of these pieces is restricted. This locked/unlocked position is best shown through the latch in between both walls.
Day 1 - I found a keypad in class that can be connected with wires and coded with a code. Based on that code, the microservers connected will move my barrel bolt lock.
Day 2 - I procured all of the materials I will need for the project by extacting my Arduino Nano from my previous robot, along with the battery casing. My materials list also includes microservers and a keypad.
Day 3 - I was able to use the Glowforge to cut out all of the parts for my sliding bolt lock. Currently, my plan is to attach the apparatus that goes inside of this piece's hole to a motor, and have that move left or right based on the keypad's code input being correct or incorrect.
I presented my initial design as a cardboard prototype. By getting critiques on the project, I learned what I was doing well, what I could do better, and what needed to be majorly removed or changed.
Day 4- Today, I began to construct a functional version of my lock. The focus was starting to make some of the apparatuses out of cardboard and beginning to wire my keypad.
Day 5- Today, I soldered a switch onto the power cords of my lock. This will be very helpful in preserving the limited energy the batteries supply and keeping them together better than wrapping or electrical tape.
Day 6 - I used the Glowforge to carve out my first internal box. This version had dimensions that were too small to fit my Arduino, but it definitely helped for my later cardboard model.
Day 7 - I began the process of drilling holes into my box. This hole allowed by put the keypad on the outside and connect it with wires from my Arduino inside of the box. On this day, I also cut out my final internal box using Glowforge.
Day 8 - This is the final internal and external designs. I swapped the sliding bolt with a motor-controlled hook that connects to a 3D-printed latch, preventing the lock from opening if the wrong is put in. I also drilled another whole (far left) for my switch to turn power off.
After working through all of the tweaks in my lock, I presented an entire box, with an electronic switch and working keypad controlling a motor hook function.
Over the course of the last two months, we have been completing machine learning projects with a professor from Georgia Tech. One of the assignments was to research current machine learning projects that centered around the body and involved training and testing models. Here are some examples of the boards I plan to present.
In addition to learning about different applications of machine learning models, one of the goals of class was to build our own. For ours, we wanted to teach a computer how to discern the difference between items based on a series of neural networks running an algorithm that it came up with itself after seeing a set of training data, getting answers right or wrong in comparison to their true value, and applying those skills on the testing data.For my items, I chose things that were found in the Engineering classroom, so that my model might have practical use in an educational setting like ours. The items I chose were:
Drill
Hammer
Scissors
Screwdriver
Each picture contains pixels on a 48*48 grayscale array. The number of pixels can vary, but tends to be between 600 and 800. For example, the image to the left shows an image classified as a hammer with 644 discernible pixels.
My model includes concepts from class and uses a classification structure to make the choices it does. It includes the importation of the pandas, keras, tensorflow, drive, and matlibplot models to call upon data I transfer from the testing computer to my drive, translate this into images and graphs, assign labels to this images, and learn from mistakes after comparing with the actual labels in the data set. Here is a copy of the data I used in a Google Drive folder as well.
In this section, I define the model. First, I call upon the keras module based on tensor established for the training database. Then, I create two sigmoid alignment functions as an input known as layer that essentially act as more strings and cross checks for the results, with the second layer, "layer2" being based on the bias on the first layer. I then create an output with 4 outputs for my 4 options of item and based this off of layer2. This results in an increase in the size of the neural network and thus the later accuracy.
Here, the model correctly identifies a drill
This shows the model understand what a greyscale screwdriver image looks like according to data recieved
This shows how the picture returning and image recognition model works for the computer to understand scissors according to its data.
This shows one of the random, nearly 1000 images that we took overall for the project with the a grand majority having predictions match up with the actual labels
Because my model had a 99.38% accuracy, I only had one instance throughout the entirety of my testing data where the actual label was different than the one the model gave it. In this, the prediction stated that the image was a hammer when in reality it was a drill. This was found by creating an if statement singling out only instances where the prediction label and actual label did not match and using the plt.show() function to portray the picture.