Saturday, 1 November 2014

Compiling OpenCV with MinGW for Windows (and setup in CodeBlocks IDE)

For a robotics project, which I may document on this blog at a later stage, I needed OpenCV working on my computer so I could play around with algorithms and ideas. Later the code was ported, without any hassle really, onto a robot that I built with a school robotics team that had an ARM processor doing some computer vision. I discovered that getting the pre-compiled OpenCV binaries to work with my preferred compiler and IDE was never going to work - the only option was to compile the source code into binaries and headers that MinGW64 would be able to work with. Luckily this isn't as hard as it sounds.

Compiling OpenCV yourself can be useful if you want to use a compiler or computer architecture for your projects which does not have pre-compiled binaries officially released for it. Compiling yourself also lets you choose what you want and don't want included. Unless you are cross-compiling, the only way to make things work reliably is to compile your programs with the exact same compiler that you compiled OpenCV with.

I wrote this guide after a lot of research on Google and trial and error in the first step to trying to get into some computer vision. Disclaimer: I accept no responsibility for anything that may come of following this guide or things that may not work.

--Download the following or newer versions--:

OpenCV 2.4.3 for windows:        
http://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.4.3/OpenCV-2.4.3.exe/download

MinGW compiler:                  
http://sourceforge.net/projects/mingwbuilds

CMake 2.8.12 installer for windows:
http://www.cmake.org/cmake/resources/software.html

CodeBlocks IDE with no compiler: 
http://sourceforge.net/projects/codeblocks/files/Binaries/13.12/Windows/codeblocks-13.12-setup.exe/download


--Setup the programs--:


    1.) The OpenCV file you downloaded was a self-extracting executable. Extract it to whatever location you want, I would recommend C:\opencv because 
it is easy to remember and get to. You will be entering this path A LOT.

    2.) The MinGW file you downloaded is not actually MinGW, but a program that allows you to choose very precisely what version to download and install. Run it and pick your own settings, I chose these, but it doesn't really matter-
        -Version:               4.8.1
        -Architecture:       x64 (assuming your machine is 64 bit, if not pick x86)
        -Threads:              Posix
        -Exception:           Seh
        -Build revision:     5
After getting MinGw installed(I would recommend putting it in C:\MinGW64), you will have to set up your Windows' PATH variable for Windows to be able to find MinGW's  executables. This is so that you can call any of MinGW's modules, e.g. g++(the c++ compiler) from anywhere on the command prompt. This saves you having to navigate to the MinGW directory every time. It is also crucial that MinGW is included in the PATH so that other programs which rely on it can find it by themselves. The path which you  add to PATH will look something like this: "C:\MinGW64\mingw64\bin" no quotation marks of course.

The PATH can be edited from the command line (google for it), or using  a Windows tool with a GUI: just search for "path" on Windows 7 and 8 in the start menu and a program called "Edit the system environment variables" will come up. Start the program as an administrator (right click on its icon - it's in the menu), click "environment variables". Under the list "System variables", search for "Path" double click it to edit it. All you have to do is add the location of MinGW's bin (stands for binary) directory to the end of the list. Make sure you put a semicolon before (if required) and after to separate it from other paths.

To check that MinGW is setup properly, go to the command prompt and type in "g++", you should get a message saying "g++ fatal error: no input files compilation terminated". Though  it's an error, it is actually a good error, because it confirms MinGW is in the path as the error is coming from g++ rather than Windows. 

    3.) CMake's executable will install CMake all properly for you.
   
    4.) Install CodeBlocks, once again, its installer will do everything for you. While it's installing, it should find the MinGW installation we did earlier, if not, 
don't worry. If it didn't find MinGW, or you installed CodeBlocks before MinGW, we'll have to tell it where it is.

Even if CodeBlocks did find MinGW by itself, I would still go through the following steps to check that everything is setup properly  by default anyway.

