G-Code transcoder part 3 (printing objects)

Post improvements made for UP, and share ideas.
mr_x
Posts: 62
Joined: Wed Dec 10, 2014 4:21 pm

G-Code transcoder part 3 (printing objects)

Post by mr_x » Wed Mar 09, 2016 8:32 pm

Hi,

The first version of the transcoder, an uploader and a monitor software (just text mode for now) is available.

I compiled it for MacOS-X, Linux and Windows ... yeah slicing and printing even from Linux is possible now :mrgreen:

All details on my blog:

http://stohn.de/3d/index.php/2016/03/03 ... der-part3/


Since I have much better control of the printer now I just made some experiments with a much smaller 0,2mm nozzle :roll:

http://stohn.de/3d/index.php/2016/03/09 ... -to-0-2mm/

Results are very promising (getting close to my best self made 3D printer now), more to come soon.

Maik

Matchpoint
Posts: 74
Joined: Tue Dec 15, 2015 10:50 pm

Re: G-Code transcoder part 3 (printing objects)

Post by Matchpoint » Wed Mar 09, 2016 11:01 pm

OMg this is going to be amazing as soon as I figure out how to use it. I applaud you good sir! :mrgreen:

3DSTB
Posts: 33
Joined: Tue Jan 12, 2016 8:33 am

Re: G-Code transcoder part 3 (printing objects)

Post by 3DSTB » Thu Mar 10, 2016 9:05 am

are the settings in Symplify3D ok?
Image

mr_x
Posts: 62
Joined: Wed Dec 10, 2014 4:21 pm

Re: G-Code transcoder part 3 (printing objects)

Post by mr_x » Thu Mar 10, 2016 12:12 pm

Hi,

First a note:

The transcoder and tools are in an early stage. Suitable for people which want to experiment.
Everything is done for the UPmini (other printers might need some adjustments / enhancements in the source code).

:arrow: In the first version I set the nozzle height to a fixed value (in the transcoder, no option yet) , which turned out to work 100% perfect on 4 different UP mini I tested. Also the printer will automatically pre heat the bed for 3 minutes (fixed) before starting the actual print.

So don't expect to much right now, but please experiment with it in case you want to support the project.

My initial findings for Simplify3D settings:

Type: Cartesian robot
Firmware: RepRap
BaudRate: <doesn't matter we don't Simplify3D to send the data)

Build-Volume (X,Y,Z): 120,120,123
Nozzle Diameter: 0.3 <== Yes 0.3 works better !!!!
(You also can set 0.25 and smaller here and it still works, the slicer just reduces material and can print smaller perimeter than the nozzle size).
Filament diameter: 1.73 <== measured and works better for me
Number of extruders: 1
Heated bed: Yes

PROCESS SETTINGS:

Extruder:
Retract Distance 1.5mm
Extra Restart Distance: 0
Retract Vertical Lift: 0
Retract Speed: 50,0 mm/s
Coast at End: No
Wipe Nozzle: No

Layer:
Primary Layer Height: 0.1
Top Solid Layers: 4
Bottom Solid Layers: 3
Outline Shells: 2

First Layer Height: 100% <=== best results for the perf board
First Layer Width: 120% <== best results for the perf board
First Layer Speed: 60%

Additions:
Use Skirt/Brim: Yes (somehow a bug in Simplify3D will put the skirt much to fast, not respecting first layer speed reduction)
Skirt Layers: 1
Skirt Outlines: 2

Use Raft: Yes <=== best results for the perf board
Raft Layers: 2
Raft Offset: 3.0 mm
Separation Distance: 0.1 mm <=== best results for the perf board and removing raft
Raft Infill: 85 %
Disable raft base layers: No

Extruder 1 Temperature
Layer 1: 270
Layer 2: 260
Layer 3: 255
Heated Bed
Layer 1: 105

Cooling:
Adjust printing speed for layers below: 6.0 s
Allow speed reductions down to: 50%

Scripts:
Starting Script: <EMPTY> (transcoder inserts homing sequence automatically, no need to put anything here)

Ending Script:
M104 S0 ; turn off extruder
M140 S0 ; turn off bed
G28 ; home all axes (I inserted homing so the nozzle moves away from the part quickly when print finished)

Other:
Default Print Speed: 60.0 mm/s
X/Y Axis Movement Speed: 150mm/s
Z Axis Movement Speed: 50mm/s


Good luck,

Maik

pp3dp.se
Posts: 14
Joined: Tue Jan 10, 2012 9:49 am
Location: Sweden
Contact:

Re: G-Code transcoder part 3 (printing objects)

Post by pp3dp.se » Thu Mar 10, 2016 12:14 pm

Good work:)

Matchpoint
Posts: 74
Joined: Tue Dec 15, 2015 10:50 pm

Re: G-Code transcoder part 3 (printing objects)

Post by Matchpoint » Thu Mar 10, 2016 3:19 pm

can you explain how you input the g-code. I used slicer to get the g-code but how do you export it to the up mini. still a little confused

