Saturday 29 July 2017

Setting Up BLTouch on infitary M508

Setting Up BLTouch on infitary M508

**General note I take no responsibility for any damage that may occur to you in this implementation. This is how I configured it but no guarantees.

So levelling is a pain, so I thought this is one problem that needs to be fixed.
Bought the Clone BLtouch from aliexpress... seemed fine but comes with lots of parts like dupon connectors. Which means you will need a crimping tool to put it together.
The other part you need is an extension for the 5 cables coming out of the BLTouch, the ones that come with the BLtouch are incredibly short.




Additional stuff you need to product;
* Crimping tool
* Additional wires
And depending on how good your crimping skills are you might need additional dupon connectors.

Alternatively you could just by a 2pin to 2pin (Black and White) cable with the 2piece dupon connectors attached and another 3pin to 3pin (Orange, Red & Brown) cable with the 3 piece dupon connectors.

Mount for the BLtouch

I took an existing mount from thingiverse, but that didn't really work well as it was too high according to the spec.

 Was about 15mm high when it needed to be about 8mm.

So I modified the shape on blender. You can find it here. (Thingy item 2459032)




Wiring diagram

First things first. I spent hours trying to figure out how to connect this to the M508. The board looks like this; (BTW this seems to be the same board as the Alunar)

You don't really need the brown GND, but I added it for good measure.
For this you need to disconnect the Z-Min sensor. You are replacing it with the bltouch.
DONT AUTO HOME until you upload firmware.

So where you should be up to now is that the red light on the bltouch comes on and does 2-3 ins and outs, but will really not be able to do anything.

Changes to Marlin Firmware

You will need Arduino IDE for this next bit.

The version of marlin I ran this on was 1.1.4. The versions seem to be very different so can't guarantee this will work on a newer version.

Overall, download the latest release (or if you can find it 1.1.4)

The following is what I changed. Will also put my firmware here but I use PETG filament so the ABS Settings are off.


Once you downloaded the firmware, open up the zip file somewhere.
Replace the configuration.h and configuration_adv.h in the marlin directory with the files from the example_configurations for the Infitary-i3-M508.

Now open the marlin.ino file and it should load up the arduino IDE.

***First off the default this board is defined as a RAMPS 1.3 board (whatever that means)
#define MOTHERBOARD BOARD_RAMPS_13_EFB
This is on its own right is not a problem. If you follow the chain of files to the pins_RAMPS.h you will find this;
#ifdef IS_RAMPS_13 //This was defined in a different file...
  #define SERVO0_PIN       7 // RAMPS_13 // Will conflict with BTN_EN2 on LCD_I2C_VIKI
#else
  #define SERVO0_PIN       11
#endif
The problem here is that any default configuration you enable for the BLTouch will expect you to use pin 11 (SERVO0). The BTN_EN2 is not shared with this pin on the M508 so I changed it to PIN 11

#ifdef IS_RAMPS_13
  #define SERVO0_PIN       11 // RAMPS_13 // Will conflict with BTN_EN2 on LCD_I2C_VIKI
#else
  #define SERVO0_PIN       11
#endif

Now go and edit the configuration.h file with the BILINEAR leveling;
All the settings below are settings that were changed from the Marlin 1.1.4 configuration.h file. The rest I just omitted to avoid complexity.
//===========================================================================
//============================== Endstop Settings ===========================
//===========================================================================

#define Z_MIN_ENDSTOP_INVERTING false
#define Z_MIN_PROBE_ENDSTOP_INVERTING false
//===========================================================================
//============================= Z Probe Options =============================
//===========================================================================
#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
#define Z_ENDSTOP_SERVO_NR 0   // Defaults to SERVO 0 connector.
#define Z_SERVO_ANGLES {10,90}  // Z Servo Deploy and Stow angles (10,90) is for BLTOUCH.
#define BLTOUCH
#if ENABLED(BLTOUCH)
  #define BLTOUCH_DELAY 1000   // (ms) Enable and increase if needed
