Vous êtes sur la page 1sur 5

Challenge:

The challenge was to create a crane arm mechanism that utilizes potentiometers, servos and
the arduinos while synthesizing elements of each of those elements (design and programming)
into one cohesive project.

Prelab:
Before this lab, we first learned how to map certain values. First, we mapped potentiometer
values so that LEDs would light up when the potentiometer was turned 1/3, 2/3, and all the way.
Each one of these turns would light an additional LED to have 3 light up when fully turned. Next,
we had a potentiometer control multiple motors that moved in inverse ways.To do this, we got
the value from the potentiometer, and mapped it to the proper values that servos can read
(0-179). For the other servo, it was mapped from (179-0) to allow it to move opposite from the
other one.

Approach:
For the approach in this project, we began by looking at Mr. Rho’s robotic arm and trying to
design a model similar to his. We wanted to get everything set before we started building. We
were confused about building the claw, but Mr. Rho made them for us. Initially, we just drew
designs about how the servo motors would be incorporated to create a working crane arm. After
the arm and the setup of the arduino was completed, we began coding the project. We did it in
this order because the software was more complicated than the building everything, so we
completed it later. This meant the build was ready as soon as the code was. Then we kept
testing and tinkering until the project was complete.

Programming:
For the programming, it was pretty easy because the same code was utilized 4 separate times
just with different variables to pair up with each different potentiometer.
1) the Servo library must be called upon and then declared.
a) #include <Servo.h>
b) Servo myServo1;
2) Next a variable for the value within the potentiometer and value that will be mapped must
be initialized and declared
a) int potent1=0;
b) int val1;
3) Within the setup, the servo motors must be attached and designated to the specific port
a) myServo1.attach(11);
4) Within the loop, the potentiometer value will be read. Then, that value is mapped to
match the value a servo can read (0-179). Finally, the value is put to the servo, and the
servo will move
a) val1=analogRead(potent1);
b) val1=map(val1,0,1023,0,179);
c) myServo1.write(val1);
5) After this, the above code is repeated 3 additional times for the other potentiometers and
servos. A delay is also included at the end.
a) delay(15);

Within programming, there were not very many challenges as we already did similar code to this
is another project. Once one servo was connected and working with a potentiometer, the same
code was just repeated 4 times making the final code very easy to make.

Building:
To build this project, it was important to figure out the design beforehand. The materials we
were given were, 4 servo motors with more horns, popsicle sticks, glue/tape, and a claw. The
circuit also had to be built.
To build the arduino board with the potentiometer, we first set up the 4 potentiometers to make
sure they all had room. Next we attached the potentiometers to a positive and negative rail to
give them power. The wire allowing the potentiometer values to be read was then plugged into
an analog spot to allow the individual values to be read. This was then repeated 3 more times
for the other 3 potentiometers.

Next the servo motors were connected to the arduino board. Like the potentiometers, the
positive and negative wires were first put into the positive and negative rails to provide power for
the servos. Next, the wire to provide the information to rotate the servos were connected from
the servo into the digital spot. Unlike analog spots, the digital can only give or receive 0/1
values; however, certain digital spots can give pulse with modulation signals. This allows values
other than 0/1 to be given to a component based on the frequency of the pulses. This allowed
the servos to read the 0-179 values and move accordingly.
Within the arduino, the hard parts were creating the board so it is aesthetically
pleasing/organized. Additionally, the potentiometers would frequently pop out of their spots
within the arduino circuit board, so tape was put on top of them to help hold them down. Finally,
the 5 volts that the arduino gets from the computer was not enough to move all the servos, so
additional batteries needed to be connected to provide more power.

The first step was to create a base to support the arm. Then a servo horn was glued to the base
and the servo motor was attached to that.

The next step was to glue a popsicle stick to the first servo motor. Then another servo motor
was attached to the popsicle sick in a different direction. We attached another popsicle stick to
that and placed another servo motor in the same direction. The next step was to attach another
popsicle stick that would hold the last servo motor and the claw. Everything was glued together
and the arm was complete. We also had to connect a seperate battery case to the circuit to
provide enough power. We did encounter some problems while building the arm. The first
problem was the the servo horns were not actually connected to the motors. We had to remove
some of the horns from the glue because the motor would not stay on the horn. Another
problem we had was that we were confused about which way all of the servo motors went. We
also were confused about building the arm which was eventually built by Mr. Rho. Other than
those problems, this project went fairly smooth.
Summary of synthesizing all of the parts:
This project involved many different parts including designing, building, and programming. We
completed all of these things separately and had to combine them later on. We started by
designing the arm. Next, we built the project including the arm and the circuit. The last step was
to complete the programming. To combine the circuit with the arm, all we had to do was connect
the servo motors to the board by connecting the correct wires to positive, ground, and the
potentiometer. The last step was to connect the board to the computer code and the
synthesizing was complete.

Reflection:
This project encompassed all we have learned before from the engineering design process, the
programming, and the building and connection of an arduino to other components. It also gave
insight into how our future projects can be, specifically the smart home project coming up as it
helped us gain more perspective to problems. This also helped us take the next step in design,
including the programming aspect into the hardware to make it move.

Vous aimerez peut-être aussi