Ghetto-Fab CNC Almost done

February 4th, 2010

New Dremel (4000 series) and mount (which does not require modifying the Dremel) and the base is mounted. Epoxied heatsinks to the H-Bridge drivers and added catch diodes.  Driver chips run cool now even under high loads. :)   Took advantage of the H-Bridge driver chip’s ability to run from two separate power supplies, so now the CPU runs from USB power and the motors have the external power supply all to itself.

admin Projects

CNC Update

October 30th, 2009

The controller board was finished long ago and I am able to send basic commands to actuate the motors and read the optical encoder strips via Serial Emulation over USB.  The trouble now has been writing a specialized USB driver for it.  After a while it really dawned on me how involved this is and that I should save that for later and just focus on getting a basic CNC up for now and start making cuts :) I will see what it will take to get EMC2 to talk to the board over the CDC USB serial emulation link.

After catching up with work and school, I need to detail the following:

1. How I identified the pinout for the optical encoders

2. How to read the optical encoders.

3. Provide schematics of the control board

4. Document and publish the source for the basic firmware I am using on the controller board.

admin Projects, Uncategorized

Controller Board

July 13th, 2009

I completed the controller board yesterday and ran a successful motor drive test.  The board consists of a PIC18F14K50, two  SN754410NE H-Bridge driver ICs, a 7404 hex inverter chip and some miscellaneous components.  I will have some schematics up as soon as I figure out how to make them in gEDA. Unfortunately, there were not enough pins available on the PIC for me to take advantage of Interrupt on Change (IOC) for the optical encoders.   I will have to try various methods of polling and see what works best.  Also on the to do list is establishing a USB connection with the device.

admin Projects

Linear encoders FTW!

June 20th, 2009

Nestled under each positioning stage is a linear optical encoder strip salvaged from a used printer.  This first mill is not meant to be accurate to 0.001″ (more like 0.0025″ at the very best,) so the relatively low resolution of these strips should not be a problem.   The readings are now satisfactory through the full range of travel.  Of course, I need to add limit switches, but that can wait a bit. The next step I’m taking is prototyping the microcontroller board to interface with the motors and sensors.

admin Projects

Rotary encoder FAIL

June 14th, 2009

The encoders gave excellent readings for about 1/2 the range of travel.  Unfortunately, as the stage nears about 3/4 the way to the end of its range, the lateral play in the drive screw becomes progressively worse, causing the encoders to go severely out of alignment.   Perhaps the way I should have gone all along is with the linear encoding strips- at least detecting and correcting backlash will be a simple matter now.  All I have to do is figure a robust way to mount the strips and adapt the sensors.

admin Projects

Optical shaft encoders installed

June 13th, 2009

I decided to try rotary shaft quadrature encoders instead of  the linear encoders I salvaged earlier from those three used printers.  I drilled holes through each pulley which interrupt the light between each emitter-detector pair with a 90 degree phase difference.

admin Projects

Programming the PIC Microcontroller

June 6th, 2009

Eventually, I will need a micro controller to run the motors, read the optical encoders, etc.  Using the PICKit2 programmer and low pin count evaluation board with the PIC16F690, I dived into the world of programming PIC microcontrollers along with my buddy Stephen from work.  We arrived at the following code and compiled it using MPLAB and the HiTech C plugin:

#include <htc.h>
__CONFIG(XT & WDTDIS & PWRTDIS & BORDIS & UNPROTECT);
void init(void)
{
// port directions: 1=input, 0=output
TRISC = 0b00000000;
}
char counter;
void main(void)
{
int val[16] = {
0b0000,
0b0000,
0b0000,
0b0000,

0b0000,
0b1100,
0b1000,
0b1011,
0b1000,
0b1011,
0b1000,
0b1100,
0b0000,
0b0000,
0b0000,
};

counter = 0;
init();

while (1){

PORTC = val[counter];
_delay(4000);

counter++;
if (counter > 15) {
counter =0;
}
}
}

Below you can see the Development board, along with a smiley face that can only be seen when rapidly moving the board side to side.

admin Projects

Drive motors added and tested

June 1st, 2009

After discovering the tedium of hand-turned operation, I decided to go the extra step of fully automating the machine.  I found some Tamiya planetary gearbox motors at Fry’s and coupled them to the drive screw via belt and pulleys.  I chose gear motors over stepper motors because the friction of the positioning stages is so high.  I am now trying to figure out how to best mount the optical encoders.

dsci0633_small2

admin Projects

Poor man’s mill up.

May 18th, 2009

I wasn’t able to adapt the x-y stage to my drill press, so I spent the weekend making a support system and adding a z-axis.  There was horrible vibration from the dremel, which I eventually traced down to the chuck.  I alleviated the vibration by replacing the chuck with a collet.

dsci0627

admin Projects

Poor man’s mill

May 15th, 2009

Some parts of the revised CNC would benefit from a little more accuracy and precision than my current set of tools can manage.  It may be possible to make a crude hand-operated mill out of my drill press.  I purchased two steel plates from Lowes and two drill-press clamps from Home Depot, which I will slap together tomorrow morning.  Total cost was around $40.

The idea is to create a stencil, trace the image on the material, and use the improvised mill to cut it out.

admin Projects