PCB Drilling Machine 5.PDF
(
376 KB
)
Pobierz
010024-5-UK TanBo-5
GENERAL
INTEREST
Drilling Machine (5)
part 5 (final): ready to go!
Design by T. Müller (Radix GmbH)
www.radixgmbh.de
In this final part on the construction of the PCB drilling machine, all its
functions are tested and the machine is calibrated. The machine is then
ready for its first job.
By the time you read this, the first
PCB drilling machines have already
been delivered — and perhaps also
assembled. It is therefore high time
that our description of the machine
be completed. All that remains is the
calibration of the machine. The
machine must be calibrated before
the driver software is able to deter-
mine the reference point, calculate
drilling coordinates correctly, posi-
tion the arm(s) and turntable and
raise and lower the drilling head. A
number of position sensing switches
play a key role in initialising the
machine. In this final part we
describe a complete calibration pro-
cedure for the arms and turntable
with the aid of the TanBoTest soft-
ware, and the use of the TanBoDrive
driver software for drilling PCBs.
Please note that the German wor-
king title of the project, 'Tanbo' (for
Tangential Bohrer) is retained in the
names of the files and programs
developed for the project.
Position sensing swiches
In the machine enclosure there is an
optical switch situated just bet-
ween the two drive shafts for the
tool arms, which operates on the
reflective principle.
The position of
the turntable
and of tool arms 1
58
Elektor Electronics
9/2001
PCB
GENERAL
INTEREST
and 2 can be determined using this
switch. The sensor consists of a
light-emitting diode (LED) which
emits infrared light vertically
upwards, and a phototransistor,
also pointing upwards, which
detects when a reflective object
passes in front of the LED. For this
reason there is a reflector made of
metallised foil on the pointer atta-
ched to the tool arm drive shaft, as
well as on the underside of the turn-
table.
This reflective light switch opera-
tes using unmodulated infrared light
and is therefore highly prone to inter-
ference from other IR sources such
as daylight, artificial light, and even
the light from cigarette lighters!
While under the circular part of the
turntable the switch is completely
covered, but the turntable’s two flat-
tened sides, which are opposite one
another, can let stray light in. And
why is the turntable not a perfect
circle? It saves a little material, but
more importantly this is the only
way that access can be provided to
the sensor to allow for inspection
and cleaning.
If stray light should interfere with
the sensor, the turntable need only
turn until the sensor is again in the
dark, and then continue to turn until
the sensor sees light again
but only
over a narrow angle
. In this way,
the position of the reflective foil can
be found. Upon subsequent rotation
in the opposite direction the transi-
tion from light to dark must be found
at the same point. Once the system
has determined the position of the
turntable, it then immediately knows
where the flattened sides are that
give rise to the risk of light interfe-
rence: the software takes these into
account.
The process for
initialising the
tool arms
is simpler, since in each
case the sensor is covered by the
turntable and is therefore protected
from stray light. The system looks for
(and finds!) the reflecting position of
the arm.
If two arms are in use simulta-
neously, there is a problem that must
not be overlooked. If both arms
attempt to travel to their end positi-
ons at the same time, there is a risk
of collision. This difficulty is over-
come elegantly as follows: the Win-
dows software notes the position of
Figure 1. The TanBoTest utility tests the various microswitches and determines the operating
parameters to be stored in the configuration file.
the two arms at the end of a run and
stores the relevant information in a
temporary file. When the program is
next run, the file is loaded, and so a
collision can be avoided. If the pro-
gram terminates abnormally (which
can be the rule rather than the
exception under Windows!), this file
will be found to be missing the next
time the program is run. In this case
the program enters manual control
mode. A graphical representation of
the drilling machine appears on the
monitor: the tool arms can be drag-
ged into position on the screen using
the mouse so as to represent the
actual state of the machine. This
need not be absolutely accurate, alt-
hough the machine will rely on your
input.
Two microswitches are provided
in the tool arms to determine which
of three possible states the drill head
lift mechanism is in.
mally-closed contact). If the arm is not fitted,
there is no BO switch, and the corresponding
switch inputs (BO1-BO4) on the circuit board
are open. The software can check each arm
individually to determine whether the corre-
sponding drill lift mechanism is in the up
position.
State 2:
Drill head lift mechanism is lower
position, determined via BU. All BU contacts
of all arms are normally open and are connec-
ted in parallel. This can work because only
one head is allowed to be in the down posi-
tion at a time. Safety logic in the GAL pre-
vents multiple drill head lift mechanisms from
being actuated at once. And if (because of a
mechanical failure) more than one drill head
should be down at the same time, this can be
detected via the BO contacts.
State 3:
This state is between the other two:
neither up nor down. Assuming nothing has
gone wrong, this can only happen during
motion of the drill head. If this state occurs
while the head is not in motion, the drill lift
guide is probably jammed.
State 1:
Drill head lift mechanism at
the top of its travel, in rest position.
If no current flows in the solenoid,
the force of the spring built into the
lower part of the arm must push the
drill head to the top of its travel and
thus open switch BO (BO is a nor-
During drilling the Windows software can
measure the time between the closing of the
upper switch and the closing of the lower
switch, which gives the time taken to drill the
hole. A broken drill can be detected by this
9/2001
Elektor Electronics
59
GENERAL
INTEREST
time being too short, and an overly worn drill
can be detected by this time being too long.
If it takes longer than five seconds to drill a
hole, the controller automatically switches off
the drill lift mechanism and the drill motor.
The first test
The
TanBoDrive
driver software requires that
the drilling machine be fully functional, both
electrically and mechanically. The input data
— in this case drilling data in Excellon format
— are specially processed and transformed
into the required commands, in the form of
motion commands and drilling commands, to
be sent to the microcontroller. More than this
TanBoDrive
cannot do. Linear interpolation,
as required for interpreting HPGL-format files,
is included (otherwise the machine could not
even move from hole to hole), but HPGL
import is disabled and will only be enabled
when the previously-mentioned milling arm
has been thoroughly tested.
TanBoDrive
should be compared to a printer driver: if the
controller board or the mechanics are not in
order, the program simply gives up.
First, then, servicing and diagnostic soft-
ware is required to test all the functions of the
controller board and the connected units. The
various switches are particularly important,
since they must be correctly wired as well as
correctly fixed. All components must first be
made to work as intended and all tests must
be passed before we can move on to drilling a
circuit board.
This requirement is met by the
TanBoTest
test
software
(Figure 1)
. When the software is
started a dialogue box appears showing the
states of all the switches, updated every 300
ms. The optical switches can be tested with a
finger or any reflective object. The drill motors
can also be turned on and off, and the lift
solenoids can be supplied with a selectable
current, in order to help check (and, if neces-
sary, improve) the smooth running of the gui-
des. The program, freely available from this
url
Figure 2. Initialisation program for calibrating the arms and turntable.
ger side and above, the left-hand
arm is tool arm 1 and the right-hand
arm is tool arm 2.
The switches are so vital to the
operation of the machine that the
switch inputs to the controller board
are not fitted with a socket, but rat-
her soldered directly. Although a
little more tedious to assemble, the
connection is more secure. A length
of black PVC insulating tape should
be used as a strain relief on the cable
which comes from the drive shafts,
so that the connecting pins are not
under mechanical stress. Ensure also
that the cable is free to move.
Here is a summary of all the func-
tions of the test software:
Cycle button initiates a drill cycle
with the selected parameters.
The
Press
box sets the force with
which the drill is pushed down on
the circuit board. This value — to a
certain extent — affects the speed of
drilling. If the value is too small, the
solenoid will not exert enough force
to drive the drill down. If it is too big,
the drill can in extreme circum-
stances be damaged when it hits the
circuit board. The value should be
set to suit the drill: a value between
24 and 40 is normal. If satisfactory
operation can be obtained with a
value below 25, it is a credit to the
conscientiousness and care with
which the assembly has been built:
congratulations!
The
Target
box selects between out-
put drive stages 0-3 for drill and coil.
The
Brake
box sets the braking value
needed to cause the drilling head to
come to a gentle stop at the end of
its upwards travel. If the value is too
high, the head guide will rebound
down before finally coming to a halt;
if on the other hand the value is too
low, the upper switch will be
(ab)used as a mechanical endstop,
which is definitely something to be
avoided. Find the setting where the
head does not rebound and then add
one or two to the value.
The
Coil
box can be set from 0-65 to
control the solenoid current from 0
(off) to 65 (100 %) for the output
stage selected under
Target
. Beware
that the original solenoids are over-
loaded at the 100 % setting and can-
not run continuously at this current.
A duty cycle of about 30 % is possi-
ble. Continuous operation is possible
at a setting of 26. The software swit-
ches the coil off if the setting is left
unchanged for 5 s.
www.radixgmbh.de/deutsch/
menu_bestellung.html
is self-explanatory and shows the states of all
the switches. It is essential to check the mes-
sages in the dialogue box and to test the
three positions of the drill head lift mecha-
nism. Test the optical switches with a reflec-
tive surface and with stray light. Set
Target
to 1 and push the drill head down: you should
see activity on BO1 and BU (but not BO2);
likewise for the other target. Using the box
marked
Coil
, adjust the solenoid current to
find the value required to drive the drill head
down. The numbering of the targets is clearly
defined: looking at the machine from the lon-
The
Drill On
button switches the out-
put drive for the drill motor of the sel-
ected target on and off.
The
Hold
box sets the time (in units
of 52 ms) for which the drill remains
down after the circuit board is dril-
led through. Too short a time leads to
swarf not being fully cleared from
around the hole on the underside of
the board, while if the time is set too
long, it is simply time wasted. The
default value of 10 (i.e. 0.52 s) is a
The next four boxes are to do with
the drill cycle. Each target has its
own press and brake values, while
the shake and hold values apply to
all four targets. Each click on the
60
Elektor Electronics
9/2001
GENERAL
INTEREST
good typical value for clean holes of
all sizes.
can be made to move simulta-
neously. When trying the speed test,
the stepper motors should not be
connected!
a
The
Shake
box is aimed at the auto-
matic clearing of faults. If for exam-
ple the guides are very dirty and not
running smoothly, the force of the
spring may not be enough to lift the
head fully up and operate the upper
switch. This fault can be simulated
by pushing the guide down a couple
of millimetres so that the switch BO
indicates
‘Head not up’
. If the head
stays in this position when it is
carefully released, then the fault con-
dition has been replicated. The
shake value controls how the head is
driven down a small amount and
then released, without braking, so
that it springs back. The force with
which this is done must of course
not be so great that the drill hits the
circuit board when it is not running.
The
EventsOn
check box, when
checked, gives up some processor
time during the speed test to the
operating system, and hence to
other processes. This is done to
allow other tasks to make progress.
The
TanBoDrive
control program
uses a dynamic algorithm to deter-
mine how much processor time to
allow the operating system, ensu-
ring as necessary that the system
does not come to a complete halt.
b
At start-up, the software must be
informed of the address of the LPT
port to which the controller is atta-
ched. This setting can be obtained
from the Windows system informa-
tion, and is generally 0378-037F
HEX
.
Open an ASCII text editor with an
empty file and enter on the first line
the first of these numbers (here
0378). Now press Return twice and
save the file as
lptaddr.txt
in the
same directory as
TanBoTest
. This
file is processed by all the drilling
machine programs and must be pla-
ced in the same directory as all those
programs.
An important part of the test pro-
gram is the measurement of the
transfer rate for data streams over
the Centronics interface. See the text
box for further details.
The
Cycle
button initiates a com-
plete drilling cycle on the selected
target. The feed time is measured
and displayed (minus the Hold
value). If the cycle completes with-
out error,
OK
is displayed; other-
wise,
Error
is displayed. If there is
an error with a feed time of around
4.5 to 5 s, this indicates that the
head never reached the lower posi-
tion: this condition can be simulated
by setting Press=0. With a feed time
of around 0.5 to 1 s, the fault is that
the upper end position was not rea-
ched: this condition can be simula-
ted as described above with
Shake=0.
c
Adjusting the arms
The values established for the drill
cycle using the
TanBoTest
program
are recorded in the configuration file.
After you have checked the opera-
tion of the hardware — and, if neces-
sary, corrected it — using the
Ta n -
BoTest
program, the machine must
be adjusted and calibrated. Calibra-
tion — also known as setting the
zero point — presents no difficulty
with a linear machine, but how can
we adjust something that is circular
and does not have a start or an end?
Further, several of the components of
the drilling machine can be assemb-
led in different ways: for example,
the drilling axis can be moved to and
fro by several millimetres before
being firmly screwed down. In order
to calculate the X/Y coordinates
exactly, the length of the arm must
be known absolutely precisely. It is
all done, as we said in the first
Figure 3. The arm positions for calibrating the
turntable: home/wait (a), wait/home(b) and
wait/wait (c).
The
Speed
button sends data at a
steadily increasing rate to the con-
troller until the PC’s processor can
no longer keep up with the data
stream and the controller’s FIFO
empties.
article in this series, without precision mea-
suring instruments of any kind.
All that is required for exact adjustment is
the
TanBoInit
software
(Figure 2)
, which also
uses the
lptaddr.txt
file. Note: if at any time
during the adjustment procedure anything
untoward should happen, or if you think from
the way the arms are moving that a collision
is imminent, click on the ‘emergency brake’
ALL MOVING STOP: the machine will come
to an immediate halt.
First we calibrate the arms, and then the
turntable. The other way round is not possi-
ble, because the turntable can only be set up
The
Speed
indication in mm/s refers
to the speed of interpolation on two
axes, for example to simultaneous
motion of the turntable and the tool
arm at the given speed. The mecha-
nical maximum speed limit is around
80 mm/s. If the speed test gives bet-
ter results then there is a surplus of
processing power, and further axes
9/2001
Elektor Electronics
61
GENERAL
INTEREST
with properly calibrated arms. Each arm can
be moved at will using the buttons CW
(clockwise) and CCW (counterclockwise). In
TanBoInit
, as before, which of the arms 1-4 is
moved can be set via the
Target box
.
First check that all the tool arms turn
appropriately in response to the CW and
CCW buttons. Select also the targets for
which an arm is not fitted, and press CW and
CCW. In these cases nothing should move.
The ordering of the target numbers has
already been checked in the test program.
The four BO switches are shown in a column
above one another. If you push down
the head on arm 1, you should see
activity on BO1 and not on BO2.
Check this very carefully, since
otherwise the collision detection will
not work. The drives are extremely
powerful and are easily capable of
destroying one another!
The turntable has its own CW
and CCW buttons, while the
Target
box remains always assigned to a
tool arm. Before an arm can be cali-
brated, the turntable must be rota-
ted so that the reflective light switch
is off.
Begin with the calibration of arm 1
(target 1). Move arm 2 (if fitted) to
the WAIT position, as shown in
Figure 3a
. In the kit of parts which
contained the brass chuck, you will
find a short polished metal pin, 20
mm long, left over. This is the only
calibration tool required. Push this
pin as far as possible, without using
excessive force, into the hole in the
aluminium shaft at the centre of the
Buffer Underrun?
The drilling machine controller software forces Windows to ope-
rate in real time. Although Windows can output data very quickly,
it cannot coordinate the timing of the output exactly, and for this
reason the controller includes a FIFO (first in, first out) memory
which allows the transmitted data items to be brought back into
step with one another.
This works perfectly as long as we can ensure that the data
stream from Windows never stalls for so long that the FIFO beco-
mes completely empty. The FIFO has 35 slots, from which we can
make the following example calculation.
Let us suppose that a stepper motor is to be turned at the rate of
500 steps per second. The motors used in the drilling machine
have an angular resolution of 1.8°, and so this corresponds to a
rotation rate of 2.5 rotations per second. Since the following gear-
box has a ratio of 200:1, the output shaft turns through an angle of
4.5° per second. The circumference of the circle swept out by the
machine is 1510.6 mm, and so the head moves at a speed of 18.88
mm/s.
What data rate is required for this? The specification of the Cen-
tronics interface allows for at least 20000 bytes/s. On an older PC
(150 MHz Pentium) the bandwidth was measured at around
46000 bytes/s.
Each motor step requires exactly one transfer, and so the requi-
red 500 transfers per second occupy a mere 2.5 % of the availa-
ble bandwidth. Bandwidth is therefore not a problem.
At 500 steps per seconds each step lasts 2 ms. The FIFO, with its
35 slots, can hold 70 ms of data. In these 70 ms the processor we
used runs for 10.5 million cycles. If these cycles are consumed by
Windows and the FIFO cannot be refilled with data in time, then
there will be a break in the data stream.
For this reason it is not possible to run programs in parallel with
the drilling machine that load the system heavily or which con-
sume practically all its processing power.
How can we check that the data stream is in fact continuous?
A control signal on the controller board indicates when the FIFO
is empty.
This signal is taken to pin 12 of the Centronics interface (paper
empty) and is asserted when all the bytes in the FIFO have been
processed.
So why is it so important to have a continuous data stream? Step-
per motors that are to be used at a high stepping rate must be
brought gradually up to the desired target speed using a specially-
designed ramp function. The moment of inertia of the rotor is so
great that it cannot follow a rapid speed change and drops steps.
This effect is much more noticeable when starting than when
stopping, and depends on the individual motor and its driver
stage. So, if the pulses are suddenly stopped while the motor is
still turning, the rotor will not come to an immediate halt, but rat-
her jump on one or two positions because of its moment of iner-
tia. That does not matter, or course, if the system has feedback,
for example in the form of an encoder on the drive shaft.
And the solution? The best answer is not to allow interruptions in
the data stream. Before issuing each motor pulse command, we
can check whether the controller FIFO signal is asserted, indica-
ting that the FIFO has emptied. Then — if we know the characte-
ristics of the motor — we can decide on the basis of the pre-
viously-set command rate whether the motor might have got out
of step (this can only happen above a certain, relatively high, rota-
tion speed), and whether the drive in question should return to
the limit switch position to recalibrate itself. If this behaviour
recurs—that is, if you notice that the machine is returning to its
reference points too frequently—then either you will need to use
a faster computer, reduce the load on your system, or reduce the
pulse rate for the motors.
None of this is really a problem, but the unnecessary recalibration
movements do affect the average speed of the machine and ham-
per the system somewhat. A reduced motor step rate can
increase the overall speed of the system, if it reduces the number
of recalibration movements.
And there is an even better solution: the FIFO memory can be
expanded, as used to be done with print spoolers. Exactly the
same principle can be applied to the drilling machine. With a small
static RAM of for example 8 kbyte the capacity of the FIFO can be
increased to 8.25 seconds of data at the frequency of 500/s men-
tioned above.
This extra FIFO would take the form of an additional unit; it is not
possible simply to change the microcontroller. Microcontrollers
with a large amount of on-chip RAM are significantly more expen-
sive. The additional module could be supplied with power via the
OptSpare pin (5 V DC). Another possibility would be a small
module on a printed circuit board to fit in the microcontroller
socket which includes the extra buffering.
If such an idea is implemented, you will be able to read about it
either in Elektor Electronics or on the drilling machine website.
62
Elektor Electronics
9/2001
Plik z chomika:
gasma
Inne pliki z tego folderu:
Printed Circuits Handbook 5th Ed by Clyde Coombs (McGraw-Hill, 2001).pdf
(30339 KB)
Etching Your Own PCB's.pdf
(1007 KB)
How To Make Good PCBs.pdf
(129 KB)
PCB Design Considerations.pdf
(241 KB)
PCB Design Tutorial RevA.pdf
(384 KB)
Inne foldery tego chomika:
All Robotics and Mechatronics Books (Total 50 Books)
All Robotics and Mechatronics Books Collection Part-II
Časovač 555 praktická zapojení
ImSHpion_5_now
Ne555
Zgłoś jeśli
naruszono regulamin