AXE049 Development board and Stepper Motor

vek

New Member
I have downloaded the example stepper motor program but it does not rotate continuously. It is being energised and has a slight alternating movement of about 2 degrees. I am wondering if the program is wrong as there are lots of mistakes in the picaxe manuals. Any help would be appreciated.
 

eclectic

Moderator
Welcome to the Forum.

Can you please provide

Your full schematic / wiring diagram.

Details of your stepper.

Your program.

e
 

vek

New Member
Thank you for replying.
The program and wiring diagram is on pages 28 & 29 of the Introduction to the Picaxe System manual from the website.
 

westaust55

Moderator
Thank you for replying.
The program and wiring diagram is on pages 28 & 29 of the Introduction to the Picaxe System manual from the website.
A link to the precise web page could be helpful.
It is not pages 28 & 29 in the 3 primary PICAXE manuals available here:
http://www.picaxe.com/Getting-Started/PICAXE-Manuals/

Edit:
Ah it is in fact the "Datasheet" specific to the AXE049:
http://www.picaxe.com/docs/axe049.pdf

Do you know for sure if the stepper motor you have is a
Bipolar
or
Unipolar
Type of motor? See PICAXE manual 3 in the link I gave above for info on connections and cod for each type.

Do you have a link you can post to the stepper motor Datasheet.

Oscillation shaft could be the wires are not connected in the right sequence rather than a code error.
 
Last edited:

westaust55

Moderator
Again, providing a link can save folks time searching for data to help you. That stepper motor is sold by Rev Ed in the PICAXE Store:
http://www.picaxestore.com/en_gb/gbx008.html

I do note some differences in connections between the AXE049 and stepper motor data for wiring:
'from the datasheet
' Stepper Y129-5
' If you use the wires in the 6 pin connector in
' order the following program will cause rotation
' Black +12V
' White +12V

' Yellow output7
' Red output6
' Brown output5
' Orange output4

'from the AXE049 sheet
The stepper motor should be connected to the
holes on the tutorial board as follows:
Black Wire 2 +
White Wire 3 +

Yellow Wire 0 –
Red Wire 1 –
Orange Wire 2 –
Brown wire 3 –
therefore try swapping the Orange and Brown wires. (Sorry I do not have time right now to check if the code in each docuemnt accommodated this wiring variance)
 

vek

New Member
Again, providing a link can save folks time searching for data to help you. That stepper motor is sold by Rev Ed in the PICAXE Store:
http://www.picaxestore.com/en_gb/gbx008.html

I do note some differences in connections between the AXE049 and stepper motor data for wiring:





therefore try swapping the Orange and Brown wires. (Sorry I do not have time right now to check if the code in each docuemnt accommodated this wiring variance)
Thank you I will try this.
 

AllyCat

Senior Member
Hi,

