Welcome! Log In Create A New Profile

Advanced

Printer mechanism positioning problems

Posted by kkannan 
Printer mechanism positioning problems
November 06, 2009 08:38AM
Hi All,

I am building an XY table out of two old printer mechanisms and 3.5" in floppy drive as Z axis which is holding a pen right now. The electronics are arduino uploaded with reprap firmware 1.1 and stepper drivers are l297/298 combos.

This crazy contraption is working as a plotter and i could draw some pictures. The problem is, i don't have the specs for one of the printer head driving motor. It has got a 15 mm timing pulley attached to the belt and no word about step angle. I stuck a pen and tried to measure the angle by plotting 1000 step line and divide by inch to obtain the steps/in and came to the conclusion that it is 0.9 deg.

Here i discovered that 1000 steps forward and 1000 steps backward doesn't come to the same position. Each successive 1000 back and forth movement keeps shifting the start and stop positions to one side. I guess it is not missing the steps, because the distance between start and stop is consistent.

Here is the code snippet which moves 1000 steps forward and reverse the same amount once i click on the serial monitor in Arduino (alpha) IDE.

boolean done = false;
void loop(){
  if(!done){
  digitalWrite(7,HIGH);// Enable stepper motor
  digitalWrite(6,LOW); // Direction 

  for(int i = 0;i < 1000;i++){
      digitalWrite(5,HIGH); // step pulse
      delay(5);
      digitalWrite(5,LOW);  // step pulse
      delay(5);
  }

  digitalWrite(6,HIGH);    // reversing the direction
  delay(5);
  
  for(int i = 0;i < 1000;i++){
      digitalWrite(5,HIGH); // step pulse
      delay(5);
      digitalWrite(5,LOW);  // step pulse
      delay(5);
  }
  
  done = true;
  digitalWrite(7,LOW);     // disable motor
  }

I tried changing the board with same results. BTW i am using the unipolar motor as bipolar by using the half coil config. mechanisms are stacked one over the other and the bottom one driving a thick board to hold paper. Both motors are behaving the same way. But i have to mention that the mechanisms are shaky at various places.

Am i missing something obvious ?

Thanks
Kannan

(Running on Vista Home pre/arduino/arduino (Alpha)/ reprap 1.1

Edited 1 time(s). Last edit at 11/06/2009 09:09AM by kkannan.
Re: Printer mechanism positioning problems
November 06, 2009 09:36AM
There should be a delay after "digitalWrite(6,LOW); // Direction". I.e. there is a minimum time between changing the direction and pulsing the step line.


[www.hydraraptor.blogspot.com]
Re: Printer mechanism positioning problems
November 06, 2009 11:04AM
oh my!!, thanks nophead, you are right. I put delay after every digitalWrite and it works like a charm. Though on power up every axis moves a little bit.

Thanks
Kannan smiling smiley
Re: Printer mechanism positioning problems
November 07, 2009 02:01AM
Back with more issues...

Now that i am sure there is no slip in the X-axis, i tried to draw a circle. It is not ending where it started, and the result is a spiralsad smiley

X-axis mechanism is timing pulley and belt, and Y-axis is printer platen driving a thick board to hold paper. Surprisingly the above mentioned drift is not occurring in Y-axis.

The g-code i fed into the arduino is accurate, since i checked it through CNC sim.

Have anybody encountered this kind of problem ?

Thanks
Kannan
Re: Printer mechanism positioning problems
November 10, 2009 05:01AM
I think you are still stepping too fast typical safe timeing for pulsing the step signalwould be 5000ns step pulse length with a 5000ns delay before the next step pulse.

Once you have reliabe stepping you can reduce these timings slightly for optimal stepping speeds.

You are seeing a spiral as the steps are too fast and are being lost.


Bodge It [reprap.org]
=======================================

BIQ Sanguinololu SD LCD board BIQ Stepcon BIQ Opto Endstop
BIQ Heater Block PCB BIQ Extruder Peek clamp replacement BIQ Huxley Seedling
BIQ Sanguinololu mounting BIQ standalone Sanguinololu or Ramps mounting Print It Stick It Cut it


My rep strap: [repstrapbertha.blogspot.com]

Buy the bits from B&Q pipestrap [diyrepstrap.blogspot.com]
How to Build a Darwin without any Rep Rap Parts [repstrapdarwin.blogspot.com]
Web Site [www.takeaway3dtech.com]
Re: Printer mechanism positioning problems
November 13, 2009 11:28PM
Hi BodgeIt,

I had such doubt and tried to reduce the feedrate very low and the drift is still occurs. Obviously the two motors are of different ratings and i don't know the step angle of the printer motor. After drawing a 1000 steps line with 16MM pulley, it moved about 165MM and made me conclude it is 1.2 deg motor.In any case the firmware considers only steps/mm and nothing else.

The distance between successive drift is constant, after the move is completed i could feel by touching, the motors takes a step backward or forward.

In its heydays the printer was known for sturdiness, speed and i am driving at half its full speed.

Just wonder XY motors should be identical since the firmware drives them at same feedrate.

Thanks
Kannan
Re: Printer mechanism positioning problems
November 14, 2009 07:08AM
kkannan Wrote:
-------------------------------------------------------
> Hi BodgeIt,
>
> I had such doubt and tried to reduce the feedrate
> very low and the drift is still occurs. Obviously
> the two motors are of different ratings and i
> don't know the step angle of the printer motor.
> After drawing a 1000 steps line with 16MM pulley,
> it moved about 165MM and made me conclude it is
> 1.2 deg motor.In any case the firmware considers
> only steps/mm and nothing else.
>
> The distance between successive drift is constant,
> after the move is completed i could feel by
> touching, the motors takes a step backward or
> forward.
>
> In its heydays the printer was known for
> sturdiness, speed and i am driving at half its
> full speed.
>
> Just wonder XY motors should be identical since
> the firmware drives them at same feedrate.
>
> Thanks
> Kannan


If the step angle of one of the motors is 1.2deg not the desired 1.8 then I would assume this is your issue.

You may be able to compensate by modifying the software, but the open loop error gain will shift in a different manner and may still cause drift.
Re: Printer mechanism positioning problems
November 14, 2009 08:07AM
Hi anodemini2,

May be you are right. I drew a 2"x2" square and measured the sides and tried reconcile one side by altering steps/mm. For a moment i thought i had a solution, no, after umpteen tries i had to give up finally. I have similar motor for the drifting axis, but the problem is existing pulley has 8mm od and the motor is 10mmsad smiley which made me to leave the original motor in the first place.

OK, moral of this story is keep the motors identical, i think i read this warning somewhere.

Cheers/
Re: Printer mechanism positioning problems
November 14, 2009 01:58PM
I can't see any reason why the motors need to be the same on each axis. the steps /mm can be different for each axis. You simply need to keep the maximum speed within the capability of the slowest motor.


[www.hydraraptor.blogspot.com]
Re: Printer mechanism positioning problems
November 15, 2009 08:29AM
Good to hear from you nohead,

Exactly that is what puzzled me, the parameter X_STEPS or Y_STEPS in configuation.h file is not used anywhere. I am using the simplified version of reprap firmware which has only four files. It is gCode.pde,configuation.h,process_string.pde and stepper_control.pde. Arudino is directly driving the pins and no other i2c boards or anything.

X-Axis motor is from autonics, Korea which is driving the platten with 35mm dia and Y_Axis motor is what came with the printer. The motor company and the printer company is long gone before the internet era, so the details not available. I thought i can tweak the steps/mm and close the gap between the two motors. But somehow i couldn't achieve that. Here is the numbers

X-Axis 1.8 deg motor 35mm platten ----- 1.8182 steps/mm

Y_Axis 1.2 deg (derived from 165 mm in 1000 steps) 16mm pulley --- 4.6619 steps/mm

Is anything wrong with these calculations ?

Thanks
Kannan

BTW, that pear cutting idea is interesting, only if it can harvest coconut there is huge price money waiting in Indiasmiling smiley

Edited 1 time(s). Last edit at 11/15/2009 08:33AM by kkannan.
Re: Printer mechanism positioning problems
November 15, 2009 09:42AM
I haven't use the RepRap firmware myself but I think the definition you need to change is X_STEPS_PER_MM, Y_STEPS_PER_MM. [reprap.org]

I think it would need to be scaled up somewhat for coconuts!

Edited 1 time(s). Last edit at 11/15/2009 09:43AM by nophead.


[www.hydraraptor.blogspot.com]
Re: Printer mechanism positioning problems
November 15, 2009 10:44AM
Yes, i am tweaking the X_STEPS_PER_MM and Y_STEPS_PER_MM and arrived at the ratio between the axes. If i draw a square it somewhat agrees, but ends an mm short of the end point. The g-code generated is tested in a simulator and it is perfect.

Upon further investigation by drawing concentric circles and concentric squares, the squares come out perfectly, meaning one inside the other centered properly. However in the case of concentric circles, the center is drifting in the Y_AXIS (printer carriage motor driving timing pulley and belt) and ended up drawing something like an eye looking sideways!!.

So while both axes are activated something happens to Y-Axis which makes it to drift further and further. I have interchanged the control pins and made sure it happens on only timing pulley/belt driven one.

Any thoughts about where exactly the problem lies ?

Thanks
Kannan

The coconut issue

[www.business24-7.ae]

Edited 1 time(s). Last edit at 11/15/2009 11:02AM by kkannan.
Re: Printer mechanism positioning problems
November 18, 2009 08:47AM
Whoof, finally as a last ditch attempt i bought a new 1.8 deg motor and the problem went away instantly. Even if the aspect ratio between x-y is not matched, the lines are connecting beautifully.

So it is better to have both x and y motor with identical step angle to save this trouble.

Cheers/
Re: Printer mechanism positioning problems
May 24, 2010 02:47PM
Just following over this older post here, and it sparked some interest as I am looking to accomplish much of the same results you did. I am deconstructing an old HP inkjet printer, and want to create a flat bed printer from the parts, but wasnt sure what logic to use to make the X and Y axis move and get the print heads to spray ink in the proper locations.

So you were able to accomplish this using Arduino and RepRap's firmware? Any notes you can pass on to me that helped you get to a fully functional piece?
Sorry, only registered users may post in this forum.

Click here to login