Pratik Y.

My name is Pratik and I am 16 years old. I go to the High School of Math, Science, and Engineering at City College and this is my second year at Blue Stamp. The starter project that I chose was the Binary Blaster. This device is a game that forces you to turn regular decimal values in the binary. My main project is the Ultrasonic Robot, which uses ultrasonic sensors to guide itself. I chose these projects because I was inspired by a student’s project last year. Robotics is a general interest of mine since I was in seventh grade. I felt that since last year, I have learned a good amount and will learn more in the future.

Name

Pratik Y.

Area of Interest

Robotics

School

The Highschool of Math, Science, and Engineering

Grade

Incoming Junior

2018

Reflection

When I came to BlueStamp for the first time, I was scared. I was unsure of how I would finish my first actual project, yet I did it. This second year was more difficult as I only had three weeks, but I still finished it. I never realized until today how mature I became. With these qualities, I now see a glimpse of what I can accomplish under pressure. I appreciate this experience because it opened my eyes to better opportunities. This year, I learned how to write better documentation for my website which was very useful. I also learned how to become even more independent compared to last year. Lastly, I learned how to handle strain better which will definitely help me in the future. These are just a few of the things that I learned along with so much more and I am happy about it.

Final Milestone

For my final milestone, I completed my Obstacle Avoiding Ultrasonic Robot or (O.A.U.R.). I got the robot body to follow the algorithm I made in milestone one. I achieved this by wiring everything together to form a circuit. I also planned where to glue my parts to the cardboard.
image-1
Figure 2:This picture shows the wiring of my project in its completion.

Even though I finished my project, there were still challenges, as there always are. This challenge, like the last, also included my motors. My motors were still too weak even after changing the material of my chassis. So I changed to the motor to be bigger and more powerful. This challenge also came with other challenges like my tires. The axle of the motor was too big for my tires to fit. So I glued the tires to the nuts which were then glued to the axle. At the time the wheels would break off, but it worked for the most part. 

38213761_305922643314217_8122293978671349760_n
Figure 1:This is the completed version (O.A.U.R.)

In total, my project included: three ultrasonic sensors, one Arduino, one breadboard, two batteries, two motors, two wheels, one dual h-bridge motor controller and a bunch of wires.

38462762_306908906548924_2253504967241367552_n
Figure 3:This picture represents my motors after I changed them and glued my tires

This experience has shown me that anything can happen at any time. This means you have to be prepared to fix it and move on. If I told my past self before this project that I could make it this far, he would say that I was crazy. This shows how far I have come and I cannot wait to go far. Blue Stamp has taught me that I wanted to go into mechanical engineering. The projects that I would prefer to do would be more robotics and I hope the experience prepares me for my future plans.

My Code

#define trigPin1 2
#define echoPin1 3
#define trigPin2 4
#define echoPin2 5
#define trigPin3 6
#define echoPin3 7

int dir1PinA = 12;
int dir2PinA = 11;
int speedPinA = 13; // Needs to be a PWM pin to be able to control motor speed

// Motor 2
int dir1PinB = 10;
int dir2PinB = 9;
int speedPinB = 8; // Needs to be a PWM pin to be able to control motor speed

long duration, distance, RightSensor, BackSensor, FrontSensor, LeftSensor;

void setup()
{
Serial.begin (9600);
pinMode(trigPin1, OUTPUT);
pinMode(echoPin1, INPUT);
pinMode(trigPin2, OUTPUT);
pinMode(echoPin2, INPUT);
pinMode(trigPin3, OUTPUT);
pinMode(echoPin3, INPUT);

pinMode(dir1PinA, OUTPUT);
pinMode(dir2PinA, OUTPUT);
pinMode(speedPinA, OUTPUT);
pinMode(dir1PinB, OUTPUT);
pinMode(dir2PinB, OUTPUT);
pinMode(speedPinB, OUTPUT);
}

