You are on page 1of 41

Introduction

The idea of creating a human-looking robotic hand is not new at all and it is not difficult to find
numerous attempts, carried out with more or less success, in recent decades. The development
of this type of projects had always required large investments only available to large companies
or prestigious universities. But, in recent years, due mainly to the Open Source movement, there
has been a significant decrease in the prices of 3D printers, as well as the fundamental
electronic components for projects of these characteristics (such as microprocessors), making
them accessible to the public. Therefore, they decided to take advantage of these circumstances
to address the development of a robotic hand but, from a novel point of view: controlling it
wirelessly simply with the movement of our own hand.

In this way, the main objective of the project will be to design, develop and manufacture a
robotic hand, with the appearance of the most human possible, able to imitate in real time and
accurately the movements of a person's fingers. This will be achieved through the creation of
two modules: a robotic hand, whose parts have been manufactured by 3D printing, and a
controller module, consisting mainly of a glove with a flex sensor on each finger. Broadly
speaking its operation can be summarized as follows: the sensors will detect the degree of
flexion of the fingers and send a signal to the servos indicating where they should be placed,
the servos will rotate the necessary degrees until reaching it, triggering the threads connected
to their blades that, in turn, will be responsible for moving the fingers, bringing them to the
correct position. To make this process possible, it is necessary, among many other things, that
each of the two large modules of the project have a microprocessor (Arduino) in which the code
has been previously loaded with the specific commands for the operation of each part.

In addition, three secondary objectives were established to increase the benefits and possible
applications of the project. In the first place, both the robotic hand and the module that the
person who controls it will have to be totally independent and autonomous. The fact that the
robotic hand constitutes a single independent device has meant the need to also manufacture
part of the arm, as a housing for the components responsible for the movement of the hand. In
addition, to provide the two parties with total independence it has been decided to establish
communication between them wirelessly, thus eliminating the limitations imposed by the cables.
On the other hand, its autonomy will be guaranteed simply by feeding the components with
batteries, instead of with the computer. The second of the secondary objectives will be that
both modules are able to operate in any position with total reliability. Objective that, as will be
verified throughout the present work, will be achieved by fixing all the components correctly,
either inside the robotic arm or to the glove and forearm of the person carrying the controller
module. And, the last objective pursued will be to guarantee accessibility to the internal parts of
the robotic arm to facilitate its maintenance.
Parts: design and manufacture.

Design of the pieces

The totality of the pieces of plastic necessary for the project can be divided into two large
groups: hand and forearm (including the wrist). As will be detailed in the following sections,
some of them have been taken from a project called InMoov, sometimes printing them without
any modification in their design and in others after carrying out some modification to try to bring
the base design to the specific functionalities required in the project. On the other hand, a large
number of pieces, especially the forearm, have been designed entirely by the author, using the
free software SketchUp.

The objective of this chapter is to present each piece, explaining its most important
characteristics and relative position in the set. If you wish to study some of the pieces in more
depth, the reader is encouraged to consult the attached files, listed in Annex A.

The InMoov project is an initiative of French designer and sculptor Gael Langevin, which began
in January 2012 with the development of the first open source prosthetic hand (Langevin,
2015). Over the years the project has been expanding, always under the premise of being
totally open to the community of makers, who can benefit from Gael Langevin's advances and,
in turn, share their own. So, in little more than 3 years InMoov has gone from being a simple
hand to the whole top, from the waist up, a human-sized robot completely available on the
Internet and hundreds of universities, companies and fans of everyone is building. At present,
Gael, with the help of the Internet makers community, is developing the lower part of the robot,
as well as studying the possibility of endowing it with a kind of artificial intelligence that would
allow any skill or capacity acquired by a robot InMoov anywhere in the world was instantly
shared with the rest.

Figure 1.1. Robot InMoov (Langevin, 2015).

The hand, in turn, can be subdivided into 3 large groups of pieces: the fingers, the palm and the
shells that line the back.
Figure 1.2. Back and palm (left and right respectively) without housing.

Figure 1.3. Back and palm (left and right respectively) with housing.

In the two previous figures the different parts of the hand are clearly differentiated: in white
and yellow the fingers, in red and gray the palm and, in green, the covers that cover the back
(light green) and the fingers (dark green) .

For the fingers it was decided to respect the design of InMoov, so that, as can be seen in Figure
1.2, index, heart, ring and little finger have 6 pieces each (whose assembly will be detailed in
chapter 4) and whose unique difference lies in the size. The thumb, on the other hand, is also
composed of 6 pieces, although in this case, markedly different from the rest of the fingers.
In the image on the left of Figure 1.4, the index finger is shown with all its pieces assembled,
while in the one on the right you can see each of them separately. This second image also
corresponds to the "print view", because when all the pieces of the finger are printed together,
the total time is significantly reduced without affecting the quality. As seen in the images below
these lines, the 6 pieces will be glued in pairs (with two-component epoxy glue) to form the 3
phalanges of each finger. The union of the 3 phalanges to each other can be done in different
ways, as will be detailed in chapter 4, all thanks to the holes available in each piece.

Figure 1.4. Index finger mounted (left) and print view of its parts (right).

With regard to the palm, the colored parts in gray in Figure 1.2, which allow the union of the
little and ring fingers with the rest of the structure, have been used without any modification.
On the other hand, the part represented in red in said figure did require a series of
improvements, which will be explained below.

Figure 1.5. Design of the original palm (InMoov)

Figure 1.5 shows the original appearance of the palm of the hand. The first measure that was
decided to take was to replace the 15 holes that cross the interior of the piece by only 5, one for
each finger, of which those corresponding to thumb, index and heart will end up converging in
one, so that in the part closest to the wrist, only 3 large holes will be visible (Figure 1.6). After
carrying out this modification, the piece was printed and it was assembled, during which two
design deficiencies could be observed: the holes destined to house the metric 8 nuts were not
big enough and, in addition, the head of the screw that joins the palm with the thumb
prevented the introduction of the screw that joins the palm with the wrist. Therefore a second
redesign was carried out in which the width and height of the holes of the nuts would be
increased by 0.4 mm and 0.15 mm, respectively, and half of the lower protrusion that houses
the screw of the thumb union would be eliminated. -palm. In Figure 1.6 you can see the final
appearance of the palm after the modifications.

Figure 1.6. Modified palm design

The design of the covers that cover the back of the hand and part of the fingers is exactly the
same as that used by Gael Langevin, with the only exception that under the existing "InMoov"
logo it has been decided to add the abbreviation of the surname of the author of the present
project, "Rope". As shown in Figure 1.7, it is in fact 3 independent covers, so that the largest
will be placed just above the part of the palm represented in red (Figure 1.6), while the two
smaller ones will be placed on the parts colored in gray in Figure 1.2, that is, the joints in the
palm of the little and ring finger. As can be assumed by studying the images carefully, the
housings will be joined to the parts of the palm of the hand by 5 small screws placed in as many
holes.

Figure 1.7. Housing of the back of the modified hand

Finally, each of the fingers has its own housing on the back of the hand, as can be clearly seen
in Figure 1.3 (dark green). These housings have been represented separately in the figure
below. In it you can see that, unlike the cases of the palm of the hand, in this case only the
thumb has a hole for its attachment by screw, the union of the rest will be done by simply
applying glue on the bottom of the housings (Figure 1.8 left). Its main function is to prevent
that when the fingers are not flexed fall too far back, leading to an unnatural position.

Figure 1.8. Views of the carcasses of the fingers.

Forearm parts

The forearm will be in charge of housing the batteries, servomotors, microcontroller and other
necessary mechanisms to provide movement of the fingers. For a better understanding it has
been decided to divide the forearm into 4 different parts, which are represented in Figure 1.9
with different colors: hook (in red), wrist (in white), housing servos (in blue) and Arduino
housing (in green). Unlike the design of the hand, in this case most of the pieces have been
designed entirely by the author of the project.

