Hello! My name is Griselda I am 17 years old, and I am a rising senior at Bruce Randolph High School. My dream is to become a successful engineer and entrepreneur in the future!I heard about BlueStamp Engineering through my school and I decided to give it a shot with no knowledge of electronics or robotics at all. My starter project was the gram piano, which I chose because I love the sound that plays off the piano board.

Griselda's 3rd Milestone BSE Denver 2015

So over the last two weeks, I’ve seen my project come apart slowly, and at times I’ve seen it slowly break down without knowing why. While that is the worst feeling in the world, it also feels great knowing that you are making progress towards finishing your creation. The main problem I faced while building my arm were related to the servos. There were times when the servos would begin twitching uncontrollably. This uncontrollable twitching was caused by a voltage problem which I spent days trying to fix. After I solved this problem, my arm started to come together, and now I can use it to pick up multiple different types of objects. Looking back, I’ve learned more during this one month of Bluestamp than I did in 6 months in certain classes in school. Instead of giving me repetitive lessons, Bluestamp provided me with useful skills that I won’t be forgetting throughout my (future) career as an engineer.

Griselda's 2nd milestone BSE Denver 2015

After completing the first milestone, I was left with the challenge of attaching multiple additional servos and parts to my Arduino Uno, and to my breadboard. While doing so, I experienced multiple problems in coding my Arduino, and in wiring involving the breadboard and the arduino itself. On multiple occasions, the servos wouldn’t turn corresponding to the potentiometers to which they were connected. Usually, it was a problem with code which I had missed or miswritten. However, the most tedious problem I faced while completing my second milestone was definitely keeping my wires in order. At some point, my wires were so disorganized that fixing them became a part of my daily morning routine. Despite facing multiple problems, I added four servos to the arduino after adding the initial servo. Three of them will be acting as servos which will control the positioning of the arm, whereas the fourth will be controlling the gripper, which I will be using to pick up different objects with the arm.  I attached my code to the bottom of this post.

Griselda's 1st Milestone BSE Denver 2015

My first Milestone on the robotic arm required me to connect a servo along with a knob (potentiometer) to my Arduino, and then after connecting those parts I needed to program the Arduino so that the rotation of the servo was controlled by the knob on the potentiometer. So, now that I have programmed my arduino, I can spin the knob on the potentiometer, and the servo will also slowly spin according to how much I spun the knob. When doing research to complete this milestone, I learned a lot about wires, arduino, coding, and especially the different uses of breadboards. Breadboards are amazing, because they hugely expand the uses of a single slot on an arduino. By using the breadboard, I can power multiple servos using the single 5V slot on the arduino, because the breadboard functions in column of the same potential, meaning that one wire on the breadboard connected to the power slot (5V) on the arduino can power multiple different servos and devices.

20150716_144425

 

Starter project: Gram Piano Kit
The Gram Piano starter project is a piano keyboard were I can play an octave worth of notes using the capacitive touch keys. The pre-installed software also lets me switch between three octaves using a potentiometer and play a melody with the press of a button. In the beginning of my started project I had to solder a lot of parts like resistors to the piano board. One very valuable thing I learned while soldering was to pay close attention to where I solder my resistors because if I don’t solder the resistors in the correct place that will affect the performance of my project.

 

Below is my documentation:

(Schematic)

schematic............_bb

(Code)

#include <Servo.h>

Servo myservoA;  // create servo object to control a servo A
Servo myservoB;  //create servo object to control a servo B
Servo myservoC;  //create servo object to control a servo C
Servo myservoD;  //create servo object to control a servo D
Servo myservoE;  //create servo object to control a servo E

double sensorValue;
int potpinA = 0;  // analog pin used to connect the potentiometer A
double valA =0;    // variable to read the value from the analog pin 0
int potpinB = 0; // analog pin used to connect the potentiometer B
double valB =0;    // variable to read the value from the analog pin 1
int potpinC = 1; //analog pin used to connect the potentiometer C
double valC =0;    //variable to read the value from the analog pin 2
int potpinD = 2; //analog pin used to connect the potentiometer D
double valD =0;    //variable to read the value from the analog pin 3
int potpinE = 3; // analog pin used to connect the potentiometer E
double valE =0;    //variable to read the value from the analog pin 4
void setup()
{
Serial.begin(9600);
myservoA.attach(3);  // attaches the A servo on pin 9 to servo A object
myservoB.attach(5); // attaches the B servo on pin 10 to servo B object
myservoC.attach(6); //attaches the C servo on pin 11 to servo C object
myservoD.attach(9);  //attaches the D servo on pin 6 to servo D object
myservoE.attach(10); //attaches the E servo on pin 5 to servo E object

}

void loop()
{ sensorValue = analogRead(A0);
sensorValue=map(sensorValue,0,1023,0,180);
valA=0.99*valA+0.01*sensorValue;
//valA = analogRead(potpinA);            // reads the value of the potentiometer (value between 0 and 1023)
//valA = map(valA, 0, 1023, 0, 180);     // scale it to use it with the servo (value between 0 and 180)
myservoA.write(valA);                  // sets the servo A  position according to the scaled value
// read the input on analog pin 0:
//sensorValue = analogRead(A0);
// print out the value you read:
//Serial.print(“SensorA =”);
//Serial.println(sensorValue);

//valB = analogRead(potpinB);           // reads the value of the potentiometer (value between 0 and 1023)
valB = 180-valA;   // scale it to use it with the servo (value between 0 and 180)
myservoB.write(valB);               // sets the servo B position according to the scaled value
// read the input on analog pin 0:
//sensorValue = analogRead(A0);
// print out the value you read:
//Serial.print(“SensorB =”);
//Serial.println(sensorValue);

sensorValue = analogRead(A1);
sensorValue=map(sensorValue,0,1023,0,180);//reads the value of the potentiometer (value between 0 and 1023)
valC=0.99*valC+0.01*sensorValue;
//valC = map(valC, 0, 1023, 0, 180);   // scale it to use it with the servo (value between 0 and 180)
myservoC.write(valC);               // sets the servo C position according to the scaled value
// read the input on analog pin 1:
//sensorValue = analogRead(A1);
// print out the value you read:
//Serial.print(“SensorC =”);
//Serial.println(sensorValue);

sensorValue = analogRead(A2);
sensorValue=map(sensorValue,0,1023,0,180);//reads the value of the potentiometer (value between 0 and 1023)
valD=0.99*valD+0.01*sensorValue;
//valD = analogRead(potpinD);           // reads the value of the potentiometer (value between 0 and 1023)
//valD = map(valD, 0, 1023, 0, 180);   // scale it to use it with the servo (value between 0 and 180)
myservoD.write(valD);               // sets the servo D position according to the scaled value
// read the input on analog pin 2:
//sensorValue = analogRead(A2);
// print out the value you read:
//Serial.print(“SensorD =”);
//Serial.println(sensorValue);

sensorValue = analogRead(A3);
sensorValue=map(sensorValue,0,1023,0,180);//reads the value of the potentiometer (value between 0 and 1023)
valE=0.99*valE+0.01*sensorValue;
//valE = analogRead(potpinE);           // reads the value of the potentiometer (value between 0 and 1023)
//valE = map(valE, 0, 1023, 0, 180);   // scale it to use it with the servo (value between 0 and 180)
myservoE.write(valE);               // sets the servo E position according to the scaled value
// read the input on analog pin 3:
//sensorValue = analogRead(A3);
// print out the value you read:
//Serial.print(“SensorE =”);
//Serial.println(sensorValue);

}

 

 

 

Leave a Comment

Start typing and press Enter to search

Bluestamp Engineering