EMC2 Configuration for H1?

A place for all things EMC/LinuxCNC
User avatar
zaphod
Prints-a-lot
Posts: 22
Joined: Thu Apr 19, 2012 10:03 am
Location: Cedar Rapids, IOWA

EMC2 Configuration for H1?

Postby zaphod » Thu May 10, 2012 11:00 pm

ok, I give up. Anyone have an EMC2 configuration for the H1?
Thanks

jcugnoni
Plasticator
Posts: 18
Joined: Sat May 19, 2012 5:11 am

Re: EMC2 Configuration for H1?

Postby jcugnoni » Sat May 19, 2012 7:42 am

Joel Cugnoni May 19th 2012

LinuxCNC/EMC2 with Seemecnc H-1 3d printer
------------------------------------------

I have just built my Seemecnc H-1 printer and managed to make it work in EMC2 / Linux CNC 2.5. I am running the stock kit hardware: Tb6560 3 axis board with Easystepper on pins 16/17 with 1.75mm hotend. The hardware has been setup according to the Electronics Manual (jumper and diode mods). I have not yet printed anything as I am waiting for ABS to be delivered but I have all axis working properly and Slic3r Gcode running (with slight modifications). Calibration is based on the default recommended settings and all units are in millimeters!

This is how I did it:
1) downloaded the latest LiveCD from linuxcnc.org and installed it on a USB drive with Ubuntu 'Startup disk creator' (burning it to a cd should work as well)
link: http://linuxcnc.org/index.php/download/21/

2) connect the parallel cable to the PC and power up your H1. Boot from the USB drive / LiveCD in the 'Try Ubuntu' mode and run Applications -> CNC ->Latency test. Stress your PC by opening applications, running glxgears in a terminal and copying files. Then take note of the largest Max Jitter number (in ns). You should get something in the order of 10'000-15'000 to have a good control of the printer.

3) run Applications-> CNC -> Stepconf wizard

4) setup a new machine with the following options:
name: Seemecnc-H1
axis config: XYZA
driver type: Other
units: mm
Step time: 2000 ns
Step space: 2000 ns
Direction hold: 20000 ns
Direction setup: 20000 ns
Parport address 0x378 (default)
Base Period max Jitter 150000 (note 1)
Press 'Forward'
(note 1: set max jitter = 1.1 * measured max jitter to have some margin)

5) Skip the Advanded config option window and move to Parallel port setup. Set the pins as follows (default = not inverted):
Pin 1: X step
Pin 2: Digital out 0, Inverted **
Pin 3: Y Direction
Pin 4: Z Direction, Inverted
Pin 5: Z Step
Pin 6: Amplifier enable **
Pin 7: X Direction
Pin 8: Y Step
Pin 9 to 13 & 15: unused
Pin 14: Digital out 1, Inverted **
Pin 16: A direction, Inverted
Pin 17: A Step

Note: it is easy to make a mistake and exchange pin 16 & 17, so if the extruder does not work jsut swap the role of these 2 pins.

(**this enables the axis driver, without it, nothing works)

6) X Axis configuration:
motors steps per rev: 200
Driver micro stepping: 8
Pully teeth 1:1
leadscrew pitch 50.8 mm/rev
max velocity: 300 mm/s
max accel: 1000 mm/s2
home location: 0 **
table travel -50 to 50 mm **

Note that you will get the standard 'default' 31.5 steps / mm calibration with these settings, a real calibration using a 20mm printed cube is necessary to fine tune these data.
(** this is not yet optimized, I have set my yero in the middle of the axis with a restricted stroke of +/- 50 mm for my trials)

7) Y Axis configuration: repeat the same as X axis, same comments.

8) Z Axis configuration:
motors steps per rev: 200
Driver micro stepping: 8
Pully teeth 1:1
leadscrew pitch 0.635 mm/rev (calculated value, not calibrated)
max velocity: 2 mm/s
max accel: 100 mm/s2
home location: 0 **
table travel 0 to 50 mm **

Note: with this, you get the default 2519.7 steps/mm as recommended
** Z Axis range is not optimzed. Zero coordinate at near contact with table