Figure 1.9. External aspect of the forearm.

First, the design of the coupling (shown in red in Figure 1.9) will be briefly explained. This part
has been printed in one piece and its main function is to provide a union between the hand and
the forearm. Function that will be fulfilled thanks to the fact that it has two projections with
holes for a metric screw 8, as can be seen clearly in Figure 1.10, allowing the coupling between
this piece and the palm of the hand shown in Figure 1.6. This coupling also has a secondary
function: to allow the passage of the wires that arrive from the tips of the fingers and go to the
servomotors. For this, 6 holes have been placed in two rows, so that the row above guides the
threads in charge of the flexion of the fingers and, the bottom one, the ones in charge of its
extension. As it happened in the palm, for ease of printing it has been decided to combine the
holes corresponding to the threads of the thumb, index and heart in one, thus obtaining the two
larger holes that can be seen in Figure 1.10.
Figure 1.10. Elevation and profile of the forearm-hand coupling

The next part of the forearm is the so-called doll. It is, as in the previous case, a solid piece and
designed entirely by the author. In this case, its main mission is to house the 9V battery that will
power the Arduino board, for which it has a support like the one shown in Figure 1.12 thanks to
the cut made. This support has two small slits on one side that allow the battery cables to
emerge from underneath it, heading to the Arduino board. In addition it can be curious the
ramp that goes from the support itself to the base of the wrist. The reason for its existence is
none other than to avoid overhangs and therefore make its printing possible. As this piece, like
the previous one, must allow the passage of the threads through its interior, a series of guides
has been added in its upper part (Figure 1.11). Finally, it is also important to highlight the
method of joining this piece with the adjacent ones. The connection with the coupling described
above will be made by gluing the part of the wrist's circular crown (see Figure 1.11) with the
back part of the hitch thanks to a two-component epoxy glue. While the union with the two
elements downstream will be made by the eyelashes that the piece has, reinforcing also in the
bottom with epoxy glue.

Figure 1.11. Views of the wrist.

Figure 1.12. Cut of the wrist by plane parallel to the support for the pile.

The part represented in blue in Figure 1.9, which is responsible for housing the servomotors, is
significantly more complex than the previous ones since, unlike them, it is formed by 4 different
pieces, which can be seen in Figure 1.13 and that they will be described separately in the following
lines.

Figure 1.13. Views of the part destined to the lodging of the servos.

The piece represented in dark blue in the figures corresponds to the lower part of the forearm
and is responsible for providing a stable structure capable of housing the support on which the
servomotors will be placed. For this, it was decided to respect the rail system designed by Gael
Langevin, which also has two screws that allow the full support of the servos support on this
piece. The two large tabs that can be seen in Figure 1.14 and that have a hole for a metric
screw 3 and a support for its corresponding thread, are responsible for promoting the union of
this piece with the housing (represented in light blue in the Figure 1.13). Although, as will be
seen later in the chapter devoted to assembly, it has been discovered that the nut is
unnecessary, because simply with the screw the union is guaranteed.

Figure 1.14. Views of the lower part of the servo housing.

Under these lines, in Figure 1.15, the housing of the servo housing is shown, a piece designed
entirely by the author and that simply has an aesthetic function, since it covers the servos and
simulates the appearance of the upper part of a real forearm. This piece joins with its lower part
thanks to the large tabs described above and, both pieces together are coupled to the adjacent
ones by means of a bonding with epoxy resin, favored in addition by a series of tabs.

Figure 1.15. Housing of the servos housing.


The next piece (Figure 1.16) has been named Servos Bed and will be directly supported and
bolted on the rails of the lower part of the forearm (shown in dark blue). However, as shown in
Figure 1.13, Cama Servos is slightly longer than the piece on which it rests, so it will have to be
in contact with the next one to achieve the desired balance. This piece has 4 holes per servo,
that is, with 20 non-through holes, destined to house the 4 screws that will fix each servomotor
to the structure. On the other hand, the output of the 3 cables of each servo to the Arduino
board is possible thanks to 5 large slots strategically placed in its walls.

Figure 1.16. Views of the bed Servos.

The design of this piece has been carried out by making a series of modifications in a similar
piece mounted on the InMoov robot (Figure 1.17), until a new and fully functional for the
present project is obtained. Simply comparing Figure 1.16 with Figure 1.17 shows that the
modifications suffered by the geometry have been numerous and substantial. However, at least
from the point of view of the author, the most important is to have eliminated the lower support
surface of one of the servomotors, as well as descended proportionally their upper support
points (where the screws will go), avoiding that the blade of the servomotor touch, during its
movement, the upper case of this part of the forearm.

Figure 1.17. Original Servos Bed (InMoov).

The small protrusion located in the central part of the so-called Servo Bed (Figure 1.16) provides
support for the last of the pieces that make up the part of the forearm intended for the housing
of the servos: the pin of the threads. This piece has been designed entirely by the author of the
project and, because it only has to guide the threads of the 3 later servos, it will have 6 through
holes, since each finger needs two threads for its movement (see Figure 1.18).

Figure 1.18. Views of the thread pin.

The last section of the forearm, represented in green in Figure 1.9, is responsible for housing
the Arduino board, the coupled shield and the battery that powers the servomotors. For this the
author has designed 3 pieces, which can be seen in Figure 1.19 and which will be briefly
described below.

Figure 1.19. Views of the part destined to the Arduino's accommodation.

The lower part, represented in dark green, is characterized by having a custom support where
to place the necessary 6V battery, as well as some small tabs that serve as support for the last
part of the Servos Bed. Regarding its exterior, it is worth noting that its cylindrical surface has
been modified to provide the forearm with a flat surface on the support when it is in a horizontal
position.

Figure 1.20. Views of the lower part of the Arduino housing.

As shown in Figure 1.20, two of the sides of the battery holder have been extended vertically to
also support the Arduino by simply fixing the plate shown in Figure 1.21 (thanks to the two-
component epoxy glue). It should also be noted that for the printing of the piece of Figure 1.20
was possible it was necessary to add small columns in its lower part, with the aim of reducing
the cantilever parts to the minimum possible. These small columns can be easily removed later
with the help of a cutter.

Figure 1.21. Arduino support plate.

The last piece of the forearm is the shell that covers the Arduino board, its shield and the 6V
battery (Figure 1.22). It is simply a cylindrical piece that fits with its counterpart thanks to its
side flanges, as shown in Figure 1.19. The set of these two joined pieces is coupled with the
previous ones also by means of a series of flanges that have their adjacent pieces (see Figure
1.13).

Figure 1.22. Housing housing of the Arduino.

Other pieces

Two additional pieces were also necessary: one for the correct fastening of the Arduino board
on the arm of the person wearing the glove with the sensors, and another to provide support for
the hand when it is placed in a horizontal position, thus relieving the weight that the wrist has to
bear.

The first of them (Figure 1.23) is a custom plate, on which Arduino will be placed by means of a
special velcro of high adherence. This piece also has two tabs on its sides, each of which with
an opening to allow the passage of a Velcro strap, which will be placed around the forearm of
the person wearing it. In this way the glove carrier can easily carry the Arduino board (with the
corresponding shield and XBee on it) on his forearm simply by adjusting the velcro until it is
comfortable and the plate is secure. In Figure 1.23 you can also see a series of rectangular
columns, which will support the lateral tabs of the piece during printing and can be easily
removed later.

Figure 1.23. Views of the Arduino clamping piece to the arm of the person with the glove.

The need to manufacture a piece that would give support to the hand when it was at rest was
discovered when, when the forearm and hand were joined for the first time, it was found that it
remained in the air, only supported by the metric screw. that joins the hook and the palm (in
purple and red, respectively, in Figure 1.24). It was decided, therefore, to manufacture an
additional piece that, although it is not necessary for the correct operation of the robotic arm, is
recommended to extend its useful life.

