Maker Pro
Maker Pro

Programming a stepper motor with Picaxe

Code:
#picaxe 28x2
main:
let b1 = 0 ; set b1 value
low B.2;
low B.5;
FOR b1 = 0 TO 1000
    high B.0 ; switch on output B.1
     pause 500 ; wait 0.5 seconds
     low B.0 ; switch on output B.1
     pause 500 ; wait 0.5 seconds
NEXT b1  
pause 1000; wait 1 seconds  
high B.5;
FOR b1 = 0 TO 1000
    high B.0 ; switch on output B.1
     pause 500 ; wait 0.5 seconds
     low B.0 ; switch on output B.1
     pause 500 ; wait 0.5 seconds
NEXT b1
pause 1000; wait 1 seconds
goto main
Hello,
I need some help for programming the stepper motor "https://docs.rs-online.com/9cd2/0900766b813f0a12.pdf" with PICAXE-28X2 SHIELD BASE "https://picaxe.com/docs/axe401.pdf", the driver that I'm using is STEPPER 4 CLICK "https://www.digikey.at/htmldatasheets/production/2455715/0/0/1/mikroe-2748.html"
The motor does not work.
You can see the program above.
Thank you in advance
 

Harald Kapp

Moderator
Moderator
How is the stepper driver connected to the Picaxe shield (B.0, B.2, B.5)?
What are the settings of the stepper driver?
How is the stepper driver connected to the motor?
 
upload_2021-8-19_8-58-44.png
As shown above in the pinout digram, I used B.2 to connect to ENABLE, B.0 connected to STEP trigger (PWM) and B.5 to DIRECTION, and RST connected to the reset of picaxe shield so I'm wondering if this is the right way to program the outputs pins in PICAXE Programming.
I checked the electric circuit, everything is working right supposedly. However, I think the problem is in the programming, cause it's my first time I'm using the Picaxe shield, and I couldn't find programming examples that are compatible with PICAXE-28X2 for stepper motor control.
upload_2021-8-19_9-30-0.png
 
Last edited:
Does the USB port work? I was impressed with my setup with open windows software Gcode Panel to an UNO with a $24 CNC shield on a 12V supply . Using gcode downloaded to UNO and Gcode Panel on a laptop. Watch out for motor supply ground noise if connected to an earth grounded tower interfering with USB port cable. Very nice User interface for XY control of acceleration, max speed and position recal with home switches. Uses touch jog buttons or user programmed Gcode files to run any pattern.
 
Last edited:
Top