Forgot your password?
No account? Register one!
September 10, 2009
Product ROB-08368 |
about 4 years ago
Thanks for your help.
The pwmout command takes the pin, the period, and the duty; for example, to yield 10,000 Hz with a 8 MHz resonator use: pwmout 2, 199, 400. The documentation mentions motor control.
The period and duty arguments must stay in sync to keep a certain duty cycle.
This driver spec said minimum 1 uS signal high time and 1 uS signal low time. That’s 500,000 Hz. That would be 18,750 rpm - way higher than I need.
At 10,000 Hz, my math says the motor should be doing 375 rpm, but it either goes ~48 rpm for a Hz in a limited range, or it just sits there and vibrates, if outside that range.
FYI, for this code:
PulsOut 2, 1
which is a 1uS pulse, it goes about 48 rpm.
And for this code:
It go about 48 rpm using this code also.
The voltage to the stepper is 5V.
What am I doing basically wrong?
If this stepper has a maximum rpm, what is it? Where is that documented?
pwmout 2, 199, 400
PulsOut 2, 1
This is my first stepper and I have a question.
I’m controlling this board from a
PICAXE 08M. I’m controlling a Sparkfun stepper (ROB-09238) .
I’m trying to use the PwmOut command to control the speed.
I’m using duty cycle 50%.
I can get it to turn or stop, and change the direction.
But I can’t seem to control the speed.
It just seems to go one slow speed (~60 rpm or less),
for a limited range of PwmOut period values;
outside that range, it just hums but does not turn.
What am I doing wrong?
PwmOut looked like the ideal way to do this…
Using the Sparkfun stepper (ROB-09238)
and this EasyDriver v3 (ROB-08368):
I wanted to share my findings
for (newbies to stepper motors) on this combination:
The EasyDriver has a 4-hole jumper (JP4 on the schematic).
The first two holes (marked A) and the second two holes (marked B) go with chip outputs 2A, 2B, 1B and 1A, respectively. 1A/1B go to one coil on the stepper; 2A/2B go to the other coil on the (bipolar) stepper motor.
On the stepper motor itself, the red/green wire pair go to one coil in the motor;
The yellow/blue wire pair go to the second coil.
1. In terms of the 4 holes on the EasyDriver v3 board, looking down, all of the following color assignments give clockwise stepper rotation when the DIR input is high:
(R=Red, G=Green, Y=Yellow, B=Blue): BYRG, RGYB, YBGR, GRBY
Red and Green must be adjacent; Yellow and Blue also must be adjacent; otherwise, the motor vibrates but does not turn.
If you reverse the order of 1 pair of coil wires (red/green) or (yellow/blue) the direction reverses to counter-clockwise when direction pin is high.
No public wish lists :(