Figure 1.24. Side view of forearm and hand (with support) mounted.

The design of this piece (Figure 1.25) was not easy since it had to be adjusted to the special
geometry of the case on the back of the hand, providing additional support that allows to
discharge part of the weight that would otherwise be supported only by the hook, represented
in purple in Figure 1.24.
Figure 1.25. Support of the hand.

1.2 3D printing

The printing of the pieces has been carried out using a Prusa Mendel i3, designed by RepRap
Core Developer Prusajr, available in the automation laboratory of the University of León. In
addition, on some occasions it has been possible to have a second Prusa Mendel i3, which has
made it possible to speed up the printing significantly. It is a molded deposition modeling (FDM)
printer that has a single 0.5 mm diameter extruder and 5 NEMA 17 stepper motors, of which 2
are used to move the Z axis, one for the Y axis, one for the X and another for the extruder. Its
print volume is 200x200x200 mm. Thanks to the fact that it has a warm bed, it allows printing
with thermoplastics such as PLA, ABS, HDPE (high density polyethylene) and HIPS (high impact
polystyrene) and even with Nylon filaments.

Molded deposition modeling (FDM) uses a technique based on the addition of layers of a plastic
filament to form the desired part. The filament will be stored in rolls and, when introduced in
the extruder, which is at a temperature higher than the melting temperature of the plastic, it will
melt and deposit on the lower layers of the piece, solidifying instantaneously. Actually, when
using a printer included within the RepRap Project, the correct term for this methodology would
be fabrication with fused filament (FFF), as it is the term that the community of members of the
RepRap Project decided to use to avoid legal problems with Stratasys Inc ., company that
registered the initials FDM.

1.2.1 Choice of material

As already mentioned there is a wide variety of materials with which to print, with ABS and
PLA being the two most used, since they are chosen by more than 90% of users. Therefore,
before starting to print the necessary parts to build the hand, it was decided to carry out a
thorough investigation of the differences between them in order to choose the most appropriate
one.

ABS (or acrylonitrile butadiene styrene) is an amorphous thermoplastic widely used in


industrial and domestic applications, mainly due to its high impact resistance. It is a very
tenacious plastic, even at very low temperatures, as well as being very hard, rigid and having a
good resistance to abrasion. It has to be extruded at higher temperatures than the PLA, around
220-240ºC, due to its high melting point. It is also easily machinable, so that it can be sawn or
drilled without problem during the post-processing of the pieces. Regarding its disadvantages, it
should be noted that it undergoes significant retractions with sudden changes in temperature,
so it is essential that the base of the piece is firmly adhered to the glass of the printing bed to
avoid "warping", that is to say , that the base is warped and the corners are raised. To try to
avoid it, it must always be printed with the hot bed (around 100ºC), in order to minimize the
temperature difference between the extruder and the outside and, in addition, it is convenient in
many cases to use support platforms , such as raft or brim, which will be explained later
(kitprinter3d, 2014).

The PLA (or polyactide) is a biodegradable thermoplastic from renewable resources such as
corn or sugarcane. It is a more fragile material, less hard and more difficult to machine than
ABS. Its melting point is lower than that of ABS, so the temperature of the extruder can be
somewhat lower (between 190 and 210 ° C). In addition, as it is very unlikely that you suffer
"warping" is not necessary to print with the hot bed (although it is highly recommended to
temper at around 40 º C) and how often it is necessary to use support platforms, such as brim
or raft , decreases noticeably. The smell is also a point in favor of the PLA, because it is more
pleasant and not harmful, unlike the ABS smoke that can be harmful in large quantities
(Kitprinter3d, 2014).

With these data the author of the project began to decant by the ABS, because many of the
pieces would need some type mechanized after his impression. However, before making a final
decision, it was decided to print a series of pieces with both materials to check the suitability of
the ABS at first hand. After performing this small experiment it was appreciated that printing
was much simpler with PLA than with ABS, as the second tended to burr easily, losing much
precision especially on curved surfaces or with holes. It was also found that the PLA allowed to
use a higher printing speed than the ABS, without an appreciable loss of quality. Once the
pieces were printed with both materials, they were machined, verifying that the PLA could be
sanded and drilled (always using a hole printed as a guide) without major complications.
Therefore, after the experiment, the author changed his mind and decided to carry out the
project using white polylactide (or PLA).

1.2.2 Preparation of the piece for printing

3D printers need a .gcode file that contains all the instructions that it will have to follow
during the printing of the piece. To transform the .stl file with which we are once the piece is
designed in .gcode there are a large number of programs. For the present work we have opted
for the Cura software, developed by Ultimaker, for its simplicity and versatility.

The first thing that must be specified is the printer model used so that the software can
know characteristics such as its dimensions or the size of the extruder. Then the program will
show a window similar to the one in Figure 1.26, in which two zones can be distinguished: the
right part of the piece's visualization and the left zone for defining the printing parameters.
Figure 1.26. Initial appearance of the Cura software

After loading the desired geometry, the next step will be to define the printing parameters.
Below is a brief description of them, as well as ranges of recommended values for this type of
impressions (Diosdado, 2014). If you want to know the specific values used for the printing of
each part, it is recommended to consult Table B.1.

Layer height: indicates the distance between two successive layers. It is a fundamental
parameter because it directly defines the quality of the piece: less layer height, higher quality,
but also longer printing time. Therefore it is convenient to reach a compromise between quality
and time that normally limits the layer height between 0.1 and 0.3 mm.
Shell thickness (edge thickness): determines the width of the edge of the object. Its value
is a function of the diameter of the nozzle of the extruder, since it is defined as the diameter of
the nozzle of the extruder by the number of turns desired to be given to the object. Normally
edges are usually made with 2 or 3 turns, so, as the diameter of the extruder in our case is 0.5
mm, the thickness of the edge could be defined as 1.0 or 1.5 mm.
Enable retraction: if activated, this option allows the extruder to retract some plastic during
the displacements so that it does not drip, thus avoiding small defects in the printing. In all the
impressions made for the present project, this option has remained activated.
Bottom / Top thickness (thickness of the lower and upper layer): indicates the thickness of
the upper and lower layers, which will always be solid, regardless of the fill configuration
selected (fill density). Depending on the geometry of the piece and the desired finish, more or
less layers will be needed, but as a general rule, 3 or 4 are usually used. Since the value must
be entered in mm, the value of the layer height must be multiplied by the number of layers we
want. If, for example, we have defined a layer height of 0.1 mm and we want the upper and
lower layers to have 4 layers, we will introduce a bottom / top thickness of 0.4 mm.
Fill density: this parameter indicates the percentage of fill that the figure will have. If we fix
it as 100% the piece will be totally compact, while if we choose 0% the piece will be hollow. Fill
density is a very important parameter because it will directly affect the time and price of
printing, as well as the strength of the piece, so that higher density, greater strength, but also
longer printing time and filament consumption. For purely decorative elements, a filler of up to
20% can be used, but if it is a piece that has to bear weight or stress, a density between 40 and
100% is recommended, depending on each specific case.
Print speed: as expected with higher speed, shorter printing time, but at the expense of
reducing the quality of the piece. It is a parameter that depends a lot on the machine used.
With regard to the Prusa i3 with which it has been worked, speeds of around 30 mm / s are
considered relatively slow, generating high quality parts. All the pieces printed for the present
project have been realized to speeds of between 40 and 50 mm / s, although it is certain that in
some of them the speed has been diminished manually in the console of the printer to improve
the quality in certain zones with complicated geometries.
Printing temperature: defines the temperature of the extruder. This varies depending on
the plastic used, being between 220 and 240ºC for ABS and between 190 and 210ºC for PLA. As
it has been decided to carry out the project with PLA, the printing temperature has remained
between 195 and 210ºC under normal conditions, although at some specific moments to avoid
the formation of burrs it has been manually reduced to 185-190ºC.
Bed temperature (temperature of the hot bed): the temperature needed in the hot bed will
vary depending on the plastic we use. For the PLA it is not necessary to heat the bed (although
it is advisable to warm it to about 40ºC), while ABS requires a hot bed temperature between 80
and 110ºC.
Support type: allows you to create supports for parts of the cantilevered part, that is, parts
in the air or with very large angles. To help detect this type of parts, you can use the
"overhang" view in the view menu, which will be displayed when you click on the button located
in the upper right part of the program (see Figure 1.27). You can select 2 types of media:
"Touching Buildplate" or "Everywhere". The first of them creates supports supporting only the
base, while the second one does it with support in any part of the piece. In the present project
it has not been necessary to use supports, since it has been tried to design the pieces without
cantilevers and, in the only two cases where it has not been possible, a specific support has
been designed for it.
Platform adhesion type: with this option you can create a platform in the base for a better
adhesion of the piece to the bed. There are two types of bases: "Raft" and "Brim". The main
difference between them is that "Brim" prints a series of layers around the edges of the piece,
while "Raft" generates a complete base on which the piece will be built. If a good surface finish
of the lower layer is desired, the use of "Brim" instead of "Raft" is recommended, so that it is
printed directly on the glass.
Diameter (filament diameter): defines the diameter of the filament that is being used. The
most commonly used diameters are 3 and 1.75 mm. Although in theory the filament used in the
project is 3 mm will be set a value of 2.85 mm, closer to reality.
Flow (filament flow multiplier): indicates the amount of filament extruded by the printer. In
the vast majority of cases, including this work, a value of 100% is established, however, in
isolated cases it is possible to vary this parameter to correct the amount of extruded plastic,
since the extruder may be poorly calibrated or the filament be of a diameter slightly different
from that indicated.
Figure 1.27. Cura views menu.

