Page 1 of 1

USB-nSTEP Upgrade

PostPosted: Thu Nov 17, 2011 12:31 pm
by Jerry
A few months ago I picked up a USB-nSTEP to control the focus on my system. It allows me to computer control the focus of the telescope. This allows me to automate focusing and deal with the focus shift when using filters of different thicknesses. It also has a temp sensor that will adjust the focus for changes of temperature. Figured at that price it was worth a try. http://www.astrogene1000.com/products/g ... _nstep.htm

Well, for me, it has some issues. First thing I found out is that the thing only drives unipolar steppers. This is not necessarily a bad thing but the severely limits the possible motors out there. Next issue there is no current limiting availablem no short circuit protection. It uses a pic that drives fets though optoisolators. So you have to be very careful with the motor you select or you can toast things real quick.

So, I want to run bi-polar motors off mine. I tried contacting the guy that made it and got no response so I am on my own. There are a few different micro-size stepper drivers out there. I chose the pololu A4988 stepper driver (http://www.pololu.com/catalog/product/1182) It has selectable current limiting, up to 16x microstepping, 2A motor capacity, short circuit and ground protection among other things. This is really what should have been on the board in the first place. At $12 it would have been the equivalent price of the extra opto and fets that are on the board and would have added a lot of features.

The problem is the stepper driver needs step and direction signals to operate. One line get a clock pulse, one pulse moves the motor a step, the direction of the motor depends on the state of the direction line. Logic high moves one direction, low the other. Unipolar motors in full step mode run with four phases 90 degrees out of phase with each other. I used a US Digital/LSI LS7184 Quadrature to step/dir IC to take the signals that would drive the first and third phase mosfets and output step and direction signals to the pololu driver. I drew up a small board that included all of this plus a voltage regulator for the logic as well as a dip switch to control the features of the stepper driver and LS7184. I designed the board to connect to the main board via a socket where the fets were.

I got the boards back from the group order from dorkbotpdx.org and put them together and started debugging. Only one real issue was I swapped the step and direction lines to the driver. A dremel and a couple pieces of wire fixed that.

So here it is, it's a bit bigger but gives me things like current limiting, 8 times the resolution, and short circuit protection. The only down side is there is no real way for me to incorporate putting the motor to sleep when it is idle to save power. I would need a logic signal from the pic to do this but I dont have access to this code.

Image
USB-nSTEP upgrade by macona, on Flickr

Re: USB-nSTEP Upgrade

PostPosted: Thu Nov 17, 2011 7:05 pm
by Doug Coulter
If they didn't set the protect bits on the PIC you can suck out the code into a dissembler. Might be too much work to be worth it. I've never needed current limiting on a stepper myself, that's kind of built in if you use the right supply volts for the motor. Most of my decent stepper collection is unipolar - that's what I run across surplus mostly for the medium voltages. I mostly see bipolar ones used when the volts are pretty low. But, I have to say Jerry, your ability to "remix" tech in big functional blocks just blows me away - I'd never even attempt some of this, I'm too in the details sometimes.

Re: USB-nSTEP Upgrade

PostPosted: Fri Nov 18, 2011 6:08 pm
by Jerry
I wouldn't stand a chance against the raw assembly in there so I got to do it though hardware.

We use tons of stepper motors at work for stop motion. Almost everything that moves from focus motors to the big camera rigs are stepper driven. All of them run bipolar. That's just how most commercial drives come and bipolar motors are generally more powerful for their size. Current limiting is nice because you can run the motor above their rated voltage which helps your top end speed.