Stepper Motor Position Control

Our weekly LIVE video chat. Every Wednesday at 8pm ET!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
Hungryman
 
Posts: 61
Joined: Fri Oct 03, 2014 1:16 pm

Stepper Motor Position Control

Post by Hungryman »

Hi Everyone

I'm working on a project that I want to accurately control the position of a stepper motor. The stepper motor is connected to a pulley which is connected to a second pulley, pulling a camera on a track. The only issue is that I want the motor to be able to stop at either end and I am completely clueless on how to do this without installing sensors on either end (which I would do, but I can't because I do not have enough pins in the long run). I have tried google but I am probably searching for the wrong phrases or keywords etc. If someone could tell me how to do what I'm trying to do ... or point me in the right direction... or even an alternative to driving this thing... I would really appreciate it.

User avatar
adafruit_support_bill
 
Posts: 88141
Joined: Sat Feb 07, 2009 10:11 am

Re: Stepper Motor Position Control

Post by adafruit_support_bill »

The only issue is that I want the motor to be able to stop at either end and I am completely clueless on how to do this without installing sensors on either end
You either need an absolute position rotary encoder, or some way to establish the 'home' position of the motor. Typically this is done with either a limit switch or an optical slot detector.

User avatar
Hungryman
 
Posts: 61
Joined: Fri Oct 03, 2014 1:16 pm

Re: Stepper Motor Position Control

Post by Hungryman »

Bill, you are the best, thank you. I hope to be sharing a finished product soon. The rotary encoder sounds nice, but I think I'll have to go with a limiting switch

User avatar
adafruit_support_bill
 
Posts: 88141
Joined: Sat Feb 07, 2009 10:11 am

Re: Stepper Motor Position Control

Post by adafruit_support_bill »

Absolute position encoders are pretty expensive. Most projects do opt for the limit switch or slot sensor. That is usually plenty as long as your motor doesn't get overloaded and start skipping steps.

User avatar
Hungryman
 
Posts: 61
Joined: Fri Oct 03, 2014 1:16 pm

Re: Stepper Motor Position Control

Post by Hungryman »

I definitely saw some pricey ones online. I'll show you what I was getting at

http://youtu.be/RKb9PT3TM08?t=9m56s

I'm mostly interested in making huge long moving time lapses, but when I told my friend about the project, he said I should look into "memory movement". Now he's definitely more pro than I am, its not something I would have to use ever, but I figured I'd look into it.

User avatar
Sxandy
 
Posts: 1
Joined: Mon Oct 27, 2014 1:31 am

Re: Stepper Motor Position Control

Post by Sxandy »

Im young and want to grow up to be a robotics engeneer. Anyway I know the basics of soldering, but is there a indeeped tutrail I can use?



Scarlett

User avatar
adafruit_support_bill
 
Posts: 88141
Joined: Sat Feb 07, 2009 10:11 am

Re: Stepper Motor Position Control

Post by adafruit_support_bill »

@Scarlett - There are lots of robotics related tutorials in the Learning System.
https://learn.adafruit.com/search?q=robotics

User avatar
Hungryman
 
Posts: 61
Joined: Fri Oct 03, 2014 1:16 pm

Re: Stepper Motor Position Control

Post by Hungryman »

Hi Bill!

So I went on a shopping spree and bought a bunch of parts for my invention - I actually got a rotary encoder on ebay for $20 bucks - problem is - there is no data sheet anywhere online. I contacted the manufacturer and they told me it is not a consumer item and to contact my manager for info..... I talked to the ebay seller and got this response
There is no manual on the internet for it at all. I have looked very hard for it but the model is discontinued and it doesn't exist anymore. The new models that replaced it use the same pinout though so this is what I used for reference.Here is the datasheet link: http://www.koyoele.co.jp/english/produc ... TRD_NA.pdf Please note! The datasheet is NOT for the TRD-3A but the colour of the wires is basically the same on page 2 (terminal assignment), some of the specifications will be the same too. It uses an open collector NPN output (unless you have some of the PNP model).I have also made a picture for you displaying how it is to be connected with NPN open collector output as with my Koyo TRD-3A1024-2610. Let me know if this is good enough.It is very easy to connect up. All you need is a resistor connected between each of the data pins and a voltage supply, depending on the output voltage swing you want. Measure the voltage coming out between the resistor and wire to encoder and it will change when you turn it (between Vdd and 0V).Hope this helps you
I have no idea how this device works, and there are 12 pins on the connector, I was hoping you might give me an explanation of how it works and how to use it.... google has been giving me convoluted answers. Thanks!!

User avatar
adafruit_support_bill
 
Posts: 88141
Joined: Sat Feb 07, 2009 10:11 am

Re: Stepper Motor Position Control

Post by adafruit_support_bill »

Not sure. The pdf document describes a digital interface, but the seller's description sounds like like he's getting an analog output.

User avatar
Hungryman
 
Posts: 61
Joined: Fri Oct 03, 2014 1:16 pm

Re: Stepper Motor Position Control

Post by Hungryman »

I will try and get more info, and do some testing..

User avatar
Hungryman
 
Posts: 61
Joined: Fri Oct 03, 2014 1:16 pm

Re: Stepper Motor Position Control

Post by Hungryman »

Oh - I was also sent this photo, from the ebay seller -



Does this mean I'll need to use 10 pins on my Arduino Uno ?! That's a lot of real estate
Attachments
pin out.JPG
pin out.JPG (20.18 KiB) Viewed 1771 times

User avatar
Hungryman
 
Posts: 61
Joined: Fri Oct 03, 2014 1:16 pm

Re: Stepper Motor Position Control

Post by Hungryman »

I have also ascertained that this is pretty much exactly how mine will work

https://www.youtube.com/watch?v=sghY7jmRpxw

There must be a way to do this without using 10 pins though... no?

User avatar
adafruit_support_bill
 
Posts: 88141
Joined: Sat Feb 07, 2009 10:11 am

Re: Stepper Motor Position Control

Post by adafruit_support_bill »

You can use an IO port expander: https://www.adafruit.com/products/732

User avatar
Hungryman
 
Posts: 61
Joined: Fri Oct 03, 2014 1:16 pm

Re: Stepper Motor Position Control

Post by Hungryman »

Thanks Bill,

While trying to test / figure out the absolute rotary encoder I've run into some kind of issue. On that schematic I posted earlier - there is a Vdd and a 24v in... Do you know if these things need their own power supply? I usually use 5-9v as an input - 24v seems really high!

User avatar
Hungryman
 
Posts: 61
Joined: Fri Oct 03, 2014 1:16 pm

Re: Stepper Motor Position Control

Post by Hungryman »

I used this as a template

https://m.youtube.com/watch?v=sghY7jmRpxw

But my LEDs are either all on or all off, but only when both the Vdd and 24v rails are connected... Position doesnt affect it

Locked
Please be positive and constructive with your questions and comments.

Return to “Ask an Engineer! VIDEO CHAT (closed)”