Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Robotics Chat


Robotics Chat Specific to discussions about robots and the making of.

Reply
 
LinkBack Thread Tools Display Modes
Old 5th March 2004, 03:42 PM   (permalink)
Default MC3479P and PIC

Hi there I've got some problems driving my stepper motor with my pic16F877.

I've connected as mentioned in the mc34.. datasheet.

when i ran the pic and connected the 12V to the stepper motor it will not turn.. it has some noise too.. seems like turning but its not..

Any ideas?

PIC and MC are connected by the CLK(Port B0) and CCW/CW(Port B1).
I've supplied the Clk to the MC3479 chip using a delay and turning that bit high and low.

Have i done something wrong?

Please advise
__________________
Computers can be a head-egg at some time
zhizhi16 is offline  
Old 5th March 2004, 03:53 PM   (permalink)
Default

A couple of things spring to mind:

1) Are the wires to the motor connected in the correct sequence?, but you would probably see it juddering.

2) Are you pulsing it slow enough?, if you pulse it too fast it won't move at all, just sit there and buzz.
Nigel Goodwin is offline  
Old 6th March 2004, 03:25 AM   (permalink)
Default

Yeah, nigel, I give some parameters:

Typically, with a 12V stepper and about 100-200mA, you should run it at 100step/second as testing. But the fact that it can run upto 400 step/s. If you run it up to 4000step/s, it seems to be no torque on the motor shaft.

The slower you run your motor, the higher torque you will get.

The max torque is appeared as you apply 2 windings at HIGH.

To know the sequence of wires of a motor. The simplest way is measure the resistor of each winding. However, the problem will happen if the motor is unipolar one. You cannot know which 2 wires are a pair by measure the resistors. You may apply AC supply (use 6VAC in your case) to the motor, measure the AC voltages between the wires, you may know.
falleafd is offline  
Old 10th March 2004, 02:00 AM   (permalink)
Default

Quote:
Originally Posted by Nigel Goodwin
A couple of things spring to mind:

1) Are the wires to the motor connected in the correct sequence?, but you would probably see it juddering.

2) Are you pulsing it slow enough?, if you pulse it too fast it won't move at all, just sit there and buzz.
1.
Does the two pairs matter? Eg. Stepper has two pairs of wires, Pair A and Pair B.

If i put Pair A1 into Pin2, and Pair A2 into Pin3 of MC3479
or Pair A1 into Pin3, and Pair A2 into Pin2?

The way i found the pair was by measuring the resistance.. If there was a resistance.. then those two wires are considered a pair. The resistance measured is 31 Ohm. The Vm, supply that im giving is 17Volts.

2.
I had an LED hooked up to pin 7, the clk pin and i could see it flashing. so it should be slow enough.. and i believe im expecting very slow turns from the stepper motor.
__________________
Computers can be a head-egg at some time
zhizhi16 is offline  
Old 10th March 2004, 07:02 AM   (permalink)
Default

Quote:
Originally Posted by zhizhi16
Does the two pairs matter? Eg. Stepper has two pairs of wires, Pair A and Pair B.
Yes, they have to be connected exactly right, or it won't work - if you don't have the pinout details you will need to work them out. You can do this with a battery, connecting it to the windings in turn to find which sequence makes it rotate.
Nigel Goodwin is offline  
Old 10th March 2004, 08:33 AM   (permalink)
Default

not sure if i got ur instructions right..

Stepper motor... Red, Blu, Yellow, White.

1.5AA battery

Q1.
I've connected Red <-- battery ---> Blue, Then i tried twisting/turning the shaft.. very very difficult to turn it..(this pair gives 31 ohms when a multi meter is used to test it)

Yellow <-- Battery --> White.. same thing.. very hard to turn.. (this pair gives 31 ohms when a multi meter is used to test it)

So it means that i got the correct two pairs right?

Q2.
PairRB and PairYW which one goes to pin23 and which one goes to pin1415
Does it matter?
__________________
Computers can be a head-egg at some time
zhizhi16 is offline  
Old 10th March 2004, 09:43 AM   (permalink)
Default

No, you don't try to turn it manually, you only use the battery.

By connecting the battery to one pair of wires you should be able to make the motor step one position. You then need to find the connections to make it move one more step, in the same direction. Continue doing this until you get back to the original first step - then you know the sequence of connections to move the motor.

As it only has four wires, presumably it's a bi-polar motor?, is your driver suitable for that?.
Nigel Goodwin is offline  
Old 10th March 2004, 11:32 PM   (permalink)
Default

Hi eGod...

I tried it.. the same thing.. only PairsYW and PairRB works..

Pairs YW turns if connected + -. then I had to turn it WY for + - and it turns back wards by 1 step.

same goes to PairRB.

If i connect WireY and R or Wire W and B, it won't turn at all..

Marcus
__________________
Computers can be a head-egg at some time
zhizhi16 is offline  
Old 11th March 2004, 06:59 AM   (permalink)
Default

Quote:
Originally Posted by zhizhi16
Hi eGod...

I tried it.. the same thing.. only PairsYW and PairRB works..

Pairs YW turns if connected + -. then I had to turn it WY for + - and it turns back wards by 1 step.

same goes to PairRB.