void loop() {

SonarSensor(trigPin1, echoPin1);
RightSensor = distance;
SonarSensor(trigPin2, echoPin2);
LeftSensor = distance;
SonarSensor(trigPin3, echoPin3);
FrontSensor = distance;

Serial.print(LeftSensor);
Serial.print(" - ");
Serial.print(FrontSensor);
Serial.print(" - ");
Serial.println(RightSensor);

if (FrontSensor > 30) {
// 30 represents units from wall
//left motor forward
analogWrite(speedPinA, 155);//Sets speed variable via PWM
digitalWrite(dir1PinA, LOW);
digitalWrite(dir2PinA, HIGH);

//right motor forward
analogWrite(speedPinB, 155);
digitalWrite(dir1PinB, LOW);
digitalWrite(dir2PinB, HIGH);
}
else if (FrontSensor <= 60) {
analogWrite(speedPinA, 0);//Sets speed variable via PWM
digitalWrite(dir1PinA, LOW);
digitalWrite(dir2PinA, HIGH);

analogWrite(speedPinB, 0);
digitalWrite(dir1PinB, HIGH);
digitalWrite(dir2PinB, LOW);
if (LeftSensor > RightSensor) {
//only one motor runs here to turn
analogWrite(speedPinA, 155);//Sets speed variable via PWM
digitalWrite(dir1PinA, LOW);
digitalWrite(dir2PinA, HIGH);

if (FrontSensor > LeftSensor) {
analogWrite(speedPinA, 0);//Sets speed variable via PWM
digitalWrite(dir1PinA, LOW);
digitalWrite(dir2PinA, HIGH);

analogWrite(speedPinB, 0);
digitalWrite(dir1PinB, HIGH);
digitalWrite(dir2PinB, LOW);
}
}
else {
analogWrite(speedPinB, 155);//Sets speed variable via PWM
digitalWrite(dir1PinB, HIGH);
digitalWrite(dir2PinB, LOW);
if (FrontSensor > RightSensor) {
analogWrite(speedPinA, 0);//Sets speed variable via PWM
digitalWrite(dir1PinA, LOW);
digitalWrite(dir2PinA, HIGH);

analogWrite(speedPinB, 0);
digitalWrite(dir1PinB, LOW);
digitalWrite(dir2PinB, HIGH);
}
}
}
}
void SonarSensor(int trigPin, int echoPin) {
digitalWrite(trigPin, LOW);
delayMicroseconds(2000);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10000);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance = (duration / 2) / 29.1;

}

Second Milestone

For my second milestone, I constructed the body of my robot. I achieved this by recycling pieces of cardboard and attaching all of my parts. Since my robot cannot inherently balance itself from programming, I made it into a shape that was passively stable. I shaped the cardboard into a triangular prism.
38454439_306807393225742_5997782641858838528_n
Figure 2:This picture shows my ball caster which allows for smooth mobility.

This milestone involved a huge problem because I did not initially intend to use cardboard. I was actually intending on using 3d printed parts for my project. The application I used to create these part was called Autodesk Inventor. The process was pretty easy and after I was all done designing my parts, I sent them to the 3d-printer. I faced a complication where my motors were struggling to move. The weight of my robot was to heavy so I had to replace my 3d-printed parts with cardboard.

38208521_306026096637205_5555690469691752448_n
Figure 1: This picture shows the completed chassis with some parts attached.

To do this, I snipped out another piece of cardboard and hot glued that to the bottom of my robot. This would be where I apply my ball caster to help my robot move and rotate smoothly. See link to ball caster hereI also applied cardboard behind my robot to tape for structural support, because my it started wobbling. 

38211814_306044516635363_3962364006395543552_n
Figure 3:This picture represents the motors that wouldn’t work because of the weight.

Time became a major variable throughout this milestone, but this time limit forced me to grow into a fast thinker. Now I can manage my time well compared to before when I came to Blue Stamp. As I had 3 weeks to complete my project I also developed a skill of rapid prototyping. With this skill, problems and solution come and go every day. What I can accomplish with this skill is unimaginable. I am satisfied with my project so far and cannot wait to see what I can accomplish during the time I have.

First Milestone