#endif

 //SET FOR BLTOUCH - WHERE IS THE PROBE COMPARED TO THE NOZZLE
#define X_PROBE_OFFSET_FROM_EXTRUDER -25  // X offset: -left  +right  [of the nozzle]
#define Y_PROBE_OFFSET_FROM_EXTRUDER -45 // Y offset: -front +behind [the nozzle]
#define Z_PROBE_OFFSET_FROM_EXTRUDER -2   // Z offset: -below +above  [the nozzle]
//originally 205 but m508 can go to 215 (Not related to bltouch)
#define X_MAX_POS 214
#define Y_MAX_POS 214

//===========================================================================
//=============================== Bed Leveling ==============================
//===========================================================================
#define AUTO_BED_LEVELING_BILINEAR
  //SET FOR BLTOUCH - CHECK ON PRINTER FIRST TO BE SURE
  #define LEFT_PROBE_BED_POSITION 34
  #define RIGHT_PROBE_BED_POSITION 180 //Bed Max X - Left probe
  #define FRONT_PROBE_BED_POSITION 55
  #define BACK_PROBE_BED_POSITION 159 //Bed Max Y - Front probe
//SET FOR BLTOUCH TO AVOID DAMAGE TO PRINTER! Sensor will be above bed.
#define Z_SAFE_HOMING
#if ENABLED(Z_SAFE_HOMING)
  #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)    // X point for Z homing when homing all axis (G28).
  #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)    // Y point for Z homing when homing all axis (G28).
#endif
//=============================================================================
//============================= Additional Features ===========================
//=============================================================================
#define EEPROM_SETTINGS // Enable for M500 and M501 commands - Allows you to save BLTouch Z offset
#if ENABLED(EEPROM_SETTINGS)
  // To disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
  #define EEPROM_CHITCHAT // Please keep turned on if you can.
#endif
//SET FOR BLTOUCH - still not sure why 3?
#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command


#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75   // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading. - I fixed this while I was at it. It was set to 3.0mm when I use 1.75mm

All items in green are items that require you to check on the printer and fill in those spots.
The Z_PROBE_OFFSET_FROM_EXTRUDER settings will most likely need to be adjusted as part of levelling calibration process.

Hopefully, if everything went well you can compile. If successful you can now upload the file.
Connect your device via USB it should come up as a new com port.
Change the board and processor under "tools" menu;
Board should be "Arduino\Gemuino Mega or Mega 2560"
Processor should be "ATmega2560 (Mega 2560)"

Now upload (CTRL+U). It will compile then upload. Don't disturb it. If it fails to upload, try again.

Testing

On whatever tool you have that can run serial commands to the printer run these. (I use octoprint)

