Hi;
I have built mini CNC plotter using some old DVD drives.
The inspiration originally came from this video.
The build uses an Arduino Nano and two L293D motor driver IC's (Not boards).
The video included links to a couple of gcode images and an Arduino Sketch which appears to listen for serial data (the gcode file) and activate the stepper motors and servo to perform the drawing of the image.
The promise of a second video on how to use it never materialised however the creator Tapendra Mandal, has uploaded a simplified model but now appears to be using a motor driver board.
What I need help with is how to get my existing (the original machine) working. I have done loads of research about using GBRL and UnversalGcode Sender etc but just as I get one thing working I hit another problem.
So can anyone help me use my get my DIY CNC machine working and printing images?
I am using a MacBook Pro but also need to be able to do this on a PC.
Here is the thread I started regarding the electronics here regarding connecting everything up.
OK so I have checked my wiring again and it turns out that my power supply was wired the wrong way round!!
Now I have modified some Arduino code that I used to test one of the stepper motors (but then I was using a L298N motor driver and the stepper motor worked)
Anyway I have modified the code to add the second stepper motor and still nothing seems to be happening however it has just gone really quite and I can hear at least on of the motors trying to engage (a very quiet whine (1.5s on, .5 of 1.5s on, 2s off).
The power supply is kicking out about 5.5v and I used it when I was using the L298N.
Any ideas?
Here is my test code:
/*
Stepper Motor Control - one revolution
This program drives a unipolar or bipolar stepper motor.
The motor is attached to digital pins 8 - 11 of the Arduino.
The motor should revolve one revolution in one direction, then
one revolution in the other direction.
Created 11 Mar. 2007
Modified 30 Nov. 2009
by Tom Igoe
*/
//amended by Bill Harvey 19/03/17 for school project using DVD drives
#include <Stepper.h>
const int stepsPerRevolution = 170; // (amended for DVD drive 19/03/17) change this to fit the number of steps per revolution
// for your motor
// initialize the stepper library on pins 8 through 11:
Stepper myStepperY(stepsPerRevolution, 2,3,4,5);
Stepper myStepperX(stepsPerRevolution, 8, 9, 10, 11);
void setup() {
// set the speed at 60 rpm:
myStepperY.setSpeed(60);//was 60
myStepperX.setSpeed(60);
// initialize the serial port:
Serial.begin(9600);
}
void loop() {
// step motor one one revolution in clockwise direction:
Serial.println("clockwise");
myStepperY.step(stepsPerRevolution);
delay(500);
// step motor one one revolution in counter clockwise direction
Serial.println("counterclockwise");
myStepperY.step(-stepsPerRevolution);
delay(500);
// step motor two one revolution in clockwise direction:
Serial.println("clockwise");
myStepperX.step(stepsPerRevolution);
delay(500);
delay(500);
// step motor two one revolution in counter clockwise direction
Serial.println("counterclockwise");
myStepperX.step(-stepsPerRevolution);
delay(500);
}
And here is my circuit (I hope I have wired it and drawn it correctly)
(The power supply is shown as the USB connector at the bottom right of the circuit
My gut feeling by the sound is that the motors are not getting enough power?