Controlling a Stepper Motor.

C

calcasmy

Guest
Greetings,

To start with, I am not even a beginner and am planning to learn... I a
trying to control a stepper motor. This is where I got so far:



1. Stepper Motor connected to power supply (12V) with darlington pair.
2. Converted USB serial signals to parallel signals for connecting to th
darlington pair.
3. I wanted to use a microcontroller, but didn't want to complicate i
(next level). I have worked as a C# programmer earlier (So I do have som
coding experience).

My Question:

1. How do I generate the Signals and send them to USB to Paralle
converter.
2. What language do I use. *(I am familiar with C, Can I use C or can I us
C# itself).
3. Is this want is called Assembly level programming. (or is assembly leve
programming used for controlling Microcontrollers only)?

Any help is much appreciated.

Thanks & Regards
Nick





---------------------------------------
Posted through http://www.Electronics-Related.com
 
On 7/9/2012 4:26 PM, calcasmy wrote:
Greetings,

To start with, I am not even a beginner and am planning to learn... I am
trying to control a stepper motor. This is where I got so far:



1. Stepper Motor connected to power supply (12V) with darlington pair.
2. Converted USB serial signals to parallel signals for connecting to the
darlington pair.
3. I wanted to use a microcontroller, but didn't want to complicate it
(next level). I have worked as a C# programmer earlier (So I do have some
coding experience).

My Question:

1. How do I generate the Signals and send them to USB to Parallel
converter.
2. What language do I use. *(I am familiar with C, Can I use C or can I use
C# itself).
3. Is this want is called Assembly level programming. (or is assembly level
programming used for controlling Microcontrollers only)?

Any help is much appreciated.

Thanks & Regards
Nick





---------------------------------------
Posted through http://www.Electronics-Related.com
Maybe this will get you started:
http://www.daniweb.com/software-development/cpp/threads/107651/how-to-control-a-stepper-motor-using-a-microcontroller-programmed-at-c

Tom
 
On Mon, 09 Jul 2012 16:56:37 -0400, Tom Biasi <tombiasi@optonline.net>
wrote:

On 7/9/2012 4:26 PM, calcasmy wrote:
Greetings,

To start with, I am not even a beginner and am planning to learn... I am
trying to control a stepper motor. This is where I got so far:



1. Stepper Motor connected to power supply (12V) with darlington pair.
2. Converted USB serial signals to parallel signals for connecting to the
darlington pair.
3. I wanted to use a microcontroller, but didn't want to complicate it
(next level). I have worked as a C# programmer earlier (So I do have some
coding experience).

My Question:

1. How do I generate the Signals and send them to USB to Parallel
converter.
2. What language do I use. *(I am familiar with C, Can I use C or can I use
C# itself).
3. Is this want is called Assembly level programming. (or is assembly level
programming used for controlling Microcontrollers only)?

Any help is much appreciated.

Thanks & Regards
Nick





---------------------------------------
Posted through http://www.Electronics-Related.com
Maybe this will get you started:
http://www.daniweb.com/software-development/cpp/threads/107651/how-to-control-a-stepper-motor-using-a-microcontroller-programmed-at-c

Tom
Lots of background on using steppers here:
http://www.cs.uiowa.edu/~jones/step/

and here:
http://www.taomc.com/bits2bots/index.htm

and here:
http://www.doc.ic.ac.uk/~ih/doc/stepper/
 
On 12-07-09 02:26 PM, calcasmy wrote:
Greetings,

To start with, I am not even a beginner and am planning to learn... I am
trying to control a stepper motor. This is where I got so far:



1. Stepper Motor connected to power supply (12V) with darlington pair.
2. Converted USB serial signals to parallel signals for connecting to the
darlington pair.
3. I wanted to use a microcontroller, but didn't want to complicate it
(next level). I have worked as a C# programmer earlier (So I do have some
coding experience).

My Question:

1. How do I generate the Signals and send them to USB to Parallel
converter.
2. What language do I use. *(I am familiar with C, Can I use C or can I use
C# itself).
3. Is this want is called Assembly level programming. (or is assembly level
programming used for controlling Microcontrollers only)?

Any help is much appreciated.

The very first step to take is this:


http://homepage.cs.uiowa.edu/~jones/step/


Read sections one through seven and you are in a much better position to
do research. The good doctor's paper will save you a lot of misery.

There WILL be a quiz.

mike
 
On 7/9/2012 1:26 PM, calcasmy wrote:
Greetings,

To start with, I am not even a beginner and am planning to learn... I am
trying to control a stepper motor. This is where I got so far:



1. Stepper Motor connected to power supply (12V) with darlington pair.
2. Converted USB serial signals to parallel signals for connecting to the
darlington pair.
3. I wanted to use a microcontroller, but didn't want to complicate it
(next level). I have worked as a C# programmer earlier (So I do have some
coding experience).

My Question:

1. How do I generate the Signals and send them to USB to Parallel
converter.
First off stepper motors are usually two phase motors that are driven in
quadrature, meaning 90 deg signals. You will likely need four
transistors to drive them in pairs of two. You need to get the data
sheet on the specific motor you have plus read some of the references
posted by others to arrive at an actual circuit and how to drive it.


2. What language do I use. *(I am familiar with C, Can I use C or can I use
C# itself).
You can use any language you are familiar with and can find a compiler
for the specific processor you intend to use. Many people work in C.

3. Is this want is called Assembly level programming. (or is assembly level
programming used for controlling Microcontrollers only)?
C is NOT assembly language. Assembly language is the lowest level
language used in microcontrollers It is specific to the type of
processor. Assembly language works one operation at a time and directly
controls arithmetic, logic functions, I/O ports and memory access. It is
usually easy to learn and become familiar with. Because it works at the
lowest level it is more obvious what is going on and easier to trouble
shoot especially for a beginner.

For this application, you'd likely set up an output register with four
bits, A,B,C,D. that drive the driver transistors. Each step is a change
of state thus: (1) Ahi, Blo, Clo, Dhi; (2) Ahi, Blo, Chi, Dlo; (3) Alo,
Bhi, Chi, Dlo; (4) Alo, Bhi, Clo, Dhi, then repeat. If you look at this,
it's two square waves 90 deg out of phase. Each of the four states is
one step of the motor's shaft.

It's trivial to generate a clock at the required period then change the
state of the register in the above pattern for each step. This can be
done at any rate up to some maximum specified by the motor. Stopping the
pattern holds the motor at that step. The motor is reversed by shifting
the A B or the C D pattern by 180 degrees; i,e., inverting it. You can
e-mail me at montassocatyahoodotcom.

Good luck

Any help is much appreciated.

Thanks & Regards
Nick





---------------------------------------
Posted through http://www.Electronics-Related.com
 

Welcome to EDABoard.com

Sponsor

Back
Top