Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Trapeziodal motion control of stepper motor

Status
Not open for further replies.

laxmid

New Member
Hi,

I want to rotate the stepper motor in Trapeziodal motion(initially high to low , constant velocity, low to high) using pic controller..

Can you please give me an idea how can we rotate like dis?

note: Given data: acceleration, max velocity, deceleration
these values we need to give dynamically.

Thanks & Regards,
Laxmi
 
I have no idea what "Trapeziodal motion" of a stepper motor is.
 
I think the OP means ramp up and ramp down the RPM...I think. But then the statement of constant velocity raises a question.
 
I am working on this exact problem, but instead of a stepper motor, I am using PWM and a 1/4HP brushed DC gear-motor. I have written the code for the PIC. Final adjustment of the ramp up and ramp down rates are pending some testing. The PIC code has an interlock to prevent reversing until the original motion comes to a stop, at which point the ramp can begin in the other direction.

I'm building an electric tug so my wife can move the Cessna, and I want it to ramp-up from a stop, reach a top speed, and then ramp down at a different rate if the switch is released or reversed. The goal is create smooth acceleration/de-acceleration to prevent from putting undue loads on the nose gear of the aircraft.
 
Last edited:
Bit of an overkill. However, my wife weighs ~110 lb, while the ramp weight of the 182 full of fuel and loaded with gear is ~2500 lb.
 
Yes, of course you understand that I meant the F18 .

Edit:
Fully armed.
(Sukhoi is also good.)
...
After looking at a few pictures I realize they really did not make these things for sport.
 
Last edited:
I'm building an electric tug so my wife can move the Cessna, and I want it to ramp-up from a stop, reach a top speed, and then ramp down at a different rate if the switch is released or reversed. The goal is create smooth acceleration/de-acceleration to prevent from putting undue loads on the nose gear of the aircraft.

If instead you had invented that little tug that collects shopping carts and returns them to the store, you'd be rich now. Of course, you'd have too much money to hang out here with us then ;)
 
I agree with MikeMl Explaination. What he explained exactly i wanted to do.

Can you give me the Code or else explain me how can we rotate stepper motor in trapeziodal.

Thanks & Regards,
Laxmi
 
I'm using a center-off, spring-return, SPDT switch as a joystick for input. I'm using a DPDT relay for reversing. Since my output is a single-channel PWM to a single motor winding, it will not work directly with a stepper, but the ramping timing method might be useful to you. I'm using CCS C for a PIC 16F88.
 
its possible to get that kind of motion using PWM.

Steadily increase PWM rate till motor reaches the desired rev/min, run constant for some time, then repeat the first step in reverse. Firstly you should generate the PWM signal in the desired pin.

I did something similar using the L297/L298 driver pairs. I used a computer with a RS 232 link to set the ramp rates, constant speed etc.
 
Thanks a lot for your reply. Even i am also using PIC-16f882 n Stepper motor(Ls7290 n L928)..

Can i have your code please and schematic if possible?.

Thanks & Regards,
Laxmi
 
Its quite simple..

1. You must be able to PWM the clock port of the L297 driver. To do this set a count value of say 255, use another variable and set the desired PWM frequency to say 200 (must not exceed 255), setup a timer, so that it ticks at regular interval of approx. 1-2 msec (the timing is not critical here as we are only setting up the port).

Make the clock port high, use another variable (counter) and increment the value at every interrupt, when the variable reaches the desired PWM frequency of 200 make the clock port low, make counter=0 and count till 55 ( count value-desired frequency or 255-200). When counter reaches 55 make the clock port high, set counter=0 and repeat the process.

By changing the desired frequency value you can adjust the PWM rate, but take care not exceed the max count value of 255.

2. To get the trapezoidal motion first get the maximum revs the motor has to move, then decide on the acceleration and de-acceleration ramps.
 
Hi,

An easy way to do this is to use a stepper motor controller chip coupled with an driver for a stepper too, then simply increase or decrease the input clock as necessary. The PIC would decide what the clock should be and the pattern would be programmed into the PIC to get ramp up and ramp down and constant.
 
I agree with MikeMl Explaination. What he explained exactly i wanted to do.

Can you give me the Code or else explain me how can we rotate stepper motor in trapeziodal.

Thanks & Regards,
Laxmi

Here is the prototype code.
 

Attachments

  • mover.c
    4.6 KB · Views: 247
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top