Start CodeBlocks, then head to the drop down menu item at the top called "settings", then click on "Compiler...", click the tab "Toolchain Executables".
First set "Compiler's installation directory" to where MinGW was installed(same as the thing we added to PATH, just minus the bin folder on the end). As for the other  settings:

        -C compiler:                           gcc.exe
        -C++ compiler:                      g++.exe
        -linker for dynamic libs:        g++.exe
        -linker for static libs:             ar.exe
        -Debugger:                             GDB/CDB debugger
        -Resource compiler:               windres.exe
        -Make program:                     mingw32-make.exe (yes, I know we installed a 64bit MinGW)

If for some reason these executables don't exist in your installation, it is most likely they are there but named something slightly different. Go into the \bin directory  of MinGW and have a look and see if you can see something similarly named. Now CodeBlocks should be ready to go. Create a hello world project and see if it all works.


--Compile OpenCV for MinGW--:


    1.) Start cmake-GUI.exe, it should be under "C:\Program Files (x86)\cmake-2.8.12.2-win32-x86\bin", or you could just search for it.

For the text field "Where is the source code:" in the CMake GUI, enter the directory where openCV was extracted (should be: "C:\opencv") don't enter any deeper folders which look like they may have some code. The correct directory is the one with, among other things, a "CMakeLists.txt" file in it. This is the file that tells CMake what user-selectable options there are for our library and how to create compilation instructions for the compiler. CMake WILL NOT compile stuff, just configure stuff ready for compilation.

Now, for "where to build the binaries" I would reccomend making another opencv directory called "opencv_mingw" under "C:\" and use that. Once the directories are sorted, click the "configure" button, in the window that pops up, select "MinGW Makefiles" in the dropdown, and select the radio button "use default compilers" then click "finish". A progress bar will appear and some text in the output, this may last for a minute, all CMake is doing is mainly testing our compiler that we installed(MinGW), which it found because it was included in the PATH. Now, for all those checkboxes in CMake that appear the, defaults will be fine, but the point of compiling is that you get to choose, so if there is anything from other guides that you want to follow, do it. Now click "generate".
   
    2.) Now we leave CMake and go to the command prompt. Navigate to "C:\opencv_mingw" or whatever you named it, just make sure it's the directory you put down for "where to build the binaries" in CMake. You can navigate to the file in the command prompt using the command: "cd <directory>", which stands for change directory. The command won't appear to do anything, but if you look at the bit to the left of the flashing cursor in the prompt, you will see that it now has the name of the directory(if it went successfully). Now type in "mingw32-make", now the command propmt will light up for about 30 minutes depending on your PC's power. When that is done, type in "mingw32-make install" DON'T miss this second step because you see some newly created files and think you are done.

    3.) Open up CodeBlocks, create a new "console application", now you will see it appear in the directory tree on the left of the CodeBlocks window. Right click on your project(should have a logo next to it with 4 coloured blocks), select "build options". Go to the tab "search directories" and select the second-tier tab "compiler" add the directory "C:\opencv_mingw\install\include", now select the second-tier tab "linker" and add the directory "C:\opencv_mingw\install\lib". Now go to the first-tier tab "linker settings", under the currently-empty list "Link libraries" add all the files in "C:\opencv_mingw\install\lib", the directory will contain about 20 files, all which end in ".dll.a". To add them all quickly, just click the "add" button, then the button in the window that pops up with the three dots (right next to where you'd normally ype a path). Now navigate to "C:\opencv_mingw\install\lib" and shift click to select all the files. If you are asked whether you want to use relative paths, click no, this won't affect operation either way, but reltive paths are messy.

YOU WILL HAVE TO DO THE STEPS ABOVE FOR EVERY NEW CODEBLOCKS PROJECT YOU CREATE WHICH YOU WANT TO USE OPENCV IN. There are ways around this: by doing the previous steps in global rather than project settings. To do this, go to the menu bar, go to "settings" then "compiler...". Note if you do this that it will apply to any project you open in CodeBlocks.

    4.) CodeBlocks, OpenCV and MinGW are now all set up to work, but if you try to compile a program which includes OpenCV libraries, the program will compile but crash when you run it. This is because windows can't find the OpenCV dll's we created when we compiled OpenCV (in simple terms dll's are libraries written by humans in C++, etc. turned into machine-readable code through compilation and are used at runtime). So what we are going to do now is add the OpenCV dll's to Windows' PATH environment variable, like we did 
with MinGW. Add the directory "C:\opencv_mingw\install\bin" to PATH.


    5.) Test everything by compiling and running a test program. Here is a test program which should run if everything is working fine:


