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 CCS Technical Support

Bipolar Stepper motor
Goto page 1, 2  Next
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
MAKInnovation



Joined: 16 Nov 2010
Posts: 61

View user's profile Send private message

Bipolar Stepper motor
PostPosted: Sat Jan 01, 2011 6:50 am     Reply with quote

I have derived a bi-polar stepper motor with full step and half step techniques successfully.
It is an easy part of driving a stepper motor but the difficult one is to determine the position of stepper motor.
....... so i really need to know that How it can be done?
Ttelmah



Joined: 11 Mar 2010
Posts: 19538

View user's profile Send private message

PostPosted: Sat Jan 01, 2011 7:08 am     Reply with quote

Normally, stepper motors are controlled as 'open loop' devices. You design the hardware, so the motor is not overloaded, then send your train of movement pulses to it, and 'count steps'. You know the count, so you know where the motor 'should be'. You can even store the count when power is removed to 'simulate' a system that knows it's position.
To make a stepper fully 'closed loop', would involve adding something like an optical shaft encoder, and reading the position using this. However this is a rare approach, since once you add the complexity of an encoder, you are well past halfway to the extra costs of building a servo instead, and with this, something like a BDLC motor can be used instead of the stepper to give higher performance.
One slightly more common approach is to have limit switches on a stepper based design, so you know where 'home' is, and can reset the counter at this point, to give a better starting point.
So, normally you just count pulses.


Best Wishes
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Sat Jan 01, 2011 8:28 am     Reply with quote

For example a desktop ink jet printer usually uses steppers to position the print head and paper.

Every time a new sheet of paper arrives, a switch senses the edge of the paper. The printer counts stepper pulses from that edge.

When you turn on the printer the print head always goes to one side where it hits a switch to let the printer know it is home. The printer counts stepper pulses from there.
_________________
The search for better is endless. Instead simply find very good and get the job done.
MAKInnovation



Joined: 16 Nov 2010
Posts: 61

View user's profile Send private message

PostPosted: Sun Jan 02, 2011 9:15 am     Reply with quote

But my case is bit difficult.
here stepper is used as valve to open and close the gas pipe.
I can not find when shaft attached to stepper hit to either end.
I am unable to stop the pulse train even the shaft is at home position only because I don't know about the position of shaft attached to stepper.

*Either End = home position(completely open) Or extreme position (Completely closed)
temtronic



Joined: 01 Jul 2010
Posts: 9243
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sun Jan 02, 2011 9:59 am     Reply with quote

You could monitor the gas on either side of the valve. Simpe logic, if both pressures are equal valve is closed...
You could monitor the 'stall curent' of the motor. Again simple logic, if stall current exceeds a preset, known amount, you've stalled the motor. Ie, it's trying to go past one end or the other. What direction you're going is already known, hence fully open or closed.
Simplest of course has already been offered. Two micro limit switches.
MAKInnovation



Joined: 16 Nov 2010
Posts: 61

View user's profile Send private message

PostPosted: Sun Jan 02, 2011 12:43 pm     Reply with quote

I checked with the voltage and waveform.
It can not be possible to figure it out with the voltage variation at middle or at the ends. I have already checked with it.
I observed the very very slight change in waveform shape. Which obviously can not distinguished with any logic.

I will check with the stall current method tomorrow in my office and then post my working.
Ttelmah



Joined: 11 Mar 2010
Posts: 19538

View user's profile Send private message

PostPosted: Sun Jan 02, 2011 2:07 pm     Reply with quote

Really I have to say, 'why use a stepper'. Seems to be the wrong tool for the job. Just use a simple geared DC motor, and when the current rises you have reached the limits....
Faster, smaller, simpler.

Best Wishes
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Sun Jan 02, 2011 4:23 pm     Reply with quote

Quote:
I observed the very very slight change in waveform shape. Which obviously can not distinguished with any logic.

Yes, it would require sampling of the current or voltage waveform, depending on your drive method. I never heard of a step motor drive implementing a similar technique and I wonder if can be reliable at all. So I think Ttelmah is right.
Quote:
and when the current rises you have reached the limits....
Unfortunately, it's not necessarily safe for high gear ratios. There's a risk to break the gear before detecting a stall.
MAKInnovation



Joined: 16 Nov 2010
Posts: 61

View user's profile Send private message

PostPosted: Sun Jan 02, 2011 11:21 pm     Reply with quote

Quote:

Really I have to say, 'why use a stepper'. Seems to be the wrong tool for the job. Just use a simple geared DC motor, and when the current rises you have reached the limits....
Faster, smaller, simpler.

It is available and was given to me for my project.
Quote:

Unfortunately, it's not necessarily safe for high gear ratios. There's a risk to break the gear before detecting a stall.

