Friday, 27 October 2017

MPCNC Machine - Part 1

Mechanical/Electrical Parts

The parts needed are pretty well documented on the MPCNC website.
I went with imperial bolts since they are easier to get in Canada.  Go to an actual supply store like Brafasco, not Lowes or Home Depot for the nuts and bolts – they will be much, much cheaper there.  Home depot wanted $3 for a 6 pack of nylock nuts.  Brafasco was around $5 for a 100 pack.

The Dewalt 660, bearings, stepper motors, belts, pulleys, and leadscrew all came from Amazon.  Most of them can be gotten cheaper from Chinese websites, but I’m impatient and had an Amazon gift card to use up anyways.

I already had the RAMPS board and Arduino as spares for my 3d printer.  The entire kit from FastTech was around $40 USD.

The EMT came from Lowes.  Also needed a shop vac, a couple types of squares and some clamps.
Altogether, I spent a little under $500 Canadian.  If I had been patient and shopped around I could have probably gotten the parts for under $400.  Without the shop vac and Dewalt 660, I could probably do it for $250.

Printed Parts

Printing all the parts took a lot of time and filament.  I'm using a Wanhao i3 printer.  I tried to work out the printing order to use up as much of the partial spools I had lying around as possible.  Altogether, it took roughly 2.5 spools and a week or so of printing time.

Misc Stuff

I used some 3/4" laminated particleboard I got dirt cheap from the Restore store.  While I was there I got a huge sheet of T slot board for $8.  It had a big crack in it, but since I just need small sections of it its perfect for my use - that will be my spoil board and let me slot clamps into it.

Sizing Considerations

I went back and forth on this a few times.  The machine can easily be any size up to 42x42 (even bigger with reinforcement in the middle). But bigger isn't always better.

Some considerations I had to think about:
  • I want the work area to be at least 24" in one dimension. It's easy to get 2'x4' sheets of various boards, and that way I just need to cut them in one direction before putting them in the machine.
  • Smaller means the frame is more rigid and should give better results
  • How much table/room space am I going to dedicate to this thing?
  • How big is the board I am mounting it on?
  • Will I be able to move it around without having to completely disassemble it?  Can I get it through the door in one piece?
I ended up going for an approximately 25"x16" working area.  That required a base of at least 36"x27".  The particleboard I had was 30"x60", so I could easily cut it down to that size.  It fits on my workbench nicely.

Mechanical Assembly

Basically I just followed the guide on the MPCNC website.  Not much special here.


Here I deviated from the instructions.  I want to use ethernet cables to connect the control box so I can easily disconnect it.  People had made brackets for previous versions of the MPCNC to add keystone jacks, but they are no longer compatible.  So I've created some of my own.  

I also decided not to wire the steppers in parallel or series, but rather run each one back to the control box separately.  This will let me add individual end stops later if the firmware ends up supporting it at some point.  It also means I'm spreading the load for the stepper drivers across 5 drivers instead of 3.  Downside is that means there is no room to add an extruder or anything later, but I already have a 3D printer.

I was hesitant about using a single wire in the ethernet cable for each stepper wire, but after testing it for awhile it seems to work ok.  That means I can just use a single jack for each axis.

Z Axis

For the Z axis, I created a holder that will fit inside the EMT and have a keystone jack pop into it.  Drill a hole in the side to feed the wires in, and punch it down to the keystone jack.

Z Axis holder with hole drilled.

Stepper wires cut and punched down.
Slack wire shoved down the EMT, and jack inserted.

X and Y Axes 

First decide which side you want the control box on.  Then on the front and opposite side, run the wires for the stepper motor through the tube to the other side.  Mine were a little too short, so I extended them with some 4 pin male dupont headers, and taped the connectors together so they didn't come apart in the tube.  To feed the wires through, I taped them to the end of an ethernet cable and pushed the ethernet cable through.  The stepper wires aren't stiff enough to feed through on their own.

Far side from control box
I printed some nice end caps (be sure to put them on before feeding the wire through the tube), and some wire loom to keep the cables tidy.  Make sure the wires end up with a loop that won't interfere with the belts once they are installed.  Run a zip tie through the bottom of the bracket (yellow in my picture) to hold them in place.  If you put the zip tie around the top of the bracket it will rub on the belt.

For the back and side near the control box, I wanted to mount keystone jacks.  I printed this part only to realize it won't work with the newer version - the bracket between the two bearings is in the way, so it can't be inserted in the tube.

Instead I created a part that mounts above the stepper and fits a keystone jack.  This requires replacing the two top M3 screws with slightly longer ones to hold the stepper in place.  I think the ones I used are 16mm long.

Back side showing wiring.

Bracket for keystone jacks. Don't put the zip tie on the top like I did here.
Each stepper is punched down to one side of the keystone jack.  The slack wire from the close stepper is shoved in the wire loom to keep it out of the way.

