Tell us about yourself!

Complete Your Profile
  • Mini CNC Machine Arduino Based & Adafruit Driver Motor L293D V1 & 2*Mini Stepper CD/DVD Player #1

    Hi I am impressed by your design. Would you please share some more design details?Like Servo details, lead screw detail, stepper driver (if not L293d based) etc.Lead screws are very costly. Is it possible to use a long bolt and nut to replace proper lead screw?

    Are you still struggling to get a better drawing?If so here are some things you can try out as I explain below.If you are using L293d shield, the major problem can be with microstepping. If you see the Afmotor library documentation they clearly mention that microstepping looses torque severely and any sort of retracting force can stop the movement while the motor runs in microstepping mode. Even when the pen touches the sheet it can generate that friction that can create the problem. I changed the code a little bit to use INTERLEAVE mode instead of MICROSTEP.Interleave is similar to microstep but with lesser resolution. I found with interleaving the motor traverses 16 mm for 200 steps. So steps per mm = 200/16=12.5. Torque is quite good. I also adjusted the speed of drawing and now it g...

    see more »

    Are you still struggling to get a better drawing?If so here are some things you can try out as I explain below.If you are using L293d shield, the major problem can be with microstepping. If you see the Afmotor library documentation they clearly mention that microstepping looses torque severely and any sort of retracting force can stop the movement while the motor runs in microstepping mode. Even when the pen touches the sheet it can generate that friction that can create the problem. I changed the code a little bit to use INTERLEAVE mode instead of MICROSTEP.Interleave is similar to microstep but with lesser resolution. I found with interleaving the motor traverses 16 mm for 200 steps. So steps per mm = 200/16=12.5. Torque is quite good. I also adjusted the speed of drawing and now it gives very neat drawings.The setting that worked for me is as below:const int stepsPerRevolution = 100;float StepsPerMillimeterX = 12.5;float StepsPerMillimeterY = 12.5;myStepperX.setSpeed(50);myStepperY.setSpeed(50);snippet from drawline() methodif (dx > dy) { for (i=0; i<dx; ++i) { myStepperX.step(1,sx,STEP); over+=dy; if (over>=dx) { over-=dx; myStepperY.step(1,sy,STEP); } delay(StepDelay); } } else { for (i=0; i<dy; ++i) { myStepperY.step(1,sy,STEP); over+=dx; if (over>=dy) { over-=dy; myStepperX.step(1,sx,STEP); } delay(StepDelay); } }

    View Instructable »
  • Mini CNC Machine Arduino Based & Adafruit Driver Motor L293D V1 & 2*Mini Stepper CD/DVD Player #1

    I had to change the motor mode to INTERLEAVE instead of MICROSTEP.

    View Instructable »
  • DebojitK commented on Make it BIG's instructable Small Arduino CNC3 months ago
    Small Arduino CNC

    Hi Made the cnc xy plotter based on L293d motor controller. It is drawing small pictures fine but it seems the x axis (pen is attached with this axis) line plots are jerky, where as y axis plots are very smooth. How to deal with this?

    View Instructable »
  • DebojitK commented on amandaghassaei's instructable Arduino Audio Output1 year ago
    Arduino Audio Output

    I did a test on the timings of direct port write. I used the following pins: PB1,PB0, PD7,PD6,PD5,PD4,PD3,PD2 ()leaving PD1 and PD0 for rx/tx). PORTD = (PORTD & B00000011)|((input<<2)&B11111100); PORTB = (PORTB & B11111100)|((input>>6)&B00000011);These two lines set the input on the aforementioned pins with direct bit-banging write method described. The result is astonishing- It only takes ~1.6 usec to execute these two lines. So for interrupt service routine you get ample time to do other processing.Here is the code:#include "Arduino.h"//The setup function is called once at startup of the sketchuint8_t input=100;String inputString="";void setup(){// Add your initialization code here Serial.begin(115200);}// The loop function is call...

    see more »

    I did a test on the timings of direct port write. I used the following pins: PB1,PB0, PD7,PD6,PD5,PD4,PD3,PD2 ()leaving PD1 and PD0 for rx/tx). PORTD = (PORTD & B00000011)|((input<<2)&B11111100); PORTB = (PORTB & B11111100)|((input>>6)&B00000011);These two lines set the input on the aforementioned pins with direct bit-banging write method described. The result is astonishing- It only takes ~1.6 usec to execute these two lines. So for interrupt service routine you get ample time to do other processing.Here is the code:#include "Arduino.h"//The setup function is called once at startup of the sketchuint8_t input=100;String inputString="";void setup(){// Add your initialization code here Serial.begin(115200);}// The loop function is called in an endless loopvoid loop(){//Add your repeated code here testSerialEvent(); long sTime=millis(); for(long i=0;i<100000;i++){ PORTD = (PORTD & B00000011)|((input<<2)&B11111100); PORTB = (PORTB & B11111100)|((input>>6)&B00000011); } long eTime=millis()-sTime; Serial.println(eTime); Serial.print("["); for(int i=1;i>=0;i--){ Serial.print(((PORTB&(1<<i))>>i));Serial.print(" "); } for(int i=7;i>=2;i--){ Serial.print(((PORTD&(1<<i))>>i));Serial.print(" "); } Serial.println("]"); delay(1000); //output-every loop takes 170 msec that mean one iteration takes ~1.7 usec. Its too good.}void testSerialEvent(){ while(Serial.available()){ char c=(char)Serial.read(); inputString += c; if (c == '\n') { input=inputString.toInt(); inputString=""; Serial.print("Input->");Serial.println(input); break; } }}

    View Instructable »