Jump to content

Banner.jpg.b83b14cd4142fe10848741bb2a14c66b.jpg

Stepper motor focus control version 2


ncjunk

Recommended Posts

In real terms though arduino is pretty slow, probably not too bad if you drive 2 steppers from one but then its also killing loads of your IO, and probably loads of your code space (haven't checked, might do later when I dig mine out)

It also depends on how fast you want to turn things and how critical it is to turn precisely when you want it to and not drastically out of sync - this is a real problem for reasonable speeds in steppers, certainly in CNC.

My understanding is the L293 is EOL, although there's probably billions around - and they're expensive and low featured compared to the A3980 (from Farnell).

Link to comment
Share on other sites

  • Replies 141
  • Created
  • Last Reply

The speed for one stepper isn't a problem (I can wait a few seconds) but I can see that if you start adding things on...2nd stepper..other functions then it is going to cause entertainment. The Stepper function effectively hogs the processor a bit.

As for the L293 I don't think it really matters if you use that or any of the other chips available the difference in control is minimal.

I do like the look of the A3980 though so I think I will see if I can get hold of one.

As for the Sanguino...nice to know about but for me personally if I keep changing boards and chips every couple of months I will be skint and never get this finished! The Arduino will be good enough for what I want for now so I will finish the Focus stuff in the new year and see what problems arise in the other bits I want to add.

I think I should have some spare time from the 30 - 3rd January to have a go at some more testing...looking forward to that.

Thanks for the info..its good stuff.

Neil C

Link to comment
Share on other sites

The trouble with the A3980 chip is that it isn't though hole. I don't know about you, but I'm going to struggle mounting something like that on a piece of matrix board :D

EDIT: Farnell only have the £6.08 +vat one in stock so it's quite a bit more expensive than the L293.

--

Martyn.

Link to comment
Share on other sites

The trouble with the A3980 chip is that it isn't though hole. I don't know about you, but I'm going to struggle mounting something like that on a piece of matrix board :D

EDIT: Farnell only have the £6.08 +vat one in stock so it's quite a bit more expensive than the L293.

--

Martyn.

Thru-holes, surface mounts doesn't make a difference really as long as you can get or fabricate a PCB - in fact surface mount is faster and less problematic than thru once you do it a couple of times

HotplateReflowTechnique < Main < Reprap

Link to comment
Share on other sites

The trouble with the A3980 chip is that it isn't though hole. I don't know about you, but I'm going to struggle mounting something like that on a piece of matrix board :D

EDIT: Farnell only have the £6.08 +vat one in stock so it's quite a bit more expensive than the L293.

--

Martyn.

There must be somekind of issue with the A3980 and A3977's as they're out most places. A3982 is available...

Link to comment
Share on other sites

  • 2 weeks later...

I have implemented the circuit on a stripboard (one 7-segment LED, one resistor, one ULN2003), written a loop for the Arduino microcontroller (look at serial port input and move one step forward or back) and written a 10-line C# application that opens a selected serial port and sends characters when buttons are clicked. The basics are done, the rest is embellishment.

Link to comment
Share on other sites

I know what you mean about the rest being embellishment but it ain´t half entertaining trying to find the time to finish it off.

Waiting for a break in the clouds at the moment...I am determined to get a first light on the used Artemis 285 I bought!

Link to comment
Share on other sites

Don't get me wrong! The challenge of getting my head around making an ASCOM driver is tempting me. But the number of hoops you have to jump is staggering. I can't even understand what the doc is talking about.

Link to comment
Share on other sites

The ASCOM driver is actually easy as they have templates for you and you only have to pass the variables across....the problem was I couldn´t find any information explaining the templates for a novice. It is obvious that if you have done a lot of coding this was the equivalent to telling someone how to put the keys in the ignition but I always like an idiot guide!

Got there eventually..

I am buying a couple of steppers with gearing and also some Oldham coulings to connect to the telescopes....hopefully I will be back in business then!

Link to comment
Share on other sites

I have installed C# express and loaded the template...not got any further though.

Driver.cs contains the commands Ascom uses. in my vb version I linked my information and variables to the commands under this section (you shouldn´t have to touch the ASCOM side)

Link to comment
Share on other sites

Hi,

I'd be quite interested in seeing how you get on with this as i'm looking to do a similar thing with my diy dome.

I've literally just started looking at stepper motor contollers today, and i cam across the following device.

Stepper Motor Controller & Driver: Virtual Village - UK

I presume you're planning some kind of similar dome automation.

What motors are you using or planning to use ? is there any specific type or rating you have found ?

Rich.

Hi,

I haven't actually tried what you mentioned above but I do work on the marketing team for VirtualVillage.com and want to say thanks for the mention of the Virtual Village Stepper Motor

To show our appreciation I'd like to pass on a 20% off discount code. The code is VVN392R. Type in the code when prompted in checkout to get 20% off!

If you have any further questions, comments or if there is anything I can do to help drop me an email at webteam@virtualvillage.com and go to VirtualVillage.co.uk to find more inexpensive accessories and electrical controllers.

Thanks again!

Claire Bartels

Assistant Marketing Manager

http://www.virtualvillage.com

Link to comment
Share on other sites

  • 1 month later...

Hello again, I am making good progress with my C# ASCOM Focuser driver for my USB-FTDI-Arduino-stepper hardware, finally. The ASCOM "Link" property works, I will update you when I get all of them working. The development environment takes some getting used to (Visual C# Express 2008).

Link to comment
Share on other sites

Sounds good, Themos

Electronic hardware I can do, however I'm finding the software ASCOM stuff tricky. Can't wait for someone to get that side sorted, I've got an ardunio stepper system ready to go.

In the meantime I've been messing with automating my scoptronic manual filter wheel using a stepper motor and ardunio again. Got it working from a simple VB interface although I do need to put some positional feedback into the system. I will be looking for some help with an ASCOM driver for that in time. I have been documenting the process and will post as a thread soon

Rob

Link to comment
Share on other sites

Look forward to seeing the code.

I have still stalled and not done anything

for a couple of months. The software was

kind of working when i stopped but really

need to find some time and finish it.

Got another project to complete as Well as

i lost my shed roof in the Gales fortunately

the telescopes were in the house, ready to

play with the focus software funnily enough!

Link to comment
Share on other sites

I will put the code up in the SGL_observatory_automation group as soon as I comment all the lines of code, describe the hardware and the firmware and use the driver for a while with an ASCOM client.

My driver has a setup dialog with a checkbox to specify whether you want an absolute or relative ASCOM focuser. It also has a combobox for selecting the COM port. It passes the Conform tests in either configuration.

I am wondering whether I should be saving state in the Arduino (the phase of the stepper, for instance and the notional position) or in the ASCOM driver or in both - something like the Park command in EQMOD. Then I would need a way of re-setting to zero phase (I use half-steps so I have 8 phases), zero position.

Last night I got the supplied Inno installer script to work, packaging up my .NET .dll file nicely and I was able to use the produced installer to migrate the driver to my laptop (from the development desktop machine). That went quite smoothly.

I still have a bug with the driver hanging when I go back to position 0, will have to clear that up first. Luckily, the Arduino dev environment allows me to type commands to the Arduino and debug it quite easily. I haven't figured out a way of debugging in C# yet.

Link to comment
Share on other sites

  • 3 weeks later...

Hi Themos, I think the data should be stored on both the arduino and the PC, if the unit is used standalone or by a.n.other device via serial or god forbid you have to do an OS reinstall, if you do the settings will be easily retrievable.

I've not been active on this thread for a while, I wanted to post my thoughts on a couple of things:

The arduino being slow is not an issue here, its 8/16Mhz, which is infinitely faster than we will ever need to move a stepper motor. the speed issue will likely be how fast the stepper itself can actually move, if you take my current stepper motor, 64 steps x 64:1 gear manages 6rpm, add the 10:1 gearing of my crayford and you can see where this is going, slowly :(

There really shouldn't be too much of an issue with code space, 16/32/128Kb depending on your arduino, is plenty really, depends how many libraries you have to rely on and how you manage them.

Adding a 2nd or 3rd stepper shouldn't be too much of an issue, although with the lcd shield it could be problematic with 3, in hindsight a better design of an lcd board would be much better as the amount of pins needed can be reduced. How many of you are using an LCD and is it actually very useful to you? I can't see it being much use in an ascom environment.

There are circuit designs for stepper motor controllers that utilise just 2 pins per motor, so theoretically you could run up to 8 motors on a duemilanove/diecimila (although trying to handle that with the libraries might be a bit hairy). If you have an arduino mega then the world is really your oyster, more IO pins than you can eat.

I haven't had any experience with the focuser software and more than one motor but I'm guessing that none of it is trying to control more than one motor at a time, as I'm sure none of you are doing from your non-ascom software either, so again speed isn't an issue.

As for through hole or surface mount, there are pros and cons for both, depending on your skill with a soldering iron, with a bit of practice surface mount is quite easily achievable, however, surface mount may end up being cost prohibitive depending on how much kit you already own and how many boards you plan to make.

Motor controller chips, it doesn't really matter what they are, as long as they have enough inputs/outputs for your needs and are 5v tolerant.

I would like to combine my dew heater code and 3 focusers (2 steppers and a servo), what issues can anyone see in doing this?

At the moment I'm telling the dewheaters to turn on if they reach within 2C above dew point, so that gives me 2 degrees leeway if the sensor code is blocked by, for instance, moving the focuser between eyepieces.

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.