mr_x
Posts: 62
Joined: Wed Dec 10, 2014 4:21 pm

Re: G-Code transcoder part 3 (printing objects)

Post by mr_x » Thu Mar 10, 2016 3:56 pm

Hi,

right now everything is console / text mode only. On github I wrote some notes to every tool.

https://github.com/MaikStohn/UP3D

A nice GUI application is in the works, but this will take some time.

The tools now can be used like this:
1.) slice your object and save the myobject.gcode file to the same folder as you have the 3 downloaded tool (up3dtranscode, upload and upshell)
Windows: make a folder "C:\UP3DTOOLS" and put things there
MacOS: make a folder on your Desktop "UP3DTOOLS" and put things there
Linux: ... you know how to do ...

2.) Make sure the original UP software is not open before you continue

3.) Turn printer on, you don't need to initialize.

4.) open a command prompt / terminal / shell
Windows: Press <Windows> + <R> key and in the "Run..." dialog type cmd and press enter
MacOS: click on spotlight search icon and type terminal and press enter
Linux: ... you know how to ...

5.) change to the folder with your .gcode file and the 3 tools
Windows: type cd C:\UP3DTOOLS and press enter
MacOS: type in cd Desktop/UP3DTOOLS and press enter
Linux: ... you know how to ...

6.) run the transcoder (personally I like to use ".umc" as extension for UpMachineCode)
ALL: type up3dtranscode myobject.gcode myobject.umc and press enter

7.) run the uploader
ALL: type upload myobject.umc and press enter
(printer will start automatically after uploading, the heated bed is turned on first and apx. after 3 minutes the print starts)

8.) OPTIONAL: run upshell if you like to see progress on your computer (layer/height/percent/time remaining):
ALL: type upshell and press enter (use <CTRL>+<C> to exit the program, print will continue)

(You also can start the original UP! Software after uploading to monitor the print progress)


Have fun,

Maik

Matchpoint
Posts: 74
Joined: Tue Dec 15, 2015 10:50 pm

Re: G-Code transcoder part 3 (printing objects)

Post by Matchpoint » Thu Mar 10, 2016 4:10 pm

perfect thank you sir. I would of never figured that one out without that post! Can't wait to try when I get home!

koreandi
Posts: 39
Joined: Sun Dec 21, 2014 11:24 am

Re: G-Code transcoder part 3 (printing objects)

Post by koreandi » Sat Mar 12, 2016 10:28 am

Hi mr_x,

thank a lot for sharing your work.
I also wanted to use a sliced part on my UP! MINI.
slicing and uploading was no problem.

I set the build volume to
x 120
y 120
z 123

The origin values are
x 0
y 0
z 0
and all set to MIN.

Whan the printer want to start the first Layer it moves the nozzle against the perfboard.

Where do I have to change values?
Global Offsets?
Origin Offsets?

My Nozzle height is set in UP! Software.


Thanks a lot. I will try ist anyway.

Kai
Posts: 26
Joined: Sat Aug 08, 2015 6:07 pm

Re: G-Code transcoder part 3 (printing objects)

Post by Kai » Sat Mar 12, 2016 6:56 pm

Looks like that the nozzle height is fixed to 124.0 mm. My nozzle sits at 125.1 mm, so everything starts to extrude in the air. I tried to set the model to -1.1 mm but no luck.

Kai
Posts: 26
Joined: Sat Aug 08, 2015 6:07 pm

Re: G-Code transcoder part 3 (printing objects)

Post by Kai » Sat Mar 12, 2016 7:10 pm

Looks like that the up3dtranscode.c file in the project has a fixed height setting:

https://github.com/MaikStohn/UP3D/blob/ ... ranscode.c

Code: Select all


