I`ve found a stepper motor

55 views
Skip to first unread message

peter247

unread,
Sep 15, 2009, 6:12:10 PM9/15/09
to PIC32-Basic
While looking through my junk box tonight looking for some 3 core
mains cable, I found a stepper motor.
Not a small CD Rom type stepping motor, but some thing a little larger
at 2 inch dia * 1 inch thick (12 volt )

I’ve had a play by connecting it to a battery a making it turn, and f#£
% did I forgot about induction by getting a right old stock.

So now I’ll have to find some use for it ?.

Malcolm

unread,
Sep 21, 2009, 6:15:45 PM9/21/09
to PIC32-Basic
Peter,
That is a similar size to the unipolar motor I am playing with.
Just connected to a 15volt supply from a scanner I can step the motor
round OK.
by putting the two centre taps to the negative (or positive) and then
touching the
other wire of the supply to the four remaining terminals in the order
1,3,2,4.
However when connected to the BV513 via the bv405 I can only get
juddering.
There must be something wrong with either my wiring or programming.
All my fixes have so far failed.

Cannot see how to add the program code to this message as yet.

Malcolm



On Sep 15, 11:12 pm, peter247 <peter224...@gmail.com> wrote:

snip

Ian macdonald

unread,
Sep 21, 2009, 6:27:50 PM9/21/09
to pic32...@googlegroups.com
Hi Malcolm,

I had this on another interface when I was driving the stepper motor
too fast, have you tried slowing the step pulse?

Just an idea

Cheers

Ian

Ian macdonald

unread,
Sep 21, 2009, 6:43:54 PM9/21/09
to pic32...@googlegroups.com
Hi Malcolm,

I just realised I think I have a bv405(will check my parts bin), if
you want to send me your code I can try it on my bv513 & bv405 just in
case you have a hardware problem, I was also looking at the l293 data
sheet and apart from driving the stepper too fast (I have a few
unipolars that above 1khz on full step they just vibrate) how are you
using the enable pins?

Cheers

Ian

On Mon, Sep 21, 2009 at 11:15 PM, Malcolm <tms...@freeuk.com> wrote:
>

peter247

unread,
Sep 22, 2009, 7:58:33 AM9/22/09
to PIC32-Basic
This is the one I’ve got.
http://www.alltronics.com/cgi-bin/item/25M001/55/Fuji-Electrochemical-SM55-4830-A-stepper-motor

Can get it to rotate with a battery, but not got about to using a
controller to drive it.
I can`t work out what type this stepper is.


On Sep 21, 11:43 pm, Ian macdonald <ianma...@googlemail.com> wrote:
> Hi Malcolm,
>
> I just realised I think I have a bv405(will check my parts bin), if
> you want to send me your code I can try it on my bv513 & bv405 just in
> case you have a hardware problem, I was also looking at the l293 data
> sheet and apart from driving the stepper too fast (I have a few
> unipolars that above 1khz on full step they just vibrate) how are you
> using the enable pins?
>
> Cheers
>
> Ian
>

Ian macdonald

unread,
Sep 22, 2009, 8:06:33 AM9/22/09
to pic32...@googlegroups.com
Easy to check Peter, if it has 4 wires its a bipolar and if its more
(I think options are 5,6 or 8) its unipolar

Cheers

Ian

peter247

unread,
Sep 22, 2009, 12:00:48 PM9/22/09
to PIC32-Basic
this as 2 sets of 3 wire .

On Sep 22, 1:06 pm, Ian macdonald <ianma...@googlemail.com> wrote:
> Easy to check Peter, if it has 4 wires its a bipolar and if its more
> (I think options are 5,6 or 8) its unipolar
>
> Cheers
>
> Ian
>
> On Tue, Sep 22, 2009 at 12:58 PM, peter247 <peter224...@gmail.com> wrote:
>
> > This is the one I’ve got.
> >http://www.alltronics.com/cgi-bin/item/25M001/55/Fuji-Electrochemical...

Malcolm

unread,
Sep 22, 2009, 3:33:27 PM9/22/09
to PIC32-Basic
Peter,
Answering belatedly since my post bounced - not signed in!!
I think you will find it is a unipolar motor. The red wires will go to
the centre tapping of each coil giving in effect 4 coils. Confirm this
by use of a continiuty meter and then by checking the resistance
between various wires.
I see the resistance is given as 36 Ohms so I would expect 18 Ohms
between a red wire and the coloured wires in the same hole.
Hope this helps

Malcolm

Malcolm

unread,
Sep 22, 2009, 4:09:10 PM9/22/09
to PIC32-Basic
Ian,
I have both enable wires tied to 5 volts.
Here is the code I have used.
Your thought will be appreciated

Malcolm