8) A Axis configuration:
motors steps per rev: 200
Driver micro stepping: 8
Pully teeth 1:1
leadscrew pitch 5.6338 degrees/rev **
max velocity: 10 mm/s
max accel: 50 mm/s2
home location: 0 **
table travel -9999999999.0 to 9999999999.0 mm

Note: with this you get the default 284 steps / mm config. A calibration must be done to get the exact values for your system.
**EMC uses degrees as units for A axis, but as we are using an extruder instead of a rotary table, we cheat a bit with the units and consider 1 degree as 1 mm of extrusion. So jsut forget about the displayed units and use values in mm here.

9) For each axis (use back and forward buttons to select):
run 'Test this axis' to see if it responds properly. Be careful with the manual displacement arrows as they react extremelly fast. Play with velocity / acceleration values to change the dynamic response and also test a cyclic displacement of +/-2.5 mm to see if the system does not loose steps.

10) save your configuration. This will create a shortcut on the desktop to run EMC with your settings.

11) Gcode generation: Slic3r
download a STL from Thingiverse for example
download Slic3r 0.7.2b from here:
http://dl.slic3r.org/linux/slic3r-linux-x86-0-7-2b.tar.gz
open file manager, go in Downloads, right click on the file and choose Move to->Home folder
move back to your home folder, select slic3r-linux-x86-0-7-2b.tar.gz and right click->'extract here'
go to Slic3r/bin and double click Slic3r to run it

12) Configure Slic3r settings:
download the default settings from http://forum.seemecnc.com/download/file.php?id=349
Load these settings: it should be in Downloads/Slic3r_INI_SETUP_175mm_Filament_020_nozzle.ini
In the Custom GCode pane, add this line to post-processing scripts:

Code: Select all

/home/ubuntu/Slic3r-post-EMC.sh

and save these settings !!

Open Applications->Accessories->gedit and copy the following lines in a new file

Code: Select all

#!/bin/bash
# Slic3r post processing script to remove unsupported Mxxx codes for EMC2
grep -v '^M107' $1 > $1.ngc

Save the file as /home/ubuntu/Slic3r-post-EMC.sh
In the file manager, go to Home and right click on Slic3r-post-EMC.sh -> Properties
in permissions, enable 'Allow executing'

Note: all that the script does is to remove the line "M107" in the gcode file and rename it to .ngc to be able to load it in EMC2. You can do the same by opening the .gcode in a text editor and remove the M107 line manually...


13) Gcode generation:
in Slic3r, click 'Slice...', select your STL file (lets call it yourfilename.stl) and wait

14) Running LinuxCNC/EMC2:
on your desktop, double click the link 'launch seemcnc-H1'
disable the emergency stop (1st button from top-left)
enable power (2nd button)
do File-> Open and choose the file named yourfilename.gcode.ngc

in Manual control:
- select X axis, use +/- buttons (or left-right arrow keys on the keyboard) to approximatelly center the X carriage, press Home Axis
- select Y axis and do the same
- select Z axis and go to your initial print height (or far above the table if you just want to test without printing), press Home Axis
- select A axis and just press Home Axis. If you print, I guess that it is the right time to set your temperature properly and feed the filament with the + button (you may want to reduce the 2nd Jog speed to reduce manual feed rate)

Once you are ready, press play and it goes !!!

---------------

This is a fairly long procedure but I wanted to describe it in all details so that it can be reproduced properly while learning how it works.

Text file with this HowTo procedure:
LinuxCNC-EMC2-H-1_HowTo.txt
Seemecnc-H1-LinuxCNC-EMC2-how-to.txt
(7.22 KiB) Downloaded 329 times

jcugnoni
Plasticator
Posts: 18
Joined: Sat May 19, 2012 5:11 am

Re: EMC2 Configuration for H1?

Postby jcugnoni » Sat May 19, 2012 7:49 am

A more direct way:

If this procedure is too long for you and you want to go straight to application, just run LinuxCNC livecd , download the attached archive to your home folder and extract it there.
All settings, apps and examples are included, with screenshots of the settings and so on.

Enjoy and leave me your feedback !

