Tag Archives: Arduino

Enclosure for my Arduino and GAUPS

Finishing my ShapeOko rebuild

As the last thing on my to-do list I’ve build an enclosure (or box if you will) for my Arduino and GAUPS shield for my ShapeOko so that it will get out of harms way. Please see this post for an explanation.

I decided to make the enclosure from 10 mm plywood and add two improvements to the electronics: a 24V 60 mm fan to keep the GAUPS shield cool and a kill switch to be able cut the power for the stepper motors.

The result looks like this:

Arduino enclosure.

Arduino enclosure.

Arduino enclosure - other view.

Arduino enclosure – other view.

If you’re interested the dxf-file for the enclosure can be downloaded on my woodworking plans page. I milled a 2mm recess for the Arduino in the bottom of the enclosure so the Arduino would fit without the solderings on the bottom of the Arduino will touch the bottom of the enclosure (see the dxf-file).

My new gaups shield – part 2

If you missed part 1 please find it here.

My new shield is ready

Finally my stepper motor drivers arrived and I’m ready to move on. I’ve placed them in their sockets and have adjusted the drivers according to this procedure.

Arduino with GAUPS shield and stepper motor drivers.

Arduino with GAUPS shield and stepper motor drivers.

Unfortunately I’m not ready to go because my Kress 800 FME spindle is broken. ๐Ÿ™

I suspect that the carbon brushes are worn out but I’ve returned it to the reseller so we shall see what happens…

My new gaups shield

My new shield has arrived

Some time ago my g-shield broke (see this post) and I ordered a new gaups shield from ASL which arrived last week. It’s a kit so some skills in soldering is required (I’m not very good at it) but never the less assembly is quite easy when you follow the instructions.

When soldering the female headers for the drivers onto the pcb I remembered a trick I saw somewhere on the Internet: Use the Arduino stacking headers to hold the female headers in place until they’re attached to the pcb:

Holding the female headers in place using the Arduino stacking headers.

Holding the female headers in place using the Arduino stacking headers.

The distance between the female headers matches the distance between six pins on the stacking headers. So I arranged the headers as seen in the photo and turned the whole thing upside down and started soldering:

The pcb resting on top of the stacking headers.

The pcb resting on top of the stacking headers before soldering the female headers in place.

Here is the finished gaups shield on top of an Arduino:

Gaups shield on top of my Arduino.

Gaups shield on top of my Arduino.

Now I’m just waiting for my Pololu drivers to arrive… ๐Ÿ™‚

Part 2.

ShapeOko 2 and my grblshield

My grbl shield is broken

When I first built my ShapeOko 2, I placed the Arduino and the grbl shield at the out most corner of the frame. This has proven to be a mistake in several ways… ๐Ÿ™

Ferrite ring on the USB cable

Original placement of the Arduino and grbl shield on my ShapeOko 2

First of all, it gets all the dust from the machine so it has to be cleaned regularly using a vacuum cleaner or compressed air. This is a bad idea…

Second, the wires going to the stepper motors are so heavy the they have a tendency to put pressureย  on the terminals, when the machine is running. Not good either…

So, the result was that the out most potentiometer (white square thing in the photo just below the power terminal) broke loose and caused me all sorts of problem. Since it’s part of the control of the z-axis, I experienced all sorts of troubles with the stepper motor running the z-axis. For instance it would work perfectly for an hour but suddenly stop moving the z-axis at all or (even worse) skip a few millimeters and then continue as if nothing had happened… ๐Ÿ˜ฎ

I took me a while to locate the cause of the problem (after all sorts of testing) and a fix turned out to be a challenge, too.

A new shield

First of all I decided to buy a replacement shield, but since ordering things from the USA can be a rather expensive experience due to danish duties, fees and shipment costs, I decided to go for an alternative shield. I’ve ordered a gaups shield from ASL (Amber Spyglass Ltd.) which is located in the UK. This means that they are within the EU and therefore goods sent from them aren’t subject to danish duties. But there is also a backside to that approach: ASL is run as a spare time project and thus shipping time can be quite long, since the owner has a full time job on top of running the shop. I guess I’ll just have to be patient and wait for the package to arrive.

