Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: dandumit on August 03, 2007, 03:28:55 AM

Title: USB output board instead of printer board
Post by: dandumit on August 03, 2007, 03:28:55 AM
Hi,

Very soon the Parallel printer port will disappear (from laptop's is already gone).

I have seen that Mach is supporting only two external output boards : G100 from GeckoDrives and  ncPod.
Unfortunately both of those are expansive and their schematic and firmware closed.

Did someone considered to use a simple output board like this :
http://www.olimex.com/dev/images/PIC/PIC-USB-4550-sch.gif
http://www.olimex.com/dev/pic-usb-4550.html
 or even better http://www.olimex.com/dev/sam7-p256.html (SAM has a much higher amount of ram and 60mhz clock ).

Those chips have usb connection and their price is around few euros.

I would like to try to implement a very simple board like this having following functionalities :
- receive and send data trough usb port
- store received octets into a circular buffer
- send this data on a timer from buffer to output pins

This will ensure that data doesn't depend on variable transfer ratio of usb port.

If someone it is willing to help me and it is able to write the plugin that will drive this board please help.
I'm intending to make available for free the schematic, the firmware and most important to run the tests until is running.

Also if you have experience please tell me what could go wrong with this ideea !

Regards,
Daniel
Title: Re: USB output board instead of printer board
Post by: jimpinder on August 03, 2007, 03:59:16 AM
As far as I understand Artsofts reasoning, only the 25 pin PARRALLEL printer port is fast enough to provide the control signals to your machine, particularly when moving several axis simultaneously, to maintain the accuracy of what you are cutting. If you imagine a circle (or a sphere even moreso) all axis are continually moving but also continously changing speed, and a parrallel port is capable of doing this.

USB and other serial connectors have to convert the many bits of data into a stream of information, which all has to run at the same speed (by definition) and may miss the subtle timings of signals to your stepper drivers. Serial connections are OK I woud imagine for switches for limits, motor, coolant etc but not for the business end.

It may be that there is available a serial connection working at such a fast speed that these difficulties can be overcome, but I haven't seen any sign of it yet from Artsoft.

The printer port is only three addresses (suitably buffered) on the internal parrallel bus of the computer &H278,279,27A  or &H378,379,37A the first address handling the 8 main data pins, the second address handling the 5 input pins and the third one the 4 other output pins, so as we know, you can get parrallel port cards to fit into your computer - yes - they are called second printer ports at the moment - maybe they will become just a parrallel port card in future, with perhaps say 16 inputs, 16 outputs - all addressable.

I dont know whether Artsoft will comment on this, but, yes, it would be nice to know, or obtain advice on which way to go.
Title: Re: USB output board instead of printer board
Post by: dandumit on August 03, 2007, 04:26:47 AM
Thank you for reply first of all.
I must tell you that today's USB in full speed has 12Mbits/second (and in high speed 480Mbps).
Probably an 1MBit (1 mega octet) is closer to reality.
This would mean that you can send 16 bits to output at almost 500 000 per second. This is far more than enough for some stepper operations.
Also I have seen on Mach3 that it has the maximum mode at 45 000 per second.

Serial (9 pin), PS2 and Parallel printer port are extremely old connectors and shortly will disappear.

Daniel
Title: Re: USB output board instead of printer board
Post by: David_Web on August 03, 2007, 07:35:04 AM
The reason for using the paralellport it that it's simple to connect to and is always included. It is just now that it is starting to dissapear.
Mach now supports 100.000 pulses/sec

The G101 is 208$ from geckodrive and the G100 is 399$
I don't see that as extreamly high prices as you get something that is rigorusly tested and rock solid.
btw it has a step speed of up to 4MHz.

If you want to develop a board that works and is a lot cheaper I might buy it. I'm sure that Art would make the drivers work with mach.
The electronics forum at CNCZone is probebly a good place to start. There i a lot of people that knows their stuff there. And a few electrical engeneers.
Title: Re: USB output board instead of printer board
Post by: dandumit on August 03, 2007, 09:51:34 AM
Hello David,
 
Thank you for your reply first of all.

1. Because parallel port is going to disappear we must do something sooner.
2. It is true that all Gecko products are very good quality and some documents from their website are better than courses from some universities BUT for a lot of people those hundreds of dollars are simply not available. (Myself I had a lot of resource limitations and it was difficult to buy some Chinese stepper motors and some linear guides.)
3. Such break out board it's easy to implement and it couldn't get more expansive than 30-40 $. I can't see any reason to buy something expansive when those components are pretty cheap and the schematic it is fairly simple and because of that I'm planning to make this small design free.
4. The 40K pulses / second it is enough for usual applications .
5. In the past I have designed some complicated microcontroller systems and I think that I have the prerequisite background. I need help because I don't know how to write the driver for Mach to send data to an USB stream instead of parallel port.

DAniel
Title: Re: USB output board instead of printer board
Post by: David_Web on August 03, 2007, 10:01:36 AM
True. The extra money does make a difference when building a hobby machine.
I am no programmer so I can't help out there.

Apart from controlling axis it might be interesting if the board could be used as universal input/output.
Meaning if the machine is already hooked up to the parallel port this card could be used as an extension for many more buttons, limit switches, relays etc.
Title: Re: USB output board instead of printer board
Post by: vmax549 on August 03, 2007, 10:44:36 AM
Hi Daniel, It is a bit more involved than just moving data. The timing of the data has to be extrememly accurate to control up to 6 axis to within .00001" accuracy at variable speeds. USB does not have that timing capability. So you would need a another controller on the other end to do what we now do with the LPT version. Also so far Windows has not shown to be stone dependable with its USB communication to outside devices. I am sure that it will someday but not today.

The LPT port is not going anywhere anytime soon, It is still available on new MOBOs and as a single or dual port card. With laptops I believe you can use the pcmci to lpt adaptor to get 1 lpt port.

NOw if you wanted to watch movies play games and surf the net and work on your word processing and spreadsheets while cncing I can see the benifit of the outside controller. But if you are just CNCing then I don't understand YET why I would want to have 1 very powerfull 3ghz computerwith 1gb ram and a 166+mhz buss just to tell a simple 4mhz controller what to do. Seems counterproductive to me. (;-) TP
Title: Re: USB output board instead of printer board
Post by: Brian Barker on August 04, 2007, 10:48:00 AM
There is a board that will do 4MHz and works over USB :) it is in testing now and seems to be working VERY well! Here is a pic of the first 3D cut ...