If i connect WireY and R or Wire W and B, it won't turn at all..

Marcus
You need to find the sequence that keeps it turning the same way, so it's probably something like:

YW
RB
WY
BR
Nigel Goodwin is offline  
Old 11th March 2004, 03:53 PM   (permalink)
Default

As I once wrote in this forum that if we need to distinguish the 2 pair of wires of a unipolar stepping.

Firstly, we can easily find the centre wire(s) of the motor by measuring the resistors of each winding.

Secondary, we apply a AC voltage to the center wire and one of the 4 remains (in case of 5 wire motor, if it's 6, 2 of them are centre wires, if it's 8, 4 of them are center and we only take care of the 4 remains).

As you apply the AC voltage (if your motor is 12VDC, you should apply 6VAC to the 2 wires mentioned above).

You may measure the voltage between center wire and 3 other wires. You will see that, there are 2 voltages seem to be zero, and only one seem to be 6VAC as your power supply.

Then, the wires which produce zero volt are a pair. And the wire provide 6VAC and the first wire you chose (not the center wire) are a pair.

Yeah, it's all what you have to do to distinguish the 2 pair A and B of a stepping motor.

Why ?

I cannot explain here because my English is not good enough to explain, but it comes from the vibration of electromagnetic field inside the motor as you apply a VAC to a winding. It will make a resonance between the 2 wires of a winding.

I don't know if my explanation is clear, but you can do it, I'm sure. With 24VDC motor, you should apply 12VAC.

Goodluck
falleafd is offline  
Old 11th March 2004, 04:13 PM   (permalink)
Default

for the bipolar motor (2 phase motor), you can directly measure the resistor and find out the 2 pair.

After you have 2 pairs, you want to know the direction of the motor if you power it.

In case of unipolar,

1) Connect (+) to the centre wire
2) Move (-) from A1 to B1 to A2 to B2 .... (which wire you choose as 1 or 2 of a pair is not important, but you have to keep this sequence.
3) Look the direction of the motor.
4) If your motor turn clockwise, and you want to run your motor in clockwise, continue with this sequence

A1, B1, A2, B2, A1, B1, A2, B2....... and keep (+) at centre wire.

If you wanna turn it in ccw
A1, B2, A2, B1, A1, B2, A2, B1...... and keep (+) at centre wire.


In case of bipolar,

1) Connect (+) to RED, (-) to BLUE
2) Change (+) to WHITE and (-) to BLACK
3) Look the direction
4) if it's clockwise, and you wanna run your motor clockwise, continue with this sequence
(+) to RED, (-) to BLUE
(+) to WHITE, (-) to BLACK
(+) to BLUE, (-) to RED
(+) to BLACK, (-) to WHITE
falleafd is offline  
Old 14th March 2004, 01:56 PM   (permalink)
Default

Reading from data sheet clk diagram. L1, L2, L3, L4

L1, L2, L3, L4
----------------------
Phase A | H L H L
B | L H H L
C | L H L H
D | H L L H

and since the sequence is
(+) (-)
Y W <--- thus at this stage what will R B be(+ or -), how do i know?
R B
W Y
B R

(+) = High (H)
(-) = High (L)


my stepper motor still can step continuously I think i tried all the combinations. n(n-1) = 4(4-1) = 4(3) = 12 combinations...

any ideas?
__________________
Computers can be a head-egg at some time
zhizhi16 is offline  
Old 14th March 2004, 05:58 PM   (permalink)
Default

Well, I don't know what you did, but it seems to be something unexpected

As you power YW, you have to leave BR free (no power). then apply power to BR and leave YW free. Continue the sequence as identically as nigel told you.

Your motor, I guess, is a bipolar motor.

If you drive your motor as you say, you will turn your motor at higher torque.

Because at a certain time, both 2 windings are powered.

In this case, your motor's winding will be powered like this

+ - + -

YWRB
WYRB
WYBR
YWBR

at the same time, you have to power 2 windings.

As you pwr the windings like up there sequence, you can see it if it turn clockwise or ccw. Then if you wanna reverse the direction, you only need to change the sequence to

YWBR
WYBR
WYRB
YWRB

it will work.
falleafd is offline  
Old 14th March 2004, 06:07 PM   (permalink)
Default

Note that, as you pwr the windings like that, the torque will be 1.41 times stronger than as nigel wrote. And usually, as people drive steppers for fullstep, they used to do so.

But if you wanna drive the motor half step you need to do this loop forever

YWRB
--RB
WYRB
WY--
WYBR
--BR
YWBR
YW--

-- is leaving relative pins free from power.
falleafd is offline  
Old 14th March 2004, 09:58 PM   (permalink)
Default

since im using the stepper motor controller chip. At any instance there would be two coils being powered up.

eg L1 L2 L3 L4
H L H L - Phase A

How do u supply no power? provide those wire with both L L right.. just checking.

And the sequence is all done by the chip. All i need to do is to plug the wires into the correct pins. L1,2,3,4 with RBYW.

The PIC only supplied the Clk to the stepper motor chip where the frequency is pretty slow.. i can see my attached led blinking.
The other pin that is connected to the pic is the CW/CCW.
__________________
Computers can be a head-egg at some time
zhizhi16 is offline  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 12:29 AM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker