Electronics – 3D Printer Build


CoreXY Design

Axis orientation for those uncertain for a CoreXY

I purchased this from a user on E-Bay that lost interest… I was able to save some monies because of that. Essentially the printer came in a box of parts with bolts, steppers and 3D printed material. Directions for assembly can be found on the URL from Thingiverse.

   

No real secrets here to assembling the materials.. just read the manual.

   

   

   

       

I wasn’t impressed with the Z Axis mount so I thought while I was building it that linear slides would be a better idea.. in fact they are a great idea but mounting them was a huge pain. The linear blocks mount from the top and the extrusion mount from the ends so they mount together butting up to each other. So I had to make a connecting piece from some aluminum on the CNC.

AutoCad drawing and MasterCam drawings..

Post installation after cutting the Z axis mount to length.

       

My first exposure to a 3D print failing, in this case the print in itself was inaccurate (up for debate) causing the fail but you can see it fails along the print line.

 

So mechanically the machine is now together and it’s time for the electronics.. I chose the DuetWifi due to its popularity and for its gcode based setup and configuration not to mention its stepper drivers and great support. The box came with all the necessary connectors but I warn you that you have to crimp all the wires yourself as is to be expected.

   

All the stepper motors were wired, I use a dual Z setup and that means the 2 connectors on the far right of the board will be utilized, I also had to remove a jumper for that configuration. This is where I started to run into my first issues on the project, mostly because of the learning curve, because I had nothing but problems with the configuration and also mainly with the machine end stops. So, by default the Duet comes with the following file structure, which is fine by me. After reviewing the Duet home page I realized there was an update available. The update requires some file copying to the SD card, so I would recommend having a way to write directly to the card using another PC or laptop. I simply replaced the files that were required by the update and all went well.

By default this is what was on the card after saving the file:

; Axis and motor configuration
M569 P0 S1 ; Drive 0 goes forwards
M569 P1 S1 ; Drive 1 goes forwards
M569 P2 S1 ; Drive 2 goes forwards
M569 P3 S1 ; Drive 3 goes forwards
M569 P4 S1 ; Drive 4 goes forwards
M574 X2 Y2 Z2 S1 ; set endstop configuration (all endstops at high end, active high)
;*** The homed height is deliberately set too high in the following – you will adjust it during calibration
M665 R105.6 L215.0 B85 H250 ; set delta radius, diagonal rod length, printable radius and homed height
M666 X0 Y0 Z0 ; put your endstop adjustments here, or let auto calibration find them
M350 X16 Y16 Z16 E16:16 I1 ; Set 16x microstepping with interpolation
M92 X80 Y80 Z80 ; Set axis steps/mm
M906 X1000 Y1000 Z1000 E800 I60 ; Set motor currents (mA) and increase idle current to 60%
M201 X1000 Y1000 Z1000 E1000 ; Accelerations (mm/s^2)
M203 X20000 Y20000 Z20000 E3600 ; Maximum speeds (mm/min)
M566 X1200 Y1200 Z1200 E1200 ; Maximum instant speed changes mm/minute

My real problems started when I tried to set the motor information and the end stops. I utilized the RepRap configurator on the following URL and its really a pretty cool utility but you must know what you’re doing, no guessing here.

ultimately I ended up with this in my config.g

; Drives
M569 P0 S0 ; Drive 0 goes backwards
M569 P1 S0 ; Drive 1 goes backwards
M569 P2 S1 ; Drive 2 goes forwards
M569 P3 S1 ; Drive 3 goes forwards
M350 X16 Y16 Z16 E16 I1 ; Configure microstepping with interpolation
M92 X100 Y100 Z1600 E100 ; Set steps per mm
M566 X900 Y900 Z12 E1200 ; Set maximum instantaneous speed changes (mm/min)
M203 X12000 Y12000 Z360 E2500 ; Set maximum speeds (mm/min)
M201 X500 Y500 Z200 E500 ; Set accelerations (mm/s^2)
M906 X800 Y800 Z800 E800 I30 ; Set motor currents (mA) and motor idle factor in per cent
; Endstops
M574 X1 Y2 Z1 S1 ; Set active low endstops
M558 P0 X0 Y0 Z0 H5 F120 T6000 ; Set Z probe type to switch, the axes for which it is used and the dive height + speeds
;G31 P600 X0 Y0 Z2.5 ; Set Z probe trigger value, offset and trigger height
;M557 X15:285 Y15:310 S20 ; Define mesh grid

Here’s my advice, read the config.g file line by line, understand it and then make your changes. There is no fast way to do this…

So, I thought I was done with the configuration after using the configurator.. not! My first attempt to home the machine was a disaster… all the steppers are moving simultaneously when only a single axis should be moving, not large distances either. As it approached the end stops it continued to run right through them like they weren’t there and then the axis belts started slipping, not good. I checked the end stop wiring, verified that I had all the “correct” lights on the Duet (red, blue, green) and so I ruled that out.

I checked that the switches triggered in the Duet control panel, they did.

videos of the dilemma..

After a bit of reading and posting on the forums I was able to determine the problem ultimately was with the switches themselves. The switches that I bought unknowingly are for a different printer design and are normally open (NO) switches, meaning that a signal is not sent until the switch is closed. For safety reasons it makes more sense to use a normally closed (NC) switch so that any interruption of the switch and the axis will stop movement.

So, since the switches were already installed, mounted on printed parts and wired I decided to use the existing switches and simply modify them. I cut the traces next C1 and both the LED and R1 and I simply use them as a 2 wire switches now.

I also made changes to each of the homing axes (homex.g/homey.g/homez.g/homeall.g) config files from what was generated by the configurator.

homex.g

G91 ; relative positioning
G1 X-305 F2000 S1 ; move to limit
G1 X5 F600
G1 X-10 F100 S1
G1 X6 F2000 ; Offset to correct zero position.
G90 ; absolute positioning
G92 X0

homey.g

G91 ; Relative positioning
G1 Y305 F2000 S1 ;Run into stop
G1 Y-5 F600
G1 Y10 F100 S1 ;Run into slowly
G1 Y-3 F2000 ; Offset to correct high limit position.
G90
G92 Y305

homez.g

G91 ; Relative positioning
G1 Z-350 S1 F300 ; Move Z down until the switch triggers
G1 Z2.5 F300
G1 Z-5 S1 F150 ; Move Z down until the switch triggers
G90 ; Back to absolute positioning
G92 Z2.5 ; Tell the firmware where we are

homeall.g

; homeall.g
; called to home all axes
;
; Relative positioning
G91 ; relative positioning
G1 X-305 F2000 S1 ; move to limit
G1 X5 F600
G1 X-10 F100 S1
G1 X6 F2000 ; Offset to correct zero position.
G90 ; absolute positioning
G92 X0 ; Tell the firmware where we are
G91 ; Relative positioning
G1 Y305 F2000 S1 ;Run into stop
G1 Y-5 F600
G1 Y10 F100 S1 ;Run into slowly
G1 Y-3 F2000 ; Offset to correct high limit position.
G90
G92 Y305 ; Tell the firmware where we are
G91 ; Relative positioning
G1 Z-350 S1 F300 ; Move Z down until the switch triggers
G1 Z2.5 F300
G1 Z-5 S1 F150 ; Move Z down until the switch triggers
G90 ; Back to absolute positioning
G92 Z2.5 ; Tell the firmware where we are

after those changes were made – a successful homing!!

Now onto the heated bed… the kit I bought came with a Lulzbot 24v heater along with an .250 aluminum plate. It is designed to stick directly to the bottom of the plate, peel and stick, nothing special here, This heater has the thermistor already built in but I may look at adding an additional external thermistor and some type of safety setup in the future.

  

 

After the bed was installed, I went ahead and started working on tuning the bed heater. Essentially your setting up the Duet control board to be able to control the bed temperature since heaters come in different designs and heat capabilities, this process matches them up.

The tuning process goes like this on the Duet.. Submit a M303 command on the Duet with the device number and the maximum temperature, then use the M303 command to see what those numbers were. You then take those numbers and modify your config.g file.

M303 H1 S240 ; auto tune heater 1, default PWM, 240C target or maximum temperature
M303         ; report the auto-tune status or last result

Here is what mine looked like the first time I ran it using a 110c setting, I wasn’t sure what to expect so I went conservative… the bed rating is for 120C.

In essence what this did was send the M303 command to tune heater 0 to 110C. So, it turned on the heater then immediately turned off, what!!! I tried it again and again with the same results… as I progressed through trying to diagnose the problem I realized that any attempt to turn on the heater promptly sent a grounding error.

So I verified the heater was reading correctly at about 1.2 – 1.4 ohms and not shorted.