In the meantime

A broken grbl shield and a ongoing project on the ShapeOko for a friend isn’t the best of combinations, so what to do?

A first I considered soldering the potentiometer back on but since it’s located just below the power terminal, it turned out to be impossible for me to find enough space for soldering it directly on the PCB. But as a matter of fact, I managed to remove it from the PCB and solder three wires in place where the connectors of the potentiometer used to be. This enabled me to make a temporarily solution by soldering the potentiometer onto a small piece of PCB and then connect the wires there. It’s not pretty but it allows me to continue my project. ๐Ÿ™‚

My temporary fix to the problem.

My temporary fix to the problem.

A better solution

Since I had the electronics taken apart for repair, I decided not to put it back on the frame of the ShappeOko. Instead I placed a plastic box with three DIN sockets connected to the wires going to the stepper motors and then use some cables with DIN connectors I had in store to connect the grbl shield to the machine. I think it’s a better solution, once I get around to building a cabinet for the electronics. It currently looks like this:

DIN sockets on the ShapeOko

DIN sockets on the ShapeOko

Hopefully, I end up with the electronics placed in some distance from the machine (out of harms way). ๐Ÿ™‚

Once I receive the parts from ASL, I’ll get back to this subject…

ShapeOko 2 tutorial – Dominion turntable – part 3

If you missed part 2, please find it here.

Generating g-code in FreeMILL

In part 2 we created the drawing in OpenSCAD and generated STL-files for each quarter. Now It’s time to generate some g-code so we can start milling soon. ๐Ÿ™‚

If you (like me) downloaded FreeMILL from MecSofts homepage you’ll have noticed that FreeMILL is actually a plug-in in the VisualCADCAM demo. This is exactly the way it’s supposed to be!

When you start the VisualCADCAM demo you’ll get two splash screens. The first one disappears when you click ‘Ok’. In the second splash screen simply select FreeMILL and click ‘Ok’ to open VisualCADCAM in FreeMILL mode.

VisualCADCAM splash screen

VisualCADCAM splash screen

VisualCADCAM then opens the help window and the main window shown below. It has the FreeMILL wizard opened to the left – this is what we will be using.

VisualCADCAM main window with the FreeMILL wizzard to the left

VisualCADCAM main window with the FreeMILL wizard to the left

First we have to open one of the STL-files that we created in OpenSCAD. Do this by clicking File -> Open and select your STL-file. VisualCADCAM will ask you if you want to save the current file – if you just opened VisualCADCAM you can safely answer ‘No’ because the initial file is empty. In the photo below I’ve opened the 3rd quarter STL-file:

VisualCADCAM with STL-file loaded

VisualCADCAM with STL-file loaded

Now it’s time to put the FreeMILL wizard to work. The wizard contains 7 steps which we will complete one at a time.

1) Set cutting direction

Just leave it as it is (World Z selected). I’ve never changed it and to be honest: I have no idea why I ever should!

2) Create Part Bounds Stock

I set ‘X Off’ to 10 mm and ‘Y Off’ to 10 mm and leave ‘Z+ Off’ to be 0. I do this to prevent FreeMILL from getting the idea of trying to do something fancy on the edges. I’ve seen this in a few cases and it spells trouble for my project.

Step 2: Create Part Bounds Stock

Step 2: Create Part Bounds Stock

3) Set Work Zero

Now, this is important! Viewed from above the ShapeOko 2 is working in a Cartesian coordinate system in the x, y plane. In our case we’re going to cut the quarter of the Dominion turntable where both x and y have negative values (the 3rd quarter), so we select ‘Set to part box’, ‘Highest Z’ and ‘North East’ like in the photo below. This will cause FreeMILL to create g-code with negative x and y values since everything will be calculated from that point.

