Sunday 20 February 2011

Wiring it up!


Having studied mechanical engineering I felt very comfortable designing, making and tweaking the hardware of huxley; but connecting the whole lot up to a computer to make it print was quite a step into the unknown!

I chose to use gen6 electronics from mendel-parts.com to help simplify this problem. It only uses one circuit board, which has a footprint of around 110x60mm, and make life connecting up all the components really simple.

Power

To power the unit I used a laptop charger, cut off the power jack and put the positive wire into the the positive side of the supplied connector, and negative to negative. Use the following picture as a guide but make sure you check the polarity with a multimeter as any mistakes will ruin your shiny new board! Also be sure to check that the power supply is rated between 12v and 24v and the correct wattage.

Wiring of the power connector
I would like to incorporate a emergency stop into the system too. This will most likely just cut all power to the gen6 board, but i could be really useful in situations when an opto flag bends or something else goes wrong!


Opto Switches
There was an option to buy pre-wired opto switches alongside the gen6 electronics which I bought to save the hassle of doing it myself. This worked as all i had to do was attach them to Huxley and plug the other end into the appropriate plug on the GEN6 board. The tricky part was physically attaching the opto switches to points on Huxley... The pictures below show how I mounted them (only on the x-axis for now!):

Reverse View of Opto mount

Front view (note that the trigger is mounted to the x-carriage)


The Z-axis proved most tricky as it needed to be placed exactly in the right position to trigger when the extruder tip is around one layer thickness away from the build surface. I used a length of M3 threaded rod to secure the opto switch to the drive side of the z-axis. The threaded rod allowed the opto switch to be positioned at the correct height.. The only problem is that it is not secured very well, a small knock would rotate the opto causing the extruder tip to come crashing down!

Stepper Motors
I bought the stepper motors from zapp automation, 3xNEMA 14 (for the axes) and 1xNEMA17 (for the extruder). I bought the steppers with the highest holding torque rating to hopefully minimise the possibility of skipping.


NEMA 17 Motor for the extruder

I did not buy the molex connectors from mendel-parts (forgot!), so i decided to use floppy disk power connectors from maplins which did the job very well (although I had to cut a bit of the connector off to make it fit!). I also bought some heat shrink wrap to tidy up the wires.
Floppy disk power connector with terminals
Stepper motor wires: soldered and shrink wrapped
The order of the wires had me stumped for a while, but I found this post in the mendel-parts forum. From left to right: blue - red - green - black.

When using the repsnapper software there is an option to control the steppers individually, this is very handy to find out if you have wired up the motors correctly. Hitting the - button (eg -0.1) then the axis should move towards the opto switch, if the axis goes the other way you need to reverse the order of the wires (so from left to right: black - green - red - blue). Pressing home on the same menu moves the axis in the negative direction until the opto switch is flagged. So be sure your optos are setup correctly before this or there will be some serious crunching!




Software
The Downloads section of mendel-parts.com has the majority of necessary downloads. Firstly I got drivers;  this sets up a USB->Serial connection to connect to huxley. I needed to find the COM port assigned to it so I went to device manager and looked for  FDTI on the list and from that i found the COM port (COM8 in this case)


Downloading repsnapper is always a good start too, don't start like me and assume the reprap host software would play nicely with the GEN6! Repsnapper acts as the control software of the printer, it can be used to manually move each axis, and generate g-code from a stl file. I am still learning about this section, but i plan to generate the g-code in skeinforge and open that g-code in repsnapper, as skeinforge is a powerful tool to create some cunning code.

I found some great tutorials on the skeinforge wiki, they are well worth a read as skeinforge is quite overwhelming when you first open it!