So the heater is good. I also checked the Duet output and it was putting out 24v… After eliminating the bed heater I finally figured that the PS was failing. I was ready to order a new one but realized I had another new PS for another project but at a lower rating than what I needed, so I tried it out and low and behold it worked!! Definitely a PS supply problem but the one I got for the printer was brand new…???? I took another look at the failing PS and realized I failed to check that the power supply setting was correctly set for 110v. The power supply was set to 220v and not for 110v, ugh!! Curious why the steppers were working.. but it seems as soon as the heater started putting a load on the P.S. it checked out.

Victory!!!

Ultimately I added the following to the config.g file

M307 H0 A203.7 C745.2 D2.6 B0

I needed to mount the Duet board and figure out what to do with the power supply since I couldn’t leave everything sitting on the floor of the machine so I decided to mount the board on the side of the machine. I made a quick aluminum frame from some angle aluminum I had and mounted away.

   

   

     

a little more tidying..

I chose and E3D V6 for the hot end.. installation was pretty straight forward, the website at E3d has good instructions and I didn’t have any problems assembling from them. The hot end tip is tightened at extrusion temperature and that process is simply to seat the hot end to the heat break to eliminate leakage.

   

Tuning the hot end is the same as tuning the hot bed just make sure you tune the correct heater (H0 or H1). Make sure you tune it with both the part fan and the hot end fan running

M307 H1 S250 is what I ran for my E3d V6 and the result was as follows

M307 H1
Heater 1 model: gain 324.6, time constant 134.8, dead time 3.7, in use: yes
M307 H1 A324.6 C134.8 D3.7 B0

Added to my config.g, the B0 parameter tells the system to use PID.

Setting up the steps on the Extruder was next. This was a little harder to configure as you need to correctly calculate the steps the extruder will be pushing/pulling the material. I followed Triffids  Hunter’s guide and in my case the calculation was as follows as:

 e_steps_per_mm = (motor_steps_per_rev * driver_microstep) / (hob_effective_diameter * pi)

(200 * 16) / (7 * 3.14159)

145.51 = 3,200 / 21.99113

This is a good starting point. To test the extrusion you have to mark your filament so that you’re able to measure the amount that is used as it is fed through the extruder. Its good to use a round number like 100mm or 150mm. I heated the hot end on my machine and used the intake side of the Bowden extruder to measure 100mm of filament and marked it with a marker

I then set the feed on the extruder to 1mm and then ran 100mm, then I measured the amount of material that was left or in some cases how much was fed in past the mark. I then adjusted the calculated steps and adjusted the number using the following formula.

new_e_steps = old_e_steps * (100 / distance_actually_moved)

rinse and repeat until the mark on the filament lines up with the intake side of the Bowden extruder. this will give you an estimated feed for the extruder there is a fine adjustment needed after I got things rolling.

Directly from Triffids guide:

E Steps Fine Tuning

Now, with everything very close to ideal values, we can finally dial E steps in that final little bit!
  1. Find an object with flat tops on a number of levels, such as this cube stack test (scale this object by 250% after loading in Slic3r)
  2. Slice at 95% rectilinear infill. Use the lowest layer height you’re comfortable with – the lower the layer height used for this test, the finer your resulting E steps calibration will be. I use 0.2mm for first run, and if I’m feeling ambitious I’ll repeat this process at 0.1mm.
  3. Print.
  4. Ignore the first 5-6 layers because they’re too sensitive to the exact height of the first layer. If it’s obviously over-filling or under-filling, alter E steps or Z=0 point and restart the print.
  5. Observe infill. If you can’t see tiny little gaps between the lines, reduce E steps by 0.5% every 2 layers until you can see tiny gaps.
  6. Observe solid top layers. If you can see tiny gaps, increase E steps by 0.5% every 2 layers until there’s no gaps in the top.
  7. Send the new E steps to your printer with M92 Ennn without even pausing the print – you will see the result in a couple of layers when the change is this small.
  8. Goto 5 until the infill has tiny gaps AND the solid top layers do not.
  9. Now, your E steps value is extremely fine-tuned! Save this value in your firmware’s configuration and flash to make permanent.

 

 

 

I needed a precise way to zero the Z axis and after some though I decided to purchase Piezo setup from Precision Piezo.

 

A current view of the machine progress.. the extruder needs to be setup and finalized and then I think I’m ready to attempt to print something… I think a calibration square.

Leave a comment

Your email address will not be published. Required fields are marked *