Very cheap stepper and driver to play with.

boriz

Senior Member
Code to test same:

Code:
#Picaxe 08m2
'Stepper motor driver test
'Boris Burke May 2012

setfreq m8
dirs=%00010111
do
	b1=b1+2 max 3//3	'b1 is direction control, 2=CW 0=CCW
	for w1=1 to 2060	'seems to be about the right number of steps for 360 degrees
		b0=b0+b1-1//4	'b0 cycles from 0 to 3 for CW and from 3 to 0 for CCW
		lookup b0,(%00011,%00110,%10100,%10001),pinsC
		pause 1
	next w1
	pause 4000
loop
 

AndreaACME

New Member
Yes, very cheap but check out the guys 833 negative comments from this year ... !!! Outrageous!
I will never by from that seller that is for sure.
 

erco

Senior Member
Yes, that's a quickie built during lunch hour. Styrene, superglue, O-rings and a small caster. My poor man's version of "rapid prototyping". :)

Those are the 5V motors, will power everything with 2x 18650 Li-Ion cells.
 

ZOR

Senior Member
I have just got one of these motors, supplied without the test pcb. Also await motor with test pcb, ordered on Ebay. How easy is it to interface motors to PICAXE with and without supplied test PCB? I have never played with steppers before and just wondering should I go down the PICAXE road or use 555 and 4017 and FETS.

I have done searches on PICAXE control, ie coding, but nothing on the physical real world, connect it up bit.

I looked in the PICAXE manual 3, page 16 section 3.
It says about unipolar motors (I thinkthis motor is Unipolar) about the darlington driver IC ULN2003.
It refers "The complete circuit is shown below" however am I stupid, as to me it's not complete.

ULN2003 pin 1 TO 11 ??
Out 7 tO 4 ??
Out 6 TO 1 ??
Pin 1 (Picaxe pin?)
Pin 2 (Picaxe pin?)

I am in the dark on the above!!

Appreciate any guidance, thanks
 
Last edited:

ZOR

Senior Member
Many thanks for the information. Just to confirm, am I correct that connections P4,P5,P6,P7 would goto 4 outputs in a suitable PICAXE?
 

erco

Senior Member
She works! I slammed on a BS1 in another mad hour of "rapid prototyping" and the results are pretty good. Here's the very first test, slow but sure. It might be able to go a bit faster with some futzing. My first stepper project, right around 2 hours total build time.

http://www.youtube.com/watch?v=TLdkKKMfUP0

 
Last edited:

ZOR

Senior Member
Very impressive!! When will you have the lawn mower version?

Thanks for confirming the pin connection, will start project shortly, think it will take a lot longer than your project time.

Regards
 

ZOR

Senior Member
My stepper - 28BYJ-48 5 volts has 2 coils, Yellow/Blue and Pink/Orange. Both have center taps, red.

I have a drawing showing the ULN2003 with a stepper connected, but shows no center tap for each coil, but a red wire where all four coils are joined. The coil colors are Yellow, Brown, Black and Orange.

How do I wire up my motor please to this or another darlington?

Motor http://www.emartee.com/product/41886...r Motor 5V

Thanks
 

JimPerry

Senior Member
Slightly fuzzy lashup on my bench - using the driver board supplied with this stepper. Red is Vcc and the others are used in sequence
 

Attachments

ZOR

Senior Member
Many thanks Jim, I think I have got it okay.

Blue - Pin 16
Pink - Pin 15
Yellow - Pin 14
Orange - Pin 13
Red - Pin 9

I am guessing this is correct from an above layout of your board.
Thanks again
 

ZOR

Senior Member
Thanks Boriz, sorry for delay, only just came back here. I have no experience at all with Arduino, and it's code. I barely understand PICAXE code. My main task is building something mechanical to pan and tilt some cameras I have.

I am using the AXE-117 PCB with a 14M2 and UCL2003. First the board has no connections fixed to pins 1 and 16 on the UCL chip, so I am using B.1,B.2,B.3,B.4 to connect to my 5 wire stepper. Therfore using pins 10/11/12/13 on the UCL chip to drive the motor
Now struggling to find just simple code that I can use to make my motor turn one way and then the other slowly. I can only find 08M2 code so far that I cannot make sense off. I did not go for the 08M2 as it seemed limited.

Anyway I will keep fishing around, at least nothing is cremated t the moment.

Thanks again
 
Last edited:

ZOR

Senior Member
I just bit the bullet, powered it up and put this code in which was the simplest I could find

Code:
steps:Toggle 1	; Toggle pin 1
	pause 200	; Wait 200 ms
	toggle 2	; Toggle pin 2
	pause 200	; Wait 200ms
	goto steps 	; Loop
[code/]

Nothing moves, but I can see current pulsing on my PSU, so something is alive somewhere, but where?
 

eclectic

Moderator
This is working on an AXE117 board

You may need to swap wires

Code:
#picaxe 14M2

