Some time ago I bought an old Boxford duet which had a somewhat old interface, requiring a serial port for general communication and a parallel port to send commands to the stepper motors. The software ran in DOS and was somewhat out dated. I have therefore started designing new hardware that only uses the serial port and should eventually only use USB, new firmware and new control software. This has proven to be of interest to people so i will document my endeavours here.
The original controller was replaced with a new one
Until i have a diagram drawn up the circuit works like this:
20 pin connector going to the stepper board is in fact used as a 10pin connector with 0V,5V,12V coming in and the direction and clock bits for the 3 axis going out. The logic therefore gets its power from the 5V pin of this connector. The 25pin D connector supplies connections for the spindle motor relays (enable, clockwise, anticlockwise) input to the PWM board for spindle speed and, access the rx and tx pins of the serial port plug on the back of the control box and a line indicating the condition of the emergency stop button.
The heart of the new design is a PIC18F4550 with the serial port pins (PortC 6 and 7) connected to a MAX232 for level conversion which is then connected to the appropriate pins from the 25pin D-sub. This provides a link from the computer to the machine. A serial to USB adaptor is then connected to the port on the back of the control box by a null modem cable and this plugs into my Windows Vista laptop and is controlled by a programme written in VB express 2008. Back at the PIC, PortD 0,1,2,3,4,5 are connected to the 20pin header pins Xclk, Xdir, Yclk, Ydir, Zclk, Zdir respectively. PortD 6 and 7 control the direction of the spindle motor and have a 1k resistor connected to them and then that goes to the base of a BC547 to switch each of the direction relays by pulling low the appropriate pin of the 25pin d-sub. A similar setup is used on PortA0 to control the spindle enable relay. the PWM input comes from the PWM output of CCP1 and at the moment simply goes staight into the input of the PWM board in teh control unit by way of the appropriate pin of the 25pin d-sub (i know a PWM running off a ref voltage generated from a PWM is a bit silly but it will be modified at a later date.) PortB 6 and 7 and PortE 3 are used for the ICSP port. There is a 20MHz local osc there too but it’s not being used at the moment as I am using the internal osc, PortB 0 is connected to the emergency stop line but this has not been implemented in software yet, neither have the opto encoders on the spindle but they will connect to PortE 0 and 1 eventually. The rest is just LEDs for debugging, flyback diodes for the realys and caps for the Max232 charge pumps.
more to follow
06/04/2008 at 05:54 pm
[…] 16/12/2007: Madness. […]