Tuesday 3 April 2018

Avoiding voids

The thinnest practical wall you can print, (with Skeinforge at least), is two extrusion widths wide. Any bigger leaves a gap, until you get to three extrusions wide, and then you get infill in between them.

If the wall is exactly two extrusions wide then they only touch tangentially and have a weak bond because the edges of the filament are rounded.

I discovered that if you make a wall even thinner then Skeinforge still lays down two paths equal to the extrusion width but places them closer together. This is because it always offsets inwards by half the extrusion width, even if the resulting paths overlap. I found I can make use of this to squash the plastic together, making a stronger wall with less voids.

An optimum amount of squeeze is to place the nozzle aperture just free of the flat part of the first path when extruding the second. The width to make this happen is $extrusion\_width - layer\_height / 2 + nozzle\_aperture / 2 + extrusion\_width / 2$.

Of course, despite what Skeinforge thinks, the plastic volume can't overlap, so regardless of where the nozzle is the minimum width the wall can be is $2 * extrusion\_width - layer\_height * (1 - π/4)$ due to the volume of plastic extruded, i.e. if it manages to completely fill the voids. This is shown below: -

The grey area is where the edge would have been with the wall two extrusion widths wide. There isn't much difference, and depending on the viscosity of the plastic, the real width should be somewhere in between. But the big difference is the walls are strongly fused together. The top void should be completely filled because it is right under the nozzle, leading to a smoother top surface. And the bottom void has more chance of being filled due to the back pressure caused by the filament having to flow more to the right.

To put some numbers to the diagrams, these have been drawn to scale for 0.25mm layer height and 0.5mm extrusion width, 0.4mm nozzle. The requested wall width is 0.825mm but the volume of plastic means it must be at least 0.946mm, only 0.054mm less than the original 1mm wall.

I made a test script that makes a box with two 1mm walls and two 0.825mm walls.

Here is a corner of the box under a microscope. The wall on the left is seamlessly fused and the wall on the right clearly has a void.

The wall comes out a bit thinner than the theory predicts, I am not sure why, maybe the increased pressure causes the plastic to feed a bit slower.

I used this technique to make the Mendel90 fan guards a lot stronger part way through production because I had some fall apart one day when my filament was a bit undersized.

It would be nice if the slicer could do this automatically, so you can keep a 1mm wall in the design, but it would make it by extruding one side of the wall as normal but the other side it would offset the nozzle to fill the voids and then extrude a little more plastic to make it still 1mm thick.

In fact it should really do this anytime it is extruding against another extrusion path. E.g. when doing multiple outlines and when doing infill. I.e. the only time the tool path of the nozzle should be down the centre of the extrusion path is when there is nothing either side, or it is enclosed on both sides. And in each of these three cases a slightly different flow rate would be needed to get the new exposed edge in the correct place.

Saturday 2 December 2017

Fretting corrosion

Long ago I noticed friction fit connectors are not reliable in 3D printers: hydraraptor.blogspot.co.uk/2011/06/reliable-connections. For example, 0.1" Molex connectors that are rated for 3A burn out when only carrying 1A motor currents. Even signal connectors on HydraRaptor lose contact and need re-seating occasionally. I figured it must be due to vibration and / or thermal expansion and contraction.

It is one of the reasons I choose the Melzi electronics for Mendel90, i.e. because it has screw terminals instead of Molex connectors that are common on other boards like RAMPS. While looking at some connectors for another project I came across the term "fretting corrosion", which is exactly the problem that causes failed connections when you have vibration or thermal movement. There is a marketing video explaining it here:

Basically contact mating points need to be gas tight to prevent corrosion and any relative movement breaks the gas tight seal. You can now get connectors that have sprung female parts to absorb any motion and prevent this mode of failure. Worth considering if you are designing a 3D printer.

Monday 7 August 2017

Will it burn

I always intended to put lots of different tool heads on HydraRaptor but after being a milling machine for a while it got stuck as a 3D printer until I started making Mendel90 kits and then it sat gathering dust.

Back in 2009 I bought a 1W 808nm infra red laser diode to experiment with but I never got around to trying it out until recently.

I bought it on eBay for £292, which seems very expensive now, but the seller claimed it has a spot size of only 13um x 120um. That would give a power density of 640 W/mm2, assuming a rectangular spot. In comparison a 40W CO2 laser with a round spot of say 0.25mm would give a power density of 815 W/mm2, so I expected to be able to cut through wood and plastic a few mm thick with it.

Inconveniently, the anode of the diode is connected to the case. 

It came with a driver board that takes 11-18V and a TTL enable signal and produces a constant current drive.

It is all a bit last century with through hole components and a relay. I looked at the switching waveform and found that the relay added an 8.2ms delay and there was a 2.95ms rise time.

The blue trace is the enable signal and the yellow trace the output voltage.