Which PICaxe (and Development Board) are you using*? What are your 5 volt and 12 volt power supplies (and how are they connected)? What test equipment to you have (LED+Resistor, Multimeter, 'scope, logic analyser)?

*EDIT: Ah, I see from the title it's a PICAXE-18 (18M2) Tutorial Board. The stepper motor is a 12 volt device and the ULN2003 output stage is "12 volt tolerant", but it seems that the Board only has a 4.5 volt supply rail implemented. :confused:

Cheers, Alan.
 
Last edited:

vek

New Member
Hi,

Which PICaxe (and Development Board) are you using*? What are your 5 volt and 12 volt power supplies (and how are they connected)? What test equipment to you have (LED+Resistor, Multimeter, 'scope, logic analyser)?

*EDIT: Ah, I see from the title it's a PICAXE-18 (18M2) Tutorial Board. The stepper motor is a 12 volt device and the ULN2003 output stage is "12 volt tolerant", but it seems that the Board only has a 4.5 volt supply rail implemented. :confused:

Cheers, Alan.
I have never used stepper motors before and picaxe advised to use this one in the manual.
What do I need to do to get a motor working. I have emailed picaxe., but no reply yet.

Thanks for your help
 

AllyCat

Senior Member
Hi,

Ultimately, to use the motor "properly", you may need to modify the circuit board so that the lower "4.5 volt" rail (in the circuit diagram on page 34) has a higher voltage. But that might not be easy (and is potentially "dangerous" for the PICaxe) unless the circuit board has been designed with that in mind (I don't have that board or a diagram to check). The manual says "Most stepper motors are designed to work at 12V, but will generally work (with reduced torque) at 6V", but 4.5 v is less than 6. ;)

So, for now, it will be better to find why it's not really moving at all. But we must have more information. What battery are you using, is it 3 x AA fresh alkalines, or 3 x AA NiMH, or what? Also what test gear do you have? If nothing, then we may be able to manage with the LEDs on the board. One method might be make the program run very slowly, but as you haven't posted any program code we can't tell you how to do that.

Cheers, Alan.
 

Technical

Technical Support
Staff member
Please provide a photo of how you have wired up all the wires, we would expect to rotate even at 4.5V.
'Wobbling' on the spot is generally because the coils are not being energised in the correct order.
 

westaust55

Moderator
@Vek,
It would remove a lot of doubt it you could just upload your code (in PE use Edit/copy for forum) and a clear photo of your project that will allow folks to trace through the wire and see what is connected where.

Your connections and code may prove to be spot on but there are often cases where a small typo or wiring error has ultimately proven to the the cause of all the grief.

Many folks here are volunteering their time for free to help others so please be patient and help those helping you by providing the requested information.
 

Technical

Technical Support
Staff member
Unfortunately various different brands/types of stepper do vary considerably with their coil alignment / cable colour coding, so you should always use the example provided with the particular stepper motor itself.
A sample written for one brand / type may need realigning to the coil alignment of the stepper actually in use.

This is the sample we provide on the paperwork with the shipped GBX008 - is this the example you are using?

Code:
[COLOR=Green]; part GBX008
; Steppper Motor Y129-5
; If you use the wires in the 6 pin connector
; order the following program will cause rotation


; Black           V+ (5-12V)
; White           V+ (5-12V)
; Yellow          output B.7
; Red             output B.6
; Brown           output B.5
; Orange          output B.4[/COLOR]


[COLOR=Black]init:       [/COLOR][COLOR=Blue]let [/COLOR][COLOR=Purple]dirsB [/COLOR][COLOR=DarkCyan]= [/COLOR][COLOR=Navy]%11110000   [/COLOR][COLOR=Green]'outputs 4 - 7 as outputs     [/COLOR]


[COLOR=Black]main:       [/COLOR][COLOR=Blue]let [/COLOR][COLOR=Purple]pinsB [/COLOR][COLOR=DarkCyan]= [/COLOR][COLOR=Navy]%11000000
            [/COLOR][COLOR=Blue]pause [/COLOR][COLOR=Navy]10
            [/COLOR][COLOR=Blue]let [/COLOR][COLOR=Purple]pinsB [/COLOR][COLOR=DarkCyan]= [/COLOR][COLOR=Navy]%01010000
            [/COLOR][COLOR=Blue]pause [/COLOR][COLOR=Navy]10
            [/COLOR][COLOR=Blue]let [/COLOR][COLOR=Purple]pinsB [/COLOR][COLOR=DarkCyan]= [/COLOR][COLOR=Navy]%00110000
            [/COLOR][COLOR=Blue]pause [/COLOR][COLOR=Navy]10
            [/COLOR][COLOR=Blue]let [/COLOR][COLOR=Purple]pinsB [/COLOR][COLOR=DarkCyan]= [/COLOR][COLOR=Navy]%10100000
            [/COLOR][COLOR=Blue]pause [/COLOR][COLOR=Navy]10
            [/COLOR][COLOR=Blue]goto [/COLOR][COLOR=Black]main[/COLOR]
 

Technical

Technical Support
Staff member
Please find below a tested program for the GBX008 using outputs 0-3 on the AXE049 board at 5V.

Please:
1) swap wired connections as colours stated below. We have kept the colours in the same order as the connector supplied on the stepper.
2) check the resistance of the coils with a multimeter (when disconnected from circuit) - the coils should give readings as shown. This proves the correct internal coil arrangement.

Code:
[COLOR=Green]; part GBX008
; Steppper Motor Y129-5
; If you use the wires in the 6 pin connector
; order the following program will cause rotation


; Black           V+ (5-12V)
; White           V+ (5-12V)
; Yellow          output B.3
; Red             output B.2
; Brown           output B.1
; Orange          output B.0


; To check coils are wired correctly
; white to red    = 75 ohms
; white to brown  = 75 ohms
; black to yellow = 75 ohms
; black to orange = 75 ohms[/COLOR]


[COLOR=Black]init:       [/COLOR][COLOR=Blue]let [/COLOR][COLOR=Purple]dirsB [/COLOR][COLOR=DarkCyan]= [/COLOR][COLOR=Navy]%00001111   [/COLOR][COLOR=Green]'outputs 0-3 as outputs[/COLOR]


[COLOR=Black]main:       
      [/COLOR][COLOR=Green]'25 x 4 steps * 1.8 degrees = 180 degrees
            
      [/COLOR][COLOR=Blue]for [/COLOR][COLOR=Purple]b1 [/COLOR][COLOR=DarkCyan]= 1 [/COLOR][COLOR=Blue]to [/COLOR][COLOR=Navy]25
            [/COLOR][COLOR=Blue]let [/COLOR][COLOR=Purple]pinsB [/COLOR][COLOR=DarkCyan]= [/COLOR][COLOR=Navy]%00001100
            [/COLOR][COLOR=Blue]pause [/COLOR][COLOR=Navy]10
            [/COLOR][COLOR=Blue]let [/COLOR][COLOR=Purple]pinsB [/COLOR][COLOR=DarkCyan]= [/COLOR][COLOR=Navy]%00000101
            [/COLOR][COLOR=Blue]pause [/COLOR][COLOR=Navy]10
            [/COLOR][COLOR=Blue]let [/COLOR][COLOR=Purple]pinsB [/COLOR][COLOR=DarkCyan]= [/COLOR][COLOR=Navy]%00000011
            [/COLOR][COLOR=Blue]pause [/COLOR][COLOR=Navy]10
            [/COLOR][COLOR=Blue]let [/COLOR][COLOR=Purple]pinsB [/COLOR][COLOR=DarkCyan]= [/COLOR][COLOR=Navy]%00001010
            [/COLOR][COLOR=Blue]pause [/COLOR][COLOR=Navy]10
      [/COLOR][COLOR=Blue]next [/COLOR][COLOR=Purple]b1


      [/COLOR][COLOR=Blue]pause [/COLOR][COLOR=Navy]1000
      
      [/COLOR][COLOR=Green]'reverse direction of steps to go the other way
      
      [/COLOR][COLOR=Blue]for [/COLOR][COLOR=Purple]b1 [/COLOR][COLOR=DarkCyan]= 1 [/COLOR][COLOR=Blue]to [/COLOR][COLOR=Navy]25
            [/COLOR][COLOR=Blue]let [/COLOR][COLOR=Purple]pinsB [/COLOR][COLOR=DarkCyan]= [/COLOR][COLOR=Navy]%00001010
            [/COLOR][COLOR=Blue]pause [/COLOR][COLOR=Navy]10
            [/COLOR][COLOR=Blue]let [/COLOR][COLOR=Purple]pinsB [/COLOR][COLOR=DarkCyan]= [/COLOR][COLOR=Navy]%00000011
            [/COLOR][COLOR=Blue]pause [/COLOR][COLOR=Navy]10
            [/COLOR][COLOR=Blue]let [/COLOR][COLOR=Purple]pinsB [/COLOR][COLOR=DarkCyan]= [/COLOR][COLOR=Navy]%00000101
            [/COLOR][COLOR=Blue]pause [/COLOR][COLOR=Navy]10
            [/COLOR][COLOR=Blue]let [/COLOR][COLOR=Purple]pinsB [/COLOR][COLOR=DarkCyan]= [/COLOR][COLOR=Navy]%00001100
            [/COLOR][COLOR=Blue]pause [/COLOR][COLOR=Navy]10
      [/COLOR][COLOR=Blue]next [/COLOR][COLOR=Purple]b1


      [/COLOR][COLOR=Blue]pause [/COLOR][COLOR=Navy]1000
      
      [/COLOR][COLOR=Blue]goto [/COLOR][COLOR=Black]main[/COLOR]
 
Last edited:
Top