#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
 
using namespace cv;
 
int main()
{
    Mat image;// new blank image
    image = imread("test.png", 0);// read the file
    namedWindow( "Display window", CV_WINDOW_AUTOSIZE );// create a window for display.
    imshow( "Display window", image );// show our image inside it.
    waitKey(0);// wait for a keystroke in the window
    return 0;



If it compiles but shows no image, there are a few common reasons why, and you should keep the following in mind when using CodeBlocks:

    -You need to create a .png image called "test.png" and put it under the folder "<my_project>\bin\Debug", this is where the executable file will be put whenever you compile your own programs.
    -The "run" button in CodeBlocks (Looks like a green play button) seems to run programs but never see any files which you put in the same directory as the executable (and refer to in software with relative paths). So instead of using the run button in CodeBlocks, navigate to "<my_project>\bin\Debug" in Windows explorer and click the executable file yourself.

 

 

--Credits and Resources--:

http://kevinhughes.ca/tutorials/opencv-install-on-windows-with-codeblocks-and-mingw/
http://zahidhasan.wordpress.com/2013/02/16/how-to-install-opencv-on-windows-7-64bit-using-mingw-64-and-codeblocks/

Friday, 31 January 2014

DIY CNC Linear Rail Design

For my CNC machine I decided that I would try and make my own linear rail system using 608 skate bearings and flat steel. This was to try and save money, and I must day that my design, which made the best of the equipment I had on hand, failed miserably. Luckily I decided to try making a prototype with a 1m length and half a carriage before diving in and buying metres and metres of steel and wasting my time building any further.

Here's a drawing of the rail with a carriage riding on it:

This is one side of that carriage made and put together, to get adjustability and thus make up for lack of tolerance (had to do this by hand), I drilled the holes a bit large on purpose so I could (in theory) get the bearings pressing tightly against the linear rail and then just tighten up the bolt:
These are the four pieces of SHS cut and drilled, two of them have cuts which allow for access to get at bolts which have to be tightened. It turns out that there was not adequate room to get at bolts with this design anyway:
The linear rail I put together, it is made of two pieces of steel bolted together, namely 50mm SHS with 3mm walls, and also steel flat which was 5mm thick by 75mm wide if I remember correctly.
For the prototype, I only used construction-grade steel and this showed in the surface finish, in the final design I planned to replace the steel flat with precision-ground steel flat and just use structural SHS for support and rigidity.
Another problem with the overly large holes which I hoped would allow me to get adjustability was that the nut would have less flat area to sit on and thus tend to skew off at an angle easily and not be all that rigid, this problem was exacerbated by the fact that the square tube had very thin walls. Also I couldn't get a washer into the tight space to help the nut. This led me to trying to mill slots for adjustability, since I don't have a milling machine or a milling attachment for my lathe, I just clamped the piece to the tool post which was very finicky, also not very rigid when all the milling force was on the clamp rather than the tool post. It sure did mill fairly well though.

In the end I decided against this method of making home-made linear rails even if I could get easy adjustability and rigidity which were major challenges with the tools I have. The final reasons I decided against this design were: the carriages were too bulky, making the carriages was way too time-consuming given the number I would have to make in total and also the fact that precision-ground steel flat for the bearings to run on would cost a lot and negate any cost savings of going homemade. Bottom line: you're going to get what you pay for and your labour is not worth wasting when the products out of China are so cheap.

Instead I've been considering 16mm supported linear rail mounted on a frame made out of 50mm SHS or larger with thickest walls I can get and the linear bearings to go with it. Lucky for me it turns out that the supplier of the linear rail is a short drive away from me.

Monday, 14 October 2013

Sanguinololu Heated Bed Connector Failure

Recently, an unpleasant surprise greeted me when I went through my usual pre-print checks on my printer to make sure there weren't any loose bolts, obvious shorts or loose connections. At first I thought that it was just a bit of dust on the heated bed connection but on closer inspection it was obviously burnt. It hadn't been like that when I started my last print or I would have seen it; in hindsight, that connector must have got ten very hot. At this point I still thought that it was only a small burn and that I could still get a print in but luckily, having time, I didn't risk it and tried to pull the connector out - it was fused in place and took a lot of nerve-wracking work with pliers in the small space around fragile components to remove.

Upon removal it was obvious that this connector had had its day so I cut it off and was thankful that I had some screw terminals on hand which I could replace the under current-rated Molex connectors with, the pins on the board were also covered in charred plastic residue. It was very lucky that I decided to replace the connector because I discovered that the wall in the plug between +12V and ground had been burnt away, so a short could have happened very easily and blown the bed MOSFET which would have been a real pain.

I then soldered in the screw terminals. Desoldering the old Molex pins was a pain with only solderwick available as I could never quite get all the solder out of the holes, so a solder pump/sucker is on my list of things to buy. It was only possible to get it off by pulling the plastic sheathing off the actual pins (which is risky because it puts a lot of stress on the board), so they could be individually pulled out while the solder was molten. Afterwards there was still solder left in the holes to remove, I've found that the best way to tackle this with only solderwick is to put as much solder into the hole as you can so that there is a large bulge of it coming out of the hole, then add lots of liquid or gel flux on top of the little domes and try to wick the solder out with the solderwick. I found that you have to leave the wick and iron there for at least 7 seconds to be sure of clearing the hole, some holes took me a few tries. 

The screw terminals that I used were very hard to find, it turns out that 2.54 mm pitch (do not get 5 mm or 5.08 mm pitch by accident as these are by far more common) screw terminals are hard to come by and that 4 pin ones are even rarer than 2 or 3 pin ones. I couldn't find them on element 14 or similar suppliers and a search through eBay's own search engine turned up nothing, but Google directed me to these ones on eBay with the exact same search query I put into eBay's search engine. eBay's search engine is broken. So far this is the only source for 2.54 mm pitch 4 pin screw terminals that I have come across. They appear to be rated (according to some writing on them, for 6A up to 150V per pin with RU certification though I would take this with a pinch of salt given the lack of branding and the supply source). Fingers crossed that these will work for me. Also of interest, nophead has his own Sanguinololu modifications which I think would leave a lot more margin for safely carrying the bed's current but a ring terminal is needed and the modification results in it being a bit harder to get a heat sink on the MOSFET.


Sunday, 29 September 2013

Experimenting With Acetone

After seeing many gloriously polished ABS prints which had used the acetone vapour method for smoothing and hearing of the legendary adhesion achievable on a heated bed with a fine coating of ABS juice, I decided to buy some acetone and see for myself whether it might help me in some way. People had said it could be had from pharmacies, hardware stores or even from the supermarket in little bottles of nail polish remover(though apparently a lot of nail polish removers are now acetone free), so I went to the hardware store where they sell a litre of it for $10 (I don't know if this is good value or not, but it sure won't break the bank anyway).

First up I tried the vapour smoothing method on an ABS model I had lying around - a squirrel with plenty of curved surfaces for the acetone to smooth and polish up. The first thing I noticed was how fast this stuff evaporates; I spilt a bit and it evaporated in seconds, the evaporation also makes it very cold when you get some on your hands. ...and on a note of safety: acetone is flammable and though not a proven carcinogen, it's not something you really want to breathe the vapour of or have on your skin for a long time and especially not in your eyes so be careful. Take care where and what you store it in as well: some types of plastic containers may dissolve and acetone in a hot place = vapour = pressure/expansion. This was the setup I used:
The squirrel before the acetone vapour treatment

A platform I quickly put together to suspend the model above the acetone. It is made from some solid-core copper wire twisted together then bent into shape, there is then a piece of aluminium foil put over the loop at the end for the model to sit on. At the top is a hook which goes over the rim of the jar. This platform is not very effective because it doesn't sit far enough down in the jar to allow the model to get the most of the acetone vapour which is most concentrated lower down. Also, it's not very stable and has a tendency to push the model into the side of the jar under gravity.
The jar sitting in some boiling water with the squirrel suspended, about 2mL of acetone in the bottom of the jar and the lid just sitting on top of the platform's hook since it doesn't allow it to screw down - good for stopping pressure build-up I guess.

The final result of the squirrel sitting in the jar for about one or two minutes. The plastic is definitely a lot shinier, especially lower down, and there are no layers distinguishable lower down. I took it out at this point because the surface at the bottom was starting to get very gooey and liquid-like to the touch, whereas it did not appear that much was happening with the higher layers. The main disappointment is that it has not been uniformly smoothed, with most of the smoothing at the bottom, I think this is because the vapour is most dense in the bottom of the jar and the platform the model was on was already too high up in the jar. When the model first came out of the jar its surface was very soft to the point of being gummy, after about ten minutes, it was hard enough to gently pick up but I easily left a deep gash with a fingernail, in the end it took a couple days for it to fully harden to how it was before the treatment.

After the vapour treatment experiment I decided to make some ABS juice with which to coat the bed to get very nice adhesion (or so people say). ABS juice is just a bit of ABS dissolved in acetone so the liquid mixture can be put on a paper towel and spread over the build platform, with the acetone almost immediately evaporating, leaving a very thin, even coating of ABS. You don't need to dissolve much ABS in acetone for this to work, I put the little ABS pieces seen in the photo above into that half-full tube in the photo. When coating the bed you will notice a quickly evaporating streak of acetone behind the wad of paper towel, I keep wiping the towel over the glass until I very barely see a bit of cloudiness on the glass. I don't seem to need much for it to adhere very well and I don't want parts sticking like crazy and pulling chunks off the glass when the bed is cold. How concentrated and how much ABS juice to apply appears to vary by supplier of filament and bed surface according to people's experiences I have read in the RepRap forums
The colour of the acetone after the ABS dissolved in it.

The bed appears to need to be coated again where the footprint of the part was after each print as each print takes the coating with it. An alternative to re-coating after every print is to "redistribute" the ABS residue from unused parts of the bed by wiping the bed with acetone, though you will still have to apply more ABS juice every few prints to "top up" the bed with ABS residue as "redistribution" takes a lot of the residue away in the process. Also, nophead claims that ABS residue can get baked on after a while of sitting round not being redistributed or printed on, this baked on residue becomes discoloured and is allegedly highly adhesive and thus tends to pull shards of glass off with the part. So even if there are some areas round the edges of your bed which barely get used it may still be worth redistributing and re-coating along with the rest of the bed.

I think I am going to permanently move from using sugared water on the bed to using ABS juice. This is because it saves time and has better adhesion, though it is much more expensive than some sugar and water. With ABS juice I don't have to create a new mixture every week due to stuff growing in it as it sits around, as with sugared water. The coating on the bed can also be redistributed instead of cleaned and re-coated which takes less time. Also I don't need to wait around for the bed to get to 80 degrees C before I can even coat it(this takes about ten minutes): ABS juice is just applied at room temperature because the acetone evaporates so quickly, so now when I click print I can walk away. With sugar water I have to be at the printer on the first layer because when plastic first comes out in inconsistent sputters during those priming loops, it has a tendency not to stick and instead clumps to the extruder. The blobs then begin pulling up good outlines when the filament flow is fully primed, the solution is to wait with a bamboo kebab skewer and push the blobs off the moving extruder and into the bed. Because of this I have to wait the full twenty or so minutes it takes the printer to warm up, stabilise temperatures and begin its first layer after I hit "print". With ABS juice these blobs never form in the first place because even the inconsistent, sputtering priming extrusion loops stick to the bed. On top of this, I save time after the print is done since I don't need "brims" around the base of the part to stop the odd corner lifting a bit since ABS juice has stellar adhesion, thus I don't waste time removing the brim afterwards. As always, parts just detach by themselves when the bed is cooled.

If you use ABS and can find some acetone I recommend giving this a go, especially if kapton of PET are not your thing or too expensive to get hold of.


Monday, 9 September 2013

Filament Feed Tube - a Z-Artifact Fix?

In a previous post I went into detail trying to explain and cure the z-artifacts that I see in my RepRap's prints, though I had only been partially successful, I did mention that there were still more things to test and to try.

Well, a few days ago, a teflon (PTFE) tube arrived in the mail - a guide tube for my filament. Other than possibly being able to fix certain kinds of Z-artifacts caused by filament dragging and pulling the carriage around as the carriage is not 100% solid, the tube allows for peace of mind for unattended printing. This is because it transfers the drag of pulling filament off the spool directly and only to the extruder instead of pulling on the weaker X axis which can cause devastating skipped steps.

THE SET-UP:
The tube with filament in it. It is important to make sure that it will have adequate length to comfortably service the whole range of the machine's motion. Also, the tube does not have to be a tight fit to your filament's diameter, mine has an inner diameter about a millimetre larger than my filament. It is best to try and use a tube with as thin walls as possible to reduce the drag on the machine from having to bend the tube + filament.

Teflon cannot be hot-glued directly so I attached two tightly-fastened zip-ties to the tube and then glued the zip-ties down with plenty of hot glue. Using two zip-ties with a decent amount of spacing is important or the force of the tube being bent will put a lot of twisting force on the first tie and quickly pull it off. The tube only has to be fixed to one structural point; the extruder end of the tube is not fixed down.
THE RESULTS:
 
My first print with this modification on my printer. The layer alignment looks very good but that is mainly due to the shape of the object and lighting hiding still-present Z-artifacts

The layer alignment problems are easier to see at this angle with a different lighting angle.
The bunny on the left was printed with the tube and the one on the right was printed before both the filament tube modification and also before I replaced my Z couplings with super-flexible hosing tube.
You'd be hard-pressed to spot much difference - which indicates that the Z-artifacts weren't coming from the older Z leadscrew coupling or lack of filament feed tube.
WHERE TO GO FROM NOW:
I think I will build a new extruder cold end (the feeding mechanism) as I suspect that the hobbed bolt currently installed may not be perfectly even. Now having access to a lathe, it should be very easy to create a precise bolt. Also, I have noticed that the gears on my current extruder do not mesh evenly and have some problems with eccentricity. All of this could be leading to slightly irregular feed rates of the plastic - it only takes a small irregularity to cause significantly more or less plastic to be fed, which in turn is easily observable as layers having too much plastic and squeezing out. I will post an update when I get around to trying this.

Monday, 2 September 2013

Building a CNC Router/Milling Machine

As my next big project, I am going to be designing and building a CNC milling machine. I am aiming for something that will have a working area of at least 700x700mm, be able to cut steel and still maintain accuracy on small scale objects such as is needed for PCB milling.

For the machine's electronics I am going to use four, possibly three NEMA 17 stepper motors driven using StepSticks on a Sanguinololu. I decided on a Sanguinololu over an arduino and GRBL shield because the Sanguinololu has more memory and came out at the same price (self-assembled) as an arduino and GRBL shield. The Sanguinololu also has a lot of expansion capability with four motor drivers and two fairly high power MOSFETs to name a few. This will all be powered at 12V using an ATX power supply. I wouldn't use an ATX on a 3D printer due to the high-current heated bed which needs a very large 5V ballast to get an acceptable 12V line, but since this one will just be driving some motors which don't need much torque, it won't matter if the voltage dips a volt or two.

I am going to go with a gantry design which moves the X axis to allow Y positioning while having a stationary bed, unlike a 3D printer. As for movement, I am going to use ACME leadscrews, probably only single start to save money at the cost of speed and I will definitely be using some anti-backlash nuts. Once again, single-start nuts are much cheaper and more widely available than multiple start ones. Also, there is a place locally which can supply ACME threaded rods.

The frame will be made of MDF, but once the machine is up and running I will use it to re-create some parts in aluminium if I'm not happy with them. 

The ways will have to be very sturdy to meet the requirements, but linear rails and bearings get very expensive, especially when they have to be thick, so I will create my own linear rail system using 608 size bearings (sometimes known as skateboard bearings) and steel which can be had from local steel suppliers. There is a local supplier in mind that sells in qualities ranging from structural-use to precision-ground engineering metals. The idea will be to get the sturdiness in the rails from  much cheaper, slightly less accurate square tube steel which may not have the best surface finish. Then mounted to this less well-finished square steel tube will be some much more precisely finished flat steel bars which don't have to be all that substantial as they will just act as a good quality surface for the bearings to roll on. Obviously the supporting steel tube cannot be absolute garbage which varies a whole lot over its length (unless I look into a shimming system which can still keep the rigidity). I am hoping that this approach will both save some money and also allow the contact surfaces to be replaceable if they wear out.

As a spindle, I will start off using a rotary tool/Dremel. Later on I will use my lathe to create a much better spindle with a good quality collet and bearings and be powered by a brushless motor and ESC, perhaps an RC car one if I can get away with it not overheating. This may require a power supply upgrade depending on the size of the motor I choose, but regardless has an extra advantage of being able to control the ESC using a spare Sanguinololu pin.

Will I be using the Mendel90 to create any parts for this machine? Probably not anything critical, as the machine has to be as rigid as possible. Perhaps I will use it make some vacuum attachments and an electronics enclosure.

Here is some of my progress so far:
I bought 5 low resistance NEMA 17 motors for about $60 off AliExpress from Wantai motors, shipping was quick (about a week because I chose Fedex IE) and communication was pretty good, but be very vigilant when shopping on AliExpress. For example, always try to make sure, by choosing fast shipping and taking into account a seller's dispatch time, that the item will arrive well before your credit card dispute window closes. If the seller charges an exorbitant fee for anything but default, slow shipping (which can take over a month), don't buy from them. This was one reason I didn't buy a cheap Sanguinololu from some other seller on the site.

A close-up of some StepSticks off eBay, all soldered up and ready for testing. It cost about $30 - 40 for four of them. In the previous photos you could see five, as I had a spare one from a previous purchase.  I will now have two spares for the CNC and 3D printer once done as the CNC will only use three.

The stepper motor and StepStick testing and calibration set up. Every motor and driver worked and there were no problems.

A Sanguinololu from Think3DPrint3D on eBay. I bought it un-assembled to save money and because I wanted to play with a new (budget) soldering station I had bought. I replaced the 2.54mm pitch molex connectors which are supplied for the motors, hot end and bed connections with 2.54mm screw terminals. These screw terminals have the advantage of being able to carry more current (good for a heated bed) and also of removing the need to assemble a connector onto the wires you want to connect. Due to the need of crimping to assemble these connectors properly, which requires an expensive tool, or a painful and slow hand-assembly method, I do not like them. The end-stops were the only ones on which I kept the molex connectors. For the thermistor connections I put headers instead of the 90 degree molex connectors in case I ever have to use this board for my Mendel90 where there is not enough space when mounted for the 90 degree connectors.

The board went together fine in a few hours of soldering (split up over bits of my free time), and I managed to solder the whole thing with no bad joints (yay!), although I soldered a MOSFET a bit wonkily.
I haven't fully tested the board yet, other than having tested the USB and FTDI chip early on during assembly, then later checking for shorts with a multimeter after which I looked for solder bridges, all I have to do now is bite the bullet and plug it in.
Well, that's it so far! As I progress with the design I will post updates.