I'm still printing the parts to do the other axis, then I can install the belts.

Part 2 will cover the control box.

Friday, 28 November 2014

ConfigMgr 2012 - MDT deployment info to hardware inventory

If you are integrating MDT into ConfigMgr 2012, one of the steps it runs is Tattoo, which runs ztitatoo.wsf.

This adds some basic information about the deployment to the registry under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Deployment 4, including the OSD Package ID, the date the computer was deployed, and the type of deployment.

I want this information captured in the hardware inventory so I can easily find computers that haven't been refreshed in awhile. Since MDT includes a MOF file, capturing this in hardware inventory is fairly easy.

  • In the ConfigMgr console, go to Administration -> Client Settings
  • Edit the appropriate client settings and go to the Hardware Inventory tab
  • Click Set Classes.  On the window that pops up, click Add
  • Connect to a computer that has already been deployed with an MDT task sequence.
  • Check Microsoft_BDD_Info
After the next hardware scan cycle, you'll have a new Microsoft_BDD_Info section that contains the deployment timestamp and other useful information to report on.

Thursday, 27 November 2014

Home File Server Part 1 - Hardware

What do I need?

I have a few requirements for a home file server:

  • Needs to be fairly reliable and easy to fix - all the TVs in the house use it for media storage, and my 3 year old daughter demands high uptime for her cartoons!
  • Support lots of hard drives.  I don't have money to go out and buy all new 4 or 6TB drives, so I need room for more smaller drives.  It also needs to be easy to upgrade those drives later on.
  • Needs to be a full computer - not an appliance.  I want to be able to run whatever software I need on it with ease.
  • Not cost a fortune.
Notably absent from that list are "low power" and "quiet".  I'm ok with it using a bit more power if I get a lot more functionality and reliability out of it.  And noise isn't much of an issue - it sits in the basement with all the network gear.

My New Server

I managed to snag an older IBM 3500 (the original 7977 model, not the more modern M3 or M4) very cheaply - as well as some spare parts like extra fans and power supplies for it.

This server has 8 3.5" drive slots,  There are two backplane boards which I have previously written about built in.

I had considered making a custom case that could use the backplanes, with small motherboard and a SAS RAID card...but that's a lot of work, and would cost more as well.  The biggest downside is that I wouldn't have been able to use the server's power supplies.  The server's power supplies provide 12.1V (at 69 amps!), but no 5V or 3.3V - those voltage regulators are all built into the motherboard.  So it ends up being far simpler to just use the server as is.

SAS controller

The biggest problem is the server's ServeRAID 8k controller.  With the latest firmware updates, it supports drives up to 2TB - but nothing past that.  Any drive larger than 2TB either gets detected as 2TB, or not properly detected at all.

The backplanes use standard SFF-8087 ports, so it's easy to find HBAs that can use them.  I had it narrowed down to:
  • IBM M1015
  • Dell H200
  • Dell H310
  • LSI MegaRAID 9240-8i
All of those cards are pretty similar - all LSI chipsets, and practically identical for my purposes - they are have 2 SFF-8087 ports, and can be used as JBOD or pass through without any RAID.  That was very important that it properly support JBOD - otherwise the disks wouldn't be readable with a different controller card later on.  The IBM and Dell branded ones would have had to be flashed with LSI IT firmware to do that properly, but that's not hard to do.

I ended up getting the LSI branded one on ebay for around $110.

I also picked up 2x 1M SFF-8087 SAS cables on ebay for $23.70, since the ones that come with the server aren't going to be long enough to reach the new card.

Once the parts arrived, installing the card was pretty straight forward.  The only tricky part was actually running the cables.  The entire section of the case between the motherboard and drive bays is full of fans on a big mount that slides out.

Luckily, if you remove the mount there is a small gap between two of the fan connectors where the cables can run.  You just need to be very careful reinstalling the fan mount so the cables don't move and get pinched.

The server detected the new card without any issues, and the card detected all of the hard drives properly.  This card can do RAID, but it's default is to act as a regular HBA and just use the disks normally - that is exactly what I want for this setup.  The OS can manage the disks directly, and unlike controllers that do tricks like single drive RAID 0 arrays for each disk, the drives can be pulled out and used in another system or the card replaced with a different model without any trouble.

Why is there a jet engine in our basement?

So, quiet wasn't on the list of requirements.  But quiet is a relative thing.  I don't need it to be silent, but by default this server is noisy!  It has 6 fans running.  If you try to remove the fans, the others won't slow down anymore, so it gets even louder.

Luckily, I don't actually need all those fans.  You only need all 6 fans if you have either a second CPU or a second power supply installed.  Without a second CPU or PSU, fans 4-6 can be removed and blanking panels installed over slots 5 and 6.  That quiets it down quite a bit.

