|
Do you drive your Motor Controller usually via the
Printer Port?
Well now you can convert it to USB with this very simple Circuit below.
We supply the PCB design
FREE, the Firmware FREE and the
Windows Application FREE.
You just build it, use it and let us know of any improvements we can
make.
To compliment our new FREE Beta USB
Application (Shown Below) along with new Firmware, we are going to
release a very simple circuit that people can build themselves that will
let you control any parallel port stepper motor controller via USB.
With this simple circuit and our Firmware you will be able to simply
plug it into your existing Controller box and using our software, run
your Gcode via the USB Port.
The reason this will work with any
existing Controller box that uses the parallel port to control the Clock
and Signal lines is because we will release standard Firmware that will
cover different pin configurations as needed.
If your controller has a different configuration
then just email us and we will customise the Firmware to suit your needs
and release it on this site. In doing this we hope to build up different
configurations to suit all different kinds of controllers out there.
Find below the first picture of version 1.0
As you can see, this is not going to cost you a
lot of money to make!!!!!!!!!

PCB and Components.
Please find below the PCB layout.
Size of PCB is 75MM * 75MM


Click here to download the Hi Resolution images.
These are 600DPI JPG and need to be viewed and printed in Adobe
Photoshop for an exact scale.
Also included are postscript files as well.
We are also releasing the PCB Layout in Gcode
for people wanting to mill their own.

Milling PCB below with 0.2mm engraving bit.

Drilling PCB below with 0.8MM drill bit.