; B.1 Blk  B.2 Brn  B.3 Yel  B.4 Ora
; Red to V+

DirsB = %11111111

Symbol rest = 5 ; change as required
Symbol degstep = 100 ; change as required

Main:

gosub Clockwise
pause 1000

Gosub Anti
Pause 1000

goto main

Clockwise:

      for b0 = 1 to degstep  
      
     let PinsB = %00001010  '1 
  pause rest

 
 let PinsB = %00010010  '2  
  pause rest

 
 let PinsB = %00010100  '3  
 pause rest

 
 let PinsB = %00001100  '4  
  pause rest  

  
  next

return  

 ANTI:
 
  for b0 = 1 to degstep  
  
 
 let PinsB = %00001100  '4   
  pause rest 

  
  let PinsB = %00010100  '3  
 pause rest

 
 
  let PinsB = %00010010  '2  
  pause rest

 
  
  let PinsB = %00001010  '1 
  pause rest

  
  
  next
 

return
e
 

ZOR

Senior Member
Many thanks, something worked.

I watched the motor move clockwise, but then nothing more happened apart from feeling the motor vibrating a little.

I don't know why, but I have 2 AXE-117 boards, and both do not bring out Pins 1 and Pin 16 to pads?

My motor is a 28BYJ-48 5 VOLT Stepper, having a blue and a pink.
The configuarion is :

PICAXE B.1 - Pin 14 ULN chip Blue wire
B.2 - Pin 13 ULN chip Pink wire
B.3 - Pin 12 ULN chip Yellow wire
B.4 - Pin 11 ULN chip Orange wire

Red wire + 5volts

I would try swapping wires around but would rather avoid a fire.

Hope someone can make sense of what I have setup. Thanks again
 

eclectic

Moderator
Many thanks, something worked.

I watched the motor move clockwise, but then nothing more happened apart from feeling the motor vibrating a little.

I don't know why, but I have 2 AXE-117 boards, and both do not bring out Pins 1 and Pin 16 to pads?

My motor is a 28BYJ-48 5 VOLT Stepper, having a blue and a pink.
The configuarion is :

PICAXE B.1 - Pin 14 ULN chip Blue wire
B.2 - Pin 13 ULN chip Pink wire
B.3 - Pin 12 ULN chip Yellow wire
B.4 - Pin 11 ULN chip Orange wire

Red wire + 5volts

I would try swapping wires around but would rather avoid a fire.

Hope someone can make sense of what I have setup. Thanks again
You CAN change the four coloured wires around safely.
See the diagram in Man.3, page 16

e
 

ZOR

Senior Member
Thanks again, however there are so many permutations that 4 wires can be moved.
I cannot be that far out as the motor is also supplied with a test board having the ULN chip in, and the picture clearly shows the motor color/order against the ULN2003A chip, which I would take to be the easiest track layout for connections on the board.

I do not understand why the AXE-117 has no track/pad on pin 16 of the ULN2003A chip, so losing 1 input of the darlington??
Hope somebody with the same motor can tell me exactly what is wrong in my connections.

Best regards and thanks again
 

erco

Senior Member
My next build is a 20M2 stepper driver using a ULN2803, which is an 8-line driver and can handle 2 unipolar stepper motors. The Ebay boards use the ULN2003, which only has 7 drivers, 3 are unused.
 

boriz

Senior Member
Maybe 7 drivers is enough for two motors?. They just have to share one and not both run at the same time.
 

ZOR

Senior Member
Having got the motor from Ebay, does anyone know where to get an equivelent to a servo horn fitting to go on the shaft. Seen lots of flexible straight couplings twice the price of the motor!! but need to fix the shaft to a plate. Thanks
 

JimPerry

Senior Member
Having got the motor from Ebay, does anyone know where to get an equivelent to a servo horn fitting to go on the shaft. Seen lots of flexible straight couplings twice the price of the motor!! but need to fix the shaft to a plate. Thanks
I use a 22mm plastic pipe clip for testing - push fit :rolleyes:
 

Attachments

ZOR

Senior Member
Hello Jim,
That's novel!!
The nearest item I have found for my project which I have just ordered, is a meccano part, ordered from www.meccanoandcomp.com.
They have a few interesting bits (reminds me when I was much younger, think all children need a meccano set)

CRANK.jpg

Hope it will fit the shaft 4mm

Might be of interest to others

Regards
 

ZOR

Senior Member
Now I can see a whole new range of PICAXE sex toy projects, or is my corrupted mind?

Only joking. Looks very attractive for making robotic objects as well as for getting one of protoypes off the ground. I followed up a link to supply Polymorph, but working out volumes of the item (pellets) to be useable is difficult to work out. Be good if the volumes were shown related to a finished cubic volume.

Thanks
 

boriz

Senior Member
Are you suggesting you buy 10cc of polymorph because you need 10cc in your project, or something like that?

Bah. Just get half a kilo of the stuff. You'll run out of polymorph long before you run out of uses for it. :)
 
Top