Posted on 5 Comments

BLTouch on Duet Wifi & RepRapFirmware

The time has come to setup BLTouch on my system.

I’m going to use Duet WiFi + Duex5, but I’ll post details about using it without the Duex as well.

Since I do use Duex5 and because of other considerations explained in this blog-post, I’ve decided upon not following the pin selection most often mentioend other places. I do however try to explain my reasoning and how you can use it to customize your own setup.

Please let me know if you have comments or inputs. I do take all comments as a positve thing, also potential corrections to my writings 🙂

When I feel I have everything I need, I’ll boil down on this post and use it as a “how-to” for both duet3d wiki and instructables.com

Index

Physical overview

First a short explanation on how a BLTouch sensor works and what it is: The BLTouch sensor is in the category of Servo sensors, meaning it’s using a mechanical servo mechanism to raise and lower the metal pin to do the testing.

Quote from the maker: ANTCLABS(A&T)

  • BLTouch is an auto leveling sensor for 3D Printers based on open-source.
  • Simple, Smart, High-precision
  • It could work with any kinds of bed materials, such as glasses, woods, metals, and so on.

Probe Connector role

At first the Duet Wifi and RepRapFirmware didn’t support servos, but focused on other sensor types like their own IR-sensor.

It means the description on the WiKi can be a bit confusing for us non-electronical centric people as they talk a lot about using the Probe Sensor, which just doesn’t apply fully to the BLTouch Sensor. (To be honest I get more confused by reading this page, so don’t feel bad if you are like me!)

They have added a BLTouch section now though, which helps a lot. Thumbs up! 🙂

It means we can’t just use all the pins from the Probe connector as the sole connection on the Duet WiFi, but only use 2 of these pins in the Probe Connector, GND and IN, to register the actual signal from the BLTouch. We need to use PWM connector for the other 3 pins from the BLTouch.

The Probe Connector is the one to the right in the photo. Placed next to the LCD connector to the left of it.

The red wire is IN and black wire is GND

Note: You might notice the small 480Ω resistor crimped into the connector here. More on this later.

Using expansion PWM port for Servo

The 3 remaining wires from the BLTouch are there to control the Servo Pin inside the BLTouch.

Since we have a Duex board we are going to use 1 of the 5 ports labeled as “PWM” ports on the board itself, but listed as “Shared with servos” on Duex2/5 main features page.

When looking at the Wiring Diagram, the connectors are labeled as “PWM / Servos“.

Physical Connections

Lets start by looking at the 2 wires for the Probe Connector on the Duet Wifi/Ethernet.

2-Pins for Z signal

We are going to connect the 2 wires labeled Z (white) and GND (black) on the BLTouch and connect to the matching pin on Duet WiFi Probe Connector, as shown in the diagram.

Note: Your wires might be colored differently. Especially if you use a counterfit version like 3DTouch.
My version of the BLTouch is an old Classic version.

5v to 3.3v logic level conversion

The BLTouch is as default configuring using 5v logic. It means we have to make sure we set it up to run as 3.3v logic instead. Don’t worry about not grasping what 3.3v logic means, as it’s really not important to know what it is, only how we hook up our sensor.

If you have an old Classic BLTouch (as I do), you need to either solder or crimp in the included 480Ω (ohm) resistor between the 2 wires for the Probe Connector.

I crimped them into my connector. Mine came with a 480Ω and 10kΩ resistor.

I do not know why the 10kΩ was included.. anyone know?

If you have a new version of BLTouch with serial number, you just need to cut the solder away between 2 solder pads, as shown here:

3-Pins for Servo

The 3 left over wires on the BLTouch are GND (brown), Red (5v) and Orange (control signal)

If you do not own a Duex expansions port and instead use the pins on the Duet Wifi, you connect as shown on this diagram:

You can use a different Heater-pin, just make the necessary adjustment in your configurations.

  • GND ( G, Brown) to pin 2 on Duet WiFi
  • 5v (5v, Red) to pin 1 on Duet WiFi
  • Orange (S, Control signal) to pin 31

Some info on the Duet Wiki where they use pin 8 instead of my 31. They are also using different colors than my BLTouch, so be sure to check on your own model!

Note on below wire colors: I did not have any brown (used black) or orange (used white) cables, so go by the labels near the connectors, or remember my choices.

