Note: This article came out in an Mecatrônica Fácil of 2003 - Brazilian magazine
HOW IT MOVES
The movements of the Climber Robot are very different from those considered "normal" for a robot. In most cases we use wheels, belts or even "legs": However, for these applications, we would be referring to robots whose displacement would be made on the floor. The proposal of the climber robot is a little different and, we would say, even somewhat unusual.
To get around, the robot needs a cable, either vertically or horizontally, and it must also be 'off the ground', that is, it must be 'high' (but not so much). It uses two claws (one upper and another lower) and a central "joint" to perform four basic movements: grab, release, bend and stretch. The sequence in which these movements are performed on each part of the robot (upper and lower claw or joint) will determine the direction in which it will follow.
The claws and joints are actually aircraft model servos. With these, we get good levers with excellent accuracy. For readers who have put together some projects published in the magazine (Figure 1) such as OCTA1 Robot, RM-1 Robot, ADR-1 OCTA1 or Insect Robot, the use of servos is nothing new.
From Figures "2A" to "2F", we have the sequence of movements necessary for the robot to perform a "step". In Figure 2A, the robot is shown "stretched" and with both claws closed, holding the cable. This is the resting state of the robot. Figure 2B shows the lower claw open and the joint stretched. Figure 2C shows the robot with its joint folded and the lower claw open. At this moment, the robot advances a few centimeters towards the upper claw. In Figure 2D the robot is shown with the joint folded, but with the lower claw closed. At this moment, it seeks support to execute the stretching movement. In Figure 2E, the robot opens the upper claw (still folded) and, in Figure 2F, the robot stretches its joint (upper claw open). Thus, it advances a few more centimeters towards the upper claw. Now the robot needs to close the upper claw. We see that it has returned to the initial state. As we can see, the speed of the robot is not high.
In order for the robot to return a "step", that is, advancing towards the lower claw, the sequence must be reversed. In Table 1, the reader has the analysis of the sequence necessary to move the robot in both directions:
As can be seen from Table 1, according to the desired direction, we must invert only the opening and closing of the claws. The "bending" and "stretching" of the joint is always done in the same order.
Table 1 |
|
Moving in the direction of the upper claw |
Moving in the direction of the lower claw |
1༠ - opening the lower claw |
1༠ - opening the upper claw |
2༠ - bending the joint |
2༠ - bending the joint |
3༠ - closing the lower claw |
3༠ - closing the upper claw |
4༠ - opening the upper claw |
4༠ - opening the lower claw |
5༠ - stretching the joint |
5༠ - stretching the joint |
6༠ - closing the upper claw |
6༠ - closing the lower claw |
CIRCUIT
In Figure 3, we have the electrical circuit of our robot. It is very simple, as it uses an embedded Basic Step 2K microcontroller, from Tato Equipamentos Eletrônicos, 3 model aircraft servos, a lC MAX232 and some capacitors.
The embedded Basic Step 2k microcontroller performs all the robot control. It is the one who makes the interface between the servos and the PC (LOGO).
The MAX232 component is a drive to match the signal level of the PC's RS-232 port to the TTL level of Basic Step 2K. Capacitors are complementary components of MAX232 and some of them may appear inverted in principle, but they are not. The connections are correct. They are arranged in such a way as to generate from the 5 V present in the Basic Step 2k "TX" communication output, voltages +10 V and -10 V compatible with the serial ports (RS-232) of the PCs.
And for the reader who has Basic Step I, we present in Figure 4 a circuit that can be used. The tests were satisfactory, but the best performance was obtained with Basic Step 2K which, due to its speed and greater number of resources in its language, allows greater control over the servos and the communication with the PC. We find it convenient to demonstrate the two versions to the reader, but the step-by-step assembly in this article will be done over the version with Basic Step 2k. The version with Basic Step I has an experimental character, and its assembly must be done taking this into account.
ELECTRICAL ASSEMBLY
For the electrical assembly, the reader can use the "lay-out" provided in Figure 5. Assembly on a protoboard is also possible (this was chosen for testing our prototype) and, in Figure 6, we have an example for the component arrangement (mounting on a protoboard).
Another alternative is to mount the circuit on a standard type board. Whatever the choice of the readers, they must be very careful when connecting the polarized components such as the microcontroller, MAX232 and the electrolytic capacitors (they are polarized). An inversion could cause the circuit to malfunction or irrevocably damage a component.
For the reader who chooses the assembly with Basic Step I, we recommend the use of the Step LAB board. In Figure 7, we have the photo of the assembly of our prototype on the Step LAB board.
CABLE ASSEMBLY
Two cables are required for the operation of the climber robot. The first will connect the "control board" to the servos, which can be seen in Figure 8. The second will connect the board to the PC (Figure 9). Both assemblies are simple. In Figure 10, there is an important detail in the making of the board / servo communication cable. This was assembled with 4 meters of wire cable that can be obtained in the specialized market easily. It was prepared to have only five "ways" (wires). The first three wires carry the signal to each servo and the last two will distribute the VCC and the ground (GND), respectively, to the servos. With this configuration, it is possible to eliminate two "ways", smoothing the weight of the cable for the robot.
The use of a "in line pin terminal" will help in the connection with the servos and a protoboard (if this is the case). However, in the absence of it, it is possible to directly weld the wires to the board and also to the servos. Be careful not to invert any connection and try to isolate the "aerial" connections, if any, with "thermo-contractile" or even electrical tape.
MECHANICAL ASSEMBLY
Mechanical assembly does not require specific or difficult to find materials. In Figure 11, there is a view of the parts used in the mechanical assembly. Once again, we use alternative materials, easily found in anyone’s drawers, countertops, etc. They are small screws of a printed circuit board, a small 3 mm thick piece of plastic, steel wire with 2 mm in diameter, a board for computers (those used to close the openings, left by a removed board), two pieces of silicone hose, among others.
In Figure 12, we have the "lay-out" of the robot with the measures of the parts, to facilitate the assembly. It is highly advisable that the reader assemble all the necessary parts, make the bends and holes in the metal part, assemble the supports for the cable with the pieces of printed circuit and the wire, etc. The material list contains everything the reader will need.
Figure 13 shows the "arm joint", made with a well-known board used in computers. Many readers are sure to have one at home, and for those who do not, it is possible to get them from maintenance workshops, often at no cost. Follow the orientation given in the "layout" for folding and drilling this part.
In Figure 14, it is possible to see the external supports for the cable. The function of these parts is to prevent the cable from "escaping" from the claws when they open. We developed them with two pieces of 20 mm x 20 mm of virgin printed circuit board and two pieces of wire of 2 mm in diameter bent in the shape of "U", welded to the boards. Follow the measurements given in the "layout", Figure 12 and Figure 14, to make the pieces correctly.
To join the servos of the lower claw with the servo of the junction, forming the "lower" assembly of the robot, we used a small piece of plastic with 3 mm thick and 15 mm x 20 mm. This piece can also be mounted on plywood of the same thickness or even with two equal pieces of printed circuit board (use two pieces to increase the mechanical resistance of the piece).
Assemble the metal computer part on one of the servo levers, as shown in Figure 15 (don't forget to make the bends and holes beforehand). It is not necessary to use very large screws. The use of nuts on these screws helps with mechanical strength.
Screw the upper claw servo to the arm joint (Figure 16). The use of screws with nuts is the best option.
Mount (Figure 17) the 40 mm long screws on the servo control levers that will work as a claw (there are only two). The use of washers helps in fixing and securing the assembly. Insert a 40 mm piece of silicone hose into the screw. This small piece of hose will work to increase the grip to the cable and should not be omitted. This hose is easily available at aircraft model shops. If the reader does not have a specialized store close to their neighborhood or even the city, one can replace the hose with another, provided that it is firmly attached to the screw and is not of the "smooth" type. One tip is to use the silicon tube sold at pharmacies.
Secure the control lever with the metal computer part to the joint servo (Figure 18). Mount the joint servo to the lower claw servo with the aid of the plastic part, as shown in Figure 19. Screw one of the servo control levers with a screw into the lower claw servo (Figure 20).
Mount the external supports on the upper and lower claw servos. Remember that the base of the "U" (wire) must be on the same side as the screw (claw). See Figure 21.
PROGRAMMING
To control the Climber Robot two programs are needed: one for the microcontroller (ALPINISTA.BAS) and another for the PC (ALPINISTA.LGO).
The ALPINISTA.BAS source code must be compiled and recorded in the Basic Step 2K microcontroller with the aid of the BASCOM compiler. The ALPINISTA.LGO source code must be installed on the computer that will control the robot. This program needs the Super Logo to run. To obtain the LOGO interpreter free of charge, visit the page www.nied.unicampig. (*) Available at the time the article was written.
HOW THE PROGRAMS WORK
The ALPINISTA.LGO program (computer) works as follows: The main function "Robot" sets the screen with the buttons (valid commands), as shown in Figure 22. When "clicking" one of the buttons, LOGO sends a string command valid via serial port for Step 2K. After sending the string, LOGO waits for a return byte, which confirms the command has been received.
There are three possible commands on the screen: up, down and stop. During the use it is recommended to click the button in the desired direction, and before changing it, use the "Stop" button. Figure 23 shows the flowchart for this program.
In Table 2, we insert the commands sent by the PC, through LOGO, as well as the "string" referring to it. These commands are transparent to the user, because, as explained, we can make the robot move in one or the other direction with the correct sequence.
Table 2 |
||
Valid commands (ASCII format) |
Effect |
String (ASCII format) |
1 |
Opens the lower claw |
AL 11 |
2 |
Closes the lower claw |
AL12 |
3 |
Opens the upper claw |
AL13 |
4 |
Closes the upper claw |
AL14 |
5 |
Stretches the joint |
AL15 |
6 |
Bends the joint |
AL16 |
The operation of the ALPINISTA.BAS program is very simple. It starts the indispensable variables and configures the Basic Step 2K. Step 2K interrupts are turned on, as the servo function uses one of the microcontroller timers. Serial communication also uses interruptions, as it is of the hardware type (Basic Step 2K has 2 types of serial communication: hardware type made on specific pins - PDO and PD1 - and software type made on any pin).
After starting the work environment, Step 2K will wait for a command string, perform the analysis and, if valid, execute the command requested, changing the position of one of the servos, depending on the command received. After the change, Step 2K sends a byte to notify the LOGO program that the command has been received. With that, we have synchronism between reception and transmission. In Figure 24, we can see the flow chart of the ALPINISTA.BAS program.
TEST AND USE
The Climber Robot has a small current consumption, but, unfortunately, unsuitable for its use with batteries. With this in mind, the reader should use a regulated 5 volt DC source (for the version with Basic Step I, it can use the source present on the Step LAB board). In Figure 25, we find the circuit and the Iayout of a small source capable of supplying 5 volts with currents of up to 1 amp. The assembly of the same is unnecessary, if the readers already have a source on their bench with the characteristics described.
After checking the entire assembly (this can help a lot!) and programming the Step 2K and the PC, it's time for the test. Turn on the power of Step 2K and check the joint and claw positions. Most likely, they will look out of the blue. Unplug the set and unscrew the servo control levers and arrange them according to the following:
• closed lower claw;
• closed upper claw;
• stretched joint.
After the servos are "tidied up", we will proceed with the tests. Tie a steel cable, the type used in bicycle shifting, for example, at any elevated point such as a high shelf, a cabinet, door, window, etc. Just remember to keep a certain distance so that the robot can move freely, without hitting anything.
With the robot off, run the claws so that they can hold the cable. This same cable must be routed internally to the external supports. Turn on the robot to hold the cable. Release it, and execute the commands in the PC program (up, down, stop, etc.).
If you want your robot to go "higher" (the limit of the communication cable between the control board and the servos is four meters), you can use a thin nylon string, the ones used to make clotheslines. However, these strings are smooth and you will need to increase the grip of the claws. This can be achieved with a piece of fine foam glued to the side of the servos which act as a claw.
CHANGE WITH PROBLEMS
Below, we list some points observed in our laboratory and that will certainly help in the search for problems, if they exist:
My robot doesn't seem to work, it doesn't move.
Possible solutions:
• Check if the set supply is OK. In this type of project, cell batteries should not be used, only a power supply.
• Check if the communication cable between the board and the PC is connected.
• Check if its communication port is enabled. Any LOGO error message regarding the port may indicate a failure in the activation.
• Check the communication cable between the board and the servos.
My robot does not hold the cable firmly, and after releasing it, it slides.
Possible solutions:
• Change the position of the claw servo control lever so that they exert greater pressure on the cable.
• Change the close position of the claws in the ALPINISTA.BAS program for better precision.
• Increase the thickness of the cable used.
• Stick a thin foam to the side of the servos used as a claw to help grip the claw.
My robot slips when it moves.
Possible solutions:
• See the previous tip, the possible solutions are the same.
My robot seems to be inverted, instead of opening its claws it closes.
Possible solutions:
• Change the values for the servos position internally in the ALPINISTA.BAS program until the desired result is obtained.
• Check if the side of the robot used is correct (see the various figures in the article). The cable must be on the left side of the robot, looking at it from above.
My robot seems to get stuck halfway.
Possible solutions:
• If the reader is using Basic Step I, the communication speed between Basic Step and LOGO should be decreased. Remember that the change must be made both in the ALPINISTA.BAS program and in the ALPINISTA.LGO program.
• If the reader notices the problem with Step 2K, the solution is the same. Slow down the communication speed.
• Check the communication cable between the PC and Step 2K.
My robot looks strange, when receiving a command all the servos seem to operate at the same time.
Possible solutions:
• This effect was only observed in our laboratory using Basic Step I. Step 1, when receives the commands from the PC, stops operating for a few moments and this allows the position of the servos to relax. To minimize this, the reader can do the following:
• Insert a piece of fine foam between the servo and the cable (the foam can be fixed using double-sided tape).
• Try to use a more flexible cable.
• Check the weight of the set, especially the cable.
All the tests above can only be considered valid if all the steps of the assembly are carried out carefully and, mainly, if all the tips suggested in the article are followed correctly.
MATERIAL LIST
Basic Step 2k:
• Semiconductors
IC₁ - Basic Step 2k
IC₂ - MAX232
• Capacitors
C₁ to C₄ - 10µF x 25V electrolytic
• Miscellaneous
3 - common servos from aircraft models
18-pin bar, 4 meters flat cable with 5 tracks, thermocontractile, protoboard or printed circuit board, etc.
Basic Step 1:
• Semiconductors
IC₁ - Basic Step 1
D₁ - Common LED
• Resistors
R₁ - 22 kΩ (red, red, orange)
R₂ - 330 Ω (orange, orange, brown)
• Miscellaneous
3 - common servos from aircraft models
Step Lab board, 18-pin bar, 4 meters flat cable with 5 tracks, thermocontractile, etc.
Material for the power source (optional):
• Semiconductors
IC₁ - 7805 - voltage regulator
D₁, D₂ - IN4001 - rectifier diodes
• Capacitors
C₁ - 1000 µF x 25V - electrolytic
C₂ - 100 µF x 16V - electrolytic
• Miscellaneous
T₁ - Transformador 9 + 9V x 1 Ampere
Printed circuit board, housing for the power source, H-H switch, pigtail for the AC grid, claws or terminal blocks and double cable for the outlet, etc.
Mechanical parts:
1 - computer plate (see text)
2- pieces of printed circuit with 20 mm x 20 mm
2 - pieces of hard wire with 2 mm thickness and 85 mm lengh each
1 - pieces of plastic or wood with 15 mm x 20 mm and 3 mm thickness
2 - screws with 40 mm length and 2 mm thickness with nuts and 2 washers each
2 - small screws with nuts to hold the plate (they may be the wood type)
8 - screws with 20 mm length and 2 mm thickness with nuts and 2 washers each
2 - silicone hose pieces with 40 mm length
CONCLUSION
In this article, the reader learned in a practical way that a robot can take many forms, and very simply. Nature can be a wonderful source of inspiration. Look in parks and squares for "little beings" and watch their movements carefully. You will discover a fascinating world of possible movements and configurations, and full of "good ideas". Good climbs and see you next time!