Tuesday, January 6, 2009

Gearbox and drive

Ok to begin with I plan to make a barn door tracker, although as suggested on the EQplatform list by Nils Olof not a conventional one.

"If I were in your place, I believe I would use a base board inclined  
perpendicular to the polar axis, with adjustable supports, and a movable  
sector driven by a threaded rod and wires along the circular rim. But I  
haven't actually tried such a design, and there are many possibilities." - Nils Olof 

I liked this idea, albeit with some of my own changes which I think should work - basically a really slow record player with a ball mount for the digital camera which is then aligned perpendicular to the polar axis.

To start with how slow do you need to go? If google is right (I'm a trusting fool), then 1 sidereal day = 23.9344696 hours, multiplied by 60 and inverted gives you the required RPM for the table which is 0.000696346 RPM - or pretty chuffing slow. 

So after a bit of poking around some scrap copiers I found the following

Which is 0.1 RPM motor which is a little DC motor with a 120 000 :1 gearbox attached - which is miles too fast but at 120 000 gearbox ratio I need to drive the input at 83.561492.

Next up I have a stepper motor which, driver and microcontroller which I intend to mount onto the gearbox input shaft to drive it at the right RPM

So thats a simple stepper motor 1.8deg/step, an appropriate driver board and an arduino which is a atmel based microcontroller that you can program in quite a high level easily

http://www.arduino.cc/

The code I have on the board at the mintue simply drives the stepper in one direction at one speed but its not tricky to add some buttons to make the mount move back and forwards and fine adjust the speed.  The code used at the mintue is below, its not currently set to drive at the correct RPM:-

/*
 * Stepper driver routine
 */

int clockPin = 5; // Clock
int dirPin = 6; // Step Direction
int startfreq = 1000;
int topfreq = 125;

int test = 0;

void setup() // run once, when the sketch starts
{
  pinMode(clockPin, OUTPUT);
  pinMode(dirPin, OUTPUT);
  digitalWrite(dirPin, HIGH); // set direction
}

void loop() // run over and over again
{  
  if (test == 0){
  for (int i = startfreq; i > topfreq; i--){// accelerate motor from stationary to required speed
  digitalWrite(clockPin, HIGH); // need to do this to prevent stalling at higher speeds
  delayMicroseconds(i);
  digitalWrite(clockPin, LOW);
  delayMicroseconds(i);
  }
  test = 1;
  } else {
  digitalWrite(clockPin, HIGH);// run motor at required speed after acceleration
  delayMicroseconds(topfreq);  
  digitalWrite(clockPin, LOW);
  delayMicroseconds(topfreq);  
  }
}

No comments:

Post a Comment