Daily Archives: April 8, 2014

The next phase is to arrange all the electronics and design some new parts. The existing parts I am using from the original controller will just be the Spindle controller, stepper drivers and parallel port breakout board (BoB for short). The new parts will be a bigger 24v supply, mini ITX motherboard, 2.5″ SSD and a flex ATX PSU. (I decided on the SSD purely because there may be some vibration to upset a normal HD, mine is 64GB but 32GB would be big enough). Once again I used Sketchup to get a rough layout, before the parts arrived. I decided to keep all mains voltage parts in the bottom left corner and put the PC in the top right. The PC backplate is not going to be on the back panel as the BoB plugs in directly via a DB25 gender changer, and I probably only want access to a couple of USB ports. The plan is to run the mains down the left hand side (cyan in image below), the 24v stepper motor wire down the right (red) and then decide which is best for the spindle (yellow). In the end as I placed the spindle motor connector on the right hand side of the back panel (top left in pictures below) I decided to run the spindle wires down the left hand side, keeping the mains at the bottom and the spindle/other wires at the top. Fixing it all in place was pretty straight forward as I just used paper templates and taped them in place. I then drilled M3 clearance holes for everything except the motherboard standoffs, which I drilled 3.2mm and then just self tapped them into the soft aluminium. I used an old 2.5″ to 3.5″ HD adapter plate I had laying about, which again is fixed using a couple of motherboard standoffs.

Sketchup Layout

Final Layout

Wiring Routes

Trying make the machine safer is another consideration. I don’t want to just rely on the Estop switch sending a signal to Mach3, which is OK all the time that Mach3 is running but not good if Mach3 or the PC crashes. Mach3 has the ability to output a charge pump signal, all the time it is running and I want to use this signal to activate the 24v motor supply and the spindle. The following is based off the 2nd circuit by Mariss Freimanis in the support document found on the Mach3 site. When the charge pump signal is active and the Estop switch is off, the relay is energised and the 24v supply is fed to the stepper motor boards. and the BoB (which converts it to 5v, see later schematic), if either the Estop is pressed or the signal stops then the relay turns off, stopping all motors. I am also sending the switched ground from the Mosfet to the IO board which will activate the spindle. (This will be discussed later) I decided to power the board from one of the PC PSU molex connectors as there were plenty spare, and in reality I am not going to use the CNC without the PC on.

Schematic

PCB layout

I need to get access to the unused parallel port pins from the Tonsen 4 Axis BoB, so the first job is to try and make a schematic of the circuit. After spending some time with the multimeter and magnifying glass I came up with the following circuit.

Tonsen Schematic

Tonsen BoB

A few things to note…

The Q817 Opto-isolators, RN2 and Input header are not actually fitted as you can see from the board picture.(Top right)

The power input is marked as 24v AC but it is DC.

The caps are marked on the PCB 1000/35 for C1, 470/25 for C2 & 220/16 for C3 but the values in the schematic are fitted.

The moto (spindle) header is on the board but it doesn’t connect back to the spindle controller.

In summary output pins 2,3,4,5,6,7,16,17 are buffered through the HC244, while pins 1,8,9,14 are connected directly to the parallel port. Pins 10,11,12,13 & 15 could easily be converted to opto-isolated inputs with some extra components. I can’t use pin 14 as it’s also the enable for the X Axis. This means that I can use pins 1,2 and 3 for outputs. I want one for the charge pump and one for spindle control, which leaves another output spare. For inputs I want one for limit switches, home switches, probe, and Estop. This again leaves one spare.

Next up is the addon IO board and here is the schematic and PCB layout.

Schematic Part 1

Schematic Part 2

Board Layout

The circuit is pretty simple, it is just opto-isolating the inputs and outputs from the parallel port and providing suitable connection points to me to wire up connectors to the back panel and BoB. On top of that there is a LED indicator to show the state of the inputs, and a 3 second timer with buzzer for the spindle control. When PP Pin3 goes high, it switches power to the 555 timer and buzzer through Q1, this is configured as a one shot 3 second timer. While the output is high the buzzer sounds through the NC contacts of the relay. Once the output of the 555 goes low, it turns on Q2 which switches the relay (but only if the charge pump is active, as it supplies the switched ground for Q2), this disables the buzzer and switches on the spindle via the NO relay contacts. There is also another LED to show the spindle relay status.

JP2 supplies the 5 volts need to power the board, the Estop signal and the switched ground from the charge pump PCB. It also sends the opto-isolated charge pump signal from PP pin 1 to the charge pump board.

In the next part I will design the back panel and fit the cooling fans to the side panels.