3 Ağustos 2007 Cuma

HOW THE BUILD YOUR OWN CNC MACHINES

Ready for some hard core gadget creation? If you thought your dremel tool was handy before, in today's How-To we'll start building our own CNC machine. Aside from the geek factor, it can be handy for making things like PC boards without chemicals or maybe some little styrofoam voodoo heads of all your enemies, uh friends.

Gentlemen, start your soldering irons.



Computer controlled mills have been around for a long time. If you just want to buy oneone, Sherline makes mills that are ready to go (pictured is their CNC ready model -- just add your own motors and controller). But then again, if you wanted to buy one, you probably wouldn't be reading this, now would you? A CNC machine is a lot like a precision drill press with a table that moves in two directions -- seeing a commercial unit like the one above should help you visualize the end goal. We'll be making ours from scrounged, recycled, and adapted parts; today we'll be going over the basic parts we'll need to build our own.

[Update: If you're not quite sure what a CNC machine is, check out the Wikipedia article, mkay.]

Parts Hunting
For Part 1 of the How-To, we'll go over all the major components of the project and get started with the controller.
The major components of the DIY CNC machine:

Stepper motors
drive positioning screw
3 Axis stepper motor controller
Linear slThe most important component to determine the construction of your milling machine is the motor. Motors can be purchased from surplus houses, but the cheapest place to get them is from old dot matrix printers. Apple Imagewriters are one of our favorite sources. They contain multiple stepper motors, and the primary is pretty beefy. As a bonus, just about every dot matrix printer has a hardened steel rod that can be useful for our nefarious goals.
A stepper motor is an odd beast. Most motors spin when power is applied, stepper motors contain multiple coils. If the coils are energized in the proper order, the motor will rotate a small amount (a step). We'll take full advantage of the nature of stepper motors with this project. To simplify your life later on, you'll want to find stepper motors with more than four wires. Four wire motors are usually Bipolar motors. They produce more torque, but end up complicating the control circuit. The preferred type of motor for the frugal hobbiest is Unipolar. These usually have five or six wires, and they're pretty easy to work withides Most stepper motors are labeled. The major points of interest include the voltage, resistance and the number of degrees per step. Knowing the number of degrees per step is vital for configuring the software to properly control the machine later on. For a three axis machine, at the very least you'll want the X and Y axis to both have identical motors. It's not the end of the world if they don't match, but it's more of a pain later on.The drive screw is the next piece of our project. Commercial units use linear ball screws or linear gears. The commercial parts aren't cheap, but you can get away with some 1/4-inch threaded rod from the hardware store. Instead of anti-backlash nuts, we'll use these handy 1-inch long 1/4-inch nuts. Just about every hardware store has them, and they produce very little play. Try out the hardware at the store because defects in the nut or rod will produce drag that's easily noticeable by spinning the nut on the rod.To couple the rod to the motor shaft, we'll use vinyl tubing with a pair of collars. The tubing is 1/4-inch inner diameter and prevents binding by allowing some play between the rod and the motor. You can get suitable collars from a model airplane store (The hardware store had some, but they were overpriced). Alternatively, you can make your own like we did from nylon bushings and hex screws.



Finally, we'll need some linear slides. One easy out is to purchase a used or surplus XY table that's built just for this purpose. Custom designs can be built using ball bearings. Above is the linear rail that ShopBot uses. They machine the edge of a piece of steel and use this cool angled roller bearing.



We built this linear slide from a 1/2-inch steel rod and multiple bearing surfaces. It works, but we don't recommend building it if you value your sanity.



Once uou've bought or salvaged a set of motors, you'll need a controller. The controller provides the interface to the computer, drives the motors and can provide some simple feedback to the computer. The stepper controller has to be powerful enough to drive the motors you've selected. We sifted through lots of stepper controller designs looking for one that presented the best value.

In the end we found this design for a relatively simple parallel port interface that originally appeared in a 1994 issue of Nuts and Volts. Today, the expensive UCN5804B is only available as a surplus item, but now the entire controller can be built for about $22-$30 in parts. (If you use a heavier motor like the ones from the Imagewriter, you might need to add some separate power transistors.)

The parts list at the link is a bit outdated, here's our updated shopping list.

3 - UCN5804B - alltronics.com
12 - 1N49355 Diodes - Part 625-1N4935 from Mouser.com
2 - .01uF Capacitors - Part 581-SR155C103KAT from Mouser.com
1 - 10uF Capacitor - Part 140-HTRL25V10-TB from Mouser.com
3 - 4.7k Resistor Network 652-4608X-101-4.7K from Mouser.com (Has an extra resistor, but works fine)
1 - D-Sub 25 pin Male - Mouser, RadioShack, etc.
1 - Barrel power connector - Whatever works for your power supply. (We used a spare 12V power brick)
Stranded Cat-5 is sufficient for wiring
Terminals and male headers are optional, see the page for the circuit.
Heat sinks for the 5804Bs are needed. We used some aluminum channel.
Copper clad PC board (We stock up on ebay every so often)
Etching solution - Ferric Chloride, etc.
We made our own board using the template from the web page. We used similar techniques to the one in part 4 of our iPod Superdock How-To. We reversed the pdf image using Gimp, and printed it onto a laserprinter transparency. This method doesn't create as nice of a trace as the paper, but it's speedier. Clean the board, and keep the paper backing between the plastic and the iron. Once the toner is ironed, just cool it with water and peel.
We etched the board using Ferric Chloride from RadioShack in a disposable Zip-Lock container. It needs to be warm and agitated to work well. The acid and hydrogen peroxide solution etches way faster.
We drilled the board with our drill press and tungsten carbide bits from Drill Bit City. We had to refer to the placement schematic several times to make sure we drilled everything right. Getting the pins holes aligned for the 5804s is a challenge!
If you want to do a toner transfer of the placement mask, do it before drilling the holes. Otherwise the surface is too uneven to allow a good transfer. If you screw it up like we did, you can cheat. Just print the mask onto a transparency and burn holes for the components with a soldering iron. It works surprisingly well.
Next time we'll start building the actual machine and show you how to build some simple and effective slide systems. For now, here's a teaser of what's coming! Good luck!

Hiç yorum yok:

Cascode stage
or “collector follower”
Jean-Paul Brodier
All microprocessors from the 8051 family have inputs and outputs that are ‘quasi-bidirectional’. This means that when power is first applied, the ports behave as inputs with a logic high level and a weak pull-up.,

Glitch
a relay or some other load such as When driving an optocou-pler or LED, there is a problem
at power on: the NPN transistor in the common emitter connec­tion (Figure 1) causes an unde­sirable excitation of the load from the moment power is applied until the microprocessor has had the chance to turn the output low. In addition, logic high outputs are seldom able to deliver enough current to drive the transistor into saturation because they have been designed to be active low.
Figure 1. An NPN transistor drives a load.
To solve both of these problems in one hit, we have to make the active level logic low. This can be done in three different ways: use an emitter follower as a buffer stage (Figure 2a), an inverter in a common emit­ter circuit (Figure 2b) or an inverter/open collector circuit (Figure 2c). The disadvantage of solution 2a is the fact that the voltage to the load is reduced. In the case of a relay with a 5-V coil there is the risk that the resulting voltage is too low. The disadvantage of examples 2b and 2c is that they require more parts.
Collector follower
That leaves the open collector buffer in the form of an IC type 7404. This solution, however, also has a few disadvantages. You do not always need all of the 6 buffers in one IC. Also, the SMD version can only handle 12 V. This is too low and dan­gerous if we happen to supply the load from an unregulated voltage.
The solution presented here com­bines in one transistor the advan­tages of the emitter follower (inactive when power is first applied) and open collector (higher power supply voltage, lower current). This circuit has been known since the valve era by the name cascode (drive via the cathode). The goal was to reduce the Miller-effect of the internal (parasitic) capacitances. Not having the option of reduc­ing the capacitance between the internal electrodes, a lower volt­age was used instead. The cas-code circuit is often used in pow­erful transmitters (tens of kW) to minimise the Miller-effect. This circuit was also used to limit tran­sistor conduction and to keep the dissipation within bounds, which increased the life of bipolar tran­sistors. This was in the IGBT and VMOS era.
The transistor conducts only when the output from the micro­processor is low (refer Fig­ure 3). The base current is lim­ited by resistor R. This current is determined by the current flow­ing through the load. When the power is switched on, both the base and emitter see the same potential, VCC, so the transistor remains blocked. One thing we have to keep in mind: we may not exceed the current rating of the microprocessor output because it has to cope with all the current flowing in the emitter of the transistor.
In the case of the quite common 80C51, this maximum current is typically 3.2 mA (two LS TTL loads). This is sufficient to drive an LED without overloading the 5-V regulator, or for driving a PNP power stage at the high side (Figure 3b). The parallel Philips PCF88574 I2C interfaces can handle 25 mA. For the Atmel AT89Cx051 as well as for the Philips P89LPC9xx the limit is 20 mA. For the latter type the cascode circuit or ‘collector fol­lower’ is even more interesting when the outputs are configured as open-drain because the nom­inal voltage is only 3.6 V. In all cases we have to make sure that the maximum dissipation of the
Figure 3. Cascode driver stage with discrete transistor.
package is not exceeded. 24 V is sufficient to energise its are determined by the power
Should this be the case, then the half Watt relay coil, which in PNP (or VMOS) transistor.
number of open collectors turn can drive a load of 16 A at The cascode transistor can be a required will probably justify 230V. ‘digital’ type with integrated resorting to a 7404. For loads driven from the positive base and emitter resistors.A current of around 20 mA at side, the voltage and current lim-


pot as interrupt generator

In battery-powered, microcon­troller driven circuits, as well as with microcontrollers operating in cars, it is desirable to switch the micro into power-down mode once a task has been completed. An interrupt request is then required to wake up the micro. This circuit allows an interrupt to be generated in a simple way using a common potentiometer. In the example circuit, the pot may also copy its spindle position to the ADC. This enables the pot to be used for continuously variable settings (like volume) as well for getting the micro out of its power-down mode.
IC1A is configured as a differen­tiator with R3 preventing oscillation by keeping the gain down to 10 times. Because the opamp oper­ates off a single-rail supply voltage, an 18k/10k potential divider (R1/R2) is able to create a virtual ground level at +1.75 V. This can be done because the LM358 can handle input levels of up to 3.5 V when supplied at 5.0 volts. IC1A supplies a brief High pulse at a falling input voltage, and a similar Low pulse when the input voltage rises. In order to get a High pulse when the potentiome­ter spindle is turned cw or ccw, IC1B is set up as an inverter. Next, each opamp output drives the base of a BC547 transistor. The 5 V-to-0 V transitions at both collector outputs are shaped and combined into a usable interrupt pulse by three NOR gates IC2A, IC2B and IC2C.If the potentiometer spindle is turned very slowly, it is possible that the circuit does not respond
That is why an LED has been added that lights briefly when a pulse is generated. Finally, a tip: a 100-pF capacitor may be connected in parallel with R5 for additional suppres­sion of self-oscillation.

elektor time standart


Elektor Time standard (1988)
Jan Buiting

The Elektor Time Standard and associated Slave Unit were spin-offs of another hugely successful project, the DCF77 Receiver / Locked Frequency Standard. The receiver was published in the January 1988 issue, the Time Standard and Slave display in the next two issues. All units were housed in then very fash­ionable and (expensive!) Ver-obox two-part ABS enclosures which had also been used for a number of Elektor test instrument designs published between 1984 and 1987. The Time Standard box was designed to process seconds pulses received from the VLF (77.5 kHz) DCF77 time standard transmitter in Mainflingen, Ger­many, and display time (with atomic accuracy) and date on an LC display. The circuit was based on then extremely popular 8052AH-BASIC microcontroller from Intel, a device, we can safely claim, that made it to fame & glory thanks to Elektor Electron-
ics. The 40-way DIL chip con­tained a BASIC interpreter capa­ble of executing ‘tokenised’ code from an external EPROM. This, we were told by our resident designer Peter Theunissen, made writing the DCF77 time signal decoding routines ‘a doddle’ using his specially adapted BASIC computer and interpreter. For example, when concerns were raised (by myself) that not all of Europe was in the time zone served by DCF77 (i.e., CET or GMT+1h), a menu option was quickly added to allow users to select between UTC and GMT+1h. As a relative novelty, a ready-made self-adhesive front panel foil with built-in membrane keys was designed into the proj­ect. This expensive item had been produced specially for Elektor. However, when the article went into print (using a rather glum page layout and black & white print), there were yet other con­cerns regarding the range of the DCF77 transmitter. This is offi­cially claimed as “approximately 1,000 km by groundwave propa-

gation”. A quick use of a com­pass and a map of Europe sug­gested that the signal would only cover the south-eastern part of the UK, possibly including Greater London. For a couple of months we waited with baited breath for readers’ responses, only to receive two enthusiastic reception reports, one from the East coast of Ireland and another from Riyadh, Saudi Arabia! The latter report came from a reader work­ing at a chemical laboratory. I remember he wrote that DCF77 could be received for a few min­utes a day only, synchronising the clock, usually around nightfall despite heavy ‘static’. A huge wire antenna was used (nothing like the 1-inch ferrite rods we used in our lab, which is less than 100 km away from Mainflingen). Although the BASIC program list-
ing for the Time Standard was freely distributed to interested readers (on paper, in an enve­lope, by snail mail!), only very advanced readers were able to compile the program into tokenised code and burn it into an EPROM. Most other readers had to rely on a ready-pro­grammed 27C64 supplied through our Readers Services. Apart from displaying time and date at atomic accuracy, the Time Standard was also capable of outputting time/date information

in the form of ASCII character strings for other (intelligent) equip­ment to use, for example, a timer or switching clock. Although sales figures of the PCB and EPROM were in the hundreds, I never heard from anyone actually hav­ing enjoyed the wonders of the ASCII output so extensively described in the article. The Slave unit published in March 1988 was connected to the Time Standard via screened (micro­phone) cable, the idea being that one or more Slave units could be installed on walls in rooms at some distance from the main clock unit. Central timekeeping deluxe for offices, labs, schools and workshops, but at what an expense and design effort! Not too many PCBs were sold for this extension of the Time Standard.