The difference between Pin 8 and Pin 31, is how Pin8 is assigned Heater 3 and Pin31 is assigned Heater 7. I picked the last available, in case I later wanted to actually use Heater 3 as a heater. I’m never going to use 7 heaters, and Heater 7 connector also made for nicer wiring in my case 🙂

Note: It can be confusing how the numbering on PWM# and E# doesn’t follow each other. Reason for this is, how the Heater numbers (E) starts with E0 and E1 located on main Duet WiFi board, while the PWM ports are either starts with PWM1 or PWM0 is somewhere not known to me.

The above diagram is a small part I made out of the full diagram.

Firmware Configuration

It’s time to configure our firmware in order to use the BLTouch sensor we just connected. There is some good information on the Connecting a Z probe – BLTouch on the Duet3d wiki.

Disable heater

As shown in the warning in the above diagram, the PWM channels are shared with the heaters, so we need to disable the relevant heater.

We are using the PWM_5 connector, which is the 7th Heater.

We disable it using the M307 Gcode command and setting A, D and C to -1 in our Heaters section in Config.g file. Setting them to -1 means they are disabled.

M307 H7 A-1 C-1 D-1

Note: change H7 to whatever heater you need to disable according to how you choose to wire it up.

RepRapFirmware 1.16 and later allow the PID controller for a heater to be disabled by setting the A, C and D parameters to -1. This frees up the corresponding heater control pin for use as a general purpose I/O pin.

Set Servo Position

Now we need to configure the position of our Servo Pin, which we do using the M280 Gcode command.

Deploy Probe

In order to do so, we put the following into our deployprobe.g file. If you do not have this file, you just hit New File in the System Editor where all the other config files are located and create it.

Insert the following into the file, where the P-number corresponds to our H-number above.

M280 P7 S10

S10 is the “angle” the PIN is put in to engage. You can read more and also see a table of most of the expansion pins. When dealing with BLTouch the engaged position is at angle 10.

Note: In the Duet wiki it is listed to include a Invert parameter: I1 at the end as well, but mine doesn’t work when used.

Retract Probe

Next we need to configure how we retract the Servo Pin in the BLTouch. These settings are configured in the retractprobe.g file. Create it the same way as before if you don’t have this file.

M280 P7 S90

Once again, the P-number corresponds to our H-number while S defines the “angle” to put the probe into. When dealing with BLTouch the retracted position is at angle 90.

Note: In the Duet wiki it is listed to include a Invert parameter: I1 at the end as well, but mine doesn’t work when used.

Configure Endstop Section

Set Z-Probe type

Now we need to setup the Probe Type to Type 5 in our Endstop section in the config.g file using the M558 command.

P5 (from RepRapFirmware 1.14) selects a switch (normally closed) for bed probing between In and Gnd pins of the Z-probe connector (Duet 0.8.5 and Duet WiFi).

Settings legend/explanation:

Overview of what the different parameters means and do:

  • P# = Mode/Type of probe – P5 is for bed probing between In and Gnd pins of the Z-probe connector.
  • XYZ# = 1 use probe for this axis. 0 do not use probe for this axis
  • H# = Dive Height of the Servo pin. 5mm is normal for BLTouch
  • F# = Feed Rate mm/min
  • T# = Travel speed to and between probe points (mm/min)

It all means that we insert the follow line for our new Z-Probe, defining the Type and usage settings.

M558 P5 X0 Y0 Z1 H5 F120 T6000 ; Set Z Probe to type Switch or Digital output where Z probe connector is used. Used for z only.;

  • Put it in the Endstop section in config.g file:

Set or Report Current Probe status

Next we need to setup how the Probe behaves, using the G31 command.

Settings legend/explanations

  • Z# = Trigger height. 1.5mm is normal for BlTouch
  • P# = Trigger value. 25-100. Lower it if nothing happens.
  • XY# = Placement of probe relative to your nozzle. Called offset. In mm.

It means we set trigger value to 50 (don’t worry if it means nothing to you), define where the probe is placed in realtion to our nozzle and the trigger height of the Probe Pin.

The Z value is the Z-offset. Used to tune the distance between trigger location and nozzle. Higher offset value and you get the nozzle closer to bed.