The menu views Cura (Figure 1.27), in addition to check parts cantilevered (overhang) of
our piece and be visible inside geometry thanks to the "Transparent" views and "X-Ray", to
simulate the printing layer to layer through the "Layers" view (Figure 1.28). Therefore, the next
step after having loaded the piece and established its printing conditions, will be to check
through this Cure function that the printing will be done according to the expected.

Finally we must export the file in .gcode format, because it is the one that is capable of
interpreting the printer. To do this, simply click on the icon in the form of a disquette in the
upper left part of the screen, which can be seen in Figure 1.28. The generated file can be copied
manually to the SD card of the printer or, if it is already on the computer during export to
.gcode, Cura will detect it and automatically save the generated file on the memory card.

Figure 1.28. View "Layers" of Cura


2 Electronic

2.1 Controller module

The control module is understood as the set of components carried by the person in charge
of controlling the movements of the robotic hand. These components are housed either in the
glove, such as the sensors, the battery and the integrated circuit, or attached to the forearm
(thanks to the piece shown in Figure 1.23), such as the Arduino board, the shield and the XBee
card .

Figure 2.1. Diagram of the connections of the controller module

As you can see in Figure 2.1, the glove has 5 flex sensors (or flex sensors), one for each
finger, connected to an integrated circuit (or PCB). This circuit has a resistance per sensor to
form the voltage divider that will generate a readable voltage by the Arduino board, a signal
that will be received through its analog input pins A0, A1, A2, A3 and A4. Although there is no
single connection order, it is essential that the sensors and servomotors are connected to it, so
that if the servomotor that controls the thumb is placed first on its shield, the thumb sensor The
first one must also be on the Arduino board of the controller module, that is, on the A0 input.
Due to the limited space that is available in the robotic arm, the order of connection of the
servos will be determined by the sensors, so that the author has chosen to follow the following
order: thumb, index, heart, annular and little finger At the PCB there are also two cables from
the microcontroller shield, one red and one black representing the positive and negative poles,
respectively, of the power supply. Power supply that, as seen in the figure, consists of a 9V
battery connected to the Arduino board. The last element to be highlighted in Figure 2.1 is the
XBee, a module that will allow wireless data to be sent to the robotic arm, which will have
another XBee that will receive them.
2.1.1 Arduino and shield.

Arduino is a platform of free hardware and open source (Open Source) that mainly has a
microcontroller and a series of ports of entry and exit. The commands will be uploaded to the
microcontroller through its IDE, called Arduino Software, based on Processing, using its own
programming language based on Wiring. Arduino was created in 2005 by Professor Massimo
Banzi at the IVREA Institute, in Italy, as a project in which, with the collaboration of the
students, a cheaper, more intuitive and accessible microcontroller than the Basic Stamp could be
developed. that was used in the Institute (Kushner, 2011).
Since then and, thanks in large part to its completely open character, Arduino has evolved very
rapidly and is used today in all areas and at all levels: from small projects in schools to data
collection in the Great Collider of Hadrons, known by LHC for its acronym in English (Walters,
2012).

Currently there are a variety of Arduino boards to choose from: UNO, MEGA, NANO, PRO,
etc. Among all of them the author has decided to use the Arduino UNO R3 board, for its
simplicity, ease of use and low cost. This board assembles the ATMega328P microcontroller and
has 6 analog inputs and 14 digital I / O pins, of which 6 provide PWM (Pulse-Width Modulation)
output. This microprocessor is an 8-bit AVR that has 32 KB of flash memory (Atmel Corporation,
2009), whose performance is more than sufficient for the project to be carried out. Other
features of the Arduino UNO board are that it has a USB port to connect the board to the
computer, either for communication or power, with battery connector, reset button (reset) and
two LED lights with RX and TX inscriptions, which indicate whether the plate is receiving or
transmitting information, respectively.

The microcontroller of the board has to work with a voltage of 5V, but the board can be
powered by batteries of between 6 and 20V (being advisable not to use less than 7 or more
than 12V), since it has a voltage regulator. In the specific case of the so-called controller
module, the power supply is a 9V battery-type battery that is connected to the board by means
of the barrel jack that it has available (Figure 2.1). A more detailed explanation on the
properties of this type of batteries will be provided in section 2.2.3, which will deal with the
feeding of the robotic arm.

Although they will be discussed in more detail in the chapter dedicated to software, the
main functions to be performed by the Arduino microprocessor are the data collection of the
bending sensors and, during the first 10 seconds, make comparisons between them to
determine the maximum and minimum values, while from the 10s has to take charge of
converting the measured value at any time in a servo angle of rotation (from 0 to 180º) and
send it wirelessly through the XBee card.
Figure 2.2. Arduino UNO

On the other hand, carefully examining Figure 2.1 shows that a module (or shield) has
been placed on the Arduino UNO, which allows the XBee to be directly connected to it. Said
module, called XBee Shield V03 Wireless Control Module, has a series of male pins in its lower
part that allow easy coupling on the Arduino UNO board, as well as female pins on the upper
one on which the XBee can be placed. One of the most important parts of the shield is, without
a doubt, the switch that allows the user to select the USB or XBee position. When the module is
connected to the computer and we wish to communicate with it, the switch must be in the USB
position, since the microcontroller-computer communication is done in series. On the contrary,
when what is desired is the communication through the XBee card, the homonymous position
must be selected in the switch. Because XBee works at 3.3V, unlike Arduino at 5V, the shield
must have its own voltage regulator.

Figure 2.3. XBee Shield V03 Wireless Control Module.

Using this module it will be necessary to use a PCB to connect the sensors to the board,
however it is recommended to those who wish to carry out a similar project the use of the
Wireless SD Shield (Figure 2.4) since it has a surface for prototyping , that is, a surface with a
series of holes on which the desired circuit can be easily constructed simply by welding the
tracks and components to its bottom.
Figure 2.4. Wireless SD Shield.

