Showing posts with label laser cutter. Show all posts
Showing posts with label laser cutter. Show all posts

Thursday, 14 March 2019

A Complete Rebuild in Acrylic

It was always my plan to make my competition robot in transparent laser cut acrylic, so that the insides could be seen. Plus it just looks so nice! Having learned the art of designing and building a laser cut robot using 3 mm plywood I was now ready to re-cut the refined design in acrylic. The main modification I made was to shorten the legs by 15 mm. I had realised from driving my prototype that it really did not need such high ground clearance as the small wheels could not climb over anything but small obstacles. It was also a little unstable. I could get it to lift some of the wheels off the ground doing sharp turns at speed!

I added some engraving to various parts and also added holes for threading all the motor and servo wires through the legs. I had drilled these holes by hand on the wooden model. Now I knew where I wanted them I added them to the CAD model so these could be laser cut on the acrylic parts. I had already designed an acrylic mount for my main display and had this mounted on the wooden chassis.

With so many parts to cut I wanted to make optimum use of my acrylic sheet material. So I used an online SVG nesting tool to layout the parts. I prepared an SVG file of all the parts in Inkscape, including a containing rectangle required by the nesting tool to limit the area and shape to fit the parts into. I uploaded this to https://svgnest.com/ which generated a cutting layout for me to download.

An optimised parts layout for laser cutting

The complete set of laser cut acrylic parts ready to assemble

First I assembled the 4 steering legs. One snag I ran into is the inconsistency in thickness of acrylic sheets. A 3 mm sheet can vary in thickness between around 2.8 mm and 3.2 mm. This is due to the surface tension on the sheet when it is being cast, which results in a curved top surface dipping down towards the middle of the sheet. The sheet sizes you typically buy are cut from this larger cast sheet. Depending on which part of the cast sheet your piece was cut from you get different thicknesses across your piece. Some of my sheets exceeded 3 mm thickness towards one end, so some of my parts did not slot together as all my slots are cut at 3 mm wide. I had to re-cut a few parts with slightly wider slots. But I did not want to make all my slots wider by default, particularly the motor mounting plates which wobbled too much when the slots were not a tight fit. This an area which could do with some more refinement so that the rigidity of the motor mounts is not so dependent on tight tolerances. In the process of assembly I accidentally snapped one part in half and cracked another by over tightening the bolts holding the parts together. Acrylic is a much more brittle material than plywood and is easy to crack, especially around rectangular holes with sharp internal corners. I later modified some of my parts to increase the width of material around the outside edges of the slots from 3 mm to 4 mm to increase the strength of some parts. After re-cutting (plus a few spares) I had two completed Rocker Bogie arms.

The Rocker Bogie arms remade in acrylic with cable routing holes

As I assembled my robot using the new parts, I tried to extensively photo-document every step of the process. My plan is to write up a full build guide and possibly release a kit of parts for others to build their own rover from my design.

Some of the many photographs I took to document the assembly process

Another problem which came from switching to acrylic was that the plates did not grip each other like the plywood had. Some of my chassis body side plates were not staying together at the ends furthest from the bolts holding them in place. I had to add some additional T-slots and bolts to hold everything firmly together. I had designed a new front plate to mount a Pixy2 camera on, and this was not held on with anything more than the friction of the tabs in the slots. This would need more refinement for the competition as it was also going to be holding my Pi Noon attachment and I did not want that falling off mid-battle. For for now I could push it on and it looked good enough for me to shoot some photos. I set up my filming lights to provide some nice back lighting and took a few photos to try and capture the beauty of the acrylic design.

My final photo submitted for the Pi Wars 2019 program

Monday, 21 January 2019

CAD to Laser Cutter and Kerf

The same week I learned I had got into Pi Wars 2019 I also managed to grab a place on a training session for the laser cutters at MakeSpace. These were the machines I had primarily wanted to use to make my robot when I joined MakeSpace and now I had done the induction I just needed to work out how to convert my CAD model into a file format I could use on the laser cutter. Or so I thought.

The first problem was how to turn a 3D model of a part into a 2D outline for cutting. I was using SolidWorks CAD software and this has a drawings feature where you can generate 2D engineering drawings for different views of the parts and assemblies you have modelled. These drawings automatically update based on any changes you make to the modelled parts, which is very handy. But the file format for SolidWorks drawings is not supported by the software which the laser cutter uses. So the drawings had to be saved in a intermediate format which can be imported into the laser cutter software. Initially I was doing this directly as DXF format. A simple 'Save As' from SolidWorks to create a file I could import into a laser cutter project.

I cut the parts of one of the forward arms of my rocker bogie suspension which needed to hold a servo, and the parts assembled around the servo perfectly. It was all going very well.

 Cutting my first parts on the laser cutter

 My assembled servo mount

The servo fitting snugly in the mount