LinuxCNC-Seemecnc-H1-Slic3r-package.tar.gz
Linux CNC settings, Slic3r 0.7.2b + settings and HowTo document to run Seemecnc H-1 from LinuxCNC
(10.97 MiB) Downloaded 423 times

User avatar
zaphod
Prints-a-lot
Posts: 22
Joined: Thu Apr 19, 2012 10:03 am
Location: Cedar Rapids, IOWA

Re: EMC2 Configuration for H1?

Postby zaphod » Sun May 20, 2012 10:52 pm

jcugnoni, Thank you. You beat me to it! Since posting my first post in exasperation, I made more headway but the daughter's graduation delayed my post. Nice job. I'll review your post in detail. Thanks!

jcugnoni
Plasticator
Posts: 18
Joined: Sat May 19, 2012 5:11 am

Re: EMC2 Configuration for H1?

Postby jcugnoni » Mon May 21, 2012 1:59 am

Great, I am waiting for your feedback, and I am pretty sure that you will be printing from EMC earlier than me... delivery is so slow here, I am waiting for my filaments since 10 days and still nothing to print, grrrr ;-)

jcugnoni
Plasticator
Posts: 18
Joined: Sat May 19, 2012 5:11 am

Re: EMC2 Configuration for H1?

Postby jcugnoni » Fri Jun 01, 2012 12:03 pm

Finally, here is an update:

I managed to print from EMC2 / LinuxCNC using the settings above. Everything is working well on the software / control side of things, the only changes that I have made is to set proper X,Y,Z limits. While printing my first parts, I have noticed that increasing max Z velocity to 6mm/s and Z accel. to 300mm/s2 help for the filament retraction phase. Moreover, the max velocity of the A-axis should be increased as well to 30-50 mm/s and accel 500mm/s2.

Concerning the calibration, with these settings it should be pretty close to the real values. On my build the calibration changes after a quick calibration (and dirty, see below for the reason why..) were just about 2-5% max.

However, I have experienced some problematic hardware issues in my first steps like hot-end leakage through the resistors hole, a LOT of play on the plastic tri-bearing, especially annoying on the X axis and some significant backlash (or skipped steps if the belt has too much tension). To fix the serial leakage (fixed 3 times already) I have completely filled the cavity between the PTFE tube and hot-end metal parts and sealed all the resistors holes and joints with high-temperature silicon.

