مهندس این عکس ها و نقشه مجله الکتروالترونیکس :
http://www.iranled.com/forum/attachment.php?aid=2875
اینم متنش :
ماه 7 و 8 مجله الکتروالکترونیکس 1995 !!
MINI ROBOT CAR
Design by L. Pijpers
This playful project demonstrates the operation of a small electric vehicle which is
capable of tracking a line. Inexpensive and easy to build, the project forms an excellent
introduction to the fascinating world of robotics.
Robot cars in large factory halls find their way with the aid of sensors and a track in or
on the floor. The track may consist of a white line painted on a dark floor, or another
reflective substance. Such tracks can de detected with optical sensors. Other variants of
track types include metal strips which can be followed with the aid of a metal detector,
or a slot in the floor which can be followed by using a probe or another mechanical
device.
To avoid collisions with personnel and objects, most robot cars have additional sensors,
for instance, infra-red detectors, cameras, or a kind of radar based on ultra-sonic waves,
laser light or radio waves. To enable them to be stopped in the (unlikely) event of a
collision or malfunction, these robot vehicles usually have a number of easily accessible
switches.
Fig. 1. The mini robot car is capable of following a white or a black track on a smooth
surface such as cardboard.
The miniature robot car described in this article is capable of following a black line
drawn on a light surface, or a white line drawn on a dark surface (as illustrated by the
photograph in Fig. 1). The description of the operation of the electronics is based on the
assumption that a black line is followed on a light surface.
The sensors used are reflection types, based on a combination of an infra-red LED and
a phototransistor. The sensors, shown in Fig. 2, drive two small electric motors via some
electronics. The motors are used to power the front wheels of the car.
Fig. 2. The two reflectors mounted at the underside of the car ensure that the vehicle
stays on the track.
Fig. 3. When reflection sensor IC2 detects more 'white' than IC3, motor M1 runs and
powers the front left wheel. The little vehicle then makes a right turn.
Drive system
The circuit diagram, shown in Fig. 3, indicates a remarkably low component count. The
symmetry of the circuit is quite obvious and not surprising because the front wheels of
the car are powered separately by motors M1 and M2. Because the speed of a normal
electric motor is far too high for the present application, motors with a built-in reduction
gear are used. Also, because the motors must turn in opposite directions to move the
car straight on, they receive opposite supply voltages.
The current through the motors is switched on and off by darlington transistors, T1 and
T2. LEDs D1 and D3 are provided to indicate activity of the relevant motor. Diodes D2
and D4 are connected in parallel with the respective motor to suppress back e.m.f.
surges which are generated when the motor coil is switched off.
Electrical power is furnished by a set of batteries, the size and type of which will depend
mainly on the size of the car. NiCd, lead-acid and ordinary dry batteries are all suitable,
although the rechargeable types are, of course, preferred because of the environmental
aspect. The battery voltage is not critical: depending on the type of motors and the
desired 'top speed' of the car, voltages between 6 V and 15 V may be used. If you use
NiCd cells, simply put a number of these in series until you have the desired voltage.
On the right track
In the present measurement and control circuit, the two reflection sensors, IC2 and IC3,
'check' if they are looking at a reflecting surface, for instance, at either side of a track
made from black tape. The detectors are mounted such that one of them is always to
the right of the track, and the other, to the left of the track. Each of the infra-red LEDs in
the detectors then illuminates a section of the surface underneath. The light reflected by
the (white) floor at either side of the track is detected by the phototransistors, which
enable the relevant motor to be powered. When the vehicle swerves from the track, one
of the phototransistors will detect less reflected light, or no light at all, and the relevant
motor will be slowed down. Because of the electrical characteristics of the sensors
used, this is a fairly gradual process, i.e, not an abrupt action, which serves to correct
the direction of the vehicle.
The circuit diagram indicates that the phototransistors in IC2 and IC3 are n-p-n types.
The collectors are connected directly to the positive supply voltage. The base of the
phototransistor is not bonded out to a pin because the device is driven by light rather
than voltage. Assuming that a fixed emitter resistor is used, the amount of collector-
emitter current which flows through the device depends on the amount of light detected
by the phototransistor. The emitters of the two phototransistors are connected to ground
via resistors R2 and R3, and a section of preset P1. As long as there is sufficient light on
the phototransistors, they will keep conducting, and the emitter voltage will be 'high'
(nearly the supply voltage). When the vehicle diverges from the track, however, one of
the phototransistors will switch off, causing its emitter voltage to drop considerably
(down to almost 0 V). When the sensor is exactly above the border between the dark
track and the white surface, the emitter voltage will be roughly half the supply voltage.
The sensor voltages are combined by two opamps, IC1a and IC1b, and then fed to the
motor driver transistors, T1 and T2. The motor associated with the sensor which sees a
'white' surface (or more white than the other sensor, see further on) is energized.
Both phototransistor emitters are connected to an inverting and a non-inverting input of
one of the opamps. Consequently, when the emitter voltage changes, the output of one
opamp will go low, while that of the other will go high. An example: assuming that IC2 is
suddenly unable to detect a white surface, its emitter voltage drops low. This low level
also reaches pin 3 of IC1a (non-inverting input) and pin 6 of IC1b (inverting input). The
result is that the output of IC1a (pin 1) goes low, while the output of IC1b (pin 7) goes
high. Transistor T1 is then switched off because its base current is removed. T2, on the
other hand, does receive base current (via R5), and starts to conduct. Motor M1 stops,
and M2 starts to turn. Assuming that M1 is fitted at the left-hand side of the vehicle, and
M2 at the right-hand side, the vehicle will turn to the left.
As already discussed, each of phototransistor is connected to two opamps. However,
the opposite is also true, i.e., each opamp is connected to two phototransistors. Looking
at IC1a, for instance, it is seen that both inputs of this opamp are actually connected to
IC2 and IC3. This causes the opamp to behave like an ordinary difference amplifier,
whose output can be made to go high by pin 2 dropping low or pin 3 going high. In
practice, that means that motor M1 is switched on either as a result of IC2 detecting
more light, or IC3 detecting less light. Remember, by 'light' we mean infra-red light
reflected by the white floor. The story is the same for opamp IC1b and motor M2.
Summarizing, the operation of each motor is governed by the light difference detected by
the pair of sensors, rather than the absolute output level of the sensor it belongs with.
Because of the electrical coupling between the two symmetrical halves of the circuit, a
kind of 'electrical equilibrium' is created. This balance occurs, theoretically, when both
sensors detect an equal amount of light, and P1 is exactly at the centre of its travel. Only
in that (hypothetical) case, M1 receives just as much current as M2, and the mini car
would drive straight on. In practice, that will never happen because of the relatively high
gain of IC1a and IC1b, and the fact that the vehicle is constantly busy correcting its
course, which can only be achieved by switching M1 and M2 on and off all the time. In
fact, the vehicle tracks the line along a slightly zigzagging course. If the vehicle has a
constant tendency to swerve to one direction, that can be corrected by adjusting the
preset.
Fig. 4. Track layout and component mounting plan of the printed circuit board designed
for the mini robot car (board available ready-made).
Track layout
Construction and test
As far as the electronics are concerned, everything fits neatly on the printed circuit board
shown in Fig. 4. This board is available ready-made through the Readers Services.
Before you start fitting the parts, cut the board in two sections. The small section is for
the detector, and the large section, for the motor driver electronics. The completed driver
board is shown in Fig. 5. Once all parts are mounted, run a thorough visual inspection on
your solder work and the values and orientations of all components.
Assuming that everything is to your satisfaction so far, you may interconnect the boards,
and connect the supply voltage. The motors are not connected as yet. Their activity is
indicated by LEDs D1 and D3. Stick a piece of black adhesive tape on a piece of white
cardboard, and move the sensor board to either side of this track. The LEDs should
come on and extinguish as you follow this track and simulate diversions. If this checks
out, you may run the same test with the motors connected to the board (mind the
polarity!). One motor will run at a time. Adjust P1 if there appears to be a divergence to
one side.
Fig. 5. The large board accommodates the darlington transistors which switch the motor
current. The two reflection sensors are fitted on a separate little board.
Building the vehicle
Although you are perfectly free to make a model car in the latest Italian style, the
emphasis here is on a simple little vehicle to demonstrate elementary robotics. The
prototype is actually a three-wheeler built from pieces of perspex cut and bent to form a
basic chassis. Perspex is easily bent into the desired shape with the aid of a hot-air gun
or an electric paint stripper. If you do not fancy building your own chassis, pay a visit to a
modellers' shop. Figure 6 shows the bottom side of the three-wheeler. The third wheel,
which is not used to power the car, is fixed on a vertical spindle, and serves to improve
the steering characteristics. The two rear wheels are dummies which are not in contact
with the floor.
Once the mini car works, you may want to experiment with different types of track. It is
best to start with a narrow black track (which fits between the sensors) on a light
surface. Alternatively, you may want to use a wider, white, track (underneath the
sensors) on a dark surface. In the latter case, be sure to swap the wire pairs on the
motors. In both cases, P1 will have to be set roughly to its centre position. Another
interesting experiment is to make the car drive along a single black/white border. That
requires P1 to be adjusted almost fully clockwise or anti-clockwise. Arriving from the left,
for instance, the car will faithfully track the border. Coming from the right, however, it will
not even be able to detect the border!
In case the car is unable to 'see' the track, experiment a little with the distance between
the sensors and the track. This distance must be between 1 mm and about 5 mm.
Finally, a remark about the power supply. Although the prototype was powered by a 9-V
battery in series with a couple of 1.5-V 'mono' cells, it is , of course, better to use
batteries of the same type to arrive at the desired voltage. The reason for this choice
should be clear: only then will all the batteries be drained simultaneously, so that they
can also be charged simultaneously.
Fig. 6. Prototype of the car viewed from underneath. The third wheel at the rear of the
car improves the steering. The two rear wheels are dummies which do not touch the
floor.