Ridiculously Complicated Auto-feeding Mini-Press-Drill for PCBs and Crafts

by throbscottle in Circuits > Tools

826 Views, 4 Favorites, 0 Comments

Ridiculously Complicated Auto-feeding Mini-Press-Drill for PCBs and Crafts

feh_066512_000030_IMG_3209.jpg
Drilling demo

I built this PCB drill to do precise work with tungsten carbide bits,, which are notoriously fragile, and are intended be used in a CNC drill. Initially, I bought a set of ten assorted bits from an eBay vendor, and I can assure you that breaking one is an unhappy event. Even though the commonly available ones found online are (I believe) actually tungsten steel - which is cheaper and less fragile than tungsten carbide, but also less hardwearing, they still need a well controlled drill to avoid breakage.

With the chuck shown, the drill will also work with standard drill bits up to 4mm diameter, if they are not too long, and can be used with burrs, if care is taken.

Please take note: I started this project in 2014, 10 years ago, and shelved it for 7 of those. The availability of some of the parts I used may have changed by now so you might need to make substitutions.

I didn't want CNC. I just wanted a precise drill where I can position the work with both hands and operate the drill with my foot. I also didn't want to program a microcontroller just to run a drill up and down, since needing to learn how to program it first seemed rather excessive (back when I drafted the first design). So I started looking at analogue motor control. What I ended up with is part logic, part analogue. A bit like Robocop.

  • It's operated by a foot switch (or push button),
  • you can adjust controls to set the drill's upper and lower limits, feed rate and spindle speed.
  • It has a "stop" button to first halt the feed at any position, then return the head if you keep pressing it
  • the spindle motor has a timer option so it can keep running between holes and stop when you've finished.
  • it can stop and hold at the low position, for use with burrs etc.
  • The spindle motor has a speed control and optional analogue tachometer (you could change it to digital with a little effort).
  • It has an emergency stop, which halts the spindle motor. It can also be set up (at construction time) to return the head as well.
  • It can be used with a normal potentiometer for position control, or an optically fed, digital one via an optional module. If optical feedback is used, a reset button will re-calibrate it.
  • I tried to include a lot of options for power (a) because you won't have the same motors or PSU as me, and (b) it's still a work in progress - I want options!

Initially I designed and built the circuit to use an opto-interrupter to detect passing gear teeth and use the signal to operate a digital potentiometer. The system works well but desipite robust filtering is plagued by mechanical vibration, so I eventually built a mechanical potentiometer version, with the opto-digi-pot as an add-on module to deploy when the mechanics improve.

I chose to use the chassis from a CD ROM drive for the drill feed, as the head movement is a slider on a pair of parallel bars. I discovered that these come in two flavours:

  • CD ROM or audio CD drives, which have a DC head motor with a gear train
  • DVD ROM or Blu-Ray drives, which have a stepper head motor with a worm drive.

Admittedly the DVD ROM drives have a superior head drive, but I didn't want to get into stepper motor control due to the added complexity (and 10 years ago, I didn't know how to program a micro...). Also by using a DC motor you have a wider choice of possible motors to use. It turns out a DVD drive stepper motor may be too weak anyway.

The CD ROM chassis has a couple of problems. One is that the slider is a bit wobbly. An extra rail and the added "Spring Thing" mitigates this considerably.

The other problem is that the drive gear train has quite a lot of play, which causes a big problem with vibration affecting the optical feedback and is the reason that, for the time being, I have stopped using it. The positive consequence of this is that I designed a really robust filter for the signal, which made a massive improvement. The negative effect is that there is still enough vibration getting through to need an occasional recalibration.

After very unsatisfactory results with laser targetting, I opted to use a small "boroscope" camera to target the drill, and a movable cross-hair image, overlaid on the video. With perspective correction, this works well.

NB I took photos throughout the history of the drill, so some of them show items which are no longer extant, extraeneous to the main subject.

Supplies