2.1.2 Bending sensors

To measure the flexure of each finger, 5 flex sensors from the Sparkfun brand have been used,
using the technology patented by Spectra Symbol. A bending sensor is a kind of potentiometer,
that is, a resistance whose value varies depending on the degree of flexion to which it is
subjected. More specifically, the model used will increase its resistance from its nominal value of
10 kΩ up to between 60 and 110 kΩ when its bending is maximum (a few lines below will
qualify these values). The bending sensors have a width of 0.25 "(6.4 mm) and length of 4.5"
(11.4 cm), of which 3.75 "(9.5 cm) are active surface, that is to say, surface with resistance,
according to their sheet specifications (SpectraSymbol, 2014)

Figure 2.5. Flex sensor.

However, the Arduino analog input pins measure voltages, not resistors, so it will be
necessary to integrate the flex sensor as part of a voltage divider.

Figure 2.6. Voltage divider (Wikipedia Contributors, 2015c))

As seen in Figure 2.6, a divider voltage is formed by two resistors, R1 being the bending
sensor and R2 a resistance of, in this case, 10 kΩ. Having selected this value has not been
coincidence and is that, for the voltage divider to be effective, the values of the two resistors
must be of the same order.

Being a series circuit, the intensity will be constant, however, the voltage across each
resistance will be different, according to Ohm's Law, so the total voltage will be
Therefore, the greater the bending of the sensor, the lower the voltage sent to the pin,
since R1 would increase, decreasing Vout.

The microcontroller on the board has a circuit inside it called analog-to-digital converter or
ADC that reads the voltage, called Vout in the previous lines, and converts it into a number
between 0 and 1023 (SM, 2015). So the maximum and minimum voltages can be recalculated
as

However, when testing the bending sensors and printing the values read on the monitor of
the serial port, it was found that the actual minimum voltage value was very different from the
theoretical value just calculated. And is that, despite having made the theoretical calculation
with the lowest resistance within the range indicated by the manufacturer, 60 kΩ, we find that
the minimum real voltage measured by Arduino is around 280 (higher than the 143 ) for all
sensors. So you can find the real value of the maximum resistance by clearing R1 in equation
(2.5):
Although this will not be necessary at present, it is convenient to know that, according to
the manufacturer's specification sheet (SpectraSymbol, 2014), buffers can be added (amplifier
buffers), such as the LM358 or LM324, to the circuit for reduce the error due to the impedance
of the source. In such case, a voltage amplifier buffer based on an operational amplifier
(operational amplifier or op-amp) of unity gain with negative feedback as shown in Figure 2.7
would be used.

Figure 2.7. Voltage divider with buffer amplifier.

2.1.3 Integrated circuit (PCB)

It is, therefore, necessary to build a divider voltage like the represented in Figure 2.8 for
each bending sensor, that is, 5 in total.

Figure 2.8. Voltage divider for a bending sensor.

To group the 5 voltage dividers into a single board, it will be necessary to manufacture a
small integrated circuit (or PCB) that will be placed in the glove and act as an intermediary
between the sensors and the Arduino board. The final appearance of the PCB and its
connections with the other components of the controller module can be seen in Figure 2.1.
There are numerous PCB fabrication methods, both using expensive industrial machines and in a
relatively artisanal way. Due to the low-cost character of the project, which allows any
interested party to reproduce it without incurring significant expenses, the manufacturing of the
circuit has been carried out in an artisanal way, as described below.

The first step, and probably the most important, is the design of the circuit. This has been done
using the free ExpressPCB program that allows creating integrated circuits by simply selecting
the desired components from the toolbar located in the left margin of the window (Figure 2.9).
In the case at hand, only 3 components have been used: trace (trace), pad (through hole) and
resistor (resistance). As can be seen both in Figure 2.9 and in Figure 2.10, the PCB design
consists of two long horizontal tracks in its lower and upper part, whose function will be to
provide a ground connection (GND) and the common voltage (5V) for the 5 voltage dividers,
which are located perpendicular to them. The 10 kΩ resistors are represented in Figure 2.9 in
yellow and their only function will be to facilitate the PCB's visualization during its design, since
when it is printed, the tracks and holes will appear only as a reference for drilling in the plate).
As can be seen both in Figure 2.9 and in Figure 2.10, the PCB design consists of two long
horizontal tracks in its lower and upper part, whose function will be to provide a ground
connection (GND) and the common voltage (5V) for the 5 voltage dividers, which are located
perpendicular to them. The 10 kΩ resistors are represented in Figure 2.9 in yellow and their only
function will be to facilitate the PCB's visualization during its design, since when it is printed, the
tracks and holes will appear only as a reference for drilling in the plate).

Figure 2.9. Design of the integrated circuit in the ExpressPCB software

Next, the conversion of the file generated by the ExpressPCB to PDF must be carried out in
order to be able to print it easily in real size. Since ExpressPCB does not directly offer the option
to export the file to PDF, it will be necessary to download a free software called PDF24 Creator,
which is a kind of virtual printer that allows you to save, by clicking on print and selecting PDF24
as a printer. copy of the file in PDF format in the desired directory. After checking that the
measurements of the tracks of the PCB have not been modified, the circuit will be printed.
Figure 2.10. PDF file with tracks and circuit pads.

The next step will be to obtain a copper plate of the desired size (it is sufficient that it
has copper on one of its sides), on which it will center and fix the sheet with the printed circuit
to proceed to the drilling of the holes of 1 mm diameter. After that, the paper will be removed
and, with the help of a permanent marker and a ruler, the tracks will be drawn as they were
designed in ExpressPCB.

The circuit is already able to be submerged in a solution of hydrochloric acid, to which


sodium perborate will be added, which will act as a catalyst for the reaction, accelerating it.
After a few minutes, normally 5 are usually enough, you can remove the plate with the help of
tweezers to check that the acid has reacted with all the copper in the plate, except with the one
protected by the ink, so that only copper will remain under the tracks drawn earlier.

Figure 2.11. Plate copper react with the acid in a container.

Next, the ink covering the tracks will be removed using a kitchen scouring pad (preferably made
of metal fibers) to leave the copper bare and the PCB ready to be welded.
Figure 2.12. PCB tracks.

After welding the resistors in their corresponding holes, a circuit like the one shown in Figure
2.13 will be obtained. The soldier cables that go to the Arduino pins, bending sensors and the
positive and negative poles of the power supply will be carried out later during the assembly of
the controller module, so it can be said that the manufacturing has been completed of the
integrated circuit or PCB. In Figure 2.13 can be seen, in addition, 8 holes (also 1 mm) made
very close to the edge of the plate, whose function is none other than to facilitate later sewing
the glove.

Figure 2.13. Top view (right) and bottom (left) of the PCB.

2.2 Robotic hand

The chapter has been called robotic hand because the hand is the only part equipped with
movement, however in addition to the hand have also built the wrist and forearm, so they will
be used indiscriminately the terms robotic hand and robotic arm as throughout this chapter.

The objective of the robotic hand will be to imitate the movement of the fingers of the hand
of the person wearing the controller module. For this purpose, the XBee card it has has to
correctly capture and interpret the information sent by the XBee of the controller module, in
order to subsequently be able to send each servomotor the order of how many degrees it has to
move.

For this, the robotic arm has 6 different components: 5 servomotors, an Arduino board, a
shield, an XBee, a battery pack (9V) and a battery composed of 4 1.5V AA alkaline batteries (6V
in total).

