hi,
I bought a RB-Ada-138 stepper motor in your shop 2 months ago and I would like to make it spin. I am using an arduino with a Arduino motor shield and a 12V batterie. I couldn t make it spin so I though the problem was coming from my code but I saw a video where it is shown that if we aplly a 12V directly in one of the two coils (red/yellow or green/grey) the motor spin step by step but mine do not.
Can you help me?
Alexis Monfilliette
Which motor shield are you using? Have you checked for a wiring diagram for a stepper motor, as well as sample code?
The other issue might be the power supply. The more information you provide, the better we can help.
I am using a Dual DC motor Shield with an Arduino Uno,
my wiring is :
red =>M2-
yellow => M2+
green => M1-
Grey => M1+
my code is:
[code]#include <AFMotor.h>
AF_DCMotor moteur1(1);
void setup() {
moteur1.run(RELEASE);
}
void loop() {
moteur1.run(FORWARD);
moteur1.setSpeed(256);
delay(1000);
moteur1.run(RELEASE);
delay(1000);
moteur1.run(FORWARD);
moteur1.setSpeed(200);
delay(10000);
}
[/code]
I am using a 2500 mah 11.1V battery.
the motor vibrate but not move.
Thank you for your interest.
Which informations do you need?
Which motor shield specifically? Please provide a link.
It sounds like either the code is wrong or the connections are wrong.
Attached you will find the tutorial on how to connect a stepper to that shield, including sample code.
Follow it step by step and give it another try.
cyt-55-tutorial.pdf (732 KB)
amp is not declared on the scope
how should I declare it?
I took the library from github:
github.com/CytronTechnologies/C … eld2AMotor
By the way, thank you for your help.
It looks like a typo in their code ("&" should be the symbol &)
oh I see, allright I ll test it as soon as I come back to the office monday,
Thanks
Allright this : “&lt;” means “<”
my code is running and I made the wiring same as your pictures.
the LD4 of my motor shield is incresing and decreasing.
With a voltmeter I can read A permanant 4.20 volt for the red/yellow wire which correspond to the black/red for your stepper motor. And in the grey/green ( white/yellow for you) the voltage move from 0Vto 3.8V with a few time at 1.9V .
(for information my battery is a 12.34V LiPo)
The motor do not move at all, it does a very very little noise when the LED 4 is turned on.
here is the code corrected
[code]#include “Shield2AMotor.h”
// Connect 4 pin on SHIELD‐2AMOTOR to “Signed Magnitude” mode
Shield2AMotor motor(SIGNED_MAGNITUDE);
signed int leftSpeed, rightSpeed;
int i;
void setup()
{
}
void loop()
{
// Rotate 360 degree CW
for(int i = 0; i<50; i++)
{
motor.control(100, 0);
motor.control(0, 100);
delay(10);
motor.control(0, 100);
motor.control(-100, 0);
delay(10);
motor.control(-100, 0);
motor.control(0, -100);
delay(10);
motor.control(0, -100);
motor.control(100, 0);
delay(10);
}
delay(1000);
// Rotate 360 degree CCW
for(int i = 0; i<50; i++)
{
motor.control(0, -100);
motor.control(-100, 0);
delay(10);
motor.control(-100, 0);
motor.control(0, 100);
delay(10);
motor.control(0, 100);
motor.control(100, 0);
delay(10);
motor.control(100, 0);
motor.control(0, -100);
delay(10);
}
delay(1000);
}[/code]
Note that & shows up a few times in their sample code.
The shield in the image is not RB-Cyt-155. Is that your photo?
On RB-Cyt-155, you need to set the jumpers to the right pins.
robotshop.com/en/2a-dc-motor … hield.html
If the board you have is different, it’s important to read through the guide step by step.
It could also be that you have the coils wrong.
Indeed, I do not have the same shield.
I saw a video in which I could see someone apply 12V directly between the 2 sides of one of the two coils of bipolar step motor. The motor was spinning step by step. It was also a NEMA. why is it not working for me?
I was thinking about using a double H-bridge to control my motor and get rid of the motor shield but first I would like to control it manualy.
You really need to read through the manual for the shield you have and use their sample code. We cannot troubleshoot something we do not carry.