//Stepper driver//
constant coill1 "b12"
constant coil2 "b13"
constant coil3 "b14"
constant coil4 "b15"
// pokei (AD1PCFG%) = 0x00ff // set to digital //
//Set pins to outputs //
portb "btc" 12
portb "btc" 13
portb "btc" 14
portb "btc" 15
// Switch coils //
function sw
dim c,n, step=10
for n=1 to 100
portb "bos" step+1
portb "boc" step+2
portb "boc" step+3
portb "boc" step+4
wait 100
portb "boc" step+1
portb "boc" step+2
portb "bos" step+3
portb "boc" step+4
wait 100
portb "boc" step+1
portb "bos" step+2
portb "boc" step+3
portb "boc" step+4
wait 100
portb "boc" step+1
portb "boc" step+2
portb "boc" step+3
portb "bos" step+4
wait 100
next n
endf

On Sep 21, 11:43 pm, Ian macdonald <ianma...@googlemail.com> wrote:
> Hi Malcolm,
>
> I just realised I think I have a bv405(will check my parts bin), if
> you want to send me your code I can try it on my bv513 & bv405 just in
> case you have a hardware problem, I was also looking at the l293 data
> sheet and apart from driving the stepper too fast (I have a few
> unipolars that above 1khz on full step they just vibrate) how are you
> using the enable pins?
>
> Cheers
>
> Ian
>

Ian macdonald

unread,
Sep 22, 2009, 4:43:35 PM9/22/09
to pic32...@googlegroups.com
No problem, maybe a few days though as I have a busy few days ahead.

Cheers

Ian

peter247

unread,
Sep 22, 2009, 6:07:27 PM9/22/09
to PIC32-Basic
Yes . red to yellow 32 ohns , red to orange 32 ohns , yellow to orange
74 ohms

peter247

unread,
Sep 22, 2009, 8:13:24 PM9/22/09
to PIC32-Basic
I`ve got it to work !!
made a program to fire 4 step at it and change the wires until it
worked right
eg colis 1 > 2 > 3 > 4 > 1 > 2 > 3 > 4

now the more comnplex half stepping, which goes something like :-

1&2 > 2 > 2&3 > 3 > 3&4 > 4 > 4&1 > 1 > 1&2 etc

Malcolm

unread,
Sep 23, 2009, 4:12:56 PM9/23/09
to PIC32-Basic
Peter,
pleased at your success.
Can you give more detail on how you are driving the motor.
I still have not got my motor rotating with bv513 and bv405
combination.

Malcolm

peter247

unread,
Sep 23, 2009, 5:01:24 PM9/23/09
to PIC32-Basic
It is a unipolar motor connect to a ULN2803A and a MCP23008.
As stated previously my stepper motor has 2 sets of 3 wires , so it’s
clearly defined which are the 2 coils A and B.
I connect both the centre tape together to the positive supply.

Made a little test program, quick and easy not an efficient program.


1 2 3 4 – Step
A B A B

Start be connect just A coils and trying coils B both way round to
find which way it should be. ( Gstep )
Found it worked so made the half_step part .

function init
i2copen 400000
i2cwrite 0x46 0 0
gstep
endf

function step(st)
select st
case 1
i2cwrite 0x46 9 128
case 2
i2cwrite 0x46 9 64
case 3
i2cwrite 0x46 9 32
case 4
i2cwrite 0x46 9 16
default
i2cwrite 0x46 9 0
endselect
endf

function half_step(st)
select st
case 1
i2cwrite 0x46 9 192
case 2
i2cwrite 0x46 9 64
case 3
i2cwrite 0x46 9 96
case 4
i2cwrite 0x46 9 32
case 5
i2cwrite 0x46 9 48
case 6
i2cwrite 0x46 9 16
case 7
i2cwrite 0x46 9 144
case 8
i2cwrite 0x46 9 128
default
i2cwrite 0x46 9 0
endselect
endf

function gstep
step(1)
wait 1
step(2)
wait 1
step(3)
wait 1
step(4)
wait 1
endf

function half_gstep
step(1)
wait 1
step(2)
wait 1
step(3)
wait 1
step(4)
wait 1
step(5)
wait 1
step(6)
wait 1
step(7)
wait 1
step(8)
wait 1
endf

function mstep
dim a
for a = 1 to 1000
gstep
next
step(5)
endf

function half_mstep
dim a
for a = 1 to 1000
half_gstep
next
step(5)
endf

Malcolm

unread,
Sep 25, 2009, 3:22:41 PM9/25/09
to PIC32-Basic
Success!!
Checked out wiring with multimeter and found the problem.
The product specifcation sheet for the bv405 shows a diagram of the
board and appears to show a -ve for each of the two output connectors
as the inner two wire clamps of the six.
I found this not to be so; the negatives are the two outer most wire
clamps, ie clamps one and six.
On switching the wires the motor ran immediately with the program I
gave earlier.

Malcolm
> i2cwrite 0x46 9 144
> case 8
> i2cwrite 0x46 9 128
> default
> i2cwrite 0x46 9 0
> endselect
> endf
>
snip program

Ian Macdonald

unread,
Sep 25, 2009, 3:28:26 PM9/25/09
to pic32...@googlegroups.com
Congratulations,

I have found my bv405, but as I said I was a bit busy this week to give
it a go, but happy you got yours working

Cheers

Ian

signature.asc
Reply all
Reply to author
Forward
0 new messages