As can be seen in Figure 2.14, the shield will be placed directly on the Arduino board and, in
the same way, on it will be placed the receiving XBee. The 6V battery will be responsible for
feeding the servomotors and will connect directly to the shield, while the 9V battery, which
feeds the microprocessor, can be connected either to the Arduino board or to the shield. The
author has opted for the first option due to the higher reliability offered by the barrel-jack type
connector. The servo motors, on the other hand, connect directly on the pins that the shield has
specifically for it. The connection of each servo in a pin or another is a personal choice but, as
already mentioned previously, they must be placed in the same order as the sensors of the
controller module. After trying different combinations, it was concluded that the one that best
adapted to the limited space available within the forearm was the one in which the servo
corresponding to the thumb began, to follow those of the index, heart, annular and little finger.
In addition, as can be seen in Figure 2.14, it has been decided to leave a pin of distance
between each servo motor, so they will be connected to pins number 2, 4, 6, 8 and 10,
respectively.
Figure 2.14. Outline of robotic arm connections.

2.2.1 Arduino and shield

As for the controller module, it has been decided to use an Arduino UNO R3 board (see
Figure 2.2), with an ATMega328P microprocessor and with 6 analog inputs and 14 digital I / O
pins, of which 6 provide PWM output (Pulse -Width Modulation).

The programming of the microcontroller will be studied carefully in the chapter in charge of
the software but its 3 main functions can be summarized as receiving, interpreting and sending
the servos the information from the controller module, making them move according to the
expected.

For the direct connection of servomotors and the XBee card to be possible, it will be
necessary to connect a module, called I / O Expansion Shield V5 (Figure 2.15). This shield is, in
fact, one of the most versatile on the market because it allows, in addition to the connection of
up to 12 servomotors and any XBee card, the connection of an SD card, communication via
bluetooth, via bus via RS-485 or via radio thanks to an APC220 module (DFRobot, 2015). Since,
as will be seen later, almost always working with servomotors will require a specific power
supply for them, this shield has two independent connectors for two different power supplies:
one for the microcontroller and one for the servos. Like the XBee Shield V03 Wireless Control
Module mounted on the controller module, it must have a built-in voltage regulator to transform
the 5V current used by Arduino into 3.3V current, used by XBee. Probably the biggest drawback
of the shield is that it does not have a switch that allows communication to be selected via XBee
or USB, so whenever you want to connect to the computer to make changes to the Arduino
microprocessor, you have to dismantle the shield. However, this has been modified in the new
version of the module, called I / O Expansion Shield V7.1, so if the reader is considering carrying
out the project, it is highly recommended that he opt for the latter model.

Figure 2.15. I / O Expansion Shield V5

2.2.2 Servomotors

The movement of flexion and extension of the fingers of the hand is possible thanks to the
action of 5 servomotors, one per finger. As can be seen in Figure 2.16, an accessory consisting
of two arms located at 180º, with a hole at the end of each, by which green fishing line has
been introduced, has been mounted on the axis of each servo. that will connect the servo with
the tip of each of the fingers.
Figure 2.16. Top view of the servos, marked with the initial of the finger they control

Two threads are needed per finger since one of them will be in charge of its flexion, while
the other will be its extension. The only difference between them is that one is attached to the
last finger phalange at the top, while another is at the bottom (see Figure 2.17). In this way,
when the servomotor pulls the first, the finger tends to shrink, while when it does the same with
the second, the finger is stretched.

Figure 2.17. Detail of the holes in the last phalanx of the thumb.
As shown in Figure 2.16, we have chosen to place 2 servomotors in the front of the
forearm and 3 immediately behind due to the limitations of space in the forearm. In addition, for
greater clarity and less loss of tension in the servo threads of the rear part, a piece has been
included between the two rows of servos that serves as a guide for the 6 longer threads.

As at first glance it may not be entirely clear, a yellow letter has been added on each
servomotor in Figure 2.16 to indicate which finger controls each servomotor: the one marked
with the letter P will control the thumb, the one with the I will control the index, the C for the
heart, the A for the ring and the M for the little finger.

The servomotor chosen for the project has been the TowerPro MG946R, whose properties
are shown in the following table (ServoDataBase, 2015).

Modulation
Torque
4.8V:10.50kg-cm
6V: 13.00 kg-cm

Speed
4.8V:0.20s/6º
6V: 13.00s/60º

Weight
55.0 g

Dimensions
Long: 40.7mm
Width:19.7mm
High: 42.9 mm

Gear type
Metal

Motor type
3-pole

Rotation range
180º

Table 2.1. Specifications of the Servo TowerPro MG946R

However, this choice has not been easy because it required a servo with a large torque (to
be able to move the fingers without problem), with a high reaction speed and, in addition, with
reduced dimensions, price and weight. To understand the election well, as well as the operation
of the servos, a brief explanation of its basic concepts is included in the following lines.

A servomotor (or servo) is an electro-mechanical device whose external appearance is


simply formed by a box (usually plastic), an axis and three cables. These three cables, which are
usually linked together, are always of 3 different colors so that they can be easily distinguished:
the black or brown is the cable corresponding to the negative pole (GND), the red or orange
corresponds to the positive (5V) and the white or yellow that transmits the signal to the servo.
Inside the box is a DC motor, a series of electronic components that transfer the signal sent by
the microcontroller to the motor, a gear system to control the rotation of the shaft and a
potentiometer that sends the electronic components of the motor. feedback engine on the
position it is in (King, 2015).

One of the most frequent questions and about which there is more confusion about the
servomotors is what kind of signal they use to function. The first thing you can think about is
that they use a PWM (Pulse-Width Modulation) signal, that is, a digital output signal that
manages to simulate an analog signal thanks to being able to turn on and off many times per
second, specifically 490 times per second on pins 3, 9, 10 and 11 and 980 times per second on
pins 5 and 6 (Arduino, 2015). In this way changing the proportion of time that the signal goes
on and off, you can generate a kind of analog signal whose voltage can be between 0 and 5V.
Thus, as shown in Figure 2.18, if the signal is on for 10% of the interval, an equivalent signal of
0.5V will be generated, while if it remains off for 90% of the interval, a signal equivalent to 4.5V
will be generated. . However, Arduino UNO is able to control up to 12 servomotors
simultaneously, but only has 6 PWM outputs, so it is ruled out that the transmission of
information is of this type.

Figure 2.18. Pulse-Width Modulation (SparkFun, 2015c))

Although the transmission is not done by PWM, it has been considered convenient to
explain it due to the great similarity it has with the type of signal used in the servos: the PPM or
Pulse-Position Modulation. The angular position of the servos is controlled by the length of a
pulse between 1 and 2 ms, sent every 20 ms. Therefore, the main difference with the PPW is
that, in this case, although the order is to perform the maximum turn of the servo, the
maximum pulse that can be sent is 2 ms, leaving therefore the remaining 90% empty. Figure
2.19 shows the signals sent to a servomotor of a radio control car when the accelerator is
pressed fully (upper signal), the brake is fully depressed (lower signal) and in a neutral position,
that is, without accelerating nor brake (central signal).
Figure 2.19. Signs sent to a radio controlled car (Duane B, 2012a))

This type of signals are, therefore, what the servos receive. But, when arriving at its
electronic components, the signal is modified, generating a very different output, capable of
operating the servomotor (Duane B, 2012a)).

As stated above, the servo will receive a pulse every 20 ms, so in a second it will receive 50
pulses. However this is only true for analog servos. If you are using a digital servo, instead of
receiving 50 pulses per second, you will receive 300 (obviously much shorter), so you can
reduce the call deadband, minimizing the response time and providing constant torque (King ,
2015). The only two drawbacks of digital servos are that their cost is somewhat higher and they
consume more energy. After studying pros and cons of both options, the author opted for digital
servomotors to try to minimize the delay time since the sensors read the position of each finger
until the servo moves.

Finally, it should be noted that, since a servomotor with a very fast and high torque
response has been selected, it has also been necessary to choose one that will have gears and a
metal shaft to provide it with sufficient strength to withstand the stresses to which it is
subjected. will be subdued.

2.2.3 Food