G31 P50 X-25 Y38 Z1.5; Set Z probe trigger value, offset and trigger height

  • This line is also placed in the Endstop section in the config.g file.
  • Just place it under the above M558 line.

G32: Probe Z and calculate Z plane

The G32 Gcode Command can be used to define 3 or more probe points. I am only using mine as a Z-min endstop with 1 point, so not going to use this feature for now.

Links

Relevant Gcode commands:

Posted on Leave a comment

Use a SSR or Power-Expander to externally power Heated bed – Part 1

I’ve had a few inquiries about how exactly to use a Solid State Relay and an extra powersupply or main power, so decided to write about how to make it work, and explain some while at it

Abbreviations/vocabulary:

  • Solid State Relay :: SSR from now on
  • powersupply :: PSU from now on
  • Mains power :: AC

Silicone Heater

Here’s my 500w silicone heater from Keenovo (opes eBay shop) powered using AC power. It comes with an attached pad of 3M MP386 heat resistant and transferring extremely sticky tape. You can have them made with other types of sensors, like a thermocoupler if you like.

I decided to include the Power-Expander (opens link to reprap.me) as it is a great alternative to a DC-DC SSR, and because you are sure not to get a counterfit SSR.

I have personally only used SSR from RobotDigg (opens their shop), but the brand Fotek is also a good quality. Problem is lots of counterfits (open UL site) & here (instructables) around, so be carefull where you buy your stuff.

Types of relays – usage scenarioes

We allready touched on the subject above, so lets take a look at the different options we have.

DC-DC or DC-AC

The denomination before the – is the input or control type. We are only talking about DC- here.

The listing after the – is the LOAD type. So if it is listed as DC-AC, it means we control it using DC from the output on controller and the LOAD we are using is AC if we have a silicone heater as listed at the top of this page.

  • DC-DC SSR or Power-Expander are interchangeable in most cases, so I’ll list them as such.
    • Notice the input type and range listed at the lower end. In this case 3-32 Volt and the type is DC
      Load type os listed at the upper end, and is 6-220 volt and also DC, so we really have some power here.
      Amperage is listed in the center, and this SSR is rated at 25A. It means the LOAD can be current up to 25amperage
    • Option 1: if your main powersupply is not powerfull enough to power a heated bed in addition to the electronics. It might also be used
    • Option 2: if you just want to use 2 seperate powersupplies for the electronics and heated bed: you might be running electronics at 12v but want 24v on heated bed.
  • DC-AC SSR
    • You want a DC-AC SSR if you have a heated bed powered using AC. Most common if you have bought an AC silicone heater.
  • Shield
    The SSRs I’ve bought comes equipped with a clear shield/cover.
    It is important to use this to avoid accidents, as the terminals are open and easy to get to.
  • Heatsink
    Read on the specifications and compare to your needs wheter you need a heatsink or cooling. I have not needed this on my build as a 500w AC heater only use 2-2.5amperage at most.

Wiring up

The next big question is how to wire it.

If you use an AC heater, you might want to add a grounding wire. You might also want to do it if you use DC, but in any case, I have added one here, as you can see.

I must admit I can’t see a scenario where it would be needed, but better safe than sorry, and it’s easy to just add an extra wire.

Here’s the wiring braided and sleeved up with the Silicone heater taped to the plate. It takes 24 hours for the glue to fully harden, so put it under pressure a day or so, before putting it upside down – don’t put pressure on the center part where the thermistor lives.

Ground Wire

People have aruged that I should have attached the ground wire to the black print-plate, but I admit I simply only had in mind to ground the entire Z-stage, so bolted it to the z-stage liftplate…

If an AC wire comes loose I guess it would it the plate.. in any case.. I leave it to you, how you want to attach it.

 

Next parts…

In the next part of this, we will go through the complete wiring of controller, psu, ssr and heated bed.

Posted on 2 Comments

BeTrue3D Printer build part 5 – LEDs

You might have read my part 3 where I had a section on installing LEDs.

Here are some thumbnails from the previous post.

This blog-post is all about getting it to work, including installing a front-mounted simple mechanical switch.

  1. Planning
  2. Execution
  3. Mounting
  4. Getting 12v in 24v system?
  5. Testing and wiring
  6. LED Installation
  7. LED Testing
  8. Video testing LEDs

