hi guys.
im new arduino , have uno r3 board,controlling 200 step, 12vdc, 0.4a stepper motor l293n driver assisted bd139 transistors.
my aim control speed, step amount , delay in-between steps label application m/c. (labels coming off roll)'all controlled knobs (pots).later suppose i'll have add sensor read label postition (optical sensor)but ill leave alone.
i'v been playing around , trying, following jigs on net. cant find me started, still alot of greek me. i'v managed going-
[code
pls appreciated
artios
im new arduino , have uno r3 board,controlling 200 step, 12vdc, 0.4a stepper motor l293n driver assisted bd139 transistors.
my aim control speed, step amount , delay in-between steps label application m/c. (labels coming off roll)'all controlled knobs (pots).later suppose i'll have add sensor read label postition (optical sensor)but ill leave alone.
i'v been playing around , trying, following jigs on net. cant find me started, still alot of greek me. i'v managed going-
[code
code: [select]
#include <stepper.h>
const int stepsperrevolution = 200; // change fit number of steps per revolution
// motor
// initialize stepper library on pins 8 through 11:
stepper mystepper(stepsperrevolution, 8, 9, 10, 11);
int stepcount = 0; // number of steps motor has taken
void setup() {
}
// nothing inside setup
void loop() {
// read sensor value:
int sensorreading = analogread(a0);
// map range 0 100:
int motorspeed = map(sensorreading, 0, 1023, 0, 100);
// set motor speed:
if (motorspeed > 10) {
mystepper.setspeed(motorspeed);
// step 1/100 of revolution:
mystepper.step(stepsperrevolution / 100);
// set motor delay 2 sec
mystepper.step(stepsperrevolution);
delay(2000);
}
}
][/code] pls appreciated
artios
you need tell happens when try code.
post link datasheet stepper motor.
give details of power supply motor (volts , amps).
the l298 poor choice driving stepper motors. have @ stepper motor basics
...r
post link datasheet stepper motor.
give details of power supply motor (volts , amps).
the l298 poor choice driving stepper motors. have @ stepper motor basics
...r
Arduino Forum > Using Arduino > Motors, Mechanics, and Power (Moderator: fabioc84) > stepper motor control driver uno R3
arduino
Comments
Post a Comment