so the stall current measurement is risky. and the idea is not safe.
gpsmikey



Joined: 16 Nov 2010
Posts: 588
Location: Kirkland, WA

View user's profile Send private message

PostPosted: Sun Jan 02, 2011 11:32 pm     Reply with quote

The limit switch is the best idea (or an optical isolator or even a hall effect sensor with a magnet - it depends if the valve control is multi-turn or if it is more of the 1/4 turn type. The 1/4 turn type would be the easiest to work with using at least 1 limit switch (or limit detector of some sort). If it is a multi-turn valve type, it is going to be a bit more difficult.

mikey
_________________
mikey
-- you can't have too many gadgets or too much disk space !
old engineering saying: 1+1 = 3 for sufficiently large values of 1 or small values of 3
MAKInnovation



Joined: 16 Nov 2010
Posts: 61

View user's profile Send private message

PostPosted: Sun Jan 02, 2011 11:39 pm     Reply with quote

It is a multi turn valve. & take many steps to reach to either side.
I am actually curious if there is any idea for position detection without tampering with hardware.
gpsmikey



Joined: 16 Nov 2010
Posts: 588
Location: Kirkland, WA

View user's profile Send private message

PostPosted: Mon Jan 03, 2011 1:06 am     Reply with quote

For a multi-turn valve and not modifying the existing hardware, either the load current idea or my preference would be an optical interrupter on the shaft of the stepper motor to allow you to detect motion. When you step and it does not advance, you are either at a limit or it is stuck. Not sure just how you determine the difference on that (stuck vs limit). The optical interrupter on the shaft would give you feedback though so you could tell if the motor was actually turning.

mikey
_________________
mikey
-- you can't have too many gadgets or too much disk space !
old engineering saying: 1+1 = 3 for sufficiently large values of 1 or small values of 3
MAKInnovation



Joined: 16 Nov 2010
Posts: 61

View user's profile Send private message

PostPosted: Mon Jan 03, 2011 1:31 am     Reply with quote

how can we install optical interrupter with the shaft and how it will work.
Confused and need some more detail.
Ttelmah



Joined: 11 Mar 2010
Posts: 19538

View user's profile Send private message

PostPosted: Mon Jan 03, 2011 3:33 am     Reply with quote

MAKInnovation wrote:
Quote:

Really I have to say, 'why use a stepper'. Seems to be the wrong tool for the job. Just use a simple geared DC motor, and when the current rises you have reached the limits....
Faster, smaller, simpler.

It is available and was given to me for my project.
Quote:

Unfortunately, it's not necessarily safe for high gear ratios. There's a risk to break the gear before detecting a stall.

so the stall current measurement is risky. and the idea is not safe.


That applies to _any_ approach, _including_ sensing if the stepper has stopped moving, if the torque the motor 'assembly' can produce is more than the valve can comfortably handle.....

Yes, you can detect if the stepper is moving with some form of interrupter. A simple gear attached to the shaft somewhere, and a magnetic sensor, is probably the simplest/cheapest. You get a waveform out of the sensor as the motor moves. Feed the waveform to a CTC, and if the count stops changing, stop the motor. The same risk exists though of damaging the valve, as with the current limit approach. I'd favour magnetic over opto, since less likely to go wrong if dirt is present.

Best Approach, provided the valve can take the full torque of the motor for a short while, is probably to 'know' roughly how many steps _should_ be involved, and if the system stops moving before (say) 99% of this number is reached, then raise an alarm, as the valve may have stuck. If the number goes beyond (say) 105%, then again alarm, as something has possibly come loose or broken...

I have used large steppers to control 'flap' air valves in factories, and also to control inflation of emergency 'bladder' pipe blocking systems, but we use the approach originally mentioned, of detecting pressure. In the former, a venturi and solid state pressure sensor detects flow in the pipe, while on the latter you have a 'maintain' pressure in the bladder, and a 'maximum' used for emergency inflation, and adjust the steps to give these.

Best Wishes
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Mon Jan 03, 2011 3:56 am     Reply with quote

Quote:
so the stall current measurement is risky. and the idea is not safe.

Depends on the gear ratio, you have to check the datasheet. It can work up to several 100:1.

Referring to the original stepper stall detection idea. I assume, that you want a reproducible positioning. So a DC motor would have to be supplemented with an incremental encoder. If the electronical stall detection doesn't work, you also need a limit switch or incremental encoder with the stepper motor. Then a DC motor would be the more compact and powerful solution.

The step motor stall detection can work, I think. I checked the waveforms with an unipolar stepper drive, by sampling the voltage at the free-wheeling winding, you should be able to detect a stall. A PIC ADC would be usually fast enough. With a bipolar drive, you possibly have to sense the current. But I wonder if it's a reasonable way for your project.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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