Jump to content

Banner.jpg.b89429c566825f6ab32bcafbada449c9.jpg

Build Project: Motorised Focuser


SniffTheGlove

Recommended Posts

Yesterday I started to modify my focuser to motorise it.

The rack and pinion was a bit heavy and it it's current state could the stepper motor could not move the shaft.

I stripped the focuser off my OTA and then slowly stripped it down into it component pieces.

I gave it a good degrease and then using soft fine sand paper slowly gave the internals a light sanding to remove the cuddy build up of aluminium and dirt.

I used the compressor to dry all the dust off and then washed it all down with IPA to remove any left behind.

I also IPA the rack and pinion and also the draw tubes.

I reassembly using a very light touch of WD40 on the rack and pinion and then put everything back together.

Now the rack and pinion is very smooth and a quite test with a stepper shows that it can now rotate the shaft.

I mount onto the OTA removing the 6mm shim between the OTA and focuser, this is so I can have a bit more play with getting the webcams in focus.

I wrote the Arduino code to control the EasyDriver and built a simple 2 switch design controller. The first lever switch controls the speed steps. Up for slow (4 steps) and down for fast (16 steps). The other switch is a SPDT Mon-Off-Mon, this controller the direction of the focuser. Up to wind the focuser in, Down to wind the focuser out.

Each time I press this direction switch the Arduino check for the state of the first switch and then move the focuser in or out, slow or fast.

I shall upload the arduino code and photo's of it all tomorrow as it's getting dark now and the skies seem to be clear :icon_eek:

It was quite an easy job in the end, a lot easier than my EQPlatform was, and with the motorised focuser getting a sharper more infocus image on the camera will be easy now due to the precise control of the focuser.

Link to comment
Share on other sites

Sorry, no pictures today as I smoked the EasyDriver this morning.

I went out to take some photo's and wheeled the dob outside as it was bright sunshine, this meant I had to unplug the 12v power supply from the main socket. When outside I plugged in a 12v Car Battery into the supply to work remotly and as soon as I did that lots of balck smoke cam out of the project box holding the Arduino and EasyDriver.

I am not sure what was smoking as by the time I had unscrewed the lid to the circuit there was nothing to see what had burnt out, but looking really close to the EasyDriver one of the pin of the IC h-Bridge is black so presume this is what had burnt out, so another EasyDriver is on order.

I am not sure why it nurnt out as the voltage is the same for the 12v mains supply as for the 12v car battery, the only thing springs to mind is that there was too much amperage going into the EasyDriver and I have no idea how to fix this and be able to use the car battery which is my main intended mobile power supply.

Link to comment
Share on other sites

The first thing I thought of was is the polarity of the battery connector the same as the mains supply?

The amperage capacity of the power supply should not matter because the circuit will only take what's required.

But there are a couple of scenarios where you are inadvertently relying on the power supply regulating the maximum current that can be supplied.

Is there a possibility that both sections of the driver could be on at the same time? That would short circuit the battery through the driver and let out the smoke. I don't know the circuit but it's a possibility if you have some sort of bridge circuit driven by the Arduino.

Are the drives to the steppers on all the time? If so the battery can supply all the power that's asked for while the mains PSU can't.

Difficult to do more than speculate...

Chris

Link to comment
Share on other sites

The first thing I thought of was is the polarity of the battery connector the same as the mains supply?

The amperage capacity of the power supply should not matter because the circuit will only take what's required.

But there are a couple of scenarios where you are inadvertently relying on the power supply regulating the maximum current that can be supplied.

Is there a possibility that both sections of the driver could be on at the same time? That would short circuit the battery through the driver and let out the smoke. I don't know the circuit but it's a possibility if you have some sort of bridge circuit driven by the Arduino.

Are the drives to the steppers on all the time? If so the battery can supply all the power that's asked for while the mains PSU can't.

Difficult to do more than speculate...

Chris

Thanks for replying Chris.

First off a new replacement EasyDriver arrived in the post today, so I dropped it straight into the circuit and using the 12v 1A main power supply the circuit all works fine and the stepper motor works great.

On closer inspection the Allegro Chip of the old one was bulging right next to what was left of pin 20 (Supply In) which as burnt away completely.

The seperate 12v car battery works fine with all my other gear and I always run everything tip positive so there is no chance of reverse polarity.

The EasyDriver can take a 7 to 30v on the input and the EasyDriver has a small pot to limit the current to the steppers, it max output to the steppers is 750ma per phase which is OK when used on the mains supply.

