loading
 
Stepper Motor Parallel Port Control
Puvan from Malaysia  [10 posts]
17 year
dear steven,

i'm a student...and doin a final year project..
can u tell teach me how control the steps of a stepper motor where two wires  is connected to a uln2803 ic from a stepper motor driver...
and two pins from the ic is connected to the parallel port pin 2 and 3...pin 2 wire is for cw rotation and pin 3 wire is for ccw rotation....
actually..microsoft Q-basic i can make the stepper motor moves correctly...but in roborealm..i cant...
in Q-basic i have to on and off the parallel port pin once...to make the stepper motor moves one steps.....that means if i want to make the stepper motor moves 300steps...i has to on and off the parallel port (ex:pin 2)..300 times...hw i can do this in roborealm....i want to make the stepper motor moves 300 steps when the camera detects red object..
i hope u will help me in this .....ur help is needed..coz i have to finish my project by the end of this month.....thank you....
Stepper Motor Parallel Port Control
Anonymous
17 year
Puvan,

Included is a robo-file that uses a stepper motor controller through the parallel port to react to the largest red object in the camera view. This should help you determine how to adapt the program to your use.

Couple points:

- this tracks a red object
- but only the largest red object
- see the VBScript module for how to oscillate one of the parallel port pins
- we did not test this as we do not have a stepper motor that behaves the way yours does
- note the timing in the VBScript file for the 0 to 1 transition period of the pin. It is set to 0.2 seconds or 200 ms. Your stepper motor may need a different timing.
- this assumes your camera can produce frames at around 30 fps.
- keep in mind that RoboRealm is essentially one big loop that executes the pipeline again and again. Thus you cannot have loops in the VBScript file but need to use the timer concept to determine when things should be done. If your camera slows down then this timing WILL be off. With a fast enough camera you should not notice the timing inconsistencies.

Perhaps if enough people are interested in using stepper motors with the Parallel port we may design a module around that. But for how the VBScript plus parallel port should do the trick.

Good luck!

STeven.
Anonymous 17 year
And here is the robo-file.
program.robo
Stepper Motor Parallel Port Control
Anonymous
17 year
Keep in mind that you will also need to change the LPT1 for the Parallel Port module. If you click on each of the modules in succession they will display the analysis up to that point. In that way you can learn what each module does to the image. Note that some do not alter the image seen.

STeven.
dear steven
Anonymous
17 year
can i use Q-basic exe file in roborealm...if can how?
Anonymous 17 year
Yes, have a look at the Extensions->Execute Program

http://www.roborealm.com/help/Execute_Program.php

You should be able to execute the Q-basic interpretor and pass it as an argument the name of your source file.

STeven.

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index