Note: the article is from 2003

 


 

 

 

 

THE BRAIN

 

 

The "brain" of the ADR-1 is responsible for controlling the motors (rotation servos), sensors (touch switches) and LEDs (light signals). It can be a Basic Stamp I Parallax (Figure 1) or Basic Step I Tact (Figure 2).

 


 

 

 

 


 

 

 

These notable little ones are "microcontrollers" programmable in the BASIC language and do not need any special recorder, just a PC and a cable. They have eight I/O lines which can be configured as input or output. Its instruction set is very good, including functions for the most diverse applications of its I/O pins. And what is better, you can use this microcontroller in several projects, as its program is saved in EEPROM, which allows another program (application) to be inserted in place of the previous one.

 

In order to obtain the free compiler program and information about cables and others, check the manufacturers' website: Basic Stamp http:parallaxinc.com

We can now count on a good microcontroller for future projects. Table 1 shows the specifications for the ADR-1.

 

 

ADR-1 CIRCUIT

 

 

 


 

 

 

In Figure 3, we have the electrical circuit of the ADR-1. We can see that the presence of BS1 greatly simplified the circuit. The I /O ports "P1" and "P2" are used to control the leds. The "P3" and "P4" ports are used to control the switches. Note that there is also a 10 KS-2 resistor connected to the "negative" battery and each switch. These resistors are called "pull-down" and form a voltage divider for the BS1 port. The "P6" and "P7" ports control the servos (motors).

Table 1 - ADR-1 Specifications

Control

Parallax Basic Stamp 1 or Tato Basic Step I

Motors

2 Futaba S-148 servos adapted

to continuous rotation

Sensors

2 normally closed switches

Supply

4 “AA” batteries for the motors and LEDs,

and 1-9V battery for BS1

Chassis

Wooden

Program

Parallax PBasic or Tato TBasic

 

The "P0" and "P5" ports are free and can be used to implement another sensor or output, according to the need and creativity of each one.

 

 

LOGIC BOARD

The board used in the assembly is of the universal type. This board can be found easily at electronic component stores. Its use has already been commented on in previous editions

 


 

 

The logic board (Figure 4) contains BS1 and other components. To avoid soldering BS1 to the board, which is not recommended, we will use a 28-pin IC holder using only one side.

The connections of the components on the board must be made according to the electrical circuit using thin wire "Wire Wrapping" type under the board and welding point-to-point (Figure 5). The connections are minimal, and this type of connection is the most suitable. The connection diagram of the components can be seen in Figure 6.

 


 

 

 

 

 

 

SENSORS

In Figure 7, we show the sensors (switches), which were assembled with a bus "pin" type and thin steel wire (2 mm thick). The wire has its ends welded to the board and to the VDD pin (+5 VDC) of BS1. In the adopted arrangement, the wire took the shape of an "arc". Each bus must be connected to the "P4" and "P5" pins of BS1, as described in the circuit. Note that the wire must touch one of the bus pins, thus forming a "normally closed" switch. We must not forget to connect the 10 k resistors to the "P4" and "P5" pins and to the “GND” pin of BS1 (see the wiring diagram in Figure 7). The reader can also, if one prefer, use "push-button" switches normally closed, easily found in specialized stores, in this case, the arc-shaped wire must be attached to the switches so that when touched they activate them.

 

 

 

LEDs

The LEDs used are of the common red type, but if the reader wishes, can use any other model. They were arranged on the front of the board and connected to "P1" and "P2" pins of BS1.

 

CHASSIS

The chassis adopted by the author was developed in wood and painted with gray plastic paint, allowing a good finishing. It can be seen in Figure 8. However, for many, the wood may seem unsuitable for this type of work and, in this case, alternatives such as: acrylic, plastic, copper, zinc or LEGO pieces, or many others can be used.

 


 

 

Another cheap and simple solution is the use of plastic or aluminum commercial boxes, easily found in specialized stores.

The shape of the ADR-1 chassis can have numerous variations, everything will depend on the material adopted for it. We believe that each reader will follow a path and, with that, will create their "own" ADR-1. The measurements and shape of the chassis adopted by the author can be seen in Figure 9.

 


 

 

The wheels used are model aircraft and their size can vary from "1.5" to "3" inches, depending on the "terrain" in which the ADR-1 should "walk". For its fixation we use a long screw with the same "step" as the one supplied with the servo (Figure 10). To improve the servo support on the wheel, a servo "disk" can be placed as shown in Figure 11.

 


 

 

 

 


 

 

 

The rear support wheel can be fixed or movable (Figure 12). We use a "rear" wheel for small model aircrafts. Its fixation can be made with steel wire, wood or any other material that the reader has available.

 


 

 

 

SERVO ADAPTATION

On the market, it is possible to find continuous rotation servos ready and that do not need any adaptation. However, if the reader has servos for model aircrafts, they can be used. For this, minor adaptations must be made for continuous rotation. For those who wish to try this option, we describe the steps:

1 - Open the servo by removing the screws (Figure 13) and the top cover (Figure 14).

 


 

 

 

 


 

 

 

 

2 - Remove the central gear from the servo (Figure 15).

 


 

 

 

3 - Remove the main gear (Figure 16).

 


 

 

 

