Drill feed controller - mostly works

Status
Not open for further replies.

throbscottle

Well-Known Member
I designed myself a feed controller for a PCB drill to use tungsten carbide bits, finished building it yesterday. It /mostly/ works. Seems the PWM isn't really affecting motor speed, haven't had chance to 'scope it yet. Some bugs relating to head positioning also, it tends to creep, which I sort of expected, occasionally goes to a position which is way off, which I didn't expect. So I might be needing some help

The basis of the drill is a modified cdrom drive with DC motor and gear train to move the drill motor up and down. I'm going to try making one using a stepper at some point because they're more common and probably more powerful.

Anyway, the way it works (or at least, is supposed to work) is, at power on, C6 (just below the lower op-amp) starts to charge, and via Q2 holds U7a in set mode until it's charged. This sends the drill head up to the top, where it hits a microswitch. This turns on (npn) Q1, fully charging C6, and also starts charging C1, which provides a brief delay so that U3, a digital potentiometer, can get some pulses from the PWM circuit, U5(2), which adjusts it to it's upper end. These are gated in via (npn) Q3 whilst the 1/2 556, U5(1) holds C/S low. Once C1 is charged enough to trigger U7b, the feed motor runs with the pwm signal set by a rotary switch connected to PL4 (provisionally a pot whilst I find out what values it needs to switch). The H bridge is a single chip device. I connected the upper half through a couple of zener diodes to create an offset so it will work with a higher supply voltage than the available gate drive. When the upper set point is passed, U2a starts the drill motor via Q5. I provided a connector so that the motor can be jumpered to the 12v input or connected to a higher voltage if needed.

U3 gets it's pulses from a photo-interrupter which detects the teeth of the final gear which drives the rack which moves the head up and down. It's not a very good signal, so Q6 sharpens it up. I used a p-channel because the signal is sitting in the upper half of the supply voltage. R21, when connected by U5 to gnd, shifts the operating point a bit to get a reasonably shapeed pulse train. When it's connected by U5 to Vcc it shuts Q6 off (though actually I need a smaller resistor for R21, some of the gear teeth still get through) so that the output can be set to whatever happens to be the state of U7a, -Q is fed into Q3 so the state of Q is reflected at it's collector. This sets the digi-pot to go either up or down. C22 introduces a bit of lag so that U/D is always set before C/S, and C20 suppresses a bit of nastiness that stops it working.

So, the feed motor runs the head down to the lower set point, flipping the state of U2b to high. I wanted to create a delay to allow for over-run, so that the head would have time to stop before the motor was energised to run in the opposite direction. So, C17 charges via R35. U7 doesn't mind because it has schmidt trigger clock inputs. Meanwhile, via R33, the two sides of the H bridge are set to receive the same signal, so the motor is braked. When C17 reaches the trigger voltage, U7a gets it's clock pulse and sends the motor on it's way up. I wanted to be able to make the head go up at full or near full power, and so Q4 pulls U5(2) control input to near gnd resulting in an output of narrow pulses (or at least it should. Works in LTSpice anyway.) When the head passes the upper set point, U7a gets a reset and the drill motor is turned off. Both sides of the H bridge get the same signal again so the feed motor is braked.

The strange arrangement of schottky diodes at the bottom of the diagram is my state-change-detector, it uses U7b to provide trigger pulses for U5(1), which generates a pulse to allow U3 to be changed between "up" and "down". Either C13 or C14 is charged via R18 or R23. When the flip-flop changes state this capacitor is discharged via D4 or D7. The time it takes for the other capacitor to charge allows a low pulse to be fed via 1/2 of D6 to trigger U5(1). It will work with 1N4148's but schottky's gave a better pulse in simulation. I'd have been better to use 2x common anode devices but only had common cathode, series, and single ones.

So now you can position the PCB you want to drill, guided by the laser whose brightness is set by U1 (again, doesn't appear to be working), press the trigger switch, which provides a clock pulse to U7b, the feed motor starts and off you go.

OK hope all that makes sense.
 

Attachments

  • Schematic-auto-separated-gates.pdf
    86.8 KB · Views: 277
Hmm, worked out what's causing the upward creep. The digi pot is flipped at the same time the return motor drive is stopped, so there's no compensation for upwards over-run. Bit of an oversight, that!

Edit: Ah, no, scrub that. When the head passes the upper set point it makes U7b reset go high, so it doesn't do anything to the output, and the digi-pot still tracks. Hmmmmm....

More edit. If I connect the D input of U7a to the Q output of U7b instead of Vcc, and a small cap from the "top" switch to the clock input of U7a (with a blocking diode to stop the signal getting swamped by C17), it ensures the motor is turned off when the top switch is hit. At the moment I am getting a situation when sometimes it can be running hard against the top stop. I think the digi-pot is being set to go the wrong way when that happens. Not had chance to investigate yet. Trouble is it's on a pcb where the track I would need to cut goes under the chip. Drat.
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…