I didn't have a second CPU to begin with, but since I have it, I did want a second power supply installed.  But having the server shutdown until I swap in a new power supply is a small price to pay for a large noise reduction.

Next up is to install and configure the OS.

Tuesday, 19 August 2014

IBM x3500 SAS Backplane Pinout

IBM x3500 SAS Backplane Pinout

You can get these backplane boards fairly cheap on ebay these days.  Even if you don't have the server it belongs do, they could still be useful for DIY storage projects. The IBM FRU is 44E8783. There are likely other similar IBM parts that use the same pinout, but no guarantees.
Unfortunately as far as I can tell, nobody bothered to document the cabling for them!  As luck would have it, I still have a working one, so I was able to map out the power cable with a multimeter.

This is just a regular backplane, not a SAS expander - one SFF-8087 connector for 4 drives.  The data connector is standard, it's just the power cable that is strange.  It looks similar to an ATX 24 pin power connector, but smaller.  If you are buying one to use in a different device, make sure it comes with the power cable - you may not be able to easily find the right connector.

I measured this by removing the cable from the backplane and measuring the voltage on each pin, with the black probe on the metal of the case (ground).  The picture shows how I numbered the pins.


Monday, 23 June 2014

KB2919355 and LSI Raid Controllers Part 3

Microsoft released a hotfix a few weeks ago, and has finally started pushing it out via windows update.  KB2966870 should be automatically installed before KB2919355 now, so servers shouldn't break anymore.  Yay!

I'm now in the process of updating all my affected machines.  Other people have reported that the update does solve the problem, so hopefully this goes smoothly.

Wednesday, 14 May 2014

KB2919355 and LSI Raid Controllers Part 2

Microsoft has finally released a knowledge base article about this issue -

The problem affects a lot of LSI based cards, including the Dell H200 my servers have, as well as some from HP, IBM and Supermicro.

Unfortunately, while there is a temporary workaround, there is no fix yet.  They did however figure out what is causing it:

This problem occurs if the storage controller receives a memory allocation that starts on a 4 gigabyte (GB) boundary. In this situation, the storage driver does not load. Therefore, the system does not detect the boot disk and returns the Stop error message that is mentioned in the "Symptoms" section.

Note This problem may not always occur in this situation. The problem is affected by the computer’s startup process, the driver load sequence, and the memory allocation of the storage controller driver at startup.
 Microsoft's workaround is to limit the system to 4GB of RAM long enough to remove the update.

This is actually an interesting bug.  4GB is the limit for 32 bit memory addresses.  But this is a 64 bit OS.  Those limits should be well behind us.  The driver itself didn't change with KB2919355, so something else in the update triggers this bug.

I'm quite curious to see what they changed that caused this issue, and why the Server 2008 drivers aren't affected by it.  Hopefully Microsoft will be releasing a fix soon.

On the upside, they seem to have extended the cutoff for future updates to June 10th, according to  That post doesn't say if it applies to Server 2012R2, or just Windows 8.1.  I'm hoping it applies to both.  People who use WSUS to update their systems have until August before KB2919355 becomes required to receive further updates.  Unfortunately, I am working on rolling out WSUS, but it ready quite yet.

For now all I can do is sit back and hope Microsoft, Dell and/or LSI come out with a fix soon.

Documenting patch panels the easy way

As I discussed previously, network documentation is important. One part of that is documenting all the physical cabling of a building.

I had started drawing out visio diagrams for each of our patch panels, indicating where the cable went, as well as floorplans marking all the ethernet ports.  The floor plans aren't too bad, especially if you can get CAD drawings of the building.  But the patch panels turned out to be a pain - positioning labels over each port on a patch panel is very time consuming.

So I decided to write a plugin for DokuWiki that will do the hard work for me.  I give it a simple description like this:

<patchpanel groups="6" name="Top_of_Rack" ports="24" rows="2">
# Port Label (#COLOR) Comment
1 Uplink #ff0000 Connects to firewall
2 2 Office 101
3 3 Office 102
4 4 Office 103
5 5 Office 104
24 24 Reception desk
And I get a drawing like this:

The plugin allows you to specify the name, number of ports, number of rows, and port grouping of the patch panel, so it looks pretty close to the real thing.  For each port, you can specify a label, optional color, and a comment.  The comments are shown as tooltips when you hover over a port.

This saves me a ton of time over updating visio diagrams, and means I don't have to edit the visio diagram, export it as an image, and upload it to our wiki.  Just edit a few lines of text when a port changes.  I'm also planning on writing one to handle switches,

The image is actually an embedded SVG.  The amazing things about scalable vector graphics is that they are text based descriptions of what to draw - so with a little bit of effort, you can dynamically create an image in any programming language, without any special image manipulation libraries.

If you are interested in using this plugin, you'll find it at

Bug reports and feature requests should be added to the github repo.