%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>
RobotBuilder |
||
|
Wood CNCHere is a homemade CNC router I started making in eigth grade. It's best at cutting wood and plastic. I used it this semester in Computer Vision to take an image and create commands that travel around the edges.. ElectronicsCNC electronics are connected to a home PC through 2 parallel ports. Each parallel port has 12 outputs and 5 inputs. Four outputs are used for each stepping motor. Turning coils on and off in order causes stepping motors on the CNC to turn, either moving an axis forward or backwards. In run mode, the stepping motors are given 12 volts and in rest mode are only given 5 volts. This is because stepper motors can achieve higher speeds with more voltage but would overheat by not moving. Current is limited to the motors with power resistors. Stepping motors are easy to use because they can be operated in an open loop - meaning that no position feedback is required and steppers are just assumed to have reached their position. I use half stepping to enhance the effective resolution of the stepping motor. Instead of only 180 steps/revolution, with half-stepping I get 360 steps/revolution. Ball screws need 5 revolutions for an axis to travel 1 inch so the end result is 1800 half-steps/revolution. Accurracy is lower due to backlash and the machine is made out of wood so it isn't perfectly rigid. SoftwareSoftware went through many iterations on this CNC. First of all, this was the first large project I ever made that was computer controlled. I started making it in eighth grade because it was an interesting computer controlled machine to make. The first program made linear moves in QBASIC to test out the functionality. Better software was made using Turbo Pascal 7.0 which had a GUI interface with text windows that opened for typing in commands, menus to change options, and an immediate command prompt. Arcs, parts of circles, could be routed with this version. There was also a notion of a facing direction that was useful for certain shapes. Examples of Basic CNC Commands Linear moves: X5Y-3 would move 5 inches in the positive X direction and 3 inches in the negative Y direction Arcs: ARC1,0, -180 - would make a 1 inch radius arc, with a starting direction of 0 degrees (0 degrees is up and positive amounts are clockwise from the Y axis), -180 degrees indicates 180 degrees out of 360 should be routed in the counter-clockwise direction Circles: C2.5Z0.5 - moves from current center outward 2.5 inches, moves Z down 1/2 an inch, cuts a full circle of radius 2.5 inches, and returns to the starting position To cut a hexagon this code could be repeated 6 times: FD1 RT60 The machine would move X and Y 1 inch in the direction it is "facing" and then rotate its "facing direction" 60 degrees to the right. In some instances, having a "facing" direction is much easier to think about when programming the CNC. Final SoftwareRight now, I use a program I made using Visual C++ 6.0. It is a simple form with a preview screen, a textbox with the current program, a history list, and buttons/commands to perform simple functions easily. The most significant addition was this program runs under windows and has a ActiveX Preview control. It lets the user view output from the program from what they type saving time by visuallizing the project. All commands the router can perform can be previewed. In preview, you can center on a new location and zoom in/out. Image ProcessingFor my final project in Computer Vision at UMass (Spring 2005), I took images and routed along edges in the image. I approximated edges with either line segments and arcs. The picture shown below is from 3 images I made in Microsoft Word using Word Art (I just captured the screen for the picture). This is actually the first test I ever made with images early on and it is only using line segments for cutting out the text. The code itself was written using Matlab because there's a lot of built in functionality for image processing making quick software development easy.
A Metal Cutting CNCThe mechanical work for another homemade CNC Router is just about done and the electronics/software may have been too if I hadn't gotten into electric lawnmowers. This project has been put on hold until I get some freetime to work on it. Right now it's got an LCD digital readout screen containing positions of each axis. The stack of boards shown in the picture, have a PIC microcontroller interfacing with other homemade cards, 8255 for extra I/O (limit switch inputs and outputs for step/direction, enable/rest outputs for the stepping motors), extra 32 KB of static ram and 2 KB Dual Ported RAM (planning on communicating with a homemade ISA card to PIC but currently thinking of something else), and two LS7266 encoder chips (keeps track of position for each axis, PIC can query chip to get current position). There's also another board in the stack now for reading analog inputs (not shown in picture) In the future, I expect to be communicating with this PIC with either USB 2.0, Ethernet, CAN, etc. The PIC will mainly be used to send precise pulses to stepping motor controllers. Since earlier software ran on a multitasking operating system (non-realtime) I decided for realiable performance a dedicated PIC microcontroller is needed. Missing or delay pulses aren't acceptable for a precision CNC Router. The PIC can do line segments now but I don't ever intend for it to do anything more complicated. I'd like all the decision making about which steps to perform and when to be decided on a desktop PC. Then these low level instructions could be sent to the PIC. They would sit in a buffer and be executed. The idea would be that the buffer never goes empty, and signals can be sent precisely to the servo motor controllers. Using a desktop PC allows me more freedom later on in developing software. I will be able to add methods for generating ellipses and perhaps bezier curves in a higher level language (I'm thinking of using VB .NET at the moment). I may also make a preview application using DirectX. I've previously used DirectX 7 for about a year working mostly on terrain, object models, and projectiles for an RPG. A 3-d view of the router's path would be much nicer than the 2-d preview I use now. |
|