Steppers and the Propeller (stupid newbe Question)
$WMc%
Posts: 1,884
Hello All
I would like to run 3 stepper motors with the Propeller at the same time. My biggest problem is writing a driver or OBJECT code, for a stepper motor. I'm new to this SPIN/SPIN ASM code, and its a lot to take in at one time.
I feel if I had a simple generic stepper code that·I could study, I would be able to figure out the rest!
If anyone has a simple little code that they would share with Me.· It would be greatly appreciated.
__Thanks in Advance_____________$WMc%___________
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Truth is out there············································ BoogerWoods, FL. USA
I would like to run 3 stepper motors with the Propeller at the same time. My biggest problem is writing a driver or OBJECT code, for a stepper motor. I'm new to this SPIN/SPIN ASM code, and its a lot to take in at one time.
I feel if I had a simple generic stepper code that·I could study, I would be able to figure out the rest!
If anyone has a simple little code that they would share with Me.· It would be greatly appreciated.
__Thanks in Advance_____________$WMc%___________
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Truth is out there············································ BoogerWoods, FL. USA
Comments
So, basically, you could write some very simple code that makes a pin go low for "forward" stepping direction, and a second pin that goes from high to low, for to initiate a step. No pin sequencing needed. The "step" pin functions basically like a clock, so the faster you pulse that pin, the more steps per second are performed.
This would be a good excuse to finally build this thing. Would you be interested? I've got enough chips to build enough for about 15 steppers, 2A/phase(4A per motor).
Pilldapill I am interested,How much will they cost?
____Thanks Again_________$WMc%_____
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Truth is out there············································ BoogerWoods, FL. USA
I could also make a alternate version where all inputs are opto-isolated with high-speed isolators. This would take one extra 3.3V or 5V pin.
What type of high-speed-opto-isolators are you using ? Can you post a part-Nr. of the manufacturer ?
What is the typical rise/fall-time for the signal from input goes high/low until output reaches high/low ?
What is the border-frequency to drive it ?
best regards
Stefan
Here is the product page for the ISO722M:
http://focus.ti.com/docs/prod/folders/print/iso722m.html
I really don't need voltage Reg.s as I have some Beefy 3.3v,5v, and 13.8v supply's made that are highly regulated. I also planed on running the steppers on their own 15 to 50volt variable power supply's, For obvious reasons.
My plan is to build a small model, with small steppers. Work out all the Bugs and then build a larger vers. using some high current transistors driving from the L298 or L293 for the larger steppers.
I like the price on the 3 stepper motor board, could You replace the voltage reg. for some 150watt or larger drivers and keep the cost down. I am willing to take care of the heatsink for the drivers if their placed on the edge of the PCB.
_______________$WMc%____________
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Truth is out there············································ BoogerWoods, FL. USA
As for "larger drivers", that could be done. I've been wanting to build a HIGH power H-bridge for a while. I'm talking up to 35V input, and 20A per phase... You know, BEEFY drivers. These would be a bit more complicated, and would probably be around $50 for a three motor board.
I see Your point about the lack of regulators. Its My old school approach that led Me to this. I build all of My own reg. power supply's to ensure accuracy and quality. I realize its not practical for You to make a PCB in this fashion.
A voltage reg. TO220 case costs about $1.00.... A 150watt FET/MOSFET/NPN transistor costs about $1.00 (this is where I came up with the trade off in $$ for the regulators)
While Your PCB may not fit what I'm after, I'm sure there are others that would love to have one of Your PCB.s (stepper driver)
________$WMc%_______
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Truth is out there············································ BoogerWoods, FL. USA
I have the" stepper_demo.spin" program running in the Propeler editor. I keep getting an error ( can't find OBJ stepper.spin) when I try to RUN the download program to the Propeller. ?
Whats up with this!!!!!!!!!!
Philldapill
I Will get back with You on the desired stepper board.!!!!!
____________$WMc%____________
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Truth is out there············································ BoogerWoods, FL. USA
Post Edited ($WMc%) : 4/10/2009 3:52:17 AM GMT
the bunch of attentionmarks "!" looks a little bit unpolite like saying "hurry up !"
What does the error-message-window report for DETAILS ?
From this question I guess - hm got his propeller only one hour ago
and did not take time yet to start read the manual
If you see file the "stepper_demo.spin" in the Propeller-Editor there is nothing "running" the editor just SHOWS you the SPIN-sourcecode
If you press F10 compile and download to RAM or F11 compile and download to EEPROM
the sourcecode gets compiled, donwloaded to the propeller and then the DOWNLOADED file runs INSIDE the propeller.
In the file stepper_demo.spin there is a section called "OBJ"
in this section "OBJ" there are listet and defined the objects that you want to use with your top-object-file (here stepper_demo.spin)
objects are simply *.SPIN-file similar like stepper_demo.spin
in your top-object-file you have to define an objectNAME which is then used as a reference for the methods inside the object
explanation:
"OBJ" 'begin of the section object-DEFINITIONS
"motor" 'NAME of the object
""stepper"" NAME of the *.SPIN-file where the code of this object is stored on harddisk
This means in the SAME subdirectory as where your file stepper_demo.spin is stored on your harddisk
there must exist a file stepper.spin
This file is part of the mjc_stepper_demo.ZIP-archive from where you have the file stepper_demo.SPIN from
So now I would like to say something general:
First thought from me was just post "read about objects in the manual" - end of post
I gave you a direct explanation in this case because I really like to explain.
In the todays grown-up world everybody expects from you that you can collect BASIC information YOURSELF
So it would be a good thing start to learn this as soon as possible.
In this case this means:
reading carefully the error-message "can't find stepper.spin" with ALL details
Take the propeller-manual and do a research of 10 minutes on YOUR OWN.
If you can not solve the problem by this post a CONCRETE question here in the forum
The question can be as simple as hell (to me there are NO "stupid" questions) if the forum members can see
from your question that you made some effort on YOUR OWN they will like to answer your question
For more information about objects read Chapter 3: Propeller Programming Tutorial from page 85 until exercise 6 until page 116
best regards
Stefan
Post Edited (StefanL38) : 4/10/2009 6:38:32 AM GMT
I really appreciate Your response to My post
I apologize to You and all of the other forum members about the "!"marks in My posts, I didn't realize this was taken so adversely.
I am struggling with the SPIN lingo.
I have the "stepper" OBJ code, but it has some errors
I have Attached the code I'm trying to use.
Any help would be appreciated
______________$WMc%_______
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Truth is out there············································ BoogerWoods, FL. USA
Post Edited ($WMc%) : 4/12/2009 7:28:26 AM GMT
1.spelling of SetDir --- typed as steDir
2. DATA at end of stepper should be DAT
3.M_Rev has 2 underscores instead of one.
4.dira[noparse][[/noparse]m4..m1]· --- in runStepper· action required eg dira[noparse][[/noparse]m4..m1]~~
Gerry
Post Edited (Gerry Keely) : 4/12/2009 10:01:09 AM GMT
OK you seem to have made a program on your own. That is OK.
As it has very basic typing-errors I recommend starting with smaller programs
Maybe I'm wrong with my impression. But to clear this I want to explain how your way
of programming and asking for help seems to be by using an analogon:
Imagine somebody goes to a store and buys an airbrushing set with everything you need
for artistic airbrushing. You go home plug the aircompressor to the socket. Connect
the airbrush via a rubbertube with the compressor. Fill in some color into the airbrush.
Then press the button on the airbrush and color is poured onto the object you want to paint.
But oops much to much color went onto the surface.
And in this situation you call for help: "can somebody correct my painting ?"
In the airbrush-case I think it is really clear that this would be strange and unpolite to ask for THAT kind of help
Almost everybody would think about this
"ey what's that ??! Give me a paid order and I paint for you or leave me alone!"
As YOU want to do the painting you have to practice and do exercise-paintings to learn it.
If you give a DETAILED discription of what went wrong and ask an airbrush-artist:
like "I always put too much color onto it. Can you come to me and take a look what I'm doing wrong ?
I use this type of airbrush and I'm painting that way. What do I have to change that much less color
comes out ?
THIS would be a question where almost everybody would LIKE to help you
OK let me see... pressure is a little bit low. Size of the Airbrush is OK but the valve is completely opened
almost close the valve and increase the pressure to ... bar
(By the way I have no skills in airbrushing at all that's just an analogon to explain)
Now back to the propeller.
The code you have posted has some very basic bugs. Did you write it on your own ?
I guess so. I assume that you know only very less about programming
that's REALLY OK you just have to change the style of asking for help
If your code simple_stepper.spin is tried to compile there comes an errormessage
minimum what we - as the other forum-members - can expect from you is,
that you give a detailed description of the errormessage
Errormessage "invalid binary number"
what am I doing wrong ?
This is a very basic question but this is GOOD. This question makes other newbies proud of finding a question they can answer to !
So ask that way
best regards
Stefan
Post Edited (StefanL38) : 4/12/2009 1:56:58 PM GMT
I Thank You for Your Reply
I read, reread, read over, read though, read back, and read again, the code I had and I still missed the typos.I think its because it looked right to Me. I am an old school BASIC programmer.I know I have to learn some new programing lingo, So here I am.
I thank You vary much for Your time.
Its members like You that makes this Forum so great!
_______Thanks Again_______$WMc%_________
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Truth is out there············································ BoogerWoods, FL. USA