Archive

Archive for June, 2009

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 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