IMG_3221.jpg
IMG_3223.jpg
IMG_3218.jpg
feh_020778_000013_IMG_3135.jpg
feh_066512_000024_IMG_3203.JPG
  1. Fast DC motor for spindle, in the size range 260/265 to 550/555 - see section on motors
  2. Aluminium and wood pieces to make motor mount
  3. Cable tie
  4. Nanogel tape (thin - 1mm)
  5. Double sided sticky tape
  6. Hot glue gun
  7. Small DC motor for feed
  8. JT0 chuck and adapter for motor spindle. Or alternative chuck that you like.
  9. Chassis from an old CD-ROM drive
  10. Magnetic platter from old CD-ROM drive
  11. Wood for supporting frame. I used reclaimed wood which measures 36mm x 19mm (old so would have been supplied/cut in imperial measure,1-3/8" x 3/4"). Nominal size, use what you have.
  12. Wood for pillar. I used reclaimed wood 50mm (2") thick. Width would have been 100mm (4") or more. Again, nominal size.
  13. Thick board for base. I used a piece of chipboard 25mm thick, 213mm deep by 125mm wide. Nominal size.
  14. Small piece of hardboard. Wide enough and deep enough to active both emergency stop micro-switches. In my case this was approxmiately 135mm x 23mm
  15. Choice of tension springs
  16. Choice of screws
  17. Choice of washers
  18. Choice of plastic tubes taken from old soap and spray bottles
  19. Clip on plastic cover (packaging) from a laser printer drum - or other piece of flat, coloured plastic with right-angled long edge.
  20. Milliput or similar (epoxy putty)
  21. Rubber grommets to fit corners of CD chassis
  22. 3mm or thereabouts steel bar (can be dismantled from something)
  23. Plastic stick from shoe packaging, or similar
  24. Plastic P clips to fit plastic stick (running fit) - 6mm
  25. Graphite powder (lubricant. A thin, plastic-safe grease may be better, but I don't have any)
  26. Double sided PCB making materials
  27. Wire for interconnects, must be able to stand several amps for spindle motor, other wire is signal grade (reclaimed, in my case)
  28. Terminals that you like to use for your wires
  29. KIS3R33 buck regulator module - now unfortunately appears to only available attached to a larger board. See schematic for how to build an alternative! Alternatively, many functionally similar buck regulator modules are available to choose from eBay, Ali-Express etc. NB a general web search for this part number brings up a lot of devices which are NOT this module, however at least one clone exists with the same footprint, which may be a little more user friendly!
  30. 0.5mm or similar copper wire (pull from phone, ethernet etc solid core cable)
  31. 2 pin screw terminals or (better) same sized polarised pin headers
  32. Normal pin headers. JST XH headers preferred for the 2 pin connectors
  33. Jumpers for pin headers
  34. 2.1 or 2.5mm DC jack
  35. 3.5mm TS or TRS jack (headphone jack)
  36. 3x 10k 9mm green potentiometers (RK097N)
  37. 100k 9mm green potentiometer (RK097N)
  38. 100k miniature chassis mount potentiometer (for non-opto)
  39. Long arm tactile switch
  40. 3 position ON-OFF-ON switch (any panel mount type - I used a sliding one)
  41. 3 position ON-OFF-(ON) pcb mount toggle switch (T8020LB found here) NB one direction is fixed, the other is momentary.
  42. 2 position ON-OFF switch (panel mount, any type)
  43. 2x small micro-switches. I used the PCB mounting type only 20mm long.
  44. LED, red, or some other colour you like
  45. MINISMDC014F-2 140mA Polyfuse

Semiconductors

  1. 74HC74 dual D type flip-flop
  2. 74HC00 quad NAND gate
  3. LM393 dual comparator (open collector)
  4. NE555 timer
  5. AD4950 combined H-bridge and driver
  6. IR21531S self oscillating half-bridge driver
  7. LM1117-5.0 or AMS1117-5.0 or similar voltage regulator
  8. FDP047AN08A0 or similar avalanche/UIL rated mosfet
  9. P0102 (or similar) low current SCR
  10. 2N7002 small mosfet
  11. 2x PNP digital transistors. Any type will do,
  12. 3x NPN digital transistors. Any type will do, but Q10 needs to have 22k bias resistors (see R31 if only <22k available)
  13. NPN transistor - any type will do. Try 2N2222 or similar
  14. 1x 1N4148W (can use LL4148 but board fit will be compromised)
  15. 12x LL4148 or similar (have spares, these things roll away!)
  16. 1x 1N5819HW or similar
  17. 16v or 18v small outline zener (exact voltage is not important, should be at least 12v, but 20v is absolute maximum)
  18. 3A (minimum) Schottky diode in DO214AA (SMB) package, eg SS34A. Any type will do.

Electrolytic caps

  1. 100uF 50v (C1)
  2. 10uF 50v (C2)
  3. 1000uF 35v (C3)
  4. 100uF 50v (C14) (220uF actually used)
  5. 47uF (C18)
  6. 10uF (C19)

Ceramic caps

  1. 100n (C4, C5, C6, C7, C8, C9, C11
  2. 220n (C10) (recommended value, works fine with 100n)
  3. 10uF (C12, C15)
  4. 5n6 (C16) (leaded mylar type actually used since I didn't have a SMD ceramic one)
  5. 10n (C17)
  6. 470p (C20) (you will probably need some other value, see datasheet for IR21531S)

Tantalum caps

  1. 22uF 35v (C13) (25v actually used but needs 35v due to tantalum de-rating specification) Aluminium polymer offers almost as good ESR without the voltage caveat.

Resistors (0603 size unless otherwise stated)

  1. 12k (R1, R3)
  2. 5k1 (R2)
  3. 1k5 (R4, R28)
  4. 4k7 (R5, R6)
  5. 220k (R7)
  6. 22k (R8, R10, R20)
  7. 10k (R9, R18, R23)
  8. 10R (R11, R12)
  9. 470R (R13)
  10. 1k (R14, R16, R22)
  11. 3k3 (R15)
  12. 47R (R17)
  13. 47k (R19)
  14. 680k (R21)
  15. 100R (R24)
  16. 33k (R25, R27)
  17. 3k3 (R26)
  18. 100k (R29)
  19. 2k2 (R30)
  20. 0R or value as necessary (R31)
  21. 39k (R32 - modify if necessary)
  22. 10k (R33 - modify if necessary)
  23. 0R05 (0.05 ohms) 1206 size (R34)
  24. 3R3 4 watt wirewound (R35 - modify if necessary)
  25. 0R1 2 watt or higher (R36 - modify if necessary)
  26. placeholder - 68k (R55 - modify as required)
  27. placeholder (R54 - modify as required)
  28. 0R link (R601, R602, R603, R604) - only needed for my PCB layout

Parts for the opto-module - module is testing prototype. To be added when PCB version ready

Slotted photo-interrupter. I used one dismantled from a printer

Encoder wheel. I used the teeth of one of the gears in the drill's feed mechanism

2x standard sized micro swtiches

2x 3 pin header (JST XH preferred)

1x 2 pin header socket

1x 8 pin (arranged as 2x4) header socket

Options, Options, Options...

logic-only-1.jpg
power-and-pwm-1.jpg
spindle-motor-1.jpg
prototyping-at-its-worst.jpg

The circuit is a based around a single IC, the 74HC74 dual D type flip-flop. With the addition of some passive components, comparators, NAND gates, potentiometer and motor drivers, this is all you need to build a working version of the controller. See Schematic 1.

It is convenient to have the circuit provide it's own internal operating voltages, speed control for the feed motor, and connectors to provide choices to match external supplies to whatever motors are in use. For internal supplies and feed motor PWM, see Schematic 2.

As the available spindle speed went up, it became apparent that speed control was necessary. Adding a control to the circuit for this was the logical thing to do. The motor's inrush current reached a problematic level, so I added a soft-start circuit. The spindle motor is also equipped with a timer option so it can keep running for a few seconds between holes. See Schematic 3

The first version was based around an optical-digital-potentiometer for positional feedback. This has now been moved to a plug-in module. Since the logic sequence changed with the conversion from discrete h-bridge and controller to an integrated one, the original optical design no longer worked properly. New version currently testing, to be added here later.

I added a resistor (R2) to enable a tachometer based on counting current pulses from the motor's commutator. Whilst I came up with a successful circuit, I quickly found it to be redundant because the pulse count-per-revolution from the motor is inconsistent and varies with speed - so the tacho reading is useless. R2 could therefore be replaced with a wire link, or used for current monitoring.

Motors, Drilling Speeds, and Chucks

IMG_2815.jpg
IMG_2876.jpg
IMG_2878.jpg
IMG_2881.jpg
feh_020778_000009_IMG_3130.jpg
Cl_002.jpg
s-l500.jpg
s-l1600.jpg

Take care choosing the spinning heart of your drill...

Originally I used a motor from an old printer for drilling PCBs for years before completing this project. By running it from a 32v power supply it was just about fast enough. Previously to that I had been using a smaller, faster motor, but the switch to tungsten carbide bits necessitated (due to my limited budget and the chucks available at the time) finding one with a wider shaft (no longer true, fortunately). So I decided it was time to find a more suitable motor. First I tested the speeds of all the motors in my now considerable collection. If you have a frequency counter you can do this by attaching a 60 slot optical encoder to the motor and read the speed directly using a photo-interrupter. You can also do it using your PC's sound card - see YouTube for the method. Anyway, they are all too slow, so I had to buy one. Very annoying...

I had been using a brass 2 piece collet chuck - cheaply available online. When I first made a PCB drill, this was the only type in my price range. They are still available, but there are now two types of 3 jaw chuck cheaply available with adapters to fit small motor spindles - one you tighten with your fingers and one which requires a key.

Now that times are easier, I decided it was time to move on up to a miniature 3 jaw keyless chuck, with motor spindle adapter. I found that the cheap chuck and adapter set I got fit together rather loosely, causing it to wobble unless done up with excessive force and a lot of fiddling about. I dismantled it, cleaned the parts and put some grease on the adapter thread and tip and the pressure washer, after which it works much better, though still far from perfect - it will align, but you need to fiddle with it.

I discovered that these little keyless chucks may be great for a hand-held drill, but as both hands are needed it's no fun trying to tighten one up in the vertical position, with the drill bit constantly falling out of it. So I changed it again. The current batch of miniature keyed chucks on eBay, Ali Express and similar have a "JT0" fitting. JT means "Jacobs Taper", which means it fits onto a tapered shaft specific to Jacobs chucks, and "0" is just the smallest size. Various size spindle adapters are available from the chuck vendors. It has since occurred to me that a spindle coupler might be a better option than an actual chuck, although you would only get one choice of shank size.

If you go the JT0 route, there are 2 kinds of spindle adapters, push fit and screw fit. Screw fit is easy to attach, but I wouldn't trust the alignment at 30,000 RPM. Push fit is a tight friction fit, you need to use a vice or clamp to press it on. Make sure to press the spindle, not the motor body. I got mine a bit wonky at first and marred the inside of the adapter, but it went okay when I aligned it properly. So be super-careful when fitting one of these!

My first line of enquiry into what type of motor I should be using, led me to the Johnson 380 motor, and some advice to look for spindle speeds in the range of 10,000 to 20,000 rpm. What I discovered soon after is that DC motors are commonly given numeric designations which refer to size, but there is a whole world of variants for any given size. Not only that, there are a lot of motors for sale which are not in their manufacturers catalogues. Presumably these are leftover custom models which are no longer required, or ones which have been superseded.

In terms of power and weight, a 380 or 385 sized motor would appear to optimal. The 555 I eventually opted for is a bit too heavy, and the 260 is a bit under-powered. What the 380/385 sized motors tend to lack is speed - and why settle for 10k rpm when I can have 30k?

A better option might be a BLDC, (or for that matter a coreless motor) but a brushed DC motor was easier and cheaper.

I found the Mabuchi website to be a tremendous help as they explain their product codes, which seem to be broadly similar across manufacturers. They also give some nice information about motor construction: Mabuchi designations

The last few digits and letters are of particular interest, once you get past the other stuff. The first 2 characters give the wire thickness, and the last 2 or 3 give the number of turns per armature slot. In simple terms, the lower this last part of the number, the faster the motor and the greater its current draw.

So, in descending order of size and power, the smallest types of interest are 380, 360 and 370. After far too much time browsing eBay it finally occurred to me to check the dimensions of the smaller motor I had been using in my original PCB drill, and to check that it's powerful enough. I found it is comparable to the 360 model. I found various 370 models ranging up to 50,000 rpm, but the basic versions have lower torque than the 360 so I didn't pursue them. Up until that point I didn't think it possible to get a motor which is actually too fast. Which brings me to the next point.

I looked up cutting speeds for tungsten carbide drills, given in meters/minute, provided by a company called Ltc Ltd. (here). The calculator here gives you the actual RPM. So, since I have very cheap tungsten carbide drill bits, I took the lower end of the range from Ltc, at 80 meters per minute. The highest speeds they give are 120 for copper and 150 for glass filled plastic . The Pferd calculator gives RPM values from these figures, dependent on drill diameter. I got a feed rate of 1.25mm per second based on Ltc's figure of .0025mm per revolution for a 1.5mm bit for these materials, smaller bits need to travel more slowly. This drill has a higher feed rate than this but the feed motor is weak enough that it just slows down as soon as it hits the work piece.

My smallest drill is 0.3mm, which needs to spin at over 159,000 rpm. Right, I really don't see that ever happening without a much more advanced drilling machine. Moving along...

My most commonly used drill is 0.8mm which is a very useful size, and in theory it needs to spin at nearly 60,000 rpm. Still not happening.

1.2mm is a common size to use for larger pins on things, and my largest drill is 1.4mm. These give spindle speeds of nearly 40,000 and over 34,000 rpm, respectively. Right, so now we are into the realm of motors I can actually buy!

You can still drill perfectly well at speeds available to mere mortals, it just takes a moment longer. The first motor I actually bought is advertised to run at 29,000 rpm at it's maximum voltage, though it's extremely noisy and vibrates a lot. Therefore I strongly recommend getting a bigger, balanced motor with ball bearings and more poles.

I would recommend getting a motor which runs on 12v or more as it will draw less current, but there is something of a contradiction there. Because a lot of small motors are made for the RC world, the fastest motors actually run on lower voltages. The 12 volt (or more) motors are intended for environments where (generally) slower motors are needed. High voltage, high speed motors get much more expensive. You could of course convert the design to use a BLDC, which can run faster and smoother (and is more costly).

Go up a size and you find the voltages go up again, 12 to 24 volt high-speed motors are available, but of course they are also heavier, so weight is a bigger consideration.

Some other stuff I found out. Basic DC motors have 3 armature poles. They are cheap, fast and powerful. However, the same sized motors are also made with 5 poles or more. They are more expensive and may not be as fast or as powerful. But they are quieter (both mechanically and electrically), smoother running, can run more slowly and change speed in a more linear way. Which might be just what you want. They have a 5 in place of the 0 in the model number, ie, 385, 365 and 375.

Originally I bought a 260 size motor, specified for 29,000 rpm at 7.2v. It's a 3 pole motor with bronze bearings, draws a lot of current, gets hot, is incredibly noisy and causes severe vibration which plays hell with the optical feedback system. It's happier at 6v but still noisy and still vibrates a lot. So I have now bought a 555 motor with ball bearings, it has 5 poles and is stated to run at 30,500 rpm at 24v. It's certainly fast and smooth running, with a no-load current of 2A at it's full rated voltage of 25.2v (which is around 50W of power!) Unfortunately it has a big inrush current, which magnetises the armature when it first starts up. At over 10 amps, this needs to be mitigated (under actual drilling conditions it draws 3A or more)

Possibly the way to go for the successor to this drill will be to have an even bigger motor that stays in one place, and use a belt drive to run the spindle.

In general, it would appear that the fastest version you can find of a 385 or 555 motor is the way to go, with a keyed chuck, or with a 2 piece chuck or spindle coupler that takes just one size of bit.

You can re-wind a motor to make it faster. Use thicker wire and fewer turns than the original winding. There are video's showing how to do this, on You-tube.

Small motors usually have bronze bearings. However you can also get them with ball bearings, which have less friction, can run smoother and faster, and cost more. Again, moving to a larger motor gives more choice.

Run a motor too fast and you may hear it start to squeal. This is very, very bad as it destroys the bearings. The squeal is caused by the shaft no longer rotating freely in the bearing but doing a kind of orbit around it's inner surface. Slow it down or stop it, immediately.

How the Ridiculously Complicated Circuit Works

Block-Diagram1.png
truth.jpg
auto-no-opto.jpg-1.jpg
IMG_2771.jpg
IMG_2770.jpg
auto-KIS3R33-1.jpg

My friend told me that I should have end stops for the drill's feed, adjustable set points for the upper and lower limits of it's working travel, that the feed rate should be constant, and it should have a button to set it off and do the rest automatically. So I designed the controller with this in mind.

The the heart of the controller is a dual d-type flip flop, but to make it do something useful it is supported by: a dual comparator, 555 timer, quad NAND gate, H-bridge, mosfet driver and a few discrete components. I've used pre-biased "digital" transistors as much as possible to lower the component count a little. I tried to use the minimum of IC's. Somebody described the design as "Mickey Mouse logic", well, it suits me, I love Mickey!

(NB see PDFs for better quality schematics)

Power

"8v" here just refers to the higher voltage internal supply. It can be some other voltage that you select. For example, if you have a supply voltage to support it, you might wish to change this to 12v to run a 12v feed motor.

Power is regulated to 2 voltages. The pre-regulator consists of a buck converter module marked KIS3R33, nominally 3.3V but modified for around 7V use. This module is built around a MP2307 3A regulator, which has a maximum input voltage of 23V. Since the KIS3R33 is pretty old now you might wish to build a clone, or MC34063 version (only 1A but up to 40V input voltage) or some other version, for example, using the TPS5430 or MP1584 to give a couple of examples.

If you need some voltage other than 8v for your feed motor, adjust R53 and R54.

The 8v supply powers a 5v regulator, which supplies power to the control circuit. If you run the feed motor from the 5v supply, you must be careful of it's current draw, to minimise stress on the 5v regulator. I have included a 140mA PTC fuse, however some other value may suit. 140mA is what I happen to have, it's quite a low current but plenty for the logic and will serve a small motor.

The whole thing is fitted with headers to enable adjustment to available supplies and motors - so for example you can connect the 5v regulator direct to the power input if it is suitable and miss out the pre-regulator, or change the pre-regulator to 5v and miss out the 5v regulator, or set some other configuration. it all depends on what you have.

Via these the whole thing will run on just one supply, if it is grunty enough to power the spindle motor.

An extra connector, labelled "Motor HV" is provided so that the spindle motor can have a dedicated supply if needed (Originally the intent was to remove the PL9 header if this was used, but since forgot to do so and destroyed stuff I added a protection diode so you don't need to remove the PL9 header in this case. A quasi-ideal diode is in the works for MKii if it ever materialises)

You can of course skip building the regulators and connect external supplies for the motor and 5v logic supplies, using the appropriate headers.

Note the Motor-HV input is a non-polarised connector because I don't have a suitable polarised one. Unless you can find a polarised connector, be very, very careful if connecting a supply here. A better arrangement is intended for MKii.

How the logic works

The brains of the outfit is known as 74HC74 (U7). This is a dual D-type flip flop, each half having the inputs Clock, Set, Reset, and D, and the outputs Q and -Q. When a positive going pulse is applied to the clock input, the Q output takes on whatever state is present on the D input, and -Q takes the opposite. Set will set the Q output high (and -Q low), Reset will set Q low (and -Q high). R and S are active low and will override all other inputs.

When the footswitch is pressed, the signal is first inverted by a PNP digital transistor, Q2 (so that footswitch is connected to 0v and not Vcc). Q4 acts as a gate, through which the signal finds it way to the Clock input of U7a. Because it's D input is connected to Vcc, the Q output goes high (you can ignore PL22). This signal connects to U1c, enabling PWM pulses from U3, the 555 timer, to reach the IN1 input of U4 which runs the motor in the "downward" direction.

RV5 is operated by the movement of the drill head, so when the voltage at it's wiper gets lower than the voltage set by RV2, U8a will produce a high output, which charges C18 via R20 until the voltage is high enough to clock U7b. The time it takes to charge C18 creates the brief delay during which the head remains stationary at the bottom of it's travel. U7 is specified as having voltage sensitive inputs, so it will tolerate the slow-rising signal.

During this interval, the high output from U8a and the high output from U7b's -Q output cause the output of U1a to go low, pulling the R input of U7a low, causing it's Q output to go low. Since both flip-flops now have low inputs, the motor controller, U4, gets no PWM input, instead receiving high signals on both it's inputs, which brakes the motor by short-circuiting it.

C11 is very important, as it filters out noise picked up by the potentiometer's wires, preventing erratic behaviour. R7 provides some hysteresis to the bottom comparator, where the problem was most evident.

The NAND gate, U1a, has some wired logic wrapped around it consisting of R18 and D12. Between them, these ensure braking can take place at the bottom of the head's travel. The truth table is shown in an attached picture.

S1 can modify the behaviour of the circuit by keeping U7b's R input low indefinitely, preventing the upward travel. It's necessary to activate the S input of the chip to actually send it up, once S1 is released. For this reason a SPDT switch is used, with one direction latching and the other direction momentary.

When the voltage on C18 reaches a sufficient level for U7b to be clocked, it's Q output goes high, enabling PWM pulses to reach U4's IN2 input, and simultaneously turning on Q1, which pulls down the CV input of the 555 timer. This causes the PWM signal ratio to change to a very high value, which represents a high motor speed, so the drill head can be pulled up quickly. At the same time, U7b's -Q output goes low, which maintains the low signal on U7a's R input via R18.

Finally, the drill head reaches a high enough point for the voltage on RV5's wiper to be higher than that on RV1's wiper, and the output of U8b goes low, resetting U7b back to it's default state, with Q being low and -Q being high. This disables the PWM signal to U4's IN2 input, so the motor is once again braked, and turns off Q1, allowing the PWM generator to operate normally. The system is now ready for the footswitch to be pressed again.

Feed Motor

Power is supplied to be feed motor by the A4950, U4. This is an H bridge with integrated logic and current limiting. It is able to supply the motor with up to 3 amps. Direction control is simple - feed the PWM signal to IN1 or IN2 to drive the motor forwards or backward, or pull both inputs high to brake it.

The current limit is dependent on a reference voltage, which is set by R32 and R33. With the voltage set at 1v, the 0.5 ohm resistor, R34, will trip the limit at 2 amps. There is no need for a precise value.

The PWM signal is generated by the 555 timer, U3. The mark-space ratio is set by RV3. Since this also affects the frequency, D19 is included to even up the resistance during the charge/discharge cycles of C16 and extends the duty cycle. It isn't completely effective due to the diode's forward voltage, but it's perfectly adequate for this. Again, precision isn't necessary. By connecting the CV (control voltage) pin to 0v, it can be forced to produce a signal with a very low or even 0% mark/space ratio. It's output is inverted by U1b, to correct the inversion produced by U1c and U1d.

Spindle Motor

Control for the spindle motor is double-sided, with a half bridge consisting of Q5 and Q6 providing the main power control, and Q7 controlling the inrush current via R35. R36's sole purpose is to develop a signal for a tachometer to sense - which has since proved unworkable due to the pulses-per-revolution caused by the motor's commutator varies with speed. Therefore R36 can be replaced with a wire link or used for current sensing.

The IR21531, U5, is a self-oscillating half-bridge driver, intended mainly for power supplies and lighting control. The oscillator side of the chip is similar to a 555 timer, and is designed to run at a 50% ratio by default. By employing the two diodes, D16 and D18, this behaviour is changed so that the control changes the ratio instead of the frequency. R27 limits the lower end of the output, improving the granularity of the control, and R26 limits the current which can be drawn from the RT pin when the chip is deactivated by Q9. Unfortunately this necessitates using a 100k control instead of being able to match the others, which are all 10k.

The chip develops it's own Vcc voltage across an internal zener diode, at 15.6v. This is supplied by R28, which should be optimised for the motor supply voltage. If the supply is always less than 15v, R28 can be 0 ohms, however the chip needs a minimum of 10v to work properly.

The half bridge works by briefly supplying the motor with power via Q5, then it turns off Q5 and turns on Q6, which allows the motor's back-EMF to flow (a diode will do the same thing, but a transistor is much more effective), before turning Q6 off and Q5 on, repeating the cycle.

Q6 also acts as a charge-pump, in combination with D4 and C12, to develop the voltage needed to turn on Q5 (see the chip's data sheet for details). I've chosen a relatively large value of capacitor, 10uF, for C12, which is also specified as ceramic, and a 22uF tantalum capacitor for the bulk cap, C37, in order to cope with the demands of running the motor at high speed, when Q6 is only on for very brief intervals so there is very limited charging time available for C12. C37 could do with being a larger value, but I used what I had. C37 is rated at 25v, which is rather low for a tantalum capacitor - it should be 35v, double the voltage applied to it, due to the heavy de-rating requirement for tantalum caps.

Q7 is operated by a timer consisting of C27, the internal bias resistors of Q10 and optionally, R31. In the off state, Q2 is off, so the gate of Q8 is low, meaning it's drain is high and Q9 is on, keeping U5 disabled and Q3 turned on. This in turn keeps Q10 turned on, which keeps Q7 turned off.

When the footswitch is pressed, Q3 is turned off, allowing C27 to start charging. It's charge current keeps Q10 turned on for a short while, forcing the motor's magnetising current to pass through R35. With no limit this can exceed 10A (with my motor). R35 keeps it down to 4 amps or so. Note that in continuous service, R35 would be running at 20 to 30 watts dissipation. I've found that that the 4 watt resistor used copes just fine with the short pulses.

At some point, C27 develops enough voltage for Q10 to turn off, at which point Q7 is turned on by R30 and bypasses R35.

C19 and R21 make a timer which will keep the drill running for a few seconds when S2 is in it's centre position. This is a convenience function to prevent constant stopping and starting of the motor when drilling a large number of holes, or needing to run it continuously. D3 is an SCR used for an emergency stop. Once triggered, it will continue to conduct as long as power is applied to it, keeping the motor off. R17 limits the current to it, since it's a very small, low powered device. Optional link R604 can be added to make the head also go up when emergency stop is pressed, if preferred.

You may have noticed the huge disparity between the operating frequencies of the two PWM circuits. It turns out that large motors like a high frequency, and small motors like a relatively low one.

Feed Mechanism

IMG_2774.jpg
IMG_2820.jpg
IMG_2822.jpg
IMG_2823.jpg
IMG_2824.jpg
IMG_2825.jpg
IMG_2826.jpg
feh_020778_000003_IMG_3124.jpg
feh_020778_000015_IMG_3137.jpg
feh_020778_000010_IMG_3132.jpg
feh_020487_000004_IMG_3142.jpg
feh_020487_000003_IMG_3141.jpg
feh_020487_000002_IMG_3140.jpg
feh_020487_000001_IMG_3139.jpg
feh_020778_000001_IMG_3122.jpg

It's straightforward, but care is needed.

First rip the guts out of an old CD ROM drive. You want the very old sort that has a DC motor and a gear train. There will be a metal frame on four soft rubber mounts, this will have the head and associated parts. An audio CD drive may also work, it just depends on what you get. DVD/Blu-Ray drives use a stepper motor - you will have to change the circuit if you want to use one of these.

Remove the spindle motor and electronics, and carefully remove all the parts from the head, so you end up with a hard plastic or metal slider, the gear train and motor.

The chassis I used had a metal lug sticking out where the CD spindle motor used to be, so I sawed this off. By the same token, saw off any extra bits sticking out which you don't need. You need the rectangular chassis with its four mounting holes. Use a saw and not shears to cut any bits off, as shears will distort the metal. File off any sharp edges caused by sawing.

The drill motor spindle must be parallel to the bars. If it is not parallel, the bit will move sideways relative to the piece, resulting in oval holes, or worse, broken bits.

Cut a small block of wood to fit the slider, shape it down the middle to fit the motor, and screw it on to the slider using whatever holes are available, drill if needed. Only fit 1 screw at first, so that you can adjust it before fixing it permanently. Make a metal mounting bracket for your drill motor. The motor is screwed onto this using it's original mounting screws (if you have them). Any other screw must be short enough to not foul the armature. Manufacturers typically state it must not penetrate the motor body by more than 3mm. The bracket is screwed to the end of the wooden block (take the block off the slider first). I used counter-sunk wood screws as they centralise the hole. I drilled a hole in the block to pass a cable tie through to secure the top of the motor, with a rebate at one end so the head can sit partially into the wood.

I encountered some problems with stability of the wood block mounting against the slider. Filling the hollow in the slider with epoxy putty and filing the whole thing level after it set increased the contact area with the wood from 4 smallish areas to one big flat one, which made a big improvement. I used Milliput, but any filler type material should do. I ended up using larger screws - which meant enlarging the original holes in the slider, and also applying a layer of nanogel tape (so it would still be slightly adjustable) before it was firm enough.

The entire mechanical arrangement would be much improved by installing a motor with a worm drive and some better gears. The 555 sized motor with keyed chuck proved to be quite heavy, and at around 330g it does appear to be at the limit of what the mechanism can handle. So using a smaller motor or changing to a more robust mechanism is something to consider. Scrapping the CD drive and making a custom mechanism would be be even better.

Using a worm drive would also eliminate a significant portion of the vibration which plagues the optical feedback system (and is the reason I stopped using it)

Optional Opto Feedback

IMG_2776.jpg
IMG_2827.jpg
IMG_2845.jpg
IMG_2858.jpg
IMG_2862.jpg
feh_020778_000002_IMG_3123.jpg

UNDER REVISION!

The optical feedback system can be built as a module in place of the standard potentiometer. Note: the header sockets are attached to the back of the board!

How it works

The 555 timer, U101 is connected as a monostable, with a rather strange looking circuit attached to it's input, consisting of 4 diodes, 3 resistors and 2 capacitors. I call it the "transition catcher". It gets it's input from the "down" control flip-flop, U7a, via PL105 and PL22 and is connected to both the Q and not-Q inputs. When the flip-flop changes state, the rising signal is delayed slightly, whilst the falling signal goes straight through, This delay creates a pulse which drives the timer's trigger input. The pulse which in turn is generated sets up the digital potentiometer (digi-pot) to go up or down. I'll call it the CS (Chip Select) pulse and CS monostable. I used the BAT54 diodes because I happened to have them, and because one of them was dual. Normal small signal diodes work perfectly well, however. The circuit exploits a quirk of the 555 timer, which allows the monostable output to be held high by keeping the trigger input low, which lets it be used to disable the digi-pot during the first phase of auto-setup.

Q100 forms the input circuit for the photo-interrupter. This changes the gear-tooth derived waveform into a series of pulses. U101(1) and U102 form a pulse-width detector (modified from Fairchild Semiconductor's AN-366, page 26). U102's D input shares its connection with the monostable, and is clocked by its inverting output. An output is produced only if the input pulse is longer than the monostable's timer. This eliminates most of the noise. (The NAND gate shown in AN-366 serves to limit longer pulses, which is not necessary here). The other half of the monostable turns this output into nice even sized pulses, although the spacing of them still depends on feed rate. These then go via R100 to U103. R100 is the load resistor for Q101, which enables the delayed inverted-or-not CS pulse can be injected here when the input is in the resting state. I later added R103 which provides positive feedback from Q6 to the photo-interrupter and turns it into a Schmitt trigger, further improving the response.

C105, R109, R110 and R111 allow a delayed version of the CS pulse signal to be produced. it only actually needs to produce the pulse for the down direction, since U103's up/down input is held high by default. The signal is gated by Q105.

The digi-pot, U103 receives pulses from the input circuit which cause it's wiper to go up or down between the end terminals, A and B. The direction, up or down, is set by the state of the U/D pin when the CS pin goes low, so the delay allows this to be held long enough for the CS pulse to finish.

Q102 and R113 enable U103 to be reset by shorting it's power supply if the reset switch is pressed or the bottom switch is hit by the drill's head.

The first thing the opto circuit does when you turn it on is go through a self-calibration routine. This is because the digital potentiometer initialises to mid-point, whilst the drill feed could be at any position. The alternative is to manually position the head, but where's the fun in that?

The two microswitches which act as the end stops are connected to PNP transistors, so that they connect to 0v, instead of routing 5v around the chassis.

The power-on-setup timer allows the motor to run the head up to the top switch whilst disabling the digi-pot (if it was not disabled, the setup routine might terminate early). Closing the switch cancels the timer, allowing U7a to operate and causing the CS monostable output to go low. This causes the digi-pot to be set to the "up" direction, and it then receives pulses from the feed motor's PWM circuit via Q106, winding it up past the point where the output of the upper comparator changes to a low state and resets U7a. A slightly delayed (by R120 and C109) signal from the top switch then reaches the clock input of U7b, causing it's outputs to change state, in turn triggering the CS monostable. Because the -Q output of U7b is high, this causes the digi-pot to be set to the "down" direction (remember the signal gets inverted by Q101). The -Q output of U7a pulls the base of Q106 low to prevent the digi-pot being wound back down again before the motor has time to pull the drill head off the top switch.

The value of the digi-pot can now be decremented by the photo-interrupter as the drill head travels down. At some point it's wiper voltage will drop past the lower set point, set by RV2.

When U7a changes state, the CS monostable will once again generate a pulse, which allows the -Q output of U7b to be connected via Q105 to the base of Q101. Since Q101 is biased off anyway, there is no change to the high state of U103's U/D pin, so the CS pulse causes it to change to the "up" condition, and when the head starts to move upwards it's wiper voltage increases until it passes the upper set point, set by RV1, causing the head to stop travelling.

The drill is now ready for use.

When the footswitch is pressed, the output of U7a changes state, and the CS pulse is generated. The -Q output of U7b is connected via Q105 to the base of Q101. Since the signal is high this time, Q101 is turned on, slightly delayed by C105, causing a low voltage to appear on U103's U/D pin, and so the wiper once again is set to follow the downward travel of the drill head.

Mount the opto-interrupter

I set up the slotted photo-interrupter so that it would detect the teeth of the final large gear in the train. I picked this gear because the number of pulses it would generate was enough to use the digital potentiometer's full 64 steps, though Microchip recommend not doing so. The gear rotates about 1 and 1/3 times, and has 50 teeth. (NB this turned out to be a huge mistake. The signal source needs to be as far removed from the actual drill head as possible, with the encoder preferrably on a shaft of it's own. A worm gear drive would seem to be the best option).

If you don't have a suitable gear accessible, it's easy enough to make a 1 track encoder wheel using Inkscape with the encoder wheel plugin. Divide 64 by the number of turns of whatever gear or shaft is suitable to use, and that is the maximum number of spokes you need.

Despite the robust filtering, some vibration from where the drill pauses at the bottom of it's travel still gets through, since the last gear is now not turning, but jiggling about. Use of a worm drive should enable the jiggling to be along the worm's axis, so an encoder disk attached to it would suffer little effect. This is my plan for MKii, should it ever materialise.

The photo-interrupter I used came from an old printer and was already mounted on a small pcb, with 3 pins: common, LED anode, and transistor collector. So I cut down the pcb a bit, mounted it on a little bracket I made from a bit of old printer metalwork, and mounted this on the chassis. I had to wedge a bit of foam behind it to reduce vibration.

Since the gear teeth don't interrupt the beam completely, some adjustment is required to get the best output. For this reason I mounted the PCB using a long screw and a spring. So the spring tensions the board against the bracket, and the screw can move it backwards or forwards.

There are 3 types of movement to deal with here, all of which affect the signal.

  1. Twisting of the bracket on it's mounting screw, which moves the interrupter in an arc opposite to the gear's teeth.
  2. Twisting of the PCB on it's adjustment screw, which moves the interrupter in an arc across the gear's teeth.
  3. Adjusting the screw, which moves the interrupter along the gear's radius, as required

Tightening the bracket's mounting screw will stop number 1, however make sure you have it adjusted for the best signal first. This is the position where the little slot in each side of the interrupter - one for the LED and one for the transistor, is radial to the gear - ie the interrupter points towards the gear's centre. I eventually put in a second screw because with one it would move no matter how much I tightened it.

A little pad fitted between the bottom edge of the PCB and the chassis will stop most of number 2. I made this from a bit of plastic cut from the casing of an old printer.

Once you have it adjusted correctly it you might want to put a spot of glue on the screw to stop number 3.

I found that the various cut-outs in the gear also caused some problems with the output signal so I stuck a black sticker over the gear to block them off.

Mount the Chassis

IMG_2882.jpg
IMG_2775.jpg
IMG_2842.jpg
IMG_2843.jpg
IMG_2844.jpg
IMG_2846.jpg

Accurate alignment of the chassis is very important

To mount the chassis, I made a frame out of some bits of wood. There is no jointing here, since the thickness of the wood creates necessary spacing between the drill spindle and drill pillar. So, cut 2 pieces of wood to the width of the chassis, and 2 pieces to the length of it. Glue and nail these together so you get a rectangular frame with narrow long edges towards the chassis, wider, shorter edges at the back. Whilst it doesn't need to be dead accurate, it's still good practice to get the frame as true as you can. I cut a space into one of the long pieces to accommodate the feed motor and gear train. A little further trimming made space to get a screwdriver in to adjust the photo-interrupter.

The large round hole was originally to mount the now defunct laser target. The slot in the side is from an also defunct floating encoder spindle experiment.

  • Drill a central hole in each of the top and bottom back pieces to enable you to fasten it to the pillar.
  • Drill a hole in each front corner to correspond with the centres of the chassis corners

Replace the original rubber mounts from the chassis with wiring grommets, as the originals will be too soft. Fit each grommet with a core cut from a bit of plastic tube such as you find in a liquid soap dispenser. These only need to be about 2mm long. Quite a bit of effort may be needed to assemble the cores into the grommets and the grommets into the chassis. Use pan head, cheese head or dome head screws. Don't use countersunk heads as these will pull the frame into alignment with themselves, which you probably don't want. Fit big washers to the screws to distribute the pressure evenly over each grommet.

Align the chassis so the guide bars are as side-side vertical as you can make them, and mark the screw positions.

Screw the chassis to the frame. You don't want the chassis to be able to move, but don't over-tighten the screws either. The rubber mounts give you an opportunity to correct for any twist or slight misalignment in the wooden frame by tightening the screws by different amounts. Pre-drill the screw holes in the wood so that it doesn't split when you screw the screws in. The main adjustment is tightening the top or bottom pair of screws to get the guide bars vertical front-back.

Assembly

main-pillar.jpg
frame.jpg
IMG_2883.jpg
IMG_2884.jpg
feh_020778_000011_IMG_3133.jpg
feh_020778_000006_IMG_3127.jpg
feh_020778_000004_IMG_3125.jpg
feh_020778_000003_IMG_3124.jpg
feh_066512_000016_IMG_3191.JPG
feh_066512_000017_IMG_3193.JPG
feh_066512_000018_IMG_3196.JPG
feh_066512_000021_IMG_3199.JPG
feh_066512_000022_IMG_3201.JPG
feh_066512_000028_IMG_3207.JPG
feh_066512_000023_IMG_3202.JPG
feh_066512_000027_IMG_3206.JPG
feh_066512_000026_IMG_3205.JPG
feh_066512_000025_IMG_3204.JPG
feh_066512_000029_IMG_3208.JPG
feh_066512_000019_IMG_3197.JPG
IMG_3219.jpg

I made a wedge shaped piece to mount the frame on. The wedge shape is to accommodate the piece of wood I happened to have, but I cut it with the grain following the oblique angle to ensure that the screws which go into the bottom to mount it to the base board, do not go directly into the end grain of the wood, which would create a weaker joint, but rather at an angle. I used a thick piece of chipboard for the base, which was an off-cut from a new shelf. Drill a couple of screw holes in the base, and in the bottom of the pillar, and screw the parts together. Use the longest screws you can for this due to the inherent weakness of the partially end-grain join.

Fit the motor onto the slider, and screw the top-back piece of the frame to the pillar. You want the drill bit to be able to pass into the base board a little when it's at it's lowest point, and be completely clear at the highest point. Tungsten carbide PCB drill bits seem to be pretty much the same length so the dimensions in the drawing should work. Use a square to align the chassis (and therefore the motor) at right angles to the base. If it's a bit off you won't get that nasty sideways movement, but you will get slightly oblique holes which can cause alignment problems with double-sided PCBs. Once the chassis is aligned, drill and screw the bottom part of the frame to the pillar.

I drilled a 10mm hole in the back of the pillar to allow screwdriver access to the motor mounting block's securing screws. It's offset; accidental as I was actually centring it on an old nail hole, but fortuitously giving better alignment with the screws!

One crucial component is the "Spring Thing" used to balance the weight of the motor pulling forward on it's mount. This consists of a tension spring, a bit of plastic tube from a spray bottle (about 2cm), an adjuster, and a 3mm (or thereabouts) bar I dismantled from something. Fit the tube into the hook at one end of the spring, lubricate the inside (I used graphite) and slide it onto the bar. Lubrication is essential to stop it jerking along. The bar is then fixed to the middle of the two horizontal bars of the wooden frame using screws and large washers. Hook the other end of the spring onto your adjuster, and screw the adjuster to the top of the spindle motor's mounting block.

The jury's currently out on whether it helps to provide assistance to raising the drill head. I made a lever and spring arrangement, held in place by plastic P clips, but system hinders as well as helps. Maybe you'll have better luck. A counterweight definitely helps, but is also tricky since it adds a lot of weight to the machine and requires pulleys to be added, which I found finicky.

Footswitch

feh_066512_000002_IMG_3176.JPG
feh_066512_000004_IMG_3178.JPG
feh_066512_000005_IMG_3179.JPG
feh_066512_000013_IMG_3187.JPG
feh_066512_000008_IMG_3182.JPG
feh_066512_000009_IMG_3183.JPG
feh_066512_000011_IMG_3185.JPG
feh_066512_000012_IMG_3186.JPG

I made the footswitch at the same time as the earliest version of the drill, since it was cheaper to use the scrap materials I had than to buy one. The plywood base is a late (but necessary) addition. it's stuck on with foam sticky pads.

The curved top of the switch is a bit of MDF from an old desk. It's rather sub-optimal but does the job. The casing I made up as I went along using steel recovered from an old appliance, the spring probably came from a printer and the pivot bar probably came from a car radio.

I chose a spring that would fit around the pivot bar and had a nice long end that would go inside the main casing. The short end is anchored in a hole in the upper hinge.

The tack welds on the lower section are done with a very cheap stick welder - continuous welds proved impossible with such thin metal, and the spot welds on the upper part are done with a home made spot welder. I cut the threads on the ends of the bar with a die.

The dimensions in the drawing were obtained by dismantling the foot-switch and measuring the pieces, since I planned everything directly onto the steel there is no original drawing. Therefore please treat the drawing as guidance rather than a real plan.

The footswitch I made for my little spot welder is somewhat better, albeit cruder, however the best thing to do is probably just buy one or reclaim one from something!

Building the Circuit

IMG_2866.jpg
IMG_2837.jpg
feh_020088_000006_IMG_3154.jpg
feh_020088_000003_IMG_3152.jpg
feh_020088_000002_IMG_3157.jpg
feh_019747_000001_IMG_3159.jpg
feh_019558_000001_IMG_3160.jpg
feh_017813_000002_IMG_3174.jpg

You may need to change certain components to suit the particular setup you have. Candidates for alteration are: R52 and C23 - set the spindle motor timeout; RV3, R14, R15, C16 - affect PWM frequency and feed motor speed range; R68, R69 - only needed if using KIS3R33 module, see notes; R104, C103 - affects noise discriminator; R107, C102 - affect pulse width for digi-pot; R100, R102, R103 - affect the photo-interrupter.

Q100 is fitted with extra pads to enable a differently sized component to be used.

NB - the opto-module header sockets are mounted on the BACK of the board.

If you are using a KIS3R33 regulator, you need to modify it a bit. (If not, skip this paragraph) First pop the case off :) Find the two 51k resistors, and remove them. This turns it into a 5.6v regulator. Connect a resistor between adjust pin and output. 68k gives you 7.8v. By using a preset you can select a range of voltages. Be careful to ensure there is enough voltage to supply the 5v linear regulator, which needs at least 6.2v (higher if using a 7805). If this is not possible you may need to use a different type of linear regulator or connect it directly to the main power input, for which headers are provided. Be aware that the A4950 needs between 8 and 40 volts on it's motor supply pin to work properly. At 7.8v it can work but there is a risk of it locking out.

I designed a double sided PCB for the circuit. The back of the board is mostly ground plane, the exceptions being the area under the 5v regulator, and a few tracks. Considering the circuit worked reasonably well as a lash-up on perf-board, before I made the PCB, it should be fine on a single sided board, as long as appropriate considerations are made regarding the motor drivers.

The board has one set of pads to attach a buck regulator, either a KIS3R33, or you can make a daughter board with the same footprint, for an MC34063, or some other regulator that you like. The KIS3R33 contains a MP2307 which is a 3A regulator, and I deployed one to supply power to the first spindle motor as well as the feed motor. The MC34063 only gives you 1A, which should be plenty for the feed motor. If using this you need to find another supply for the spindle motor. The idea is to have flexible design to accommodate different motors and PSU's. The big limitation for the MP2307 is that it's input voltage mustn't exceed 23V.

The high current tracks for spindle motor power and output have pads along them so that solid wires can be tacked to them. I melted some cutouts into the screw connectors where they sit on top of the wires, however you'll be pleased to see I've widened the tracks in these areas so that isn't necessary now.

If you have an established workflow for assembling PCBs, great, just do your funky thing!

If not, well... Assuming you're hand soldering. Start with the A4950, U4 since it has an exposed pad underneath and sits on some thermal vias, to which the pad must be soldered. I used a heat gun underneath the board to solder this - to be honest though, it was more a case of wanting to try it, than it actually being necessary. It will work quite happily with the thermal pad disconnected as long as the motor current is fairly low.

Solder the rest of the components in order of size, the exception being C37, which is awkwardly positioned and needs to be done early.

It's perfectly ok to build the circuit on perforated board too, though you may need adapter boards for IC's that aren't available in a DIP format.

You can actually fit SOP chips on perf board by bending alternate legs up and soldering wires directly to them (see my latching momentary switches project for the method). I use 0.1mm magnet wire for this (cheaper but more fiddly than more sensibly sized wire). If you are careful it's also possible to mount them on a bit of old FPC - see my lan cable tester repair project for the method of doing this.

Mounting the Switches and Electronics

The control circuit is fitted to the pillar, out of the way, since the controls are largely "set and forget". Once the control circuit is mounted, run the switch and motor wires to it, trim to length and connect to the board. Don't forget to fit jumpers to the board for the power supply settings you want to use. If you don't want to use a power switch, fit a jumper over the power switch terminals on the board. An additional bracket is needed for the power switch and spindle option switch. I mounted the circuit using L shaped feet with a mounting hole at the bottom. A case is intended but I haven't got round to making one yet.

Be very careful to ensure the MOSFET tabs don't come into contact with each other, or disaster will ensue!

The potentiometers don't have any support except their pins, so to provide some mutual support cut a strip of plastic and drill some holes in it to go over the fronts of the potentiometers, switches and LED. Stick some foil to the back of it to connect the potentiometer spindles together and connect a wire to one of the potentiometer nuts using a large ring terminal. The potentiometers are a lot firmer with this and whilst the foil provides negligible shielding, the metalwork is a least grounded so it won't pick up the large amount of EMI from the spindle motor and couple it to the tracks or wipers.

The emergency stop takes the form of switches fitted to the front edge of the base, with a bar covering them. Take care routing the wire from this switch so it can't foul whatever you are drilling. Also please bear in mind it's the only switch with 5v running to it.

If building the opto module, the top and bottom switches need to be mounted with some care. I only had microswitches without a lever (dismantled from old microwave ovens) which work just fine but require greater precision in mounting. Lever types are to be preferred.

Whilst doing this take care not to damage anything fixed to the chassis (like I did!)

Choose self-tapping or thread-forming screws which are just long enough to go through the switches' mounting holes and through the chassis. Choose a drill bit suitable for these screws. Riv-nuts are the best alternative, however plain tapped holes are also possible, or self-locking nuts.

Slide the head up as far as it will go, and position the switch so it is activated by the spindle motor's mounting block (or some other part if more suitable). Drill the mounting hole which is furthest away and fit the screw. This gives you a bit of room for re-positioning. Re-check the fit, then drill and fit the other screw. Check the switch clicks on and off when you move the head up and down. Repeat the process for the bottom switch.

I needed to fit washers between the switch body and chassis as they were sitting on top of some screw heads. A spot of glue holds the washers in place.

Fit wires to the switches. I was lucky enough to have some nice twisted pairs to use, pulled from old equipment cable. Leave them long for now.

Targetting System

cross.png
feh_020487_000011_IMG_3149.jpg
feh_020487_000010_IMG_3148.jpg
feh_020487_000009_IMG_3147.jpg
feh_020487_000008_IMG_3146.jpg
feh_020487_000012_IMG_3150.jpg
feh_020487_000007_IMG_3145.jpg

I originally included a laser fitted with a cross-hair lens as the targetting device, however it proved to be too problematic.

A vastly better arrangement is to use a small camera and overlay a cross-hair image onto the feed. I got a small boroscope/endoscope and made a mount for it using an old cotton reel and a bit of thick rigid plastic.

First cut the piece of plastic so it can hold the cotton reel as close to the head as possible. File it to fit any lumps and bumps on the chassis. Find a self-tapping screw to fasten the reel to the plastic and drill a hole in the plastic to fit the screw. Pull the end of the reel which has clips on it so it comes out, drop the screw in and fasten them together. Drill 2 more sets of holes and screw the plastic to the chassis.

Mark a spot on the reel in line with the drill spindle. Remove the reel, plug it's end piece in and drill through it. Check that the camera will fit. The camera I used is 5.45mm in diameter and I drilled the hole with a 5.5mm drill, but it's a tight fit so no further securing necessary. Remove the camera and screw the reel back in place. You need to be able to twist the reel afterwards slightly, so don't do it too tight.

Fit the camera and point it at the spot where the drill will penetrate.

For targetting you need to have a cross-hair image over the video so you can line it up with a test hole you drill. You then line up the rest of the holes with the cross-hair.

The ffmpeg program allows perspective adjustment, so it is used to display the output from the camera. See next step.

Downloads

Setting Up and Using the Drill

feh_020487_000005_IMG_3143.jpg
feh_020778_000016_IMG_3138.jpg
IMG_2847.jpg
IMG_2848.jpg
IMG_2863.jpg
IMG_2865.jpg
feh_018866_000001_IMG_3167.jpg
feh_018022_000001_IMG_3175.jpg
feh_019256_000001_IMG_3164.jpg

The functions and connections are as follows:

  • Upper stop position - this control allows you to set the point the drill moves to at the top of it's travel
  • Lower stop position - this control allows you to set the point the drill moves to at the bottom of it's travel
  • Feed motor speed - changes the mark/space ratio of the PWM signal to the feed motor
  • Spindle motor speed - changes the mark/space ratio of the PWM signal to the spindle motor
  • Trigger switch - this is where you connect the foot-switch (or other type) to operate the drill
  • Top switch (opto-only) - this is used as part of the auto-calibration routine at power on, or when reset
  • Reset (opto-only) - this is provided by the bottom switch if the head gets too low, or by manual switch
  • Spindle timer setting. This 3 position SPDT (or DPDT) ON-OFF-ON switch allows the spindle motor to run continuously, or for approximately 18 seconds, or for the duration of it's down/up travel.(You can change R52/C23 for a different timer)
  • Stop/return switch - Short press: stops downward travel. Long press: returns head to top position
  • Emergency stop - stops the spindle motor and optionally returns the head to upper position.
  • Hold low/return SPST ON-OFF-(momentary ON) - enables the head to remain at the bottom position; useful if you want to use a burr with it to make funny shaped holes. Set the the switch to ON to stop at the bottom, push it all the way to the momentary position to send the head back up. Other types of switch will do the same job, but you will have to adjust how you use it.
  • Select power - set a jumper here to choose if the 5v regulator is supplied from the buck regulator module, or directly from the power input, or some other source, via an appropriate header. It is also possible to connect an external Vcc supply, so the 5v regulator can be missed out altogether.
  • Drill power option - set a jumper here to select if the spindle motor is powered from the power input or the 8V (or whatever V) buck regulator. Leave the header off if using a dedicated motor supply, connected to the "Motor HV" screw terminals (now includes an idiot diode since this idiot forgot to remove it and blew the regulator)
  • Feed power select - set a jumper here to select if the feed motor is powered from the buck regulator, the 5v regulator, or some other power source, via an appropriate header
  • Potentiometer connector - this is where either a mechanical potentiometer can be connected, or the opto-module's digital potentiometer interface plugs in
  • Tacho module. This board plugs onto the "tacho" pins and has a connector for an analogue meter, to provide a speed indication for the spindle motor.

It's advisable to use the drill with the upper and lower set points fairly close together.

The drill needs some adjustment before it is ready to use.

If necessary, adjust the 4 chassis mounting screws to get the drill running perpendicular to the base board. Use a square to get it true. Check for it being twisted sideways, crosswise or leaning forwards or back. Drill a few test holes and put a drill bit through to see if it's perpendicular in all directions.

Also the drill motor needs to run parallel to the guide bars. Hopefully you already set it up correctly so no adjustment is necessary. If not, you may need to remove it and re-do the mounting of the block on the slider, or the motor on the block. If it's more than a slight amount off, you will feel the drill pull a test piece when it goes up.

Set jumpers on the board to connect the supply you want to power the feed motor and spindle motor, and to set the appropriate input for the 5v regulator. You can alternatively use the headers to connect external supplies in place of the internal ones.

Opto only section:

I found the movement is very sensitive to the position of the photo-interrupter, although I think this is largely because the plastic gear on my chassis got it's teeth blunted by all the abuse when trying out ideas. So anyway, set this up for the best signal first.

Next, adjust the noise filter control to maximum resistance, disable the spindle motor and turn the drill on. The head will probably keep travelling up and down between the top and bottom switches. Adjust the noise filter until it stops doing this. Turn the drill off and enable the spindle motor. If it gets stuck against the top switch before the adjustment is complete, just turn the circuit off and on again.

You might find you have to re-adjust the filter slightly when the spindle motor is running.

Turn up the feed rate control almost to maximum and the position controls to mid-way, and turn the drill on. It should go through it's calibration and be ready to use, however several things can go wrong.

Always check the wiring!

  1. Head jams against the top switch and stays there. This is caused either by no pulses from the PWM circuit getting to the digi-pot when the top switch is activated, or by the direction control not triggering or getting reversed. Try adjusting the feed rate control. You may need to turn the power off, slide the head down manually, and turn on. If it starts working at a different setting there is something wrong with the PWM circuit. If not, check that the correct signals are getting through Q105, Q106 and the photo-interrupter circuit.
  2. Head travels all the way between end stop switches. This is caused by no pulses getting from the photo-coupler to the digi-pot. Try adjusting the position of the photo-coupler. Check pulses are actually making it through Q100 (you can check this with a multimeter by disconnecting the feed motor and moving the head slowly with your fingers) You may have to adjust R100 and/or R102 and/or R103. It can also be caused by the range of the digi-pot exceeding the range of the controls.
  3. Head travels down when power is applied. Feed motor is wired backwards.
  4. Drill spins wrong way. Spindle motor is wired backwards.
  5. Drill works properly, but the head gradually gets higher or lower.Greetings from Hell, you have met my personal demon! This is the only significant flaw in the design and is caused by Gremlins. When the gremlins are away, naughty pixies come and take over. It looks like mechanical slippage, which simply isn't possible.
  • The chief business of the pixies and gremlins is to cause extra or missing signals at the photo interrupter, which in turn cause the digital pot to adjust to an incorrect value, effectively changing the end points of the head's travel. The noise discriminator gets rid of a large proportion of this, but other remedies include, reducing vibration of the optical parts and getting a nice smooth running spindle motor.
  • The next candidate is an uneven mark/space ratio in the pulses from the photo interrupter, which can cause some pulses to simply disappear. Adjust the screw which changes the position of the photo interrupter in a radial fashion to correct this (if deriving the signal from a gear like I am doing). If you are using an encoder disk then you shouldn't have this problem, but other adjustments may apply. You can correct-as-you-go by adjusting the stop potentiometers, but may have to resort to manual re-positioning.
  • The final cause of this problem is the derivation of pulses from gear teeth - the signal is not as well defined as it could be and incorrect pulses can occur. Get the photo-interrupter aligned as square to the gear as possible.
  • The circuit is designed to include overshoot in the head position value, however this doesn't compensate false signals which can also be caused by bounce at the ends of the head's travel.

Mechanical problems not related to vibration so far have been:

  1. The motor being pushed up when the bit makes contact with the PCB being drilled, which moves it out of alignment. Fortunately this is consistent and easily compensated for. The fix is to have a more rigid motor mounting.
  2. The cord which carries the counterweight slipping off it's rollers
  3. The photo-interrupter moving if it gets knocked etc.
  4. The chuck dropping off after being run for some time, and needing to be pressed into place with a clamp.

You may find the head wanders slightly even when everything is working correctly, but this isn't enough to cause a problem - it is after all intended to drill holes through sheet material, so within limits, depth isn't important. Whilst using the very flaky and fickle opto-only prototype I experienced a lot of this, but the drill re-calibrates itself if it wanders too far, so even this did not prove to be a significant problem.

Set up the guidance system.

Set up the camera so it has a clear view of the working area. It actually needs to be rotated so that the drill chuck is off to the side. I've provided a transparent target image to place over the video, which will show up against both dark and light objects. In Linux you can open the file in transparent mode with:

user$ qiv -pf cross.png

The setting is transparency "on" and full-screen, which enables dragging. The image is provided with four "handles" so it's easy to click one and move it around. I don't know how you would create this overlay in Windows or Mac. Possibly there is webcam software that supports an overlay natively. Set the window to keep on top so you don't keep losing it (right-click the icon on the panel, since there is no title-bar).

Using ffmpeg with a perspective control looks like this:

user$ ffplay -f v4l2 -framerate 25 -video_size 640x480 -i /dev/video0 -vf 'perspective=-0:-19:W:49:00:550:640:H'

You might wish to change the exact settings to suit your use case. The numbers in the perspective section are x0, y0, x1, y1, x2, y2, x3, y3, where the numbers relate to corners, top left, top right, bottom left, bottom right, in that order. To get an idea of these numbers in action, open an image in the Gimp, use the perspective tool set to Corrective (backward) mode. Centre the mouse on each of the corner handles and watch the numbers at the left of the status bar. Personally I found it easier to just edit the numbers in the command until it looked right.

Lay a sheet of graph paper on the drill's platform and align it with one edge. Fit a drill bit in the chuck and manually move it down so it pins the paper. This will enable you to see where you need the perspective correction. You can take a still image and open it in the Gimp, as above, and copy the settings, or use trial and error, as I did.

You could of course use the drill without the perspective correction.

Possibly there is Windows or Mac software that does the same thing in a GUI - I'd be interested to know. It would certainly be more convenient!

At Last, Actually Drilling!

You will need to drill a few test holes to get the cross hair set up right.

So, first mark some holes on a spare area of board. Drill the first hole in an un-marked, plain area. Keeping the board in position, centre the cross hair image on the hole you just drilled. Move the board so one of your test marks is under the cross hair, and drill a hole. Chances are it doesn't quite line up. We're looking at an error of only a fraction of a mm here, however there isn't much room for error in the pads themselves, so it pays to be particular. Once it's set up, the system is very easy to use, though the cross hair could probably be improved.

Move the cross-hair slightly so it's over the new hole, and try again. Repeat until happy.

Once you start drilling, always keep the board orientated the same way. This is so that any small deviation from perpendicular will always go the same way - important if doing a double sided board. If you turn the board around, you double the deviation and the pads on the other side have a high risk of not lining up.

Two things to watch out for: since you probably are using the computer for something else as you go, for example, to check drill sizes, is accidentally clicking the cross hair and moving it. Don't do this, it will make you sad. Also, don't try to move the board you are drilling by using the mouse. Not that I'd know about that, obviously (ahem).

If you have decided to build the opto-module (hurrah!), you might find that desipite all the noise filtering and vibration control, the head drifts up or down gradually. The pause at the bottom of travel is the culprit in my case. Unfortunately, for optical feedback, more advanced mechanics are needed to avert this, and the simplest solution for now is an occasional press of the reset button.

Improvements

Mechanically speaking, a much superior version of this drill could be built by adopting the mechanism used in pillar drills (or press drills, if you like). What they use is a splined spindle which can slide up and down a mating hole in a pulley, which is driven by a belt connecting another pulley attached to the motor. Such a mechanism could be adopted to enable the motor to be moved to a stationary position. Higher spindle speeds could be achieved by the use of pulleys, and remove the restriction of motor spindle sizes, allowing a slower motor to be used, though a bigger one may also be needed. A splined shaft is a big ask for a hobbyist, but hex or square shaft should be do-able.

Changing to the 555 sized motor reached the limit of what can easily be accomplished using a CD-ROM drive as the basis for the drill. The motor plus counterweight weighed well over 600 grams, leading to me ditching the counterweight. It would benefit from a sturdier mechanism. I consider the drill to be a work in progress, so a beefier version will be in the works at some point.

A challenge proved to be getting the vertical movement to go slow enough. Despite the benefits of PWM using an integrated driver, it simply isn't powerful enough with the speed turned right down. A worm drive would solve both this issue and hopefully also the vibration problem with optical feedback

Much too late, I realised the vertical movement would be better driven using a servo. By then I already had a working prototype, and wasn't going to change the design.

Using a stepper motor would eliminate the need for feedback, unfortunately I hadn't realised this when I did the initial design. A stepper also needs precise digital control to ensure the correct number of steps are always generated. So another alternative to consider, but you may need a microcontroller for this.

The original choice of optical feedback potentiometer was mainly due to:

  • me not wanting to add extra mechanics to the mechanism I had
  • because of the percentage of mechanical potentiometer track which would be wasted without adding more mechanics
  • the fact that mechanical potentiometers wear out.

I had settled for a system that's "pretty good" instead of "perfect" due to aesthetics, despite the extra complexity and vibration issues. Eventually I decided that having a consistently behaving drill to be more important.