In my eyes it's was to must current loading from the 12v car battery so I am looking for a way to reduce the current and I believe I can do this by putting a rough 12 ohm resistor inline from the battery to the circuit, I believe this will work but just guessing.

So currently on the mains supply everything is great now, so it is just the bit about limiting current initially before it get to the arduino circuit and EasyDriver for the next time I want to use it away from the mains.

Link to comment
Share on other sites

If you limit the current then what will happen is that as the current increases the voltage will reduce. If this voltage is also driving the Arduino - or some other microcontroller - then if it goes below about 7V the Arduino won't get enough voltage to keep it working and it will fail. Half an amp will drop the voltage by six volts.

If the current increase is just a surge as the motor is started then you will get some strange errors as the microcontroller fails.

Chris

Link to comment
Share on other sites

Thanks Chris.

I have spent the sunny day making everything work (including my EQ Platform) and I took the plunge of plugging the motorised focuser circuit into my EQ Platform power supply (A 7Ahr 12v battery). I read on the side of the battery that it provides a max initial surge current of 2.1A which I think was worth the risk of trying out as after all I don't want to lose the motorised focuser when out of the obsy.

Here are some photos.

First one is the project box which holds the Arduino and the new EasyDriver, there are 2 bable which you can see. The grey one is cat 5 cable which runs to a small handheld box which has 2 switches. One for speed (slow or fast) and the other for focuser direction (in-out). The white calbe is a 4 core calbe that runs up to the stepper motor on the focuser.

Next to the grey cable is the power socket for the incoming power feed (12v)

In the next pic is the stepper connected to the focuser.

Here is my Ardunio Code


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Telescope Stepper Motor Arduino Code
// Version 1.1 - April 10th 2011
// Version 1 - Draft April 6th 2011
// Code by Sean
//
// EasyDriver MS Information
// MS1 MS2 Resolution
// LOW LOW Full step
// HIGH LOW Half step
// LOW HIGH Quarter step
// HIGH HIGH Eighth step
//
// How to call Stepping Routines.
// Stepping(Direction,StepSpeed,Steps,Seconds);
// RewindStepping(Direction,StepSpeed,Steps);
//
// Direction == 1 Anti-Clockwise, == 0 Clockwise
// StepSpeed == 1 Eighth, = 2 == Quarter, 3 == Half, 4 == Full
//
// Focuser_Direction variable: 0 = Do Nothing, 1 = Forward Tracking, 2 = Rewind Tracking to Start Position
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Delcare Global Variables
int pin_DIR = 2; // Declare pin_DIR variable as int and assign Arduino Digital Pin value of 2
int pin_STEP = 3; // Declare pin_STEP variable as int and assign Arduino Digital Pin value of 3
int pin_Focuser_In = 5; // Declare pin_Focuser_In variable as int and assign Arduino Digital Pin value of 25
int pin_Focuser_Out = 6; // Declare pin_Focuser_Out variable as int and assign Arduino Digital Pin value of 6
int pin_MS1 = 7; // Declare pin_MS1 variable as int and assign Arduino Digital Pin value of 7
int pin_MS2 = 8; // Declare pin_MS2 variable as int and assign Arduino Digital Pin value of 9
int pin_SLEEP = 9; // Declare pin_SLEEP variable as int and assign Arduino Digital Pin value of 8
int pin_Focuser_Speed = 10; // Declare pin_Focuser_Out variable as int and assign Arduino Digital Pin value of 6

unsigned long time; // Declare time variable as unsigned long
int Done_X_Steps; // Declare Done_X_Steps variable as in and assign 0 to it
int Focuser_Direction = 0; // Declare Focuser_Direction variable as int and assign value of 0
int Focuser_Direction_Stop = 0; // Declare Focuser_Direction variable as int and assign value of 0
int Focuser_Direction_In = 1; // Declare Focuser_Direction_In variable as int and assign value of 1
int Focuser_Direction_Out = 2; // Declare Focuser_Direction_Out variable as int and assign value of 2
int Focuser_Speed = 0; // Declare Focuser_Speed variable as int and assign value of 1
int Focuser_Speed_Stop = 0; // Declare Focuser_Speed variable as int and assign value of 1
int Focuser_Speed_Slow = 1; // Declare Focuser_Speed variable as int and assign value of 1
int Focuser_Speed_Fast = 2; // Declare Focuser_Speed variable as int and assign value of 1