For my first milestone, I controlled my two DC motors with my three ultrasonic sensors.
img_0372
Figure 1:Ultrasonic Bot in progress being able to control motors shown above.

Now I am able to have my motors move in the same direction. I can also change which motor works and which does not in order to control which way the robot turns. At this point, this is all theoretical until I can see it in action. I used three ultrasonic sensors to detect distance. The ultrasonic sensor has two parts to it: the trig and the echo. The trig part of the ultrasonic sensor produces or triggers the sonic ping. The ping is then collected by the echo part of the ultrasonic sensor to name the distance. The logic is based on how close each ultrasonic sensor is to the wall. See link to the Ultrasonic Sensor here

The motors are controlled by a Dual H-Bridge Motor Controller and provide ease to code for the motors. It uses a power source like a battery or an Arduino to control the motors. The Motor Controller allows me to rotate the axle of the motors forward, backward, or not at all. This device also control the speed of the motors. See link to the Motor Controller here.

Pratik Y.
2014-05-21t22_56_30.552z-515

My code uses if and else statements for the ultrasonic sensors to detect the furthest distance. The plan is that if the ultrasound sensors are far from the walls, my hypothetical robot should move forward, but if the forward ultrasonic sensor is not going near a wall, the robot should react by choosing which turn to take. To figure this out, the ultrasonic sensors on the side detect their distance. Whichever sensor has the farther distance, the robot turns in that direction. For example, if the left ultrasonic sensor senses a distance of forty units, while the right ultrasonic sensor senses a distance of 50, the robot should turn right.

 

 My biggest challenge throughout my first milestone was the coding process. After I set up my circuit for my Ultrasonic Bot, I did not know where to go next. I brainstormed at home to figure out where to start with my code. After brainstorming, I came up with the code to start working on at Blue Stamp. During the day, I tested the code that has the motor run and it almost worked. The motors were responding to my ultrasonic sensor but not correctly as one motor was running while to other motor was fidgeting around. After many test runs, my motors started working properly. One reason it started working could be because my I included a function to stop one of the motors instead of not specifying its state.

pasted-image-0-2
pasted-image-0-3
inkedaccount-ownership-diagram-tutorial-2_li

 At this point, I finished my first milestone.  Before I started this project, I did not think I would make it this far in basically a week. Last year, I went to Bluestamp, an Engineering Camp for Kids, for six weeks and I remember it took me a long time to get to my first milestone. So I feel amazing knowing that I finished my first milestone. 

Starter Project

My starter project is called the Binary Blaster, a game that uses your knowledge of numbers to be translated to binary. See link to the Binary Blaster here.
38218328_306045759968572_5714406158572191744_n
Figure 1:The fully assembled Binary Blaster can be seen above emitting digits by LEDs which is also represented as the LEDs in the button, converting decimal form to binary form.

How it works is that you are supposed to convert numbers one to fifteen displayed in decimal to binary form. Figure 1: The fully assembled Binary Blaster can be seen above emitting digits by LEDs which is also represented as the LEDs in the button, converting decimal form to binary form. Anything above fifteen requires five buttons because there are more than four digits in a binary sequence. These digits are represented by bits which are the buttons shown in the picture. Binary uses a system where the highest digit is one. This is opposed to the decimal system where the highest digit is nine. Every number that has a base of two like one, two, four, eight, sixteen… increases the number of bits by one like this:

One = 1

Two = 10

Four = 100

Eight = 1000

Sixteen = 10000

Notice how each bit corresponds to the power of the decimal versions’ power. To play the game, watch as a number displays on the LED. The user presses the combination of buttons that represent the binary version of that value. For example, fifteen would be 1111 so you would click all the buttons. Ten would be 1010 so you should click the three-bit button and the one-bit button. The Binary Blaster utilizes a small circuit board with the following: two switches, two capacitors, one resistor, four buttons, one speaker, four battery holders, and two LEDs. Capacitors store electrical voltage. Resistors control the energy flow around the circuit. LEDs or light emitting diodes emit light. A diode allows current to flow only one way. Switches allow for electricity to travel around the circuit board. These components were soldered to the circuit board. There were not many problems that slowed down my progress, but, one problem that occurred was that my batteries had lost their charge. In the end, I switched the batteries out with new batteries and everything came together. For the most part, it was fun and easy to assemble at STEM Classes For Kids in New York. 