The two TO220 devices had their markings ground off but it was trivial to trace the circuit and work out what they are: a 7810 10V regulator and an LM317 variable regulator wired as a 1.25A constant current source.

Laser didoes are very easily destroyed by overshoot transients of even a few micro seconds duration, so most of the circuit seems to be to avoid those. R2 and C3 seem to be to stop inductive spikes from the relay getting onto the 10V rail. R4 and C6 are probably to filter any relay contact bounce but they also make the rise and fall times very slow. D1 is a mystery because it can never be forward biased, so might as well not be there.

I hacked the PCB and reconfigured the circuit to replace the relay with a MOSFET, speed up the edge rate and added a big red LED to warn me when it was on. I have a pair of Thorlabs LG9 safety glasses to protect my eyes.
Here is the new switching waveform: -

This time the yellow trace is the enable signal. The blue trace is the current waveform measured with the hall effect current sensor mentioned in my last post. The small delay turning on is while the output capacitor charges enough for the diode to start conducting. The rise and fall times are now less than 1ms which seems more reasonable.

The forward voltage of the diode is about 2.2V at 1.25A giving a power dissipation of 2.75W and an efficiency of 36% assuming the output is 1W. I mounted it on an old PC CPU cooler which was complete overkill.

I made a rough estimate of the thermal resistance of the heatsink with the fan on by attaching a 50W resistor that has the same case style as the laser. The heatsink itself is about 0.23°C/W and the case of the resistor a little more, 0.48°C/W in total. So the temperature of the diode casing will rise by less than 1°C.

These dashes were made by waving a random piece of black plastic (most likely ABS) in front of it while the 100 Hz test waveform above was driving it.

With continuous power it makes deep scars.

Holding it steady I was able to slowly drill all the way through the 1.75mm thickness but it left a ring on the surface. The exit hole was clean though. By all accounts ABS doesn't laser very well.

With these rough manual tests I established the focus length was about 35mm, which I needed to know to be able to design a mount for HydraRaptor, so that I could position it relative to the Z probe to give me auto focus.

I also established it has no effect at all on white paper because that reflects red light and this is near IR, so it will behave mostly the same as red light. It also had no effect on some Kapton (polyimide) film because that is transparent to red light. With near IR you can only cut materials that absorb the red end of the spectrum. If they are transparent or reflective to red they are unaffected. In contrast, CO2 laser light is far infra red with a much longer wavelength and that is absorbed by most things including optically transparent materials like glass and clear acrylic and white materials like paper.

I designed HydraRaptor in 2D and that was all it needed at the time because it was made from flat sheets of MDF and had no 3D printed parts. In order to be able to add new parts to it I decided to re-model it in 3D in OpenSCAD.

I mounted the heatsink on a printed bracket that aligns the laser with the centre of the table and also supports a radial blower and duct for air assist. That is a jet of air that blows the smoke away from the cut and the lens.

I made a steel plate bed to protect the XY table and allow me to hold down the work piece with magnets. An L shaped bracket made from DiBond allows repeatable alignment with the back left corner of the bed. I used that corner to allow oversized sheets to hang over the front right where there is maximum clearance.

The hole in the corner of the L is needed because an internal corner would otherwise have a radius equal to the tool radius that cut it.

The first task was to find the exact focal point and I did that by burning a line of spots from different heights into the paint surface of an off-cut of DiBond and looked for the smallest one. I have hundreds of these off-cuts from making Mendel90 kits and because the paint is a thin layer on top of aluminum it seems like a good way to measure the spot size.

After I had established the focal point I then needed to establish how big the spot is. I have a microscope and a graticule slide but it was too hard to align it by hand. The alternative method I came up with was to make a line of spots 0.1mm apart so that I could compare the spot size with their pitch and use the ratio to work out the size.

As you can see the spot isn't quite aligned with the outer case of the laser. The size works out at 0.16mm by 0.07mm. This is a lot bigger than the 0.12mm x 0.013mm advertised and only gives a power density of 90 W/mm2. The bright area in the middle where it looks to have cut to full depth is 0.036mm wide.

Laser spots don't have well defined sharp edges. An ideal laser has a Gaussian intensity distribution which falls off  away from the centre asymptotically to zero. The beam diameter is sometimes defined as where the intensity drops to half the maximum and other times where the intensity drops to 1/e2 ≈ 13.5%. So my power density calculations are somewhat naive.

The beam starts off long and thin because it comes out of the edge of the chip die. The cleaved edges form the two parallel mirrors. Whereas I think of lasers having a parallel beam, the beam from a diode laser diverges at tens of degrees. And it diverges faster in the axis at right angles to the die than it does in the axis parallel to the die. So although it starts out wide and short it ends up tall and thin.

