Hello Community,
i recently started to build my own CNC machine.
Just because I have the time and want to fresh up my knowledge (which is not very much) about all this stuff and of course, learn new things.
I am still in the beginnen process but just because of a problem what I simple can't find a solution for.
All the mechanics are working well and waiting to be motorized and controlled.
i googled the whole world, but I can't solve the problem.
My problem sounds simple: I just can't bring the motor to turn. It is just vibrating. But I am sure, that the reason is not the wiring of my motor, i checked it without the motor driver, just the l298amp and it worked very well well.
So here is my set-Up:
- Arduino MEGA2560
- L297
- L298N Board (I think anywhere here is the mistake, cause it's a board, maybe can't communicate to l297 like i though ?..)
this: http://bilder4.eazyauction.de/marotr...0_2e921a00.jpg
- NEMA 17, 12V 0.4A 200steps/rev StepperMotor
this: http://www.omc-stepperonline.com/dow...HS13-0404S.pdf
- 12V from old PC-Powersupply
and now some wiring Detail, I used this circuit:
http://www.st.com/web/en/resource/te...CD00000063.pdf
L297:
- on the OSC pin: 3,3nF / 22kOhm
- RS1, RS2 = 2,5Ohm --> Vref = 1V
- i soldered cables to pin 1 and 15 of the L298N on it's Board to connect it with Sense's and RS's
- Vref = 1V, with voltagedevider 40kOhm, 10kOhm
- HOME, SYNC -> empty
- ENA/ENB -> INHA/INHB
- RESET = 5V
- all GND's together, of L298N Board, L297, Arduino
- L297 gets 5V from Arduino
- L298N gets the 12V power supply, for itself and for motor
I think this is the important information. the rest is wired as seen in the circuit diagram.
And yes.... it is just vibrating, and making music.. but it won't turn, or even move.
I checked the motor wiring a hundred times and like i said, the motor works fine if I leave out the L297 and drive the L298N via 4channel Stepper.h from arduino directly
from 50 to 150RPM).
Here is the sketch:
int smDirectionPin = 8; //Direction pin
int smStepPin = 4; //Stepper pin
int EN = 6; // Enable pin
void setup(){
pinMode(EN, OUTPUT);
pinMode(smDirectionPin, OUTPUT);
pinMode(smStepPin, OUTPUT);
Serial.begin(9600); }
void loop(){
pinMode(EN, HIGH);
digitalWrite(smDirectionPin, HIGH);
for (int i = 0; i < 200; i++){
digitalWrite(smStepPin, HIGH);
delayMicrosenconds(4000);
digitalWrite(smStepPin, LOW);
delayMicroseconds(4000);
}
pinMode(EN, LOW); delay(1000);
}
I would be very grateful, if somebody has an advice, what to try next.
Thanks,