void setup() {
Serial.begin(9600); // open the serial connection at 9600bps for debugging
pinMode(pin_DIR, OUTPUT); // set pin_DIR to output
pinMode(pin_STEP, OUTPUT); // set pin_STEP to output
pinMode(pin_MS1, OUTPUT); // set pin_MS1 to output
pinMode(pin_MS2, OUTPUT); // set pin_MS2 to output
pinMode(pin_SLEEP, OUTPUT); // set pin_SLEEP to output
pinMode(pin_Focuser_In, INPUT); // set pin_Focuser_In to input
pinMode(pin_Focuser_Out, INPUT); // set pin_Focuser_Out to input
pinMode(pin_Focuser_Speed, INPUT); // set pin_Focuser_Direction to input
digitalWrite(pin_SLEEP, LOW); // Put the EasyDriver to Sleep - Saves Power
}

void Stepping(int pin_DIRection,int Step_Speed, double Do_X_Steps, double Step_Runtime) {
double StepRuntime; // Declare StepRuntine variable as double
double SteppyTimer; // Declare SteppyTimer variable as double
int i; // Declare i variable as int
if (pin_DIRection == Focuser_Direction_In) // Check pin_DIRection variable equals Forward
{
digitalWrite(pin_DIR, LOW); // If pin_DIRection variable equals 1 then set Ardunio Digital Pin (pin_DIR) HIGH.
Focuser_Direction = Focuser_Direction_In; // Assign Focuser_Direction variable with Forward
Serial.println("Rotation: Anti-Clockwise"); // Debug Information.
}
else
{
digitalWrite(pin_DIR, HIGH); // If pin_DIRection variable does not equal 1 then set Ardunio Digital Pin (pin_DIR) LOW
Focuser_Direction = Focuser_Direction_Out; // Assign Focuser_Direction variable with Rewind
Serial.println("Rotation: Clockwise"); // Debug Information
}
if (Step_Speed == 1) // Check Step_Speed variable equals 1
{
digitalWrite(pin_MS1, HIGH); // If Step_Speed variable equals 1 then set Ardunio Digital Pin (pin_MS1) HIGH
digitalWrite(pin_MS2, HIGH); // If Step_Speed variable equals 1 then set Ardunio Digital Pin (pin_MS2) HIGH
Do_X_Steps = (Do_X_Steps * 8); // Calculate the number of steps required for the given pin status of (Pin_MS1 and pin_MS2)
Serial.println("Step Speed: Eighth"); // Debug Information
}
else if (Step_Speed == 2) // Check Step_Speed variable equals 2
{
digitalWrite(pin_MS1, LOW); // If Step_Speed variable equals 2 then set Ardunio Digital Pin (pin_MS1) LOW
digitalWrite(pin_MS2, HIGH); // If Step_Speed variable equals 2 then set Ardunio Digital Pin (pin_MS2) HIGH
Do_X_Steps = (Do_X_Steps * 4); // Calculate the number of steps required for the given pin status of (Pin_MS1 and pin_MS2)
Serial.println("Step Speed: Quarter"); // Debug Information
}
else if (Step_Speed == 3)
{
digitalWrite(pin_MS1, HIGH); // If Step_Speed variable equals 3 then set Ardunio Digital Pin (pin_MS1) HIGH
digitalWrite(pin_MS2, LOW); // If Step_Speed variable equals 3 then set Ardunio Digital Pin (pin_MS1) LOW
Do_X_Steps = (Do_X_Steps * 2 ); // Calculate the number of steps required for the given pin status of (Pin_MS1 and pin_MS2)
Serial.println("Step Speed: Half"); // Debug Information
}
else
{
digitalWrite(pin_MS1, LOW); // If Step_Speed variable equals 4 or other then set Ardunio Digital Pin (pin_MS1) LOW
digitalWrite(pin_MS2, LOW); // If Step_Speed variable equals 4 or other then set Ardunio Digital Pin (pin_MS1) LOW
Serial.println("Step Speed: Full"); // Debug Information
}
Serial.print("Do x Steps: "); // Debug Information
Serial.println(Do_X_Steps); // Debug Information
StepRuntime = ((Step_Runtime / Do_X_Steps) *1000); // Calculate StepRuntime variable by dividing Func_Variable Step_Runtime with Func_Variable Do_X_Steps then multiple by 1000ms
Serial.print("Step Runtime:"); // Debug Information
Serial.print(Step_Runtime); // Debug Information
Serial.println(" Seconds"); // Debug Information
Serial.print("Stepper Delay:"); // Debug Information
Serial.print(StepRuntime); // Debug Information
Serial.println("ms"); // Debug Information
digitalWrite(pin_SLEEP, HIGH); // Wake Up the EasyDriver from being a Sleep
SteppyTimer = 0 - StepRuntime; // Assign SteppyTimer vaiable to 0-StepRuntime
for(int i=0;i<Do_X_Steps;i++){ // For Next Loop using variable i to iterate to Do_X_Steps variable
if (digitalRead(pin_Focuser_Out) == LOW && Focuser_Direction == Focuser_Direction_In) { // Check if pin_Focuser_Out is LOW and Focuser_Direction is Forward. ie Has the Tracking End Limit Switch been pressed
Serial.println("Tracking End Button Pressed"); // Debug Information
Focuser_Direction = Focuser_Direction_Out; // Assign Focuser_Direction variable with Rewind
break; // Exit Function
}
if (digitalRead(pin_Focuser_In) == LOW && Focuser_Direction == Focuser_Direction_Out) { // Check if pin_Focuser_In is LOW and Focuser_Direction is Rewind. ie Has the Focuser_Direction Start Limit Switch been pres
Serial.println("Tracking Start Button Pressed"); // Debug Information
break; // Exit Function
}
Serial.print("Time: "); // Debug Information
time = millis(); // Assign time variable with current Arduino ms runtime
SteppyTimer = SteppyTimer + StepRuntime; // Assign SteppyTimer with current StepperTimer variable plus StepRuntime variable
Serial.print(time); // Debug Information
Serial.print("ms Combined Time:"); // Debug Information
Serial.print(SteppyTimer); // Debug Information
Serial.print("ms Step:"); // Debug Information
Serial.println(i); // Debug Information
digitalWrite(pin_STEP, LOW); // Set Ardunio Digital Pin (pin_STEP) LOW
delayMicroseconds(1); // MicroDelay
digitalWrite(pin_STEP, HIGH); // Set Ardunio Digital Pin (pin_STEP) HIGH and step the motor
delayMicroseconds(1); // MicroDelay
// digitalWrite(pin_STEP, LOW); // Set Ardunio Digital Pin (pin_STEP) LOW
Done_X_Steps = i; // Assign i variable to Done_X_Steps to count steps done.
// delay (StepRuntime); // Delay until StepRuntime variable has passed
}
digitalWrite(pin_SLEEP, LOW); // Put the EasyDriver to Sleep - Saves Power
}