Under the Terminal type; (Don't type the ; and comments after it:))
M280 P0 S10 ; pushes the pin down M280 P0 S90 ; pulls the pin up M280 P0 S120 ; Self test – keeps going until you do pin up/down or release alarm M280 P0 S160 ; Release alarm 
M119 ;shows status of x,y,z min they should all be open.
M280 P0 S60 ;Puts the the BLTouch in test mode dont skip this test.
M119 ;Take note that everything is "open"
Now push the pin upwards, should be a very light touch and not hard. The light should come on.
If your BLtouch is like mine, it will push the pin down again in a few seconds.
Before it pushes the pin down, put in the M119 again.

You should see Z_Min triggered. If it isn't something has gone wrong, and it is way to hard to tell you where. Could be wiring, could be firmware... try narrowing it down. You shouldn't need the resistors or anything else.

First calibration

So we are nearly there. Need now to make sure that the nozzle is nearly touching the heat bed when the Z is zeroed.

For this next step have you finger over the power button to shut it off if it doesn't go as expected. What I mean is that if the BLTouch isn't working as expected the auto-homing will push the nozzle into the bed and potentially damage something!

Go back to the terminal and type;
M851 ; this should give you the item I highlighted in orange a while back
G28 ; home - FINGER OVER POWER BUTTON!
G1 Z0 ; this will set the nozzle at Z0 at least what it thinks is 0.

If the nozzle is too high above the bed then the Z_PROBE_OFFSET_FROM_EXTRUDER  needs to be a lower number (e.g. -2.5 instead of -2). If it's pushing into the bed, then it needs to be larger (-1.5 instead of -2). 

To figure out how much to put in, you will need a number that slightly digs in the bed (should push the springs) and play with the Z on the actual m508 (under prepare), move it up till you have a figure (e.g +0.2mm)

Let's say the figure I had was -2 from M851. Now I need to add the 0.2mm, this should give me a figure to put in = -1.8

To change the z offset programmatically you can type in; Have a piece of thin a4 paper under the nozzle.


M851 Z-1.8G28 ; homeG1 Z0 ; this will set the nozzle at Z0 at least what it thinks is 0.
If the paper is slightly hard to move but still moves under friction of the nozzle, you are good to go. If not, keep adjusting the M851 Z value till it does.

Once you are done commit to memory (EEPROM). Type in the terminal

M500 ; commit to memory

Autoleveling the bed

Now in the menu do prepare->bed levelling
or type G29 from the terminal. It should measure 9 points across the bed. (these points probably need tweaking but for now that should be fine)

G29 in startcode

Make sure to do a leveling command at the beginning of each print (this is not a must, but good measure)

I use Slic3r and I put it in the "Printer Settings->Custom G-code"
After G28 on the next line put in G29


Printing a test print

Use this to test the calibration and auto bed levelling is working
https://www.thingiverse.com/thing:29028/#files


Issues encountered

This thing burned up a weekend nicely.
First off where to connect was painful, then the fact that it wasn't listening to commands from the firmware. This was caused by the pins_RAMPS.h file using the wrong port!!!!

After figuring that one out when I hit auto-home it would keep on pushing the heat plate and not stopping.
It ended up being a mistake I made in the firmware. I forgot to add #define Z_MIN_PROBE_ENDSTOP_INVERTING false
was set as true while I did setup Z_MIN_ENDSTOP_INVERTING  as false. This is a must.

Overall its now working. Time will tell how well it actually works. Might have to monitor start of prints for a while.

Links;

https://locxess.de/3d/BLTouch_Anleitung_englisch.pdf




Friday 28 July 2017

newbie 3D Printing

Newbie 3D Printing

So I got my first 3D printer. It is an Infitary M508 from aliexpress.
With little to no experience wasn't sure what I was looking for...

**BTW for later the filament for this unit is 1.75mm and Nozzle head is 0.3mm

It arrived relatively quickly and as a kit. When they say a kit they mean a kit:)

When you open the box you will see the 5 step motors (2 for Z-axis, 1 for Y-Axis, 1 for X-Axis and an extruder step motor), along with a circuit board (Arduino board custom made for 3d printers), power supply, LCD and SD slot and frame.

They also put all the videos and firmware for you on an SD card which is a nice touch. No manuals are printed out anywhere though.
 

Spent half the day peeling the brown tape from the frame and then followed the youtube videos to put it together. Overall there are a few complex pieces and making sure you are always on the correct side of the project is pretty important! put a few things the wrong way around, only to find later, for example, that I put the main Y axis screws in backwards *doh*.

The Y-Axis belt required a bit of time as you need small hands and a second pair of hands if available.

The X-Axis was even more painful, but I got through it.


Power was pretty straight forward, and I can't say it was to complicated. Just had to use a lot of zip ties to tidy up the cables. (you will need to buy quite a few small ones)

After putting together the cables, I highly recommend not following the video directions for the extruder cables they should go to the side not over the top, but if you aren't certain just follow the video. You will see what I mean later:)


