Jump to content

NLCbanner2024.jpg.2478be509670e60c2d6efd04834b8b47.jpg

barn door project, stepper motor without Arduino?


Recommended Posts

I'm just about to start building a barn door tracker. My maths is good, my craft and engineering skills are very good but the idea of coding an Arduino brings me out in a cold sweat. I am sold on the concept of a stepper motor but need to control it as simply as possible with pre-assembled components..i really don't want to [removed word] about with breadboards, PCBs and soldering. so i am considering purchasing the following items to save a lot of time and stress.

MOTOR;  https://www.amazon.co.uk/XCSOURCE-4-Wire-Stepper-Printer-TE225/dp/B011NRMXYO/ref=sr_1_7?crid=277K22PDOS9AJ&dchild=1&keywords=stepper+motor&qid=1590313684&sprefix=stepper+%2Caps%2C139&sr=8-7

POWER SOURCE...maybe a battery pack? not sure yet.. i'm out in the field so it needs to be portable. any suggestions appreciated.

DRIVER ;  https://www.amazon.co.uk/TopDirect-Upgraded-TB6600-Controller-Segments/dp/B0711J1K66/ref=sr_1_12?crid=19QUZNXJ01S5M&dchild=1&keywords=stepper+motor+driver&qid=1590313835&sprefix=stepper+motor+d%2Caps%2C143&sr=8-12 

CONTROLLER.   https://www.amazon.co.uk/FTVOGUE-Controller-Generator-Adjustable-Regulation/dp/B07NVN2128/ref=sr_1_53?crid=188XP341U1163&dchild=1&keywords=stepper+motor+driver&qid=1590313302&sprefix=stepper+motor+driver%2Caps%2C137&sr=8-53

Once i get this all up and running, i might be tempted to get into more precise control via an Arduino, especially if the the above kit is too clunky. But the level of tracking accuracy at this stage is probably not a issue. My current thoughts on the engineering will be that the bottom block of the door has to have some mass to supress general vibrations, vibration damping motor mounts, i will be using high quality stainless steel, ball bearing door hinges. Adding an adjustable alt/ az sub-base for finer polar alignment. Any pointers on keeping things metric would be helpful, pretty much all the guidance out there is in imperial units....

Edited by Cornelius Varley
links fixed
Link to comment
Share on other sites

My Arduino based barn door tracker runs on an Arduino sketch with less than 16 lines of code. Don’t fear the reaper! Seriously, the code for driving a single stepper is super simple, but it is designed for the Easy Driver hat just sends a pulse stream. The “secret” to making an Arduino precisely time those pulses is using the “millis” feature instead of the “delay”. 

  • Like 1
Link to comment
Share on other sites

The code is just a revamp of the “Blink Without Delay” example provided in the Arduino IDE package. I lied. There are 19 lines, but 3 of those are just ending statement curly brackets.

The end user will have to alter the baseline timing number to fit their final drive gear ratio, but it’s clear where this number is and how altering it effects the stepper motor speed.

Code below:

const int ledPin =  13; // the number of the LED pin

int ledState = LOW; // ledState used to set the LED to off or step pulse to off

unsigned long previousMillis = 0; // will store last time LED was updated

const long interval = 50; // adjust numerical value to suit your needs larger number equals slower pulses

void setup() { // set the digital pin as output:

  pinMode(ledPin, OUTPUT);

}

void loop() {

  unsigned long currentMillis = millis();

  if (currentMillis - previousMillis >= interval) { // save the last time you blinked the LED

    previousMillis = currentMillis; // if the LED is off turn it on and vice-versa:

    if (ledState == LOW) { //if step pin signal is off

      ledState = HIGH; // turn it on

    } else {

      ledState = LOW; // if the step/LED pin is high then turn it off

    } // set the LED with the ledState of the variable:

    digitalWrite(ledPin, ledState); // sends the signal depending on the state of the pin.

  }

}

 

 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Be aware that “my” code was set up for a Nano, and the onboard LED pin (D13) is used. A different Arduino might need a different designation here. Any digital pin should work just as well, but I used that to provide a visual indicator of pulse timing via the blinking LED. In the dark this flashing LED is a quick and easy way to know your tracker is doing its thing.

My ban door tracker needed several adjustments to the baseline timing, and along with drift alignment it’s surprisingly accurate. Yes, it took several nights to get it right. 5 minute wide field exposures yield nice round stars, and since my thing is trying to catch meteor falls this is good enough for me. I have mounted my C-90 Mak on it via a ball head, and it keeps a target pretty much centered in the FOV for the 3 hour length/duration of the curved all thread rod.

I use a spring loaded (an elastic hair scrunchy) setup on my stepper motor to hold the drive gear firmly in contact with the driven gear on the bent rod. Both gears were salvaged from a dead VCR. While plastic they seem to hold up well. I have left the base outside for nearly three years now, and I see no degradation so far. I just remove the stepper, and Arduino, and let the rest of the tracker sit. Mine is mounted onto a plastic 55 gallon drum filled with water.

Of course a brass gear set would be better. I epoxied the small gear to a belt pulley on the stepper, and to the nut that rides on the drive rod. When the bent rod is used up I simply push the stepper away and spin the tracker gear backwards to the starting position. This only takes a minute or so. Had I put more effort into the little device, like a retainer for the driven gear so it wouldn’t creep up the drive rod, a simple pushbutton switch could reverse the motor at a much higher speed. Frankly I didn’t think it worth the effort.

  • Like 1
Link to comment
Share on other sites

Thanks. I've got a code base already to use and had amassed all the bits but it's interesting to see another as coding Arduino is all new. My barn door is already built but is fully manual, though I can achieve reliably 3 minute exposures at 40mm.

 

  • Like 1
Link to comment
Share on other sites

On 02/06/2020 at 14:32, Legion Of Andromeda said:

well, my project is coming along nicely 2 boards hinged with high tolerance hinges, M5 threaded rod bent to a smooth curve and passing through a hole without a hitch

I bored a nylon block to 1/32” larger than my drive rod (1/4“ x 20) and mounted it on a pivot to act as a guide. The nylon bushing keeps the drive rod registered with the gear and hinge point. This pivot is two short sections of VCR tape read motor shafts epoxied to 90° x 1” angle aluminum. This is fixed on the under side of the stationary/barn plate. The bearings that supported the motor shafts in life now keep the shafts free to turn and follow the imperfections in my bend. A cross drilling through the nylon block at 90° to the drive rod hole with a tight fit to the VCR motor shafts, and a drop of super glue, and the nylon block is a very low friction guide. I let my angled aluminum float until I found a point where there was the lest friction by opening and closing the tracker and clamping those bearing angle pieces in a best guess position. This keeps that rod at a “just so” distance from the hinge even if there are uneven spots. No lube is needed on the nylon, and a drop of light oil on each bearing twice a year keeps things smooth. 

I will try to remember to snap a photo tomorrow. OFF TOPIC WARNING:

I am restoring my 92 Ford Ranger 4X4, and have poured some coins into a stem to stern servicing. The front end in total was rebuilt. New tires, shocks, brakes, exhaust, 30 over bored, crank turned 10, new head yadda yadda yadda. Today I figured out 2, maybe 3, of the injectors are working part time. On that 2.3 Lima the whole upper half of the intake has to come off to get at the little devils. I should have put a new set in when putting the engine back together. Live and learn, or maybe not... I’ll get a photo if I’m not distracted by a stumbling old truck

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 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.