2017

Final Milestone

For my final milestone, I have added a feature that would be helpful for many people around. What I added was a way to enroll anyone’s finger in which it would stay into the microcontroller.  To do this I had to modify my “FPS_Enroll” code to make it so that the words would print on the Liquid Crystal Display. I then had found a way to implement this code into my final code. Something I had trouble with while trying to get this to work is making it enroll it as most of the time it would say “Failure to Enroll”. What I did to fix it was to make sure that I was placing and taking my finger when it told me to. Another difficulty was with the LCD and fingerprint scanner. They would turn off and on by themselves. To fix this I had to resolder the wires because they were loose. For my next modification, I would like to add facial and voice recognition. I enjoyed my time at Blue Stamp, a Summer Camp for Coding

My Circiut

STEM Summer Camp for Kids

Reflection

Throughout my journey at Blue Stamp, I have learned a lot.  First, I learned how to code and how to use power tools which I have never used before. I also learned some lessons like to not get frustrated from small errors and issues and to keep trying. I also learned have fun is the best way to motivate yourself to do more. This was a very fun experience I would definitely come next year.

Third Milestone

For my third milestone, I have added an LCD display which displays what it is to be done. I think that this is a huge milestone because now I am able to verify whether my password was wrong or right or whether my finger was verified correctly.  Some things I had trouble with is the servo and the LCD sharing the same power. They were sharing the same power so they only used half of their potential. To fix this, I plugged them into separate ground pins. Also making the hole for the LCD  was absolutely annoying because it would never fit. Problems will be encountered in Blue Stamp, a STEM Summer Camp. For my future modification, I will program it to be able to enroll other fingers without using a computer.

Second Milestone

For my second milestone, I designed my box so that the keypad, fingerprint sensor and servo motor are could protect the box from opening easily. The hardest part of this milestone was screwing pieces into inconvenient corners and dremeling holes. First I worked on making holes for the fingerprint scanner and the battery as they were the easiest. Then I hot glued the keypad to the box and made a hole where the wires would connect. Then I glued the servo motor so that I could lock the box. I lastly attached hinges that would help lock the box. Not only is Blue Stamp a Coding Camp for kids but it also requires physical caption.

First Milestone

For my first milestone in the STEM Classes for Coding, I made got the keypad, fingerprint sensor, and servo motor to work together to create security for my future biometric lock box. The most difficult part of this milestone was the coding as it was difficult to configure the code into how I wanted it to work. First I had to configure the fingerprint sensor to enroll my finger and then recognize that same finger again. Next, I had too make sure the keypad was connected correctly and working.  I then combined the code of the keypad and fingerprint sensor so that if one worked, it had to move onto the next step. Lastly, I attached the servo motor to the code and made sure it worked. Once the code for the servo motor was implied in my code, I was set.

Starter Project

For my Starter Project, I have created a TV-B-GONE which is a remote that shoots infrared LED light like a normal remote. This project consists of batteries to power it obviously, three resistors, which moderate the power going into the LEDs, three capacitors, which smooths the current flow throughout the circuit board, five transistors, which control the power going into the infrared LEDs, a power button, five LEDs, and a circuit board (PCB). The wires that attaches the batteries to the circuit board caused some problems because the coiled part of the wire was too short to fit in to the circuit board. I had to rip a bit of rubber that insulates the wire off and then I tinned it so it wouldn’t untangle. Another issue I had to deal with was when I faced the transistor the wrong way. It took a while to de-solder and this made it very difficult to put it the right way again. I learned a lot from this experience like soldering and de-soldering. I also learned that I have to read instructions carefully because sometimes mistake are hard to fix.  

Leave a Comment

Start typing and press Enter to search

Bluestamp Engineering