Click here to download the Gcodes.
Inside this file are two Gcodes, one for the Milling and the other for
the drilling.
Components:
1 * 25pin socket
1 * 18F4550 Chip
1 * 40 pin Dip Socket.
1 * USB Socket
1 * 20mhz Xtal (the Pic internally clocks this upto 48mhz)
2 * 22pf ceramics
1 * 4k7 resistor
1 * 1k resistor
1 * LED
1 * 0.1uf ceramic decoupling cap.
1 * 0.1uf electrolytic capacitor
1 * 22uf electrolytic capacitor
1 * little tactile push switch for resetting Pic, not really needed.
And a PCB about 75mm * 75MM
Firmware Version 1.2 released 12/03/2006:
Click here to download the Firmware Version 1.2 Type1.
This code is for use with the 18F4550 Pic Chip.
You will need a suitable Pic Chip programmer that supports the 18F4550.
The fuses have all been set in the hex file, so simply load up, Program
and Verify.
Type 1 is configured for the following Pin
Configuration:
Pin2: Step X-Axis
Pin3: Direction X-Axis
Pin4: Step Y-Axis
Pin5: Direction Y-Axis
Pin6: Step Z-Axis
Pin7: Direction Z-Axis
Pin10: Z-Limit Switch
Pin11: Emergency-Stop Switch
Pin12: Y-Limit Switch
Pin13: X-Limit Switch
As we have said before, if you need the firmware customised to suit your
controller then please email us and we will re-compile and release here.
Command Structure for Firmware:
Command Structure Ver 1.2 upwards:
Commands are sent 11 bytes at a time.
This first byte gets broken down into 8 bits and they do the
following:
bit0= X Axis Direction
bit1= Y Axis Direction
bit2= Z Axis Direction
bit3= Travel kind, this is for the firmware to tell it to use
different routines for G00 travelling or G01 cutting, 1=Travelling
0=Cutting
If you set this bit to 1 then the firmware will not care about
how it gets to this position and it will just clock each Axis until it
gets there.
If you set it to 0 then it will move the X and Y axis at even
pulses to get to it's destination giving the correct line needed. This
option takes more processing time, so speed pauses may have to be
adjusted.
bit4= Tells Firmware to ignore limit switches 1=ignore
0=do not ignore
bit5= always 0
bit6= always 0
bit7= always 0
The next 3 bytes control how many pulses you wish to send to the
X-Axis.
On our machine 533.333 pulses =1mm so to tell it to travel we first
have to round up and break to binary int(533.333)=533
533 binary= 00000000 00000010 00010101
now we get our 3 bytes from this
1st byte 00000000 = 00
2nd byte 00000010 = 02
3rd byte 00010101 = 21
By doing it this way we can send a max 16777215 pulses which = 31457MM
(103 feet!) Travel
The next 3 bytes control how many
pulses you wish to send to the Y-Axis.
This is the same as the X-Axis
The next 2 bytes control how many
pulses you wish to send to the Z-Axis.
Same as the X-Axis but this time only 2 bytes(16bits)
Final 2 bytes is Pulse Width Delay
0050 = Pulse delay in Microseconds for speed.
This will differ depending on the Step Mode that the
controller box is set to.
Find some examples below, obviously we round up because we only send 4
digits to the controller.
Eighth Step Timings:
A 2250 Microsecond pause gives 25.4mm or 1 Inch
Travel per minute.
A 1125 Microsecond pause gives 50.8mm or 2 Inch
Travel per minute.
A 0562.5 Microsecond pause gives 101.6mm or 4 Inch
Travel per minute
A 0281.25 Microsecond pause gives 203.2mm or 8 Inch
Travel per minute
A 0140.625 Microsecond pause gives 406.4mm or 16 Inch
Travel per minute
A 0070.3125 Microsecond pause gives 812.8mm or 32 Inch
Travel per minute
A 0035.15625 Microsecond pause gives 1625.6mm or 64 Inch
Travel per minute
A 0017.578125 Microsecond pause gives 3251.2mm or 128
Inch Travel per minute
So to work out what pause we needed for
say 45IPM we would use 2250/45 which gives us 0050
To work backwards and see what a pause of 50 would get, we would take
2250/50 which would give us 45IPM.
The motors we use on the CNCDuDeZ Frame max out at about 50 Microsecond
pause, which gives us a respectable approx 45IPM!
Quarter
Step Timings:
A 4500 Microsecond pause gives 25.4mm or 1 Inch
Travel per minute.
A 2250 Microsecond pause gives 50.8mm or 2 Inch
Travel per minute.
A 1125 Microsecond pause gives 101.6mm or 4 Inch
Travel per minute
A 0562.5 Microsecond pause gives 203.2mm or 8 Inch
Travel per minute
A 0281.25 Microsecond pause gives 406.4mm or 16 Inch
Travel per minute
A 0140.625 Microsecond pause gives 812.8mm or 32 Inch
Travel per minute
A 0070.3125 Microsecond pause gives 1625.6mm or 64 Inch
Travel per minute
A 0035.15625 Microsecond pause gives 3251.2mm or 128
Inch Travel per minute
Half
Step Timings:
A 9000 Microsecond pause gives 25.4mm or 1 Inch
Travel per minute.
A 4500 Microsecond pause gives 50.8mm or 2 Inch
Travel per minute.
A 2250 Microsecond pause gives 101.6mm or 4 Inch
Travel per minute
A 1125 Microsecond pause gives 203.2mm or 8 Inch
Travel per minute
A 0562.5 Microsecond pause gives 406.4mm or 16 Inch
Travel per minute
A 0281.25 Microsecond pause gives 812.8mm or 32 Inch
Travel per minute
A 0140.625 Microsecond pause gives 1625.6mm or 64 Inch
Travel per minute
A 0070.3125 Microsecond pause gives 3251.2mm or 128
Inch Travel per minute
Full Step Timings:
Use below full step for speed of 25.4mm or 1 Inch
Travel per minute.
A 9000 Microsecond pause gives 50.8mm or 2 Inch
Travel per minute.
A 4500 Microsecond pause gives 101.6mm or 4 Inch
Travel per minute
A 2250 Microsecond pause gives 203.2mm or 8 Inch
Travel per minute
A 1125 Microsecond pause gives 406.4mm or 16 Inch
Travel per minute
A 0562.5 Microsecond pause gives 812.8mm or 32 Inch
Travel per minute
A 0281.25 Microsecond pause gives 1625.6mm or 64 Inch
Travel per minute
A 0140.625 Microsecond pause gives 3251.2mm or 128
Inch Travel per minute
Every time you send a 11byte command you will get
2 bytes back from the controller that will give you in ASCII the answer
OK. This is the same whether
sending Serial or USB.
You will also get a 2 byte ASCII code sent back
for AUX1 inputs which are triggered:
XL X-Axis Limit Reached
YL Y-Axis Limit Reached
ZL Z-Axis Limit Reached
XY X-Axis and Y-Axis Limits Reached
XZ X-Axis and Z-Axis Limits Reached
YZ Y-Axis and Z-Axis Limits Reached
XA X-Axis, Y-Axis and Z-Axis Limits Reached
ES Emergency Stop Activated.
Application:
Please
Check the USB-Software link to download our Beta Application.

Setting up and testing:
After you have assembled your new
Interface, simply plug in a USB lead and Windows XP will automatically
detect the Interface as a USB Hid Device.
You can confirm this by checking in device manager of your machine.
Now connect your Printer Port cable from
the Interface to your controller box and you are ready to go.
Run up the software, set up the pulses per MM parameter and try out the
Jog.
Please make sure you read the HELP File first.
|