CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Pic to drive stepper motor, Or high current relay

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
James Rye
Guest







Pic to drive stepper motor, Or high current relay
PostPosted: Sun May 19, 2002 10:30 pm     Reply with quote

Hello,

I am trying to drive a stepper motor from a pic controller.

When I use it to drive leds it has no problems, it blinks the leds in sequence no problems.

What I need is to know how to use the 5 volts from the pic and connect it up to a 24 volt power supply so that my pic does not drop out on me.

All response will be appreciated.

Thank you

James
___________________________
This message was ported from CCS's old forum
Original Post ID: 4445
Bieli
Guest







Re: Pic to drive stepper motor, Or high current relay
PostPosted: Mon May 20, 2002 3:00 am     Reply with quote

Maby you should try to use L298 as power level. It is 2A double H-bridge (up to 30V). I made it and it work fine.
___________________________
This message was ported from CCS's old forum
Original Post ID: 4447
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

Re: Pic to drive stepper motor, Or high current relay
PostPosted: Mon May 20, 2002 6:30 am     Reply with quote

Use something like a UDN2987A

Mark

:=Hello,
:=
:=I am trying to drive a stepper motor from a pic controller.
:=
:=When I use it to drive leds it has no problems, it blinks the leds in sequence no problems.
:=
:=What I need is to know how to use the 5 volts from the pic and connect it up to a 24 volt power supply so that my pic does not drop out on me.
:=
:=All response will be appreciated.
:=
:=Thank you
:=
:=James
___________________________
This message was ported from CCS's old forum
Original Post ID: 4451
L.Hunter
Guest







Re: Pic to drive stepper motor, Or high current relay
PostPosted: Wed May 22, 2002 12:37 pm     Reply with quote

:=Hello,
:=
:=I am trying to drive a stepper motor from a pic controller.
:=
:=When I use it to drive leds it has no problems, it blinks the leds in sequence no problems.
:=
:=What I need is to know how to use the 5 volts from the pic and connect it up to a 24 volt power supply so that my pic does not drop out on me.
:=
:=All response will be appreciated.
:=
:=Thank you
:=
:=James


I had use two method:
1. use UCN5804, so you just need two output from PIC, one control direction the other send the pulse.

2. use four output and connect to four IRL3303 MOSFET. PIC output connect to Pin G via a 10 ohms resistor and Pin D connect to one of the coil,(the other end of the coil connet to your 24V supply).and Pin S connect to ground. the program is in the PICC example. (best to have a diode IN4148 connect across your coil.
Hope this help
___________________________
This message was ported from CCS's old forum
Original Post ID: 4516
Dmitry



Joined: 17 Feb 2005
Posts: 1

View user's profile Send private message Send e-mail

PostPosted: Sun Mar 13, 2005 6:53 pm     Reply with quote

Please answere can I use to drive stepper motor STA471A - this module
drive step motor in my old printer Lexmark. How can I drive with this device from PIC?
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Sun Mar 13, 2005 11:06 pm     Reply with quote

Go here http://www.sanken-ele.co.jp/en/ and search for STA471A and you will find the datasheet which shows the pin out.

BTW, there is more than one kind of stepper motor and they require different means to drive them. Not to mention the voltages and current requirement for a particular motor.
Ttelmah
Guest







PostPosted: Mon Mar 14, 2005 3:31 am     Reply with quote

Others have given a number of answers.
The first thing to understand is that there are two fundamentally different 'stepper' structures. The first, (unipolar), just has a number of coils and a common connection. Movement is achieved normally by applying power to _pairs_ of the coils in turn, and then shifting this applied 'pair' round the cycle of coils. This is the so called 'full step' excitation. So if the coils are 1,2,3,4, the cycle would be:
1+2
2+3
3+4
4+1
This gives the best torque behaviour from this type of motor. However you then have the second problem that when you apply power to a coil, this is a very inductive load, and it takes a significant time for the current to rise, and the magnetic field to build. This limits the step rate. The rate at which the current rises, is limited by the 'end point' voltage of the drive system. Hence the normal way to get good speed and torque without overloading the motor, is to use a much higher voltage than it's 'rating' (which really just specifies the voltage that can be applied continuously without the motor overheating), and then limit the maximum current to prevent overheating when not moving. Typically up to 5* overvoltage is used. Hence on printers, it is common to find '5v' stepper motors being driven off 24v supplies. The 'driver', then has to provide the functions of level shifting you have identified, plus possibly current limiting, and clamping the tendency to overshoot when the voltage is removed. If you are working a motor at it's rated voltage, a very simple driver IC can be used, like the ULN2064. This can still be used for an 'overvoltage' motor, by adding dropper resistors to limit the current. However for the most efficient drive, a 'PWM' current limited driver is needed.
I'd suspect if your motor came from a 'printer', it may well have originally been overdriven in this way, so you will need to use this type of drive, if you want to emulate the original behaviour.
The second type of motor, is the so caled 'bipolar' design. This typically has no common connection, but just a pair of pins for each coil, and power has to be applied first in one direction, and then the other across the coil. This requires a more complex 'H-bridge' driver for each coil. These motors have the advantage of giving greater torque for a given size. A typical driver IC for these, would be the L298.
You can then for a loss off torque, remove the power from one coil in each pair (half step mode), or modulate the effective current delivered to each coil in a psuedo sinusoidal pattern, to give even smaller movement anges (microstep mode). The latter requires relatively complex drive control, and on normal motors will not give precise angular control (there are special steppers with more accurately made coils and armatures, designed to operate in this mode).
Driving a stepper in it's most basic 'full step' mode, at low speeds, with only it's basic rated voltage applied, is relatively easy. You can use a driver IC, or just four power FETs, with added clamp diodes (do not rely on the internal diodes in the FET...). However a really good driver that gives both high performance, and accuracy from a stepper is a lot more work...
I'd suggest you go the the SGS-Thompson site (a company who make a lot of stepper driver IC's), and look through their 'application notes'. There is one there called 'stepper motor driving', which is a really good description of the modes, and the sort of drivers needed. There are also a number of driver IC's supporting the various modes.

Best Wishes
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group