4 - Using pliers, remove (cut) the main shaft lock (Figure 17).

 


 

 

 

5 - Remove the metal ring or bushing (Figure 18). Remove the internal plastic lock of the potentiometer from the inside of the main axis of the servo (Figure 19). Do not forget to replace this ring after removing the lock.

 


 

 

 

 


 

 

 

6 - Reassemble the servo, care must be taken so that the axles and gears fit again (Figure 20).

 


 

 

There, you now have a servo for continuous rotation.

 

Note: To restore the servo to its initial condition, you must purchase a gear kit for the modified servo model from model aircraft stores.

 

FINAL ASSEMBLY, PROGRAMMING AND TESTS

The logic board can be installed on the chassis with the aid of "hot glue", double-sided tape, rubber bands or others (Figure 21). It must be fixed at the front so the sensors can act effectively. Remember that the height of the sensors must be arranged in such a way that their performance is the best possible in relation to the "environment" and its obstacles. The cell battery and battery holder can also be installed using the same features. Fix them so that the set obtains the best balance (Figure 22).

 


 

 

 

 


 

 

 

The fixing of the servos will depend on the adopted chassis and screws, hot glue or others can be used for this task (Figure 23).

 

 

 


 

 

 

The servos are connected to the logic board via a "pin" type bus on the board (Figure 24). The control wires must be connected to pins "P6" and "P7" of BS1. Note that the servos are powered independently by four small "AA" cell batteries (6 VDC), connected to the logic board by a "pin" type bus (Figure 25). BS1 is powered by a 9 V battery, which is also connected to the board by a "pin" bus (Figure 26). It is important to connect the negative points of the battery, cell batteries and BS1 together.

 


 

 

 

 


 

 

 

 


 

 

 

A switch of the "H-H" type can be used to turn the robot on and off, without having to disconnect the battery and cell batteries from the board. The connection scheme can be seen in Figure 27.

 


 

 

 

Insert BS1 into the holder (Figure 28) and program it using the appropriate compiler and cable.

The compilers can be obtained from the website of their respective manufacturers, free of charge.

When turning on the ADR-1, it must move forward. If the movement is in the opposite direction or your robot rotates, arrange the servos in the chassis correctly so that both rotate in one direction. Check the performance of the switches; if the operation seems reversed, change the position of the servos (left / right).

If one of the servos has a higher speed than the other, the reader will notice a slight deviation to the opposite side. If this occurs, compensate for this deviation with the following routine in the program:

 

Compensation of the movement to the right

for i=1 to 2

pulsout sdir, d1

pause 20

next i

 

This compensation is made to the right. That is, the left servo is faster than the right. If the required compensation is to the left (right servo faster than the left) use the following routine:

 

´Compensation of the movement to the left

for i=1 to 2

pulsout sesq, d1

pause 20

next i

 

The reader can increase or decrease this compensation in the “for” command by increasing or decreasing the final value of the counter (2). The routine is already included in the program, to indicate the proper insertion location.

 

COMMENTED PROGRAM

 

´Program ROB1_1 - ADR-1 robot

´Revista Mecatrônica Fácil - Brazilian Magazine

´Márcio José Soares - 01 /04/2002

´Compiler: PBasic for Basic Stamp 1

´or TBasic for Basic Step I

 

´variables

symbol led2 = 1

symbol led1 = 0

 

symbol sdir = 7

symbol sesq = 6

 

symbol chave1 = 5

symbol chave2 = 4

 

symbol d1 = b3

symbol d2 = b4

 

let pins = 0

 

´4 outputs and 5 inputs

let dirs = %11110011

 

high led1

low led2

 

´main loop

´analyse the switches, if there are no obstacles,

´go forward, if the switch is pressed,

´rotates to the opposite direction when touched

início:

´tests the switches

input pin 5

if pin5 = 0 then direita

input pin4

if pin4 = 0 then esquerda

 

´nothing pressed

´go forward

let d1 = 50

let d2 = 255

 

gosub anda

goto inicio

´right switch function

direita:

high led2

low led1

 

gosub inverte

 

let d1 = 0

let d2 = 50

for i=1 to 30

gosub gira

next i

goto inicio

 

´left switch function

esquerda:

low led2

high led1

 

gosub inverte

 

let d1 = 255

let d2 = 0

for i = 1 to 30

gosub gira

next i

goto inicio

 

´go backwards function

inverte:

let d1 = 255

let d2 = 50

for i =1 to 50

gosub gira

next i

return

 

´servo moving function

´without speed compensation

gira:

pulsout sesq,d2

pulsout sdir,d1

pause 20

return

 

´go forward function

´there is compensation if one of the servos used

´present greater speed than the other, then

´the slowest one moves 50% more

´than the other

anda:

toggle led1 ´pisca leds

toggle led2

for i = 1 to 5

pulsout sesq,d2

pulsout sdir, d1

pause 20

next i

 

´Movement compensation

´remove it if not needed

for i = 1 to 2

pulsout sdir,d1

pause 20

next i

return

 

 

CONCLUSION

The ADR-1 is a simple robot, which many readers may think of as "My first robot". There may be many adaptations and improvements at the ADR-1.

 

 

 

Datasheets


N° of component