Not only that, but the beam also has astigmatism. That is: the point that the beam diverges horizontally from is further back then the point it diverges vertically from. So focusing it to a round spot requires tricky anamorphic optics. Mine just has a plain lens that is rotated in a screw thread to adjust the focus, so it can't correct the elliptical beam shape.

My next experiment was to work out what travel speed I can engrave at. This will be different horizontally and vertically because the energy density applied to the material will depend on the area swept out as well as the power and time. This will make motion planning interesting as the speed will need to vary depending on the slope of a line and so will the kerf compensation. Alternatively the laser could be mounted on a rotary axis to keep it pointing along the axis of travel for maximum detail. That would need a very accurately aligned axis though to avoid the spot wandering as it rotates. A round spot would be a lot easier to deal with!

I engraved a 5x5mm crosshatch with each line at a different speed. Speed reduces from left to right and bottom to top. The speeds are 5mm/s, 5/2mm/s, 5/3mm/s. ... 5/13mm/s.

By looking at the cross over points one can tell if the maximum engraving depth has been reached or not. So it needs go as slow as about 0.5mm/s horizontally to not show the vertical lines.

Note that it never goes deep enough to reach the aluminium skin. It looks bright but when I check for conductivity with a mulitmeter I have to scratch away the white layer to get contact. I think there must be white primer underneath the black paint and that reflects the laser, stopping further ablation.

Here is a 5x5mm rectangle engraved with a raster of lines overlapping 50%.

I don't know what gives it an apparent texture.

While doing these tests it soon became apparent that I needed fume extraction because removing even a tiny amount of paint smelt unpleasant. I thought I might get away without it for shallow engraving as there are many open frame laser engraving machines on the market. My first attempt was to add an 80cfm fan close to the edge of the bed that sucks air and blows it down a 1" pipe that I hang out of the window.

It produces quite a powerful suction and this reduced the smell but not enough. I switched to tests on balsa wood because I thought it would be less toxic. I have a lot of 2mm sheets left over from the early days of RepRap when it was used as a bed material for PLA before better options were discovered.

It still smelt very smokey, so I decided to make an enclosure. I had always intended to do this. Way back when I bought the laser, I also bought some brushed aluminum DiBond sheets big enough to make a cover but ended up using most of them for other things. I did have two left to make the front and top and some black off-cuts from Mendel90 production long enough to make the sides.

The width of HydraRaptor is 511mm and that is bigger than the X axis of my CNC router, which is 450mm. By hanging it over the side of the bed so it just cleared the gantry I was able to route one side at a time. I made some tooling holes in the corners of the door cutout that allowed me to turn it around 180° but maintain accurate registration. If it had been 1mm wider it would not have fit the router!

The door is an acrylic one I recycled from my Mendel case. I might replace it with DiBond to remove the need to wear safety glasses. It is sealed around the edges with rubber sealing strip tape. The enclosure isn't airtight because there are holes for wires to the z-axis driver, etc, but it is under significant negative pressure when the fan is running, so they are not a problem. I cut an 80mm hole opposite the extractor fan to get a good stream of air across the bed.

The enclosure removes any smell in the room while it is engraving wood but the smokey smell remains inside the machine even after a couple of weeks.

I did a larger grid test (50mm x 50mm) to see what speed I could cut through 2mm thick balsa wood but found it didn't matter how slow I went it did not go right through but it did give a wider charred area. The speed is 5 / n mm/s, where n is the line's index.

Here is the underside: -

Just a few pin prick holes and some surrounding char where the slowest lines cross.

I did another test where instead of reducing the speed by the line's index I kept the speed constant at 3mm/s (5 mm/s for y) but repeated the line n times. I found this gave far less char and actually cut all the way through.

So horizontally it took 4 passes at 3mm/s to cut through and vertically 6 passes at 5mm/s. Working out the power energy density as passes * power / speed these are more or less the same, which is odd considering the big difference in beam width.

The next test I tried was to cut out a square using four passes at 3mm/s in both directions.

I was disappointed to find it didn't cut all the way through so I re-ran the grid test above and the laser power dropped to zero and it never lased again. The left edge of the wood was not very straight where I cut it with a knife and it left a small gap that allowed the laser beam to hit the steel plate below. What seems to have happened is the reflection was enough to destroy the diode's mirrors. It still takes the same power but gives no output. This is known as Catastrophical Optical Damage.

Where the beam had previously gone all the way though to the steel it had created black stains so that stopped any reflection. So it looks like I should have painted my steel plate black. I was also lucky that the DiBond didn't engrave down to the aluminium surface as I expect that would be an even better mirror.

So a disastrous end to the experiment!

I have ordered a 2.3W blue laser from China so I will continue experimenting with that when it arrives. I also have a 12W IR fiber laser to play with but that requires a serious power supply and cooling system, so I will get more experience with lower power lasers before I attempt to power that up.