Wednesday, 24 December 2014

Network rack

For a while now I have been thinking of ways to tidy up my two external hard drives and cable router as they were sat on the end of a shelf in my study at home and were somewhat untidy!

Original setup

Having just got a 3D printer I was looking for a project which could include some 3D printed elements.  I had already got some 10mm MakerBeam aluminium extrusion and decided to a mixture of this and 3D printed parts soI got to work with the free AutoDesk 123D Design and started to design the 3D printed elements.

I decided on a base and two shelves. SO I produced STL files using 123D Design and printed them in black PLA:


Shelf supports

I then designed some spacers, end covers for the extrusions, feet and a top piece to finish the while thing off:
35mm & 50mm spacers

End caps & feet

Top piece

I also designed and printed a couple of cable management guides which gave this complete kit of parts:

Cable management guides

Complete kit of parts

The MakerBeam extrusion was assembled with 3mm fasteners and captive MakerBeam square head nuts :

Completed rack

 It was then pressed in to service with the network hard drive, use hard drive and cable modem / router installed and cabled:

The finished rack

All in all a much nicer solution with fewer visible wires and using a lot less shelf space as well.

I sourced the MakerBeam extrusion and specialist fasteners here: TechnoBots

Friday, 28 November 2014

Clarke milling machine - Lighting ring

I have a Clarke CMD300 Milling machine, which is based on a Sieg X2 I believe.

When I first bought the machine I made an LED lighting board which was "fixed" to the mill in a rather haphazard manner.  The board used 5mm LED's which were hot glued into a perspex panel which was then attached to the holes on the front of the mill which were originally used for the sliding guard.

A little while ago I bought an AdaFruit NeoPixel ring to play with.  While playing I had the thought that it might make a good light for the mill.  It was extremely bright and, of course, circular.  The inner diameter was sufficiently larger than the quill on the mill to ensure adequate clearance. So I attached it to an Arduino Uno and a rotary encoder, wrote some code to allow the brightness to be varied.

I didn't really want to use a whole Arduino Uno for the project so I put a simple ATMega 328 based circuit together on some strip board along with a dual power supply (one 5V channel to power the circuit and a separate 5V channel dedicated to powering the NeoPixel ring.  I put this altogether in a project box I had laying around.

Interior view of control box

As can be seen i have mounted the voltage regulators for each of the 5V rails on an external heatsink, which I recovered from a defunct UPS! I added a power connector for an external 2A power adaptor, a power switch, power LED and XLR socket for connection to the NeoPixel ring.

The rotary encoder I use includes a decoder which takes away the grief usually involved in rotary encoders and was purchased from Spriatronics.  I got the NeoPixel ring from PiMoroni.  NOTE I have no affiliation with either!  The Arduino library I for the NeoPixel used can be found here.  I realize that I could have done this with a number f LED's and a potentiometer and that my solution was overkill but the end result is extremely bright and controllable and the all in cost was around £35 which seemed reasonable to me.  And let's not forget it was a project as much for the sake of it, it just turned out to be a very useful and practical project - result!

Front, side and rear views

The code to control the NeoPixel ring is very easy thanks to the Arduino library provided by AdaFruit.

The next thing I had to resolve was how to mount the ring on the mill itself.  I have just had a 3D printer for my birthday so I designed a bracket and a spacer in Autodesk 123D Design, printed them and attached the NeoPixel ring to them both using cable ties.

Views of the 3D printed bracket and the light working.

Installed and running.  And it is very good!

Arduino code:
#include <Adafruit_NeoPixel.h>

#define PIN_NEOPIXEL 5
#define PIN_ENCODER_SI 3
#define PIN_ENCODER_DI 4
#define PIN_ENCODER_SW 2

int __EncoderPosition = 255;
boolean __EncoderChanged = false;
boolean __FullOn = true;

Adafruit_NeoPixel strip = Adafruit_NeoPixel(24, PIN_NEOPIXEL, NEO_GRB + NEO_KHZ800);

void setup(void)
  strip.begin();; // Initialize all pixels to 'off'



  //pull ups
  digitalWrite(PIN_ENCODER_SI, HIGH);
  digitalWrite(PIN_ENCODER_DI, HIGH);
  digitalWrite(PIN_ENCODER_SW, HIGH);

  for(uint16_t i=0; i<strip.numPixels(); i++) {
      strip.setPixelColor(i, 255, 255, 255);

  attachInterrupt(0, Encoder_Turn, RISING);
  attachInterrupt(1, Encoder_Switch, RISING);

void loop(void)
  //if ( __EncoderChanged == true) {
      __EncoderChanged = false;
      for(uint16_t i=0; i<strip.numPixels(); i++) {
        strip.setPixelColor(i, 255, 255, 255);

  Serial.print(", ");
  Serial.print(", ");

void Encoder_Turn(void)
  int _Direction = digitalRead(PIN_ENCODER_DI);

  __EncoderChanged = true;

  switch (_Direction)
    case LOW:
      __EncoderPosition -= 5;
    case HIGH:
      __EncoderPosition += 5;

 if (__EncoderPosition > 255)
   __EncoderPosition = 255;

 if (__EncoderPosition < 0)
   __EncoderPosition = 0;

void Encoder_Switch(void)
  if (__FullOn){
    __EncoderPosition = 0;
    __FullOn = false;
  } else {
    __EncoderPosition = 255;
    __FullOn = true;

  attachInterrupt(1, Encoder_Switch, RISING);
  __EncoderChanged = true;



Monday, 24 November 2014

Welcome to my blog.

I plan to post information here on any projects I am working on.