Next I cut the parts for a steering leg, and while they went together without any difficulty, there was a lot of play in the plate holding the motor. I started to think about the tolerance of the parts I was cutting and I soon had a lot of questions which I needed to learn the answers to. I had modelled my parts in CAD software to the exact dimensions I wanted them. But clearly when you cut them out with any sort of tool some material is removed by the cutter (in my case vapourised by a laser, but the same applies to a saw where some material is removed by the blade). Thanks to the maker community on Twitter I learned that the width of the cut produced by a tool is called the 'kerf'. Once I knew that I was able to search online and learn about offsetting (adjusting for the kerf). If I modelled a part to be 30mm wide then the drawing output from my CAD program defined a part which was 30mm wide. But when I cut this on the laser cutter the resulting part was only around 29.8mm wide due to the kerf. This was not so significant for how the part looked, but my tab and slot fittings were just a little loose fitting due to this.

There appeared to be 3 approaches people suggested:
  1. Specify an offset in the CAD program.
  2. Offset my drawings in a 2D drawing program after exporting them from the CAD drawings.
  3. Specify offsets in the laser cutter software.
I also realised that I needed to consider the sizes of holes for my various bolts and screws. I had used a 3mm hole size for an M3 bolt in the CAD software. But if I wanted a freely rotating M3 bolt without excessive wobble then 3mm was not quite right. The hole needs to be slightly larger than 3mm, but the kerf will mean a 3mm circle will be cut slightly larger. So what size circle does the laser cutter need to be given to get a hole just the right amount larger than 3mm for the bolt to fit freely but not too loosely? I also discovered that the offset features in some CAD software were not present in SolidWorks. I think this may be because while a hobbyist might be happy to apply offsets to their drawings where they are cutting parts themselves, a professional using a 3rd party to do their cutting does not know the kerf settings of the cutter to be used, so they leave it to the cutter operator to apply.

So for me there was no option 1. At the time I did not know whether option 3 was possible in the software on the MakeSpace laser cutters either. So I went for option 2, applying my offsets in a 2D drawing program. Various articles online pointed to using an offset feature in Adobe Illustrator. But I did not want to buy an expensive 2D drawing program when free alternatives were available. My go-to free 2D drawing program is Inkscape. This has a feature on the Path menu to Outset or Inset a shape. But this appears to apply a hard coded offset amount and distorted the shape of my parts adding curves to angled corners.
A part with lines outset/inset using Inkscape
(original outline in black, outset/inset lines shown in red)
(the largest circle on the right side is 6mm diameter)

Inkscape also has a feature called Dynamic Offsets where if you select just a single outline and then choose the Dynamic Offset option on the path menu (or Ctrl+J) then you get a drag handle and can adjust the line offset by hand. By duplicating each line I could manually offset it by approximately the line width (setting the line widths to the amount I wanted to offset them. There was still a little distortion of the shapes, but these were insignificant for the amount of offset I needed.
A part with dynamic offsets applied by hand in Inkscape
(original outline in black, offset lines shown in red)

This enabled me to explore different amounts of offset and cut some parts to see what amount of adjustment gave me the right fit. But having to adjust every shape by hand dynamically was time consuming. It also made me realise that I needed different offset settings for different aspects of my parts. My 6mm shoulder bolts used in various pivots between parts needed a different amount of adjustment of the hole size than the machine screws holding parts in fixed positions, which was different to the slots cut to take tabs on the edges of other parts.

I think perhaps option 3 (specify offsets in the laser cutter software) is preferable in the long run, but would require me to adjust all my hole sizes to include some aspect of hole size adjustment. (If I want a 6mm shoulder bolt to rotate freely then I want a slightly larger hole size than 6mm. I should model that hole size in CAD so that when I apply an offset for kerf in the laser cutting software the resulting hole is cut to exactly the size I modelled in the CAD software). At this point I asked a friend at work how SolidWorks recommend doing this, and he pointed me to the free version of DraftSight, as 2D drawing program from Dassault Systemes (who also own SolidWorks). Draftsight features an offset feature which allows you to specify the offset amount numerically. So I developed a workflow to manually apply offsets of different amounts to my various drawing parts using DraftSight.

I discovered that importing DXF files into DraftSight resulted in curves being converted into short sections of straight lines. So my nice rounded edges became jagged. This was avoided by exporting the drawings from SolidWorks as DWG format files. These can be read by DraftSight without converting the curves. I then had to weld all the line segments back together into single outlines for each part in DraftSight. Then I could apply a single offset to the entire outline of each shape (rather than to each line segment individually). Finally I exported the drawing in DXF format to take the file into Inkscape.

At this stage all my shapes have two lines for each feature of a part. The actual CAD drawing outline and the offset outline I want the laser to cut along. In Inkscape I coloured these cutting lines red, leaving the original lines black. That way I could easily verify which offset I have applied and that it is on the correct side (outside for the outlines of parts, and inside for cut-outs/holes in the part). The final step was to save the coloured drawing with offset lines in DXF format and import this into the laser cutter software, telling it to not cut the black lines, and applying cutting settings to the red lines. I was also able to add text to engrave into the material in Inkscape in a 3rd colour if needed and apply settings in the laser cutting software to engrave the shapes outlined by lines in that colour.

At last I was able to cut out parts on the laser cutter which were exactly what I had designed in my CAD model, and start to build my robot.

A set of parts for a steering leg

An assembled steering leg with details of 
the kerf offsets used engraved onto the parts