T-Shirt Forums banner

21 - 40 of 188 Posts

·
Registered
Joined
·
72 Posts
Discussion Starter #23
Epson r1400 have encoder with 360 pulses, Epson r1900 have encoder with 720 pulses. Because i must make two code for arduino. One for 360 pulses and other for 720 pulses. Just the way arduino code it works. Is very complicated and I can not share it.
To move the table, I used a stepper motor 2.8A and stepper driver 3A. This is only for test.
As the stepper driver heats'll replace it with a stronger 5A. When I'm all finished I will send you new videos.:)
 

·
Registered
Joined
·
472 Posts
Epson r1400 have encoder with 360 pulses, Epson r1900 have encoder with 720 pulses. Because i must make two code for arduino. One for 360 pulses and other for 720 pulses. Just the way arduino code it works. Is very complicated and I can not share it.
To move the table, I used a stepper motor 2.8A and stepper driver 3A. This is only for test.
As the stepper driver heats'll replace it with a stronger 5A. When I'm all finished I will send you new videos.:)
It's kinda sad how we come here seeking help but find it difficult to give back. There is only one instruction possibly two to make a change in stepper increments to make a complete 360 rotation in your code. Where is the complication in that?
 

·
Registered
Joined
·
227 Posts
Agreed. I would like to see the code more to see how he parses the incoming data. Driving a stepper is simple but knowing what the incoming data is and translating it would be useful information so no one has to reinvent that wheel.
 

·
Registered
Joined
·
72 Posts
Discussion Starter #30
Agreed. I would like to see the code more to see how he parses the incoming data. Driving a stepper is simple but knowing what the incoming data is and translating it would be useful information so no one has to reinvent that wheel.
Hi guy,
If you are interested so you enclose the underlying code for controlling Epson encoder on the stepper motor driver. I will share with you but you are cautiously examine my post.
All I show you, analysis and the rest you have to do it yourself.
I do not exactly one display case as well as dragonknight did not want anything more to answer the Functioning of the DTG. Therefore, I myself studied some with your help and some on other forum.
This is code:

Code:
[FONT=Courier New]#define encoder_a 2 //keep this on and interrupt pin
#define encoder_b 3 //keep this on and interrupt pin
#define motor_step 4 //can be any pin
#define motor_direction 5 //can be any pin

#include <delay.h>
volatile long motor_position, encoder;

void setup () {
  //set up the various outputs
  pinMode(motor_step, OUTPUT);
  pinMode(motor_direction, OUTPUT);
  
  // then the encoder inputs
  pinMode(encoder_a, INPUT);
  pinMode(encoder_b, INPUT);
  // enable pullup as we are using an open collector encoder
  digitalWrite(encoder_a, HIGH); 
  digitalWrite(encoder_b, HIGH); 
  
  // encoder pin on interrupt 0 (pin 2)
  attachInterrupt(0, encoderPinChangeA, CHANGE);
  // encoder pin on interrupt 1 (pin 3)
  attachInterrupt(1, encoderPinChangeB, CHANGE);
  encoder = 0; //reseet the encoder position to 0
}

void loop() {
  //do stuff dependent on encoder position here
  //such as move a stepper motor to match encoder position
  //if you want to make it 1:1 ensure the encoder res matches the motor res by dividing/multiplying
  if (encoder > 0) {
    digitalWrite(motor_direction, HIGH);// move stepper in reverse
    digitalWrite(motor_step, HIGH);
    digitalWrite(motor_step, LOW);
    delayMicroseconds(10); //_delay_us(200); //modify to alter speed
    motor_position++;
    encoder = 0; //encoder--;
  }
  else if (encoder < 0) {
    digitalWrite (motor_direction, LOW); //move stepper forward
    digitalWrite (motor_step, HIGH);
    digitalWrite (motor_step, LOW);
    delayMicroseconds(10); //_delay_us(200); //modify to alter speed
    motor_position--;
    encoder = 0; //encoder++;
  }
}

void encoderPinChangeA() {
  if (digitalRead(encoder_a)==digitalRead(encoder_b)) {
    encoder--;
  }
  else{
      encoder++;
  }
}

void encoderPinChangeB() {
  if (digitalRead(encoder_a) != digitalRead(encoder_b)) {
    encoder--;
  }
  else {
    encoder++;
  }
 }[/FONT]
These are the basic code but happily explore
 

Attachments

·
Registered
Joined
·
472 Posts
I will say thank you for all the others who may find this info useful.

Now here here is something back for your effort. Most of the noise generate by your build is due to vibration. Perhaps you could look at reducing the height of the table. And use thicker aluminum in some areas.
 

·
Registered
Joined
·
472 Posts
The diagram provided is a general diagram and would not be exact for printer connection. The printer encoder provide pulses at 3.3v and can be tapped off the relay board or directly off the encoder board. Most use the relay board. These boards can be damaged very easily you must take precaution while working with them. If you're not savvy with electronics find someone to help you out.

The arduino board input and output posts are on opposite sides of the board do not be confused by the numbering on the diagram.
 

·
Registered
Joined
·
72 Posts
Discussion Starter #33
I will say thank you for all the others who may find this info useful.

Now here here is something back for your effort. Most of the noise generate by your build is due to vibration. Perhaps you could look at reducing the height of the table. And use thicker aluminum in some areas.
spindle is 100cm long and 10mm thickness there are vibrations. The stepper motor is also loud so everything is loud. To reduce vibration and noise if you use the belt drive. At present, the noise does not bother me. I have a problem with printing ink white on dark clothing. I use 100% cotton and 4x movement of the head is very poor results. Look at the picture.
 

Attachments

·
Registered
Joined
·
101 Posts
I want to thank you for sharing your code and providing such helpful information and I also want to thank Priest for convincing you to post the code and for his good observations.

Regards to all !
 

·
Registered
Joined
·
72 Posts
Discussion Starter #36

·
Registered
Joined
·
472 Posts
spindle is 100cm long and 10mm thickness there are vibrations. The stepper motor is also loud so everything is loud. To reduce vibration and noise if you use the belt drive. At present, the noise does not bother me. I have a problem with printing ink white on dark clothing. I use 100% cotton and 4x movement of the head is very poor results. Look at the picture.
You could have poor quality ink. Give the white cartridges a good shaking before printing and see what gives. If the ink sits for a long time the pigment separates.
 

·
Registered
Joined
·
72 Posts
Discussion Starter #38
Where in the EU selling white ink for textiles and liquid pretreatment.
Is there in Europe a ink factory for ink textile.
China seller does not know that any white ink requires pretreatment. Can be tested in PVC T-shirts.
Cotton t-shirts very absorb white ink.
 

·
Registered
Joined
·
76 Posts
Hi Miki, thanks for the job done, be careful with the head, you must fill the cleaning station with liquid for cleaning every night, that part is very delicate.
White ink you can be dried and harms you the head, DTG all dark t-shirts must be pretreatment, the problem is not the head at 4 x
see this link for the care of the head
https://www.youtube.com/watch?v=Cl0Sq83RFno

applying liquid pre-treatment

https://www.youtube.com/watch?v=YHChve-sfT0

I would remind you, the ink is not bad, you take care of the head in the evenings or at the end of print
 
21 - 40 of 188 Posts
Top