PDA

View Full Version here: : Stepper motor clock


pjphilli
31-10-2010, 11:58 AM
Hi
I am currently driving a stepper motor control circuit using a low frequency 555 timer for clocking pulses.
Any opinions on whether guiding could take into account the slow frequency drift from such a clock if this arrangement was used for RA tracking?
Alternatively, I would like to have a more frequency stable variable low frequency clock for this purpose. Any suggestions for a simple circuit perhaps employing PLL techniques and readily available components? I have some electronics expertise.
Cheers Peter

bojan
31-10-2010, 12:12 PM
555 is stable enough, and quite adequate provided it is part of the auto-guider or manually guided loop (corrections being made while looking through eyepiece with reticle).
Of course, you have to account for adjustments errors when designing the circuit - in other words: tuning range - it must be larger than expected drift.
And you must use the best components you can find (metal film resistors and polycarbonate capacitors) to maximise the frequency stability.
However, as a stand-alone oscillator, it will not be adequate because of remaining drift (don't expect less than ~1% over operating temp range). This will translate in star trails on exposures longer than couple of minutes (and depending on focal length of course).

Why do you need variable oscillator in a first place? What is your pulse rate ?

If you need to use stand-alone tracking driver (without auto guider), the much better option than PLL is uP with crystal clock oscillator.
Then, if you need to change the pulse frequency for some reason (different mount?) you simply reprogram it with new required pulse rate.
For auto-guiding, processor is changing the pulse rate according to the state of one or more of it's inputs (this input is provided by autoguider)

PLL is used with DC (servo) motors, feedback can be via optical encoder used as rate detector, and stable oscillator (again, processor) as reference.

pjphilli
01-11-2010, 02:11 PM
Thanks Bojan - I will look into uPs as I really only want one clock frequency. I think it is of the order of a couple of hundred hz but I can measure this as I have a frequency counter.
Could you direct me to a suitable circuit using available components? I see that JayCar has a range of uPs but a search of their data sheets and the net made me none the wiser on how to go about this task.
Cheers Peter

snowyskiesau
01-11-2010, 02:29 PM
If you're looking at PIC microcontollers for this application, here (http://www.piclist.com/techref/microchip/index.htm)'s a good place to start.

bojan
01-11-2010, 02:56 PM
As Geoff suggested, PIC controller is OK

Dontronic has PC boards:
http://www.dontronics-shop.com/pic-p18-icsp-icd-enabled-18-pin-pic-microcontroller-prototype-board.html
http://www.olimex.com/dev/images/PIC/PIC-P18-sch.gif

and Jaycar has processors:
http://www.jaycar.com.au/productResults.asp?keywords=PIC+con troller&keyform=KEYWORD&SUBMIT.x=0&SUBMIT.y=0

However, it may be worth looking into PICGoTo designs as well :
http://sites.google.com/site/picgoto/english-manual

snowyskiesau
01-11-2010, 03:21 PM
You can find some interesting (and useful) PIC stuff at SparkFun (http://www.sparkfun.com/commerce/categories.php?c=9).

Bassnut
01-11-2010, 08:50 PM
Well, its my hobby horse, a PICAXE (http://www.microzed.com.au/) pic chip (with free software) the cheapy 8 pin PIC would do, cant be beat IMO. Easy as . No learning curve, cheap, no fancy programing. In fact using a crystal for accurracy, its a one line command.

pwmout 2,150,150 ‘ set pwm duty

They give you a table to select the right freq in this single command, try that with one line in C :P (and you need a compiler :lol:)

bojan
01-11-2010, 11:02 PM
Wow!
Thank you for this tip, that's useful.. will have a look.

pjphilli
02-11-2010, 01:09 PM
Thanks everyone for these suggestions. I have just had a quick look at the recommended sites and see there is a feast of knowledge there regarding pics. Cheers Peter

pjphilli
02-11-2010, 01:39 PM
Hi Fred
Just had a closer look at the PICAXE site. There is certainly a lot of information there. Could you point me towards the crystal controlled IMO(?) as it seems to be just what I need.
Cheers Peter

Bassnut
02-11-2010, 03:01 PM
Heres (http://www.rev-ed.co.uk/picaxe/) the UK mother-site. The easiest way is to get the prototyping PCB with PIC attached and a socket for downloading progs etc (standard serial RS232). You just replace the resonator with a Crystal (avilable anywhere and cheap), instructions are in datasheets and the free software.

The Picaxe chips come with a basic interpreter built in (thats how they make money, charge a bit extra for the PICs, so the softwares free). Its all insanely well integrated and easy to program/use, but it is interpretted basic, which the purists will laugh at. I dont care, the PICs are sooo fast now, Ive used them in realtime industrial apps to great effect.

If you down load the sotware and poke around the manuals in the help drop down (easy and quick to peruse), youll quickly see how it works.

If you just want a clock, then an 8bit PIC/crystal with a one line pwm setup command is easy, but youll just need to make a serial lead (or buy one from them).

BTW, they have this silly cheap little PCB with an 8 bit PIC and dual output motor driver (and serial download socket !), that would be fine as a stepper controller. There are several one line commands designed just for stepper contol, have a look in the BASIC commands manual.

pjphilli
03-11-2010, 04:15 PM
Thanks Fred - This looks like a lot of fun and I will get onto it!
Cheers Peter

alistairsam
21-02-2011, 11:17 AM
Hi Peter,

Picaxe's are great fun and so easy to use, it'll take you about 1 hour at the most to understand it if you never knew anything about mcu's. its designed so school students can start with mcu's very early on, but its still very powerful.

I've been playing with them for over year and have built a picaxe based stepper controller for RA tracking and slewing. so far, i've gotten away with 2 min exposures and no star trails without autoguiding. main culprit is my gear train which i'm working on.

the X2 picaxes (except 20x2) have pins for optional external resonators or crystals.you can get them from www.microzed.com.au.
they start from $4. the 28X2 would be ideal.

as below, the line for stepping a motor for tracking is very simple, but after experimentation i found pulsout to be a much more accurate method than pwm as pwm can't go too low.

if you have a gear reduction of around 700, to get sidereal rate, you'll need a clock of around 60Hz or so (roughly) at 1/16 microstepping.
you can't get that with pwm on the picaxe, so just use this simple method.

track:
pulsout c.1,100
pauseus 100
goto track

it basically sends 100us pulses on pin c.1, pauses for 100 micro seconds and loops. just change values for the pauseus and you get different frequencies. the pulsout pulsewidth can remain constant.

i've been experimenting with picaxes for generating a trapezoidal acceleration profile as well for stepper motors for high speed slews. that way you can get it to run at the steppers highest rated speed with the picaxe.

and for motor drivers, I've switched to the TI DRV8824.
this supports 1/32 microstepping, 2A rated.
only issue is this comes in the SMD format, so soldering is not easy.
but works really well.

send me a PM if you need more info.

this is a vid of my early prototypes with picaxes for high speed slew, low speed slew, and tracking.
http://www.youtube.com/watch?v=oO68oe5R-Ws

recent positioning test with a DRV8824 driver at 1/32 microstepping.
the picaxe sends 6400 pulses, pauses, toggles the direction bit, sends 6400 pulses and repeats.
i just wanted to test the accuracy of 1/32 microstepping.

http://www.youtube.com/watch?v=53tgJ4pwn1w

one very good thing about the picaxes is the software simulator. you can simulate almost all functions in the free software, it shows you how the pins toggle, what the variable values are and so on. so you learn how to improve your code.

pjphilli
22-02-2011, 05:25 PM
Thanks Alistair - I did look into Picaxes before but must admit I got a bit lost. I have dipped quickly into this further information that you have provided and I see that there is a lot of interesting sites to explore so I will have another go.
Cheers Peter

alistairsam
22-02-2011, 06:11 PM
thats good Peter. the picaxeforum http://www.picaxeforum.co.uk is a great one just like IIS and loads of very helpful people who answer the very basic to advanced questions.
check the active forum or search for the topic you're interested in.
quite a few aussies in there as well.
heaps of project vids on youtube as well.
good luck.