As already explained above, the Arduino microcontroller needs to operate with a 5V current.
However, the board can be powered with batteries between 7 and 12V, thanks to the fact that it
has a voltage regulator capable of generating the 5V required. Therefore, just as it was done for
the controller module, it has been decided to power Arduino with a PP3 9V battery, specifically
the Energizer 522 model. It is an alkaline battery composed of Zinc-Manganese dioxide (Zn /
MnO2) whose weight is 45.6 g and its dimensions approximately 48.5 mm in height, 26.5 mm in
length and 17.5 mm in width (Energizer, 2015). The vast majority of these batteries get their 9V
from a set of 6 batteries type LR61 connected in series inside.

Figure 2.20. 9V Energizer 522 alkaline battery.

It has been proven that this battery powers the Arduino board perfectly, but when trying to
power it with the 5 servos the voltage provided is not enough.
To understand why this happens and what solutions can be adopted to solve it, it is
necessary to understand how the Arduino pins are internally powered.
Figure 2.21. Pin diagram of Arduino UNO (Dube, 2015).

Figure 2.21 offers a detailed view of the pins present in Arduino UNO. It offers a lot of
information, but the most important for the case that we are interested in is that there are two
power supplies within Arduino, which are differentiated in the figure by the color that surrounds
the points of the pins. So, the 6 analog pins and the 0, 1, 2, 3 and 4 digital pins are powered by
the "red" source, while the remaining digital pins are powered by the "orange". If we represent
the total circuit schematically (Figure 2.22) it is clear that there will be 3 branches with different
intensities but, in all cases, the same voltage (5V). Also in Figure 2.21 it is noted that each of
the branches has a maximum current value of 200 mA (although it is not recommended to
exceed 150 mA), with a limit per pin of 40 mA (although it is not recommended to exceed 20
mA ).
Figure 2.22. Schematic representation of the pins connections in Arduino.

For better understanding, a small experiment has been carried out consisting of a circuit
powered by a 9V battery consisting of a servo and two LEDs connected in series (with their
corresponding resistance to limit the current). The two LEDs have been added to provide a
visual idea of the current that arrives at Arduino, since together they require approximately 4.5V
to shine, voltage equivalent to the one that Arduino needs to work, so the variations in its
brightness will simulate the variations of intensity to which the Arduino microcontroller would be
subjected. In Figure 2.23, the configuration of the circuit in question has been represented very
simply.

Figure 2.23. Schematic representation of the experiment circuit.

During the realization of the experiment it has been verified that, when the servomotor is at
rest, without any applied load, the LEDs will shine without any problem. However, the greater
the applied load (in the form of pressure on the blade with the finger), the luminous intensity of
the LEDs decreases significantly, even going completely off if it is very large (Duane B, 2012c)).
This indicates that when an important load is applied to a servomotor that is connected to the
same power supply as Arduino, it has serious problems to satisfy the intensity demand of both
components, since the consumption of the servo is triggered. The consumption therefore
depends, in addition to the intrinsic characteristics of the servo, of the applied load. When not
having an ammeter, it has not been possible to measure the current required by the servo used
but, according to Duane B, 2012b) and Abbott, 2015, it will be around 50 mA at rest, which can
reach 800 mA or even 1 A during very short periods of time when it is subject to a lot of load.

These figures can be surprising since only a few lines above it was stated that the pins
have an intensity limit of 40 mA, but these limits are not applicable for the case of servos, since
they are fed through a control circuit .

The solution will be to independently feed the servos and the Arduino to ensure that it
always receives the necessary current to behave correctly. The Arduino board will be powered
by the 9V battery, the characteristics of which were previously explained, while the servomotors,
on the other hand, will be powered by 4 AA batteries of 1.5V that will provide a total of 6V.
Thanks to the shield used (I / O Expansion Shield V5) has a specific connection for the power
supply of the servos, the 6V of the battery, unlike the 9V of the PP3 battery, will not pass
through the voltage regulator. Arduino, so that they will be used in their entirety, providing
greater torque and speed. Taking this into account, the simplified schemes of the two circuits
present in the robotic arm will be as follows.

Figure 2.24. Schematic representation of the circuit powered by the 9V battery (not including
the voltage regulator).
Figure 2.25. Schematic representation of the circuit powered by the 6V battery.

It has been proven that the 6V battery is capable of providing the necessary current even
when several of the servos are under load. However, it is probable that if this happens during
prolonged periods of time, the battery life will be very short, since, as can be seen in Figure
2.26, the higher the intensity required, the shorter the hours of service rendered and, in
addition, Over time, the voltage provided will be less and less.

Figure 2.26. Voltage and service hours of a 1.5V AA battery depending on the required current
(Duracell, 2015)
The PP3 9V battery, on the other hand, should not have any problem to power the Arduino
since, as indicated in Duane B, 2012b), its consumption is around 10 mA and, according to
Figure 2.27 (in which shows the capacity of the Energizer 522 battery depending on the
discharge current when it is used at 4.8V), its capacity will be higher than 600 mAh and,
therefore, its useful life will be several days.

Figure 2.27. Capacity (in mAh) of the Energizer 522 battery used at 4.8V (Energizer, 2015)

2.3 Wireless communication

In order to provide the project with greater versatility and independence, it was decided to carry
out the data transmission from the controller module to the robotic hand wirelessly. There are
numerous ways to carry out such a company: bluetooth, radio, wifi, etc.
Figure 2.28. Wireless communication between the controller module and the robotic arm.

Among all of them, it was decided to opt for the XBee modules (marketed by Digi), which
use the Zigbee high-level wireless communication protocol, based on the IEEE 802.15.4
standard for personal area wireless networks (personal wireless area). network, WPAN). It is a
technology created by ZigBee Alliance whose main objective are applications that require secure
connections with low data transmission rate and a maximization of the life of their batteries
(Wikipedia Contributors, 2015a)). It is, therefore, especially useful for sensor networks in
industrial, medical and, above all, domotic environments.

Each XBee module is composed of 20 pins (Figure 2.29), of which 6 are ADC input (that is,
capable of converting an analog signal into digital) and 8 digital I / O type. But without a doubt,
the 4 most important pins are VCC, GND, DOUT and DIN, because through the first two the
module will be fed and through the last two the exchange of information will take place.
Figure 2.29. Outline of the XBee module pins (AlvaroUnal, 2011)

2.3.1 Communication via USB and via XBee

The vast majority of XBee Shields have a small switch with XBee and USB indicated at the
ends. This allows the user to determine how the XBee serial communication is established with
the ATMega328 microcontroller and the FTDI serial chip on the Arduino board. The FTDI chip
(an ATMega16U2 in the case of the Arduino UNO R3 board) is responsible for acting as a bridge
between the USB port of the computer and the serial port of the microprocessor. For there to be
communication between the microprocessor and the FTDI, the pins RX and TX of the first must
be connected with the TX and RX of the second, respectively, as shown in Figure 2.30.

Figure 2.30. FTDI microprocessor-chip communication.

When the XBee position is selected on the shield switch, the DOUT pin of the XBee will
automatically connect with the RX pin of the microcontroller and the DIN with the TX. The
microcontroller and the FTDI chip, on the other hand, remain together as before, with the
exception that now the ATMega328 will only be able to receive data from the XBee module, not
from the computer's USB. Therefore, the general scheme of the connections of the
communication pins will be the one indicated in Figure 2.31. This will be, therefore, the position
that will be chosen when the corresponding codes have already been loaded in the
microprocessors and it is desired that the modules communicate wirelessly.
Figura 2.31 Comunicación en modo “XBee”

If the USB position is selected without having removed the microprocessor from the
Arduino board, the communication of both the computer and the microcontroller with the XBee
will be cut, establishing again the communication indicated in Figure 2.30. This configuration will
be necessary when you want to load, through the USB port of the computer, a new code to the
ATMega328 without having to remove the XBee module.

