Struggling to drive a stepper motor

SgtWookie

Joined Jul 17, 2007
22,221
Well, anyway - here's the simulation, using both 9.65v with your 5R6 resistors, and 12v with 8 Ohm resistors.

Note that in the 12v version, the current through the inductor increases more quickly than the 9.65 version. This means that the motor can step faster.

Red traces are power dissipation in the resistor. Note that average power dissipation (not shown) is pretty low; with the 9.65v version it's about 1.47W at that step rate.

Don't worry that the model isn't a ULN2064; I didn't have one available - it's an approximation using a similarly-rated single Darlington, and a reasonable estimation for D1 of what the internal diode would be.

This simulation is representative of a 2,000 steps/sec rate.
 

Attachments

Thread Starter

Reggie

Joined May 8, 2010
16
I was thinking in the range of around 400 steps or greater per second when it needs to move large distances, If I'm using the telescope visually I will swap eyepieces, which require refocussing through a large range. with absolute positioning I will be able to program the different positions into the atmega chip and recall them from a laptop.

When its hunting for focus its likely to be slower due to needing to process image data between steps or groups of steps as it iterates through the hunt.

My current stepper gives me around 80K steps per full revolution of the 1:1 focus knob,about 1/4 micron movement of the focuser drawtube per step, overkill. I'm looking at having around 4K steps per revolution with the new astrosyn stepper. so I will need to experiment with speeds.

I really appreciate the help Sgt. Wookie, retched :)
 

retched

Joined Dec 5, 2009
5,208
Just let us know where the asteroid will hit. ;)

Also, the slower the better. Steppers need to ramp up and down. So the faster you go, the longer it will take to slow, and you may overshoot you focus.

1/4 micron is awful small. I suppose you have a huge focal range to choose from.

What kind of aperture are you using on this thing?
 

Thread Starter

Reggie

Joined May 8, 2010
16
66mm aperture F5.9, I usually use 2 telescopes and 2 cameras, 1 dslr and a 'guidecam' which is essentially a high quality/sensitivity webcam sized sensor, this is used with 1 telescope to lock onto a star, once it has a star locked it then keeps that star centred by 'nudging' the scope via stepper motors whilst also tracking the path of the star across the night sky.

this allows me to take long exposure images with a canon 450D DSLR camera of objects in space, stars, star clusters, nebulae, galaxies etc.

You usually take a number of images of a single target, say, 50x7 minutes of the same shot and then combine those images using software, this process when done correctly brings out more data than a single image and is almost the same as taking a single 350minute image, this gives a much much more detailed image. It takes the light a very very long time to get here so its very weak.

Heres a few images for you:
My main imaging telescope
http://i246.photobucket.com/albums/gg85/SkyAndStuff/wo66Bracket2.jpg

I think this was around 50 images 'stacked' into 1 image of the north america and pelican nebulae, probably around 50x5minute exposures:
http://i246.photobucket.com/albums/gg85/SkyAndStuff/na2.jpg

By contrast a single image will show you the star field but a lot duller and less stars and you will barely see any of the pink cloud at all. It works by filtering out noise, data (light) that is supposed to be there is reinforced by being the same in each image, so it is summed and gives much greater detail in the final image. using these techniques amatueurs can produce some very stunning professional hubble style images, although I have a way to go yet before I get that good.

some more pics:
Andromeda Galaxy through the same telescope
http://i246.photobucket.com/albums/gg85/SkyAndStuff/PB_M31.jpg

Its actually 3 galaxies in that image, 87x30seconds worth of exposures :)

The pleides Nebula, aka the seven sisters aka subaru:
http://i246.photobucket.com/albums/gg85/SkyAndStuff/NEW.jpg

43x1min + 5x2min worth of images.

The bubble nebula with a nice star cluster next to it:
http://i246.photobucket.com/albums/gg85/SkyAndStuff/Bub52_crop_dbe.jpg

this was quite a short stack, 6x4minutes but really pleased with the results on that one.

I should explain also that the dslr is connected to its own telescope and the whole kit and kaboodle is controlled via PC on a single mount that has serial controllable high quality stepper motors/gears that help it to track stars at a constant rate of 1 revolution per DAY :)
 

SgtWookie

Joined Jul 17, 2007
22,221
Here's a modification to the above circuit; R3, a 47 Ohm resistor was added. This helps to decay the current flow through the stepper motor much more quickly, which will help to achieve a higher step rate.

In the previous simulation, the vertical scales were automatic. In this version, I've manually set the vertical scales so you can more easily compare their performance.
 

Attachments

Thread Starter

Reggie

Joined May 8, 2010
16
Thats Awesome Sgt.Wookie :) If I'm reading that correctly thats achieving a step rate of 5000 per second?

Way faster than I need right now I think, although I've been having mad thoughts that I mght be able to do some fancy adaptive focusing if imaging planets/ the moon, so it might be very useful being that responsive.

Depending on the atmospheric conditions you get varying degrees of a phenomena called microlensing which when seen on video or with the naked eye looks like the image is shimmering. You can image the moon and planets using a simple webcam which makes things a lot easier as you work at the fastest frame rate possible as there is usually a lot of sun light reflecting off them and they're relatively close compared to nebula/stars etc.

I forgot to ask, what power rating is the 47ohm resistor?
 
Last edited:

SgtWookie

Joined Jul 17, 2007
22,221
Yes, that's 5,000 steps/sec. The current flow will be about 522mA average, or around 600mA RMS per phase if you are single-stepping (only one phase on at a time). Your torque will be reduced quite a bit, but since it's geared so low that may not be a problem.