void loop() {
Serial.println("Stepper Starting"); // Debug Information
digitalWrite(pin_SLEEP, LOW); // Put the EasyDriver to Sleep - Saves Power
Focuser_Direction = Focuser_Direction_Stop; // Assign Focuser_Direction variable with Stop
Focuser_Speed = Focuser_Speed_Stop; // Assign Focuser_Speed variable with Stop
if (digitalRead(pin_Focuser_In) == HIGH && digitalRead(pin_Focuser_Out) == HIGH) {
Focuser_Direction = Focuser_Direction_Stop;
}
else if (digitalRead(pin_Focuser_In) == LOW) { // Check if pin_Focuser_In is LOW
Focuser_Direction = Focuser_Direction_In; // Assign Focuser_Direction variable with Focuser_Direction_In
Serial.println("Focuser_Direction_In is LOW"); // Debug Information
}
else if (digitalRead(pin_Focuser_Out) == LOW) { // Check if pin_Focuser_Out is LOW
Focuser_Direction = Focuser_Direction_Out; // Assign Focuser_Direction variable with Stop
Serial.println("Focuser_Direction_Out is LOW"); // Debug Information
}
if (digitalRead(pin_Focuser_Speed) == HIGH) { // Check if pin_Focuser_Speed is HIGH
Focuser_Speed = Focuser_Speed_Fast; // Assign Focuser_Speed with Focuser_Speed_Fast
}
else
{
Focuser_Speed = Focuser_Speed_Slow; // Assign Focuser_Speed with Focuser_Speed_Slow
}
// Serial.print("Focuser Direction is "); // Debug Information
// Serial.println(Focuser_Direction); // Debug Information
// How to call Stepping Routines.
// Stepping(Direction,StepSpeed,Steps,Seconds);
// RewindStepping(Direction,StepSpeed,Steps);
// Direction == 1 Anti-Clockwise, == 0 Clockwise
// StepSpeed == 1 Eighth, = 2 == Quarter, 3 == Half, 4 == Full
if (Focuser_Direction == Focuser_Direction_In) { // Check if Focuser_Direction is Focuser_Direction_In
if (Focuser_Speed == Focuser_Speed_Slow) { // Check if Focuser_Speed is Focuser_Speed_Slow
Stepping(Focuser_Direction_In,4,4,1); // Run the Stepping Function
}
else if (Focuser_Speed == Focuser_Speed_Fast) { // Check if Focuser_Speed is Focuser_Speed_Fast
Stepping(Focuser_Direction_In,4,16,1); // Run the Stepping Function
}
else if (Focuser_Speed == Focuser_Speed_Stop) { // Check if Focuser_Speed is Focuser_Speed_Stop

}
}
if (Focuser_Direction == Focuser_Direction_Out) { // Check if Focuser_Direction is Focuser_Direction_Out
if (Focuser_Speed == Focuser_Speed_Slow) { // Check if Focuser_Speed Focuser_Speed_Slow
Stepping(Focuser_Direction_Out,4,4,1); // Run the Stepping Function
}
else if (Focuser_Speed == Focuser_Speed_Fast) { // Check if Focuser__Speed is Focuser_Speed_Fast
Stepping(Focuser_Direction_Out,4,16,1); // Run the Stepping Function
}
else if (Focuser_Speed == Focuser_Speed_Stop) { // Check if Focuser_Speed is Focuser_Speed_Stop
}
}
}