To fix the excessive play, I have just printed trilinear bearing replacements [see post http://forum.seemecnc.com/viewtopic.php?f=35&t=628&p=1951&hilit=tri+bearing+upgrade#p1951 ] that I will install this week-end. Hopefully this upgrade will allow me to get a good parallelism and finish properly the calibration of the machine.

The idler bearing upgrade will follow...

jcugnoni
Plasticator
Posts: 18
Joined: Sat May 19, 2012 5:11 am

Re: EMC2 Configuration for H1?

Postby jcugnoni » Wed Jul 04, 2012 8:54 am

For those of you who are using a 4 axis tb6560 card,
Here is the list & settings of the pin to enter in step conf

Pin 1 x dir
Pin 2 unused
Pin 3 z step
Pin 4 amplifier enable (*)
Pin 5 digital out 0, inverted (important*)
Pin 6 z dir
Pin 7 y dir
Pin 8 a dir
Pin 9 a step
Pin 14 y step
Pin 16 x step
Pin 17 digital out 1 inverted (*)

Leave all other pins as unused.
(*) important those pins are enabling the amplifiers of all axes

For the direction pins, some may need to be inverted, but i don't have such card to test, so i let you try.
Let me know if it works or not...

tom10122
Printmaster!
Posts: 401
Joined: Fri May 11, 2012 11:18 pm
Location: NJ

Re: EMC2 Configuration for H1?

Postby tom10122 » Wed Jul 04, 2012 1:39 pm

Thanks! Won't be with my printer for a while but I will test when i can.

mtcorby
Noob
Posts: 4
Joined: Tue Jul 03, 2012 11:35 pm

Re: EMC2 Configuration for H1?

Postby mtcorby » Sun Jul 08, 2012 1:48 pm

little confused on the A axis. I've converted the Z,Y & Z axes to inches, but do I do the same for the A axis? I know that if it was truly degrees, then it would not change, but you mentioned something about it not truly being degrees, but in mm of extrusion. So do I convert the 5 deg/rev like:

deg/rev = 5mm/rev * (1in/25.4mm) ?

or is this conversion only for the max acceleration and velocity?

tom10122
Printmaster!
Posts: 401
Joined: Fri May 11, 2012 11:18 pm
Location: NJ

Re: EMC2 Configuration for H1?

Postby tom10122 » Mon Jul 09, 2012 11:52 am

What do you have against millimeters?

jcugnoni
Plasticator
Posts: 18
Joined: Sat May 19, 2012 5:11 am

Re: EMC2 Configuration for H1?

Postby jcugnoni » Tue Jul 10, 2012 6:20 pm

Hi,

actually, EMC2's default is to display 'degrees' as units for the A axis but this is just a display setting.
However, the true coordinate for the A axis of a printer must be in 'length of input filament'.
So you need to choose which actual unit you will use and enter the calibration values, velocity and accel accordingly (and forget about degrees..)
For mm, I recommend

motors steps per rev: 200
Driver micro stepping: 8
Pully teeth 1:1
leadscrew pitch 5.6338 mm/rev
max velocity: 10 mm/s
max accel: 50 mm/s2

so for inch, you just divide by 25.4:
motors steps per rev: 200
Driver micro stepping: 8
Pully teeth 1:1
leadscrew pitch 5.6338/25.4 = 0.22180315 inch/rev
max velocity: 10/25.4 = 0.393700787 inch/s
max accel: 50/25.4 =1.968503937 inch/s2

Hope it helps

tom10122
Printmaster!
Posts: 401
Joined: Fri May 11, 2012 11:18 pm
Location: NJ

Re: EMC2 Configuration for H1?

Postby tom10122 » Sun Jul 15, 2012 8:00 pm

The config works, the x-axis needed to be inverted but my prints are huge! Im pretty sure they are 10 times bigger, i tried downscaling with slic3r but it just doesn't work well like that, it does 2 passes and thinks its finished so any ideas on whats goin on?

tom10122
Printmaster!
Posts: 401
Joined: Fri May 11, 2012 11:18 pm
Location: NJ

Re: EMC2 Configuration for H1?

Postby tom10122 » Mon Jul 16, 2012 6:34 pm

fixed it, those original config numbers are 4 times too big(instead of 200 steps its 50 )for 2 axis(x,y) the others i don't know off the top of my head but they were off too

Bill
Noob
Posts: 1
Joined: Thu Jul 19, 2012 11:24 am

Re: EMC2 Configuration for H1?

Postby Bill » Thu Jul 19, 2012 11:44 am

As I am NEW to seemecnc, I question why ANYONE would ask this. (what do you have against mm). I am 65, and while an EE, have lived and thought in "ENGLISH" units all my life, to the point that I see inches and KNOW what the distance is. The distance is the same, only the numbers change. GET OVER IT. Always tell your units, then confusion ages away.

tom10122
Printmaster!
Posts: 401
Joined: Fri May 11, 2012 11:18 pm
Location: NJ

Re: EMC2 Configuration for H1?

Postby tom10122 » Thu Jul 19, 2012 11:15 pm

...it was a joke, mm is what most reprapers use , so others use it. it's also standard for 3d printing software. It makes sense.

TKL
Printmaster!
Posts: 41
Joined: Sat Apr 14, 2012 6:07 pm
Location: Denmark

Re: EMC2 Configuration for H1?

Postby TKL » Mon Jul 30, 2012 2:35 am

I just made a fast and dirty modification so all the steppers will be enabled with the "Amplifer" output from CNC2. Only pin 2 is now in use - the other two enable pins can be ignored. Now all the steppers is turned on and off with the "power button" in CNC2 - even the easydriver. Nice to get rid of that noise from the steppers when they are not in use.
Attachments
Stepper Driver modif - common Enable.jpg


Return to “EMC2/LinuxCNC”

Who is online

Users browsing this forum: No registered users and 0 guests