Ste 3: Set Work Zero

Step 3: Set Work Zero

For the 1st quarter STL-file I will select ‘South West’, for the 2nd quarter STL-file I will select ‘North West’ and for the 4th quarter STL-file I will select ‘South East’. In other words: I will always select the corner that represents the center of the Dominion turntable as my work zero and leave the cutting direction as it is!

4) Create Cutting Tool

In the first run we’ll be using a roughing tool path so we’ll be using a flat cutter. Select the flat cutter icon and set the diameter, flute length and the tool length. In my case I’ll use a 3,2 mm diameter cutter tool with flute length 15 mm and tool length 20 mm. Holder length and holder diameter I leave as is.

Step 4: Create Cutter Tool

Step 4: Create Cutting Tool

5) Set Cutting Feeds and Speeds

Again, these values depends our what CNC-machine you are going to use. In my case (ShapeOko 2 with a Kress FME 800 spindle) I set the following speeds: Spindle speed 30000 RPM, Cut Feed (Cf) 1000 mm/min, Engage Feed 500 mm/min and Retract Feed (Rf) 500 mm/min. After some trial and error I’ve found these feeds and speeds to be a good choice for the ShapeOko 2.

Step 5: Set Cutting Feeds and Speeds

Step 5: Set Cutting Feeds and Speeds

ย 6) Create Machining Operation

Since we are creating a roughing operation I select a step distance of 2,8 mm so I get a little overlap (my tool is 3,2 mm i diameter). Then select the cut direction to ‘Along X’ and press ‘Generate’. FreeMILL will then generate the tool path and display it as blue lines in the window.

Step 6: Create Machining Operation

Step 6: Create Machining Operation

If you press ‘Simulate and select ‘Display cut model’ you’ll see what the model will look like after we cut it. The jagged edges are caused by the fact that we’ve used a flat cutter and a step distance of 2,8 mm.

Simulated cut model

Simulated cut model

7) Post-Process Operation

This is where we will generate the actual g-code that we’re going to use. VisualCADCAM comes with a lot of post-processors for a large variety of CNC-machines. To generate g-code that the ShapeOko 2 understand (or actually the Arduino and the g-Shield), please select ‘WinCNC_MM’ as your post-processor. If you’re using a different kind of CNC-machine you might have to select a different post-processor.

Step 7: Post-Processing Operation

Step 7: Post-Processing Operation

When you press ‘Post’ you’ll be asked for a file name (saving the file will take some time). I tend to use file names like ‘Dominion_C_3.2_FLAT_2.8_STEP_X.nc’ but feel free to find your own system to identify the correct files later on. When FreeMILL has saved the g-code in a file, it will open that file in notepad for you to inspect the g-code.

More steps to complete…

We then repeat steps 6 and 7 (leaving the choices in steps 1 to 5 as before) to create a roughing operation in the y-direction by selecting ‘Along Y’ in step 6 (same step distance, etc.) and generate a tool path in the y-direction.

Furthermore, we repeat steps 4, 5, 6 and 7 again (leaving the choices in steps 1 to 3 as before) in both directions but in step 4 we create another tool: A ball mill (in my case 3,2 mm diameter, 15 mm flute length and 20 mm tool length) with the appropriate dimensions.

Ste 4: Creating a ball mill tool

Step 4: Creating a ball mill tool

Step 5 will be the same as before but in step 6 we select a ‘Step Distance’ of 0,4 mm for both the x and the y-direction.

Step 6: Step distance of 0,4 mm in both directions

Step 6: Step distance of 0,4 mm in both directions

Now we have created 4 g-code files: two files with a flat tool and a step distance of 2,8 mm (one in each direction) and two files with a ball nose tool and a step distance of 0,4 mm (one in each direction). We now have the g-code files we need for cutting the 3rd quarter of the Dominion turntable. ๐Ÿ™‚

Part 4.