There is also another possibility that allows to communicate the XBee directly with the
computer, through its USB port (and the FDTI chip). For this it is necessary to select the USB
position on the shield of the XBee module but, after having previously removed the
microprocessor from the Arduino board. In this way, the communications established between
the FTDI and the XBee will be those shown in Figure 2.32. This has only been necessary in the
present project when configuring the XBee (see section 2.3.5), however, it can also be useful if
you want to control the robotic hand from the computer instead of the sensors arranged in the
computer. glove, because this configuration allows you to directly send the commands entered
in the serial port monitor to the XBee module.

Figure 2.32. Communication in USB mode without microcontroller.

2.3.2 Modes

As far as the modes are concerned, a clear distinction must be made between the ways in
which the information is transmitted and the ways in which an XBee can be found during its
useful life.

There are two communication modes between XBees (Duarte Marin, 2014):

AT Mode: also called transparent serial transmission mode. In it the communication resembles
a transmission through a serial port, since the device is responsible for creating the frame and,
the data that reaches the TX pin will be sent wirelessly. It is considered the simplest way, but its
main disadvantage is that to send information to different nodes it is necessary to constantly
enter the configuration mode to modify the destination address.
API Mode: an external microcontroller is responsible for creating a specific frame for the type
of information to be sent. It is the recommended method for very large networks for which it
would not be feasible to manually modify the destination addresses constantly, it is therefore
the mode to be used when working with networks in mesh structure (see chapter 2.3.3).

The "internal" modes of the XBees can be classified as follows (Duarte Marin, 2014):

Receive / Transmit mode: the XBee module is in receive mode when information is arriving
through its antenna, while it is in transmit mode when it is sending information that arrives
through it. of pin 3 (DIN).
The information transmitted may be directly or indirectly:
Direct transmission mode: the information is sent directly to the destination address.
Indirect transmission mode: the information is held for a period of time and is sent only
when the destination address requests it.

In addition, it is possible to send information in two ways:


Unicast: communication is point-to-point (see chapter 2.3.3). When the information is
made in this way the receiving module must send a packet, called ACK, to the address of origin,
by way of confirmation. The ACK can not be seen by the user but, if the issuer does not receive
it, it will resend the package 3 times or until it receives the confirmation ACK packet.
Broadcast: the communication is established between a node and all the other nodes of
the network, so there is no confirmation via ACK.

Low power mode (Sleep mode): when the XBee module is not in use, it will adopt a low
power consumption mode, called sleep mode.
Command mode: this mode allows you to enter AT commands to the XBee module to
configure, adjust or modify parameters, such as the own address, the destination address or
define its operating mode. Access to this mode must be done through programs such as
CoolTerms or X-CTU, which will be explained in detail in chapter 2.3.5.
Idle mode: when the module is not in any of the previous modes, it is in it. As seen in
Figure 2.33, it is always the previous mode to any of the above.
Figure 2.33. Schematic of XBee operating modes.

2.3.3 Basic network architecture

A Zigbee network consists of basically 3 types of elements: a coordinating device,


routers and end devices (Duarte Marin, 2014).

Coordinator: is the node of the network whose function is to form the network. To do this, you
must first establish the communications channel and the PAN ID (see chapter 2.3.5) for the
entire network and then allow the union of routers and end points devices. Once the network is
formed, the coordinator will adopt the functions of router, that is, it will participate in the
routing of packets and will be the origin and / or recipient of the information.
Routers: it is a node that creates and maintains information packages on the network to
determine the best route it. Normally it will act as an intermediate device between the
coordinator and the final device.
End device: these are the final devices, so they do not have the capacity to route packets. If
you wish to send information to another end device, you will always have to do it through a
coordinator or a router. These devices are normally powered by batteries although, since they
do not have to perform routing functions, their consumption is low.

The XBee modules are very versatile, being able to act as coordinator, router or end
point and, therefore, establishing very diverse network topologies. Figure 2.34 shows the 4
types of networks that can be created: point to point, star, mesh and tree. In addition, these
can be combined with each other to establish mixed networks. In the project carried out by the
author, it was sufficient to establish a point-to-point connection between the XBee present in
the controller module and that of the robotic arm. Finally, it is important to emphasize that the
type of network structure that can be used will depend on the XBee series chosen, for example,
a mesh network could not be established if XBees series 2 was not available.

Figure 2.34. Different configurations of ZigBee networks (Abel, 2014)

2.3.4 Classification of the XBee modules

There is a large amount of XBees, so they can be classified according to numerous criteria.
The first logical classification that can be made of them is the one that distinguishes them
between Regular and Pro. Physically the only difference they present is that the Pro version is
slightly longer. The biggest advantage of this version is that it has a much greater reach: 1 mile
(1.6 km) on most models, and can reach up to 28 miles (45 km) in some cases, compared to
300 or 400 feet ( 100 or 120 m) of the Regular version. The counterpart of this is that the
XBees Pro consume more and are considerably more expensive (Sparkfun, 2015a)).

Probably the most popular differentiation that is made of the XBees is the one that separates
them into Series 1 and Series 2. However, the term Series 2 is not entirely accurate, so the
following classification will be made (Sparkfun, 2015a)) :

XBee Series 1: these are the simplest modules since they do not need to be configured before
being used, although it is highly recommended to do so. They use the 802.15.4 protocol and are
designed to work in point-to-point and point-to-multipoint networks.
XBee Znet 2.5: these are the old Series 2 modules, withdrawn from the market today. They
are somewhat more complex to manage since they require previous configuration but they can
operate in both AT (or transparent) and API mode, depending on the firmware with which they
are configured. Although they can work in point-to-point or point-to-multipoint networks, such
as Series 1, these modules are intended to be used in applications that require repeaters or a
mesh network. Because Series 2 XBees do not use the same protocol as Series 1, both series
are not compatible with each other, that is, they can not be combined in the same network.
XBee ZB: they have the same characteristics as the Znet 2.5, but with a new firmware. This
new firmware is not compatible with the previous one, but its update is very simple and free.
XBee 2B: it is the last model of the so called Series 2. They mount the firmware of the XBee
ZB but on an improved hardware that, among other things, has a lower consumption than its
predecessor. As expected, this model and the ZB are also not compatible with the XBee Series
1.

The following classification that can be done is based on the type of antenna that
mounts the module (Sparkfun, 2015a)):

Chip Antenna: it is a small chip that acts as an antenna. They are cheap and due to their small
size, they hardly bother. Each time less is used, since they are being replaced little by little by
the trace antennas.
Trace Antenna: they are also called PCB antennas, since they are basically composed of a
small integrated circuit.
Wire Antenna: they are closer to what can be commonly understood by antenna, because it is
a small cable (protected by a plastic) that protrudes above the module.
u.FL Antenna: the modules with u.FL Antenna do not have an antenna itself but simply with a
small connector to hook it to. They are very useful when the module is going to be inside a box
(or similar) and you want to place the antenna on its outside.
RPSMA Antenna: as in the previous case, it is not an antenna, but a connector for it. The only
difference is that the connector is of another type and of a considerably larger size.

Finally, the XBees can be classified according to the frequency they use: 2.4 GHz or 900
MHz. Most of the modules operate at 2.4 GHz, but some do so at 900 MHz because, together
with a high gain antenna, they are able to provide a much greater range (up to 15 miles -24
km- in the Pro modules). In addition, the lower the frequency, the greater the penetration
capacity of the signal. However, it should be borne in mind that the frequency of 900 MHz is
restricted in many countries. In addition, it is important to be aware that modules with different
frequencies can not be used in the same network.

Taking into account all this information, the author has considered sufficient for the
project in question the use of a pair of XBees Series 1 (Figure 2.35) whose most important
characteristics are shown in the following table (Sparkfun, 2015b)):

You might also like