I’ve tried taking some more photos due to popular demand 🙂

Planning

I had a hope the small on/off switch could be placed as you see on the photo. I removed the bracket, measured up, and drew some lines. I made 0,5mm extra space between the switch and extrusions – giving me some margin of error to work with.

Execution

I started out using a small quality drill from proxxon with a pointy tip to get an accurate starting point (I don’t know one of those fancy tools to make a small indentations)

After I had it going I switched to a more sturdy drill and worked on it. Using plenty of cutting oil and cleaning away aluminium parts all the time.

I used a tray as a drill-platform as I do not own a proper workbench (I have a small portable one, but it was packed away). I’ve put it over the sink in the kitchen. Worked great as the metal parts just ended up in the sink, and the drill didn’t go down into a tabletop or similar.

After finishing the pilot hole I measured the diameter I needed for the switch and used the right sized drill for the job.

Mounting

The on/off switch is within the bracket, so that’s as planned. I had previously used the switch, so allready had in and output wires on it. I use the male plug (2 exposed pins) as input and the female connector as output. Doing it like this, so any wires/plugs with active current is not in the form of bared metal pins.

I soldered on male connectors to the wires coming from the LED strips. Using a portable gas weller solderpen I had from my time as network techie 🙂

I took a photo of the small hand tool, as that is enough of a tool to crimp on most connectors. A proper crimping tool is prefereble, but if you only need it for 1 project it is fine to skip buying it.

Getting 12v in 24v system?

So, the next step is to get 12v in my 24v system, as the LEDs are running on 12v. The Duex5 can be configured to output 12v, so I might go that route eventually, but I’d like to initially have power available to the LEDs as soon as the PSU is on, regardless of setup.

I’m using a small “hardwired” 24v DC to 12v DC step down. It can even output at 3amp, which is a lot for such a small thing! I like these things compared to the one you adjust manually, as they never put out that annoying high pitch coil whine you sometimes get from “normal” DC-DC step down modules.

Photo shows front and rear of the board.

I’m going to solder on small pins, as I’m not sure what I want in the longer run regarding these. Alternative is to just solder on the wires.

Using the foam pads to keep the pins in place while soldering them on.

Ready, get, set go, and finished. The fan is homemade with a carbon filter.. it’s really super nice.

Testing and wiring

I’m using standard female dupont connectors and just using standard  tools.

I have a super nice Lambda Vega-Lite 550 powersupply I found at a bargain price. Going to convert it into a proper “lab psu” at some point with banana plugs etc.

I’m making sure the output is in fact 12v and not something else.

Putting the wires in place using duct-tape (untill I can print some other cable-management things) and mounting the small Step Down below the Duex5. I’ve just used double-sided tape for now, and have not wired it up any further.. propably going to be directly hooked up to the PSU though.

LED installation

This should had been in the previous post, but since I didn’t take any photos of it, I do it now. You can see how the power input comes up through the floor paneling through a small indentation, and each section of the LEDs are conneted using a small piece of wire.

I’ve put white heatshrink over the exposed solderpads.

LED testing

It might be hard to see, but here are 2 photos showing the BeTrue3D Printer with LEDs on and off.

Video showing a test of the LEDs

Posted on Leave a comment

BeTrue3D Printer build part 4 – Printbed

This post is about my brand new super nice PEI-Coated black oxidized 5mm aluminium plate with lasered logo/url and about a lot of wiring I’ve spent time doing.

I also put in the last paneling. I ran out of the white 5mm card board material and am using some whiteish acrylic I had untill I can get some more of the white plates.

Printbed

First up is the printbed. This is the single most expensive item in my printer at around €85 including shipping! Especially when combined with the 500w AC heater at around €35. You can get the plate much cheaper if you get it in natural color instead of black though.

Here’s the finished result, which I’ll go through in steps, to show how I did it.

I’m very pleased with the result, if I might say so 🙂

Keenovo heater used

I’m using a 500w AC heater from Keenovo. You can get it in custom sizes at no extra prize, and they really deliver high quality. Included is 1 big pad of preapplied heat resistant and -conducting 3M MP486 tape, which is the best for the job.