I think the price is about 150-175 for the device and it is Plug and play with an existing install of Mach3 (You can use the same XML and you plug in the 25 PPort cable)
Title: Re: USB output board instead of printer board
Post by: vmax549 on August 04, 2007, 11:30:57 AM
Now that the cat is out of the bag, How about an overveiw of how it will work.

No offense intended but past history has shown the usb side to be fairly undependable.

Maybe this is the mousetrap that beats the mouse?

Thanks Brian. (;-) TP
Title: Re: USB output board instead of printer board
Post by: lemo on August 04, 2007, 11:49:24 AM
I WANT ONE!
Lemo ;D
Title: Re: USB output board instead of printer board
Post by: Brian Barker on August 04, 2007, 11:59:13 AM
Well... I can tell you that I have run a file from my laptop, talking over skype AND changing screens all at the same time with NO trouble... It is working as well as the printer port and may have a few goodies if they can fit them in... Beta testing is about to start on the device and will be out as soon as it passes all the testing. The Firmware is also downloaded from the plugin when it connects so the trouble of updating the FPGA code is GONE! I must say that this is the best device that I have ever used but only time and beta testing will tell us how it will truly work.

That is about all I can tell you for now :)

Thanks
Brian
Title: Re: USB output board instead of printer board
Post by: Hood on August 04, 2007, 12:01:58 PM
Is it going to be suitable for a lathe,  ie threading? ;)
Hood
Title: Re: USB output board instead of printer board
Post by: Brian Barker on August 04, 2007, 12:17:22 PM
They hope to have threading when it is released for bata testing ;)

Title: Re: USB output board instead of printer board
Post by: Hood on August 04, 2007, 12:38:56 PM
sounds good but  looks like it may be too late for my lathe, I am hoping to make time for that in 2 or 3 weeks time.

Hood
Title: Re: USB output board instead of printer board
Post by: Brian Barker on August 04, 2007, 12:48:14 PM
you need to have an X axis first  ;D

This will plug right in to everything that you are doing... You will need to add an encoder to the spindle but other then that you should be all set!

Later
Brian
Title: Re: USB output board instead of printer board
Post by: Hood on August 04, 2007, 12:51:54 PM
Working on that, hopefully a deal will be struck at the right price in the next day or so, if not then I will just have to use one of the analogue drives I have sitting here ;)  And I have a few 2000 line encoders with Index pulses which will be a breeze to fit to the spindle offtake.

Hood
Title: Re: USB output board instead of printer board
Post by: dandumit on August 05, 2007, 08:38:31 AM
Brian, I'm very glad that you have noticed this thread !

What I'm intending to build it is pretty much the same : one microcontroller board which is sending data on a timer - this means a very good and stable output transfer rate.
The microcontroller also will contain a buffer for data in order to solve the problem of inconstant data transfer rate of usb (unfortunately this small time shifting will have also some dissadvantages).
Also on microcontroller will be an bootloader so the firmware will be downloaded when is connected to computer.

Please tell me if your board is doing something more than that.

Will you help me with the driver for Mach3 ?

Regards,
Daniel
Title: Re: USB output board instead of printer board
Post by: Brian Barker on August 06, 2007, 09:48:09 PM
Daniel,
Man is it ever hard to see all the threads here! I end up having to speed read the threads looking for things that could be bad problems and I do miss them from time to time :(
So you are thinking about making a device that is USB and a motion controller...  If you are thinking about doing this as a product I would be willing to talk to you over the phone as it is just to much to type :( We would have a thread that would go about as long as Hood thread about the lathe he may finish some day! (Good thing I like Hood ;) ) This is no small task and we would expect you to write the Lib files so we can hook into the device with your Lib... If you are willing to do that I am willing to do the Mach3 code for you (You don't want to go there on your own! )

So send me a PM and we will talk it over!

Later
Brian

Title: Re: USB output board instead of printer board
Post by: Hood on August 07, 2007, 05:55:30 PM
Well if this guy would hurry and release this USB board I think he would sell that many he would become almost as rich as you Brian ;)
 As I would be able to buy one it would then give me the incentive to finally take time to finish my lathe and my thread would grow no longer.
Sounds like that would be the best solution for everyone :)
Hood
Title: Re: USB output board instead of printer board
Post by: Chaoticone on August 07, 2007, 06:02:41 PM
 ;D
Title: Re: USB output board instead of printer board
Post by: dandumit on August 08, 2007, 02:47:59 AM
@Hood - I must tell you that I'm in a really hurry. I have ordered already two development boards : one with PIC18F4550 and one using AT91SAM7S256.

Is not about making profit. I'm intending to make this design free.
PIC is available also in DIP40 package and would be simpler to everyone to solder it.
The supposed board is extremely simple. Will see if it can work out. I'll keep you informed.

Daniel
Title: Re: USB output board instead of printer board
Post by: dandumit on August 10, 2007, 08:48:23 AM
an article related to this subject :
http://www.electronicdesign.com/Articles/ArticleID/16125/16125.html