If you are going to have more than a single phase on at a time (like half-stepping, normal stepping) then you will need one 5r6 resistor per phase instead of one supplying the current for both center taps.
 

Thread Starter

Reggie

Joined May 8, 2010
16
full step will be fine but I can always experiment, I wasn't going to pair the centre taps but I'm open to experimentation. I'm really grateful that you showed me the 2064 ICs, I can knock up a test board using stripboard without having to commit myself to etching a board until I'm happy.

I'll have a go at knocking up a schematic/board in eagle and post it when I'm done, I'd appreciate you taking a look at it just in case I don't get it quite right.

I couldn't see where you'd answered, so I'll ask again, what power rating was the 47ohm resistor? I think I've got some schottky diodes, from your previous spice models I probably won't need the resistor/schottky to start off with but might add it at a different date, is it a standard 1/4w resistor?

As a side note, I believe the stepper motors in my telescope mount must be be using wave drive, which is incredibly smooth, so I'd like to head towards that kind of setup eventually.
 

Thread Starter

Reggie

Joined May 8, 2010
16
Ok, here's a quick schematic for just the uln2064/stepper circuit, I didn't bother labeling the stepper winding pins, as all of that will be dealt with in software.
 

Attachments

SgtWookie

Joined Jul 17, 2007
22,221
full step will be fine but I can always experiment, I wasn't going to pair the centre taps but I'm open to experimentation. I'm really grateful that you showed me the 2064 ICs, I can knock up a test board using stripboard without having to commit myself to etching a board until I'm happy.
Stripboard is OK, breadboarding not good.

I'll have a go at knocking up a schematic/board in eagle and post it when I'm done, I'd appreciate you taking a look at it just in case I don't get it quite right.
I have Eagle 4.16r2, so can't read .sch/.brd files created with anything newer.

I couldn't see where you'd answered, so I'll ask again, what power rating was the 47ohm resistor?
Sorry. Use a 2W resistor. It must be non-inductive. Wire-wound is out.

I think I've got some Schottky diodes, from your previous spice models I probably won't need the resistor/schottky to start off with but might add it at a different date, is it a standard 1/4w resistor?
The diodes are in the ULN4064. Use the resistors from the COMMON pins to +V. They are not optional. You either must connect the COMMON pins directly to +V or connect them via resistors. If they are left unconnected, you will burn up the ULN4064.

As a side note, I believe the stepper motors in my telescope mount must be be using wave drive, which is incredibly smooth, so I'd like to head towards that kind of setup eventually.
You could start by using half-stepping.
0001
0011
0010
0110
0100
1100
1000
1001
... etc.
And then work PWMing into the grand scheme of things.

If you want to use anything other than single step (1 phase at a time) then you will need one 5.6 Ohm resistor per connection to the ULN2064. rather than using one resistor per motor.

Single step:
0001
0010
0100
1000

Normal step:
0011
0110
1100
1001
 

SgtWookie

Joined Jul 17, 2007
22,221
also forgot to ask, why is the current flow reduced so much?
In the simulation, I'm just showing a single phase operating at a 5,000 step/second rate. With the low voltage, it takes awhile for the current to start flowing. If you want to see what it looks like at a slower step rate (say, 1,000 steps/second) that's easy enough to do. [eta] See the attached.

The important thing to note between the two simulations with and without the 47 Ohm resistor is the difference between the ON current and OFF current is much greater when the resistor is used. This is because the resistor helps a great deal to stop the current flow in the motor quickly vs just connecting the common to +V.
 

Attachments

Last edited:

SgtWookie

Joined Jul 17, 2007
22,221
Stripboarding will require you to use the heatsink on top of the IC as shown in the datasheet. When you go to make a circuit board, be sure to use the layout shown in the datasheet for the copper pour area around the central GND pins.

The ULN2064 will dissipate ~1W per output that is sinking current. 1 square inch of copper pour area will dissipate 1W with 20°C temperature rise.

[eta]
It will also dissipate power when snubbing the reverse-EMF. The 47 Ohm resistors will take the brunt of that power dissipation, which is another good reason to use them. If you are using a single 47 Ohm resistor per common terminal, you can use 1/2 Watt resistors.
 
Last edited:

Thread Starter

Reggie

Joined May 8, 2010
16
Definitely wasn't going to use breadboard for this project :)

Do I *have* to do the copper pour area on the final board or can I go with leaving a heatsink on it? I've got a few devices I can pull heatsinks from and cobble something reasonable together.

Heres another .png of a revised schematic, does that look ok?
 

Attachments

retched

Joined Dec 5, 2009
5,208
If you do not use the copper pour method (Which you should, it is easier than not and saves etchant) you should connect the ground pins to the heat sink as well.
 

Thread Starter

Reggie

Joined May 8, 2010
16
I guess it depends on your method of getting a PCB made, I'm going to be using some direct to PCB ink, that uses a standard printer (that can print to CDs) to print my circuit directly onto the copper fr4 board, the ink is relatively expensive, and takes a couple of weeks for shipping from the usa, much easier/cheaper for me to get etching flluid. I don't mind etching the copper if it saves that ink, although I guess I could get an etch resist pen and draw the 'pours' in. I'm also restricted by board size, although these are single sided so I could use the whole of the top side as a gnd/pour?
 

SgtWookie

Joined Jul 17, 2007
22,221
You can use a variety of things for etchant resist. I've found that the red Staedtler (tm) Lumocolor (tm) pens for overhead projectors work really well. Markers for CD's work fairly well.

You could also just get some flat copper stock and cut it into a "butterfly" shape and use that. Copper is a much better conductor of heat than aluminum; aluminum is about 58% or so as efficient as copper.
 
Top