T-Shirt Forums banner
1 - 20 of 30 Posts

·
Registered
Joined
·
95 Posts
Discussion Starter · #1 · (Edited)
I`ve made description of all pins on stock relay board.
This board is from R1900/R2880.

To get full control with microcontroller you need to connect to microcontroller:
- PE sensor for paper detection emulation (get rid of PE sensor)
- Encoder A, B for obvious resons
- APG sensor to emulate APG unit (get rid of AGP unit)
- GND for obvious resons

The easiest way is to solder wires to selected pins and connect it directly to arduino.
Don`t forget that all sensor and encoder runs on 3,3v.

If you made that far to need above info you will compete your mod easly.
If you lack skills of basics electronics or microcontroller programing I wont help you. All you need is to read 2 books.
First about basics electronics and second about programing microcontroler of your choice (AVR, ARM, etc).

My code won`t run on your AVR so I don`t share my code.
To run it you will have to have the same configuration (limit switches, control buttons, stepper driver, correct pinouts, etc.).



For basic configuration you will need 11 pins (9 digital, and 2 analog) on microcontroller so arduino uno is just fine.
- 3 for stepper driver (step, dir, and enable signals) - digital pins
- 2 for limit switches - digital pins
- 2 for encoder - digital pins
- 2 for APG and PE sensor emulation - analog pins (or digital, depending on design)
- 2 for buttons (load, unload) - digital pins

Adding other features need more pins so arduino MEGA is better.
- 2 for LCD (on i2C bus)
- 3 for another stepper driver (height adjustments of plate) - digital pins
- 3 for joystick (easier control than adding more buttons or keypad) - analogpins
- 1 for printer pause (cover open sensor) - digital pin

Cheap and simple AVR have enough power to run it but you have to use hardware timers, interrupts, and direct port manipulation on ISR routines.
 

·
Registered
Joined
·
95 Posts
Discussion Starter · #3 ·
what is the code, or sketch of arduino, for run the printer in mode microcontroller?
My code won`t run on your AVR so I don`t share my code.
To run it you will have to have the same configuration (limit switches, control buttons, stepper driver, correct pinouts, etc.).

Just read 2 books. First about basics electronics and second about programing microcontroler of your choice (AVR, ARM, etc). There is no complete solution for free.
 

·
Registered
Joined
·
30 Posts
Hi John2880!
Thank you for foto. I have r1400 and relay board is simily, but for me, I have on pinout to ASF and PE still +3.3V on state without paper. When ASF turn, is 0V (that is ok, I need only read from ASF for make simulate PE). That I have a problem to make signal for PE input to mainboard, becouse on state without paper, pin out have +3.3V, on state with paper - proses with print- (switch is open), on the pinout from PE switch I meansured 0V.
Do you have some idea ( I'm surprised for different with r1900).
 

·
Registered
Joined
·
95 Posts
Discussion Starter · #5 ·
Hi John2880!
Thank you for foto. I have r1400 and relay board is simily, but for me, I have on pinout to ASF and PE still +3.3V on state without paper. When ASF turn, is 0V (that is ok, I need only read from ASF for make simulate PE). That I have a problem to make signal for PE input to mainboard, becouse on state without paper, pin out have +3.3V, on state with paper - proses with print- (switch is open), on the pinout from PE switch I meansured 0V.
Do you have some idea ( I'm surprised for different with r1900).
It`s easy.
I have 2 limit switches on my build.
When powering up I get my plate to first one (load/unload tshirt position) and when I loaded new tshirt, plate go to second limit switch (ready to print position).

The distance between them is 95000 steps (for stepper).
In ready for print position I reset steps counter (zeroing) and enable encoder signals from printer.

When I click print printer loads plate so microcontroller trigger PE switch for >3000 steps and <76000 steps). It`s 100% error free in sheet mode. When printer finish printing it eject plate. It stops automatically at first limit switch and disable encoder signal.
 

·
Registered
Joined
·
30 Posts
I look for inspiration of HIGH ADJUSMENT OF PLATEN, Sorry John, you have a automatic mechanism, please, can you show to me image of this mechanism, I need only inspiration, I can construct this with automatic drive with steeper and sensor.
by the way, my base construct is fully function for print with limits and LOAD, EJECT platen. I have Adruino Uno R3 with one stepper, belt drive very simily as X-base from UFO.
Thank you.
 

·
Registered
Joined
·
95 Posts
Discussion Starter · #9 ·

·
Registered
Joined
·
101 Posts
I used this in all my builds:



They`are a lot cheaper in my country than hiwin linear guide. But if you can buy hiwin and price is resonable get hiwin. Both will be working fine in DTG.
Thank you for sharing details, I also wanted to choose the same version as you did, yet before I procced ordering this, I want to know if this kind of rails produce high noise when the bearings slide on them. I know that highwin setup is almost perfectly silent.
Looking forward for your reply.
Regards!
 

·
Registered
Joined
·
95 Posts
Discussion Starter · #13 ·
You can hear when the bearings are moving.
They are noiser than hiwin but still quieter than working printer.
I use them because the`re 50% cheaper than hiwin in my country so quality/price ratio is OK.
If I can get cheaper hiwin I will definitely use hiwin.
Hiwin is generaly better, and more compact in size.
 

·
Registered
Joined
·
101 Posts
Hey John hope everythig is working good for you.
I have a few questions if you have the time to answer and help a little.

1. when you build the electronics for push buttons to move the plate (load t-shirt, go to print position), did you used external resistors (pullup or pulldown resistor) or used the internal arduino pullups?
Also did you used 5V for the push button from external power source or from arduino 5V output?
I presume you used also debouncing for the push buttons.

3.did you disabled input from the push buttons while printer is printing?

4. the output signal coming out from arduino pins that connects to printer relay board in order to emulate PE and APG sensors needs to be 3.3V, so did you used resistors to lower the voltage from 5V to 3.3V, or something else like level shifters, buffer chips.

5. can you also help a little with the math behind calculating the correct gear ratios to use with the 4mm lead ballscrew, it looks like I'm getting some sort of error in my calculation.(stepper driver set to 1/8 - 1600 microsteps )
 

·
Registered
Joined
·
95 Posts
Discussion Starter · #19 ·
1. I dont use extrenal resistors with buttons, I also dont use extrenal +5v for buttons.
I use build in pullup resistor and simply connect:
GND---->button---->arduino digital input pin (with pullup)
2. I use hardware timers build in atmega for debouncing and some more things like generating step signal for stepper motor, refreshing LCD, etc.
3. I disable buttons while printing.
4. for APG and PE emulation I use arduino analog pins that create +3,3v
 

·
Registered
Joined
·
101 Posts
Thank you very much for your reply John.
It's a great idea to use two analog pins as 3.3v output for the PE and APG, thanks a lot for this info.
and also thanks for sharing the way you wired your push buttons.
Hope to also get some help later if needed.
Kind regards!
 
1 - 20 of 30 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top