|Feb 22, 2006, 01:51 AM||#1|
help in step motor
I have a project in my school and I need a way to controll the step motor.
it is a floppy step motor with 2 coils and I need something that will conect between the micro and the engine, so I could give an prder to the motor to turn right or left. I'm only in highschool so plz if you can make it simple do so.
|Feb 22, 2006, 05:34 AM||#2|
Alternatively, I happened to have to control a stepper motor as part of my thesis for my elec. eng degree (automatic shifting on a bicycle). But again, the simplest way was to use a small microcomputer that gave direct access to CPU ports.
Assuming you absolutely HAVE to use a mac, the simplest way I can think of is to get a USB -> RS-232 converter, and then write an app that sends differnt bytes "down the line". At the other end of the line you stick an RS-232 controller chip, and you pick of the stepper motor control signals on the controller's output...
Anyone got a better idea? :-)
|Feb 22, 2006, 01:49 PM||#3|
What is the end goal that you're trying to achieve? An RC servo motor may be more appropriate.
|Feb 22, 2006, 04:01 PM||#4|
Personally, I'd use a parallel port, since it's easy to wire 4 data lines from the port to the 4 activation wires in the stepper motor (through a power transistor, please!!!)
Then you can write software to cycle the bits in the appropriate sequence. For example, say you had a 4-wire stepper and the step sequence is:
0001 --> 1
0010 --> 2
0100 --> 4
1000 --> 8
Then your pseudocode would look something like:
repeat (for as long as you need)
delay a few ms
On a PC, in QuickBasic, it might be as easy as:
OUT 888, 1
OUT 888, 2
(and so on)
To reverse the direction, just reverse the output order. There are also other bit patterns you can use, depending on the particular step sequence of the motor in question.
... I used to LOVE this stuff in high school and university (systems engineering degree... ) I did my fourth-year university project on a stepper-motor and servo-controlled pan/tilt camera unit for an autonomous robot, which was pretty fun...
edit: hmm, OP refers to a two-coil motor, which is going to be bipolar, and therefore might not be quite as easy to control without building a little bit of additional circuitry (e.g. an H-bridge). My write-up above is for unipolar motors... if you can find one of those, it'll probably be easier for you...
edit2: here's a sample bipolar motor controller which uses 2 discrete CMOS IC's (a dual flip flop and a quad XOR) and a 10 MOSFETs to build the H-bridge... http://www.web-ee.com/Schematics/Stepper/stepper.htm It wouldn't be too difficult to breadboard or perfboard this.
What's nice about this is that once built, you only need to generate a clock source, enable, and a direction signal. If your motor is only ever going to operate at one speed, you could "permanently" wire an oscillator into the CLK input of the flip-flops, and then just use the enable and direction signals. You could easily drive that from RS232 (just toggle some signal lines like DTR, RTS)...
Last edited by notjustjay; Feb 22, 2006 at 04:16 PM.
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|Importance of stepping for MP 1,1 CPU upgrades||Neodym||Mac Pro||10||Aug 19, 2011 03:10 PM|
|Ringer in Nissan Motor cars (Infiniti) is disabled||Jason0418||iPhone||1||Jul 1, 2010 03:17 AM|
|Help, Help, Need help in Webdesign software||3sin||Mac Applications and Mac App Store||2||Jan 25, 2009 06:01 PM|
|Stuck in step 6 of the unlocking process||Zeeno||Jailbreaks and iOS Hacks||2||Feb 10, 2008 05:55 PM|
|In need of Dire Help in Keynote 2.0||Aldaris||Mac Applications and Mac App Store||2||Mar 19, 2005 01:21 AM|
All times are GMT -5. The time now is 10:36 PM.