Once it was assembled and I powered it on, it all seems to work with no smoke. That was a good sign. You can move the axis from the menu (Firmware is already installed on the Arduino - firmware is called Marlin, that's for a different day).
Could move the X axis and Y axis fine, but Z was making a grinding noise and getting stuck more often then not.
After loosening one side of the Z-Axis long screw shaft from the motor the Z axis moved freely on only one step motor. It would appear that the Z-axis screw wasn't fully aligned with the motor and with the X-Axis mount, there is no way to make it align better (as far as I can see), so I released a few screws (specifically the ones on the brass Z-axis to X-axis carriage which have the Z-axis shaft run through it) to give it the space it needs to move freely.

Alignment of the nozzle and the heating bed seemed rather simple just moved the Z axis limiter switch and twist the Z-axis to get the right height till they seemed to touch.
(limiter switch is the little switch which tells the arduino when you get to the minimum point, so it doesn't grind the motors)

After fixing that problem I tried loading filament. There is an easy way to do this.
1. Cut the filament with the cutter so that it is sharp on one end.
2. Providing you are using PLA, under the prepare menu goto preheat PLA, this will warm up the Nozzle to 190degrees.
3. Once it reaches 190, go back to the prepare menu and press change filament.
4. It will then try to retract the previous filament (which doesnt exist), wait a couple of seconds to let it go through its unloading cycle.
5. The put the filament in the small hole on the extruder stepper and press the round button. It should start loading the filament:)
Took me a while to figure out how to load it...






Okay so first a couple of pointers for newbies;
1. 3D printers print gcode files which are just machine instruction sets for vectors and movements (including commands for heating elements etc....)
2. You will need to install something like cuda on you PC to convert STL files which are exports from CAD type software to something your printer can understand. This is provided on the SD card with this unit (It can also be downloaded from the web)
3. The SD card has some gcode files on it already ready to test, so just insert that to test it.


So attempt 1 to print... First of DON'T DO THIS!
I didn't put down any tape (the yellow stuff in the picture above) because i didn't understand why I needed it (will explain later). I then proceeded to print the first file by selecting it from the menu on the SD card.
The bed warmed up, then the nozzle warmed up. (They do this so the nozzle doesn't start oozing while you wait for the heated bed)
The bed was not level, which means the nozzle nicely dug a long groove into my heated plate. quickly pulled the plug and read up on levelling.

So this is one thing I would probably make sure I had as a feature when I bought a 3d printer. The M508 does not come with auto levelling built in.
Levelling includes disabling you step motors (in the menu), taking a sheet of A4 paper and moving your nozzle across 4 different points of the bed to make sure it is barely touching the paper, by rotating the screws in the correct location. (there are other more scientific ways to do this, but this is simple enough for most).

Attempt 2... okay so I tried levelling... but didn't use the method with an A4, rather I tried eye balling it.
It started and didn't scrape the surface that was good, and then it started to print, but the filament just kept on being pushed around by the nozzle and detaching from the bed... stopped that and read more...

After reading more learned that a technic to make sure things stuck to the bed was to use painters tape (they yellow tape), so stuck that on and went on attempt 3.

Once again it started up but the same thing happened... the filament just detached from the bed!!!

Played with levelling for a good 2 hours, cause I didn't know what good looked like. Finally got to the point where it was slightly squishing the filament on the bed and it started to print properly. (A4 sort of worked:))

*Your gut feel will tell you that the head has got loose filament hanging from the heating process that is pushing the filament off the bed. That isn't the problem your bed is just of range. Do the levelling. It can also be a temperature issue but start with that one first.


BTW, if you haven't bought a printer, don't expect it to printing anything in a hurry. It takes hours!

After less than a couple of hours, my kids wanted me to print something for them, so I went over to thingiverse and found a Pitbull. I tried shrinking it on cuda (by changing the scale - so it wouldn't take so long). Generated the gcode and put it to print.

It started printing just fine, until the hind legs would just detach from the base mid print (even with the levelling done and the tape). I thought I was doing something wrong!! tried glue sticks, tried re-levelling, nothing worked. the legs kept coming off!!

What I quickly learned was that the surface area of the leg was just way to small for it to stick properly. I modified the STL using blender and put a bigger footing around it and it worked just fine.

So that's all from me today. If you got this far you are at the beginning of the journey:)