post-21428-13387756114_thumb.png

post-21428-133877561152_thumb.png

Link to comment
Share on other sites

  • 2 weeks later...

Hi Sean,

That looks like a nice project, here iss some info from Sparkfun ( dont know if thie applies )

Caution: Do not connect or disconnect a motor while the driver is energized. This will cause permanent damage to the A3967 IC.

Note: Version 4.3 of the PCB has an error on the Current Adjustment silkscreen. The Min/Max labels are reversed. The correct direction for maximum current is counter-clockwise.

HTH

John

Link to comment
Share on other sites

Hi Sean,

That looks like a nice project, here iss some info from Sparkfun ( dont know if thie applies )

Caution: Do not connect or disconnect a motor while the driver is energized. This will cause permanent damage to the A3967 IC.

Note: Version 4.3 of the PCB has an error on the Current Adjustment silkscreen. The Min/Max labels are reversed. The correct direction for maximum current is counter-clockwise.

HTH

John

Thanks John.

I managed to get Ver4.4 when I reordered from Technobots so the writing on the silkscreen is now correct.

I must say, it works absolutly faboulus and much more precise than me using the knobs by hand.

Link to comment
Share on other sites

Hi Sean,

You might want to take a look at a yahoo group we have at the moment using Arduinos for this purpose and basically running them from the computer......tech.groups.yahoo.com/group/sgl_​observatory_automation

its not an official SGL group but most of us are from SGL.

HTH

John

Link to comment
Share on other sites

Hi Sean,

You might want to take a look at a yahoo group we have at the moment using Arduinos for this purpose and basically running them from the computer......tech.groups.yahoo.com/group/sgl_​observatory_automation

its not an official SGL group but most of us are from SGL.

HTH

John

Thank you John, I have just joined up.

Link to comment
Share on other sites

  • 9 months later...

Some feed back after nearly a year of using.

Works fantastic with eyepieces in the focuser as well as using an SPC900Nc webcam.

The only main problem is using my EOS350D, once the draw tube is extended then the motor does not have enough torque to rotate the rack and pinion mechanism and the motor just starts to slip.

I am still looking for a heavier torque stepper motor that can be driven at a max of 750ma per phase that the EasyDriver can support OR look at trying to implement a geabox to help but I am not to sure that will work with the weight.

Link to comment
Share on other sites

  • 4 months later...

After much searching I have come to the conclusion that I shall built a simple geared down gearbox. I have found a supplier of parts

http://www.technobotsonline.com/pulleys-and-cams/plastic-timing-pulleys/mxl025-timing-pulley.html

I am going to get the 4630-018 to fit on the stepper motor shaft and then have the 4630-048 on the focuser R&P shaft and then a pully timing belt. This should give me 2.6X more torque which should hopefully do the job, if not I can find a larger gear for the R&P shaft.

My next other step is to look at finally doing the ASCOM focuser now that I am running my EQ6 with EQMod

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.