It comes with premounted 2 wires for AC power and 2 wires for the build in thermistor. It generally reads 10c above actual surface temp of the printbed.. guess its due to heat dissipation. You can get other sensor types as well

The CE is “China Export”, so it doesn’t mean it is CE certified

Ground and sleeving

I wanted to ground/earth my Z-gantry directly, in case of a mishap, so needed an extra wire. I also enlarged one of my 3mm holes to 4mm to make it fit perfectly.

I drilled an extra small hole where I can zip-tie the cables onto the lift-plate for stress-relief for the wires/headpad. It is places so the wires does not grind on the edge of the plate.

I originally wanted to use a cable drag-chain, so hadn’t planned on using zip ties.

I braided the cables and sleeved the part that’ll be visible ind the print chamber.

I do not insulate the bottom of the plate, as I want the increased heat output to act as a sort of “passive” heater element for the heat-chamber effect I’ll get by doing this.

 

Fingerscrews.

I’ve planned to use the Ultimaker 2 fingerscrew system. I really like it, as it is discreet and runs very nicely, while at the same time can be tightened down really tight so the bed doesn’t wobble.

It means I’ve had 3 holes at 6.5mm made in the lift-plate for the fingerscrews, which lines up with corrosponding countersunk holes on the print bed.

The fingerscrew assemblies are made up of the fingerscrews, spacers, springs and m3 scews.

For best result I have put on lithiumgrease between the fingerscrews and spacer, and again on top of the spacer.

Note: I’ve used some other types of grease on other printers with great result as well, so no need for special grease. Just use something.

Mounting

After fixing the cables at the back edge of the bed, as shown in photo a bit above, I placed the springs at the right spots, and placed the bed on top of them (took a bit of balancing in order not to knocking around the springs with the plate).

The springs are 20mm long and has an inner diameter of 7mm.

I used a caliber I can lock into place and put it at 10mm. This means I can do a rough calibration of the bed. It’s not precise, but close enough to start calibrating using printer software.

Note: The distance I used might not fit on other printers, due to thickness of plates and length of m3 screws and springs. So tighten down the springs untill you can depress the corners with your fingers, but not so easily that the bed can wobble. The springs must be tightened down good, but not all the way.

The give in the sprigns is an insurance if you accidentailly have the hotend smash down onto the plate. If the plate can’t move, something else is likely to break.

Clean it up using Acetone or Isopropyl alcohol when done. Can see my sticky fingers on the photo above 🙂

Drag-chain

I originally wanted to use a dragchain… but I’m just not that big a fan of them, and found it looked bulky in there.. even a thin one. I know this is a subjective view, but there it is. I liked the sleeved version I made, so stuck with it.

I drilled an 8mm hole for the wires to get out to the back compartment, along with 2x 3mm holes for a ziptie to hold the cable in place.

The cable can flex up behind the z-stage.. even if it wanted to get under the bed, there is plenty of space for it in there, so it can’t cause any troubles.

Cables out back

I couldn’t get good photos of cables out back, but one of the AC wires went to the Load side of the SSR module at the connector labeled 1. The other AC cable went to my PSU at the AC N connector.

The Ground/Earth cable went to the AC earth connector, while the 2 thermistor wires went to the bed thermistor.

Cabling – Wire harness.

So much wiring when custom building printer!

As I created a connector plate for the 5 extruder motors, I did the same for my wire harness going to the carriage/hotend. It’s a LOT of wires for sure, but they are needed.

The 6-pin plug to the left is for BLTouch. 2 of those pins are for z-min and 3 for servo. 1 is unused.

The big 9 pin plug is for heater (2), heatsink fan (2), printobject fan (2), thermistor/thermocoupler (2-3 – some thermocouplers has 3 or even 4 wires)

The handdrawn “labels” are meant for my reference untill I get it working. I plan on printing some nice versions at some point.

 

Internal view

So many wires! I had a lot of cable clips from my old Um2 extrusion clone project, but recently threw them away… need to print some new to get rid of the duct tape when I find the time 🙂

Rear connectors

Here we can see how the new connectors looks; with and without the matching wire-harnesses hooked in.

I havn’t put connectors on the far end (at hotend) which’ll wait till I get the last parts I need to make the Y axis and carriage in order to make the correct length.

That’s it for now.

Hope you liked it, and thank you for following my proejct. 🙂