//gcode parsing pass 2 (write output)
rewind( fgcode );
if( !umcwriter_init( argv[2], 123.45, print_time ) )
return -2;
But I am not sure how the 123.45 value translates to 124.00 mm
I tried to modify the value in the source code and recompiled it under OS X, but no change in behavior on my Up Mini :(

mr_x
Posts: 62
Joined: Wed Dec 10, 2014 4:21 pm

Re: G-Code transcoder part 3 (printing objects)

Post by mr_x » Sun Mar 13, 2016 4:14 am

@Kai,

yes this is the right place to change the nozzle height.

It looks like the UP software adds another 0.2 to the stored nozzle height when it calculates the print height.
Or maybe the better (more precise) homing procedure from up3dtranscode gives different start value.

The translation to 124.00 is caused by the up firmware which usually reports in mm only. Lately I found a command to change the reported precision to 0.001 mm. This will be included in next version of upshell. This just means any value between 123.01 and 124.00 will be reported as 124.00 in upshell right now.

==> If your stored nozzle height is 125.1 then I would try 125.3 or 125.4 in the up3dtranscode source code.

Good luck,

Maik

Kai
Posts: 26
Joined: Sat Aug 08, 2015 6:07 pm

Re: G-Code transcoder part 3 (printing objects)

Post by Kai » Sun Mar 13, 2016 12:18 pm

Thanks Maik die the explanation. I tried to use 126.0 even if this would cause a nozzle crash, but no change in nozzle height. upshell still reports 124.00 as height. I verified that I really use this new value by modifying the source to include nozzle height as a double driven from argv[4] command line parameter. To make sure all is like expected I added to the end of main() an printf() for this nozzle height parameter.

Next I tried to initialize the nozzle height with the original up software before uploading the newly generated .umc file. No change either. Could it be that the upload of the nozzle height fails?

Update: Stupid me! I forget to send the new nozzle height down to umcwriter_init() :(

Now it works to set the new height. You are right I had to add some value, I started with +0.2, but it looks to be a bit more like +0.3.

dentee
Posts: 2
Joined: Tue Mar 15, 2016 8:32 pm

Re: G-Code transcoder part 3 (printing objects)

Post by dentee » Tue Mar 15, 2016 8:38 pm

Hello,

May I ask you to share your s3d factory file? Also I'm wondering about the compiled windows version, as it is 16Bit only so not usable under windows 7/8/10. Is there a trick to get this running?

3DSTB
Posts: 33
Joined: Tue Jan 12, 2016 8:33 am

Re: G-Code transcoder part 3 (printing objects)

Post by 3DSTB » Tue Mar 15, 2016 10:04 pm

Syntax in MINGW32 is correct?

gcc hoststepper.c hostplanner.c gcodeparser.c up3ddata.c umcwriter.c up3dtranscode.c -o up3dtranscode.exe

mr_x
Posts: 62
Joined: Wed Dec 10, 2014 4:21 pm

Re: G-Code transcoder part 3 (printing objects)

Post by mr_x » Wed Mar 16, 2016 4:05 am

Hi,

the compiled Windows binary should work on any windows version. I tested it on 32Bit and 64Bit Windows 7.
Also just tested on fresh installation with Windows10 64Bit and it works fine.

To compile it yourself, just use the bash script "make.sh". It detects the host and uses correct compiler arguments.
I suggest to install "MSYS2", use "pacman" to install the mingw packages for gcc, libusb, ... and then open the mingw shell to compile it.

Good luck,

Maik

Riffer
Posts: 7
Joined: Wed Mar 09, 2016 8:27 pm

Re: G-Code transcoder part 3 (printing objects)

Post by Riffer » Wed Mar 16, 2016 10:20 am

Is there any way to switch on / off the LEDs via USB? Maybe via the monitor tool?

I had a test print by slicing in Slic3er and used your tool with great success - the moving speed of the printer head really is impressive!

And after printing surprisingly the Up! shut down what really was new for me and a feature I miss because after printing I am not always there to shut it down manually.

My plan is to put the Up! into my cellar and remotely print via a raspberry Pi 2 (either via USBIP from my main PC or maybe native via UP3dTools if possible).

In addition my idea is to put a web cam in front of the up so from time to time I can check how things are going.
Having the possibility to turn on / off the LED via USB could improve this idea much more, no need to install extra lights.

3DSTB
Posts: 33
Joined: Tue Jan 12, 2016 8:33 am

Re: G-Code transcoder part 3 (printing objects)

Post by 3DSTB » Wed Mar 16, 2016 10:55 am

Hi, thank you compiling is working now.
What is the correction value for the nozzle height? E.g. 123.23 in the UP Soft becomes 123.53? Is the the second decimal place considered?

Riffer
Posts: 7
Joined: Wed Mar 09, 2016 8:27 pm

Re: G-Code transcoder part 3 (printing objects)

Post by Riffer » Wed Mar 16, 2016 12:33 pm

I just compiled the tools with a Raspberry Pi 2 - in addition to install the compiling tools and libraries I had to change the make.sh scripts a little bit.

I had no chance to test them now with the UP (not at home) but the compilation works with very few changes:

UP3DPARTS: in file make.sh - add "-lm" to the second gcc line:

Code: Select all

gcc -std=c99 -O3 -o convg convg.c -lm
UP3DTOOLS: in file make.sh - change

Code: Select all

elif [[ "$OSTYPE" == "linux-gnue" ]]; then
to

Code: Select all

elif [[ "$OSTYPE" == "linux-gnueabihf" ]]; then

mr_x
Posts: 62
Joined: Wed Dec 10, 2014 4:21 pm

Re: G-Code transcoder part 3 (printing objects)

Post by mr_x » Wed Mar 16, 2016 12:49 pm

@3DSTB:

The theoretical resolution is 854 steps/mm (UpMini) for all axes (X/Y/Z/E) which equals to 0.0017 mm accuracy.
However the stepper driver ICs are using 128 micro stepping which means it does not have this accuracy for positioning.
A stepper motor can reliable position full and half steps only.
This means 1 / (854steps/mm / 128 (micro)steps * 2 (for half steps)) = 0.075 mm accuracy for *ALL* axes.
Not taken into account, that X/Y/Z are driven using belts that adds another small amount of inaccuracy again...

But, as of my testings, 0.05 is making a difference for X/Y/Z. Anything below this was not giving any effects at all.

Maik

Post Reply