Welcome! Log In Create A New Profile

Advanced

USB vs serial - is speed an issue?

Posted by pica 
USB vs serial - is speed an issue?
September 02, 2010 08:36AM
Hi,

I'm just starting to look at electronics for the Mendel. I've noted that there's several people using the rs-232-to-USB converters and I've also noticed that several of the new designs take commands directly via USB. I have a few questions:

1. Is there a speed-up when you use USB? Or is all this negated by an immediate "down-convert" to serial speeds (even if it's TTL logic instead of "real" +/- 12v. logic )
2. Assuming a speed-up, is it worth it? Or is the bandwidth of a simple serial connection adequately fast enough to keep up with the print speed. I understand that the SD card is not yet being utilized, so I guess I'm asking if the printer ever has to wait for a slow serial line, or is the printer significantly slowed in the beginning of a print because the print job is spooling?
3. What serial connection speed is everyone using? 9600-8-n-1?
4. Has anyone had any issues with specific types of USB-to-serial adapters?

The last question is because of my experience flashing an embedded Linux device with a Redboot environment. I had an unbelievable amount of problems at the default 115200, but they all seems to disappear at 9600. I blamed the cheap USB-to-serial adapters, because when I went through the entire box of them, I only found one that worked reliably at 115200 (so I marked it with my name and kept it for myself). I can't believe I'm the only person with speed issues in these days of "lowest bidder, made in China, re-brand under our name".
VDX
Re: USB vs serial - is speed an issue?
September 02, 2010 08:48AM
... the common communicationg speed is 19200 Baud, but some runs with higher speeds too.

As the USB-Driver is a common RS232-to TTL-wrapper, there is no real difference ...


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: USB vs serial - is speed an issue?
September 02, 2010 09:04AM
VDX Wrote:
-------------------------------------------------------
> ... the common communicationg speed is 19200 Baud,
> but some runs with higher speeds too.
>
> As the USB-Driver is a common RS232-to
> TTL-wrapper, there is no real difference ...

Thanks for the speedy reply. I suppose that answers all my questions, but I'd love to hear if anyone else is having issues with cheap adapters.

Next question: At 19200 Baud, is this significantly faster than the printer? Let's say there are advances down the road and we get a significantly faster printer that gobbles up the g-code at 4x. Could 19200 Baud "keep up" at 4x?
VDX
Re: USB vs serial - is speed an issue?
September 02, 2010 09:13AM
... i have a CNC-mill, that is milling 3D-objects much faster, than Mendel can print them - and it's running at 9600 Baud winking smiley

So long the serial communication with optimized G-Code is faster than the mechanics can move, it's no real issue ... and even the cheapish serial adapters can support higher baudrates than 19200 ...


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: USB vs serial - is speed an issue?
September 02, 2010 09:29AM
FTDI chip based USB to serial converters can be run up to 230,400 baud.
It is more likely the Sanguino that is the determining factor - how fast can it receive serial communication?


Bob Morrison
Wörth am Rhein, Germany
"Luke, use the source!"
BLOG - PHOTOS - Thingiverse
Re: USB vs serial - is speed an issue?
September 02, 2010 09:51AM
Thanks, rhmorrison and VDX, that really helps.
Re: USB vs serial - is speed an issue?
September 03, 2010 03:18PM
The USB is desirable because it plugs into about everything where most PC's no longer come with serial ports.

It also has the side benifit of being able to power the main processor chip on a arduino or sanguino board, so that the process can then control the larger power supply.

Early firmware had pauses as it did not overlap receiving the next command; while executing the previous, that has gone away as the firmware gets more refinded.

Speed would come into play for downloading large jobs onto a SD card, but still not critical.
Re: USB vs serial - is speed an issue?
September 03, 2010 10:59PM
freds Wrote:
-------------------------------------------------------
> The USB is desirable because it plugs into about
> everything where most PC's no longer come with
> serial ports.
>
I get where you are coming from, but serial ports are not an issue for me. I have two, unused on my PC (admittedly, the PC dates from '03). I also have some curb-shopped ones (I'm keeping them for power supplies, but I've got like ten of them).

For people not like me, well I've had great luck with something like this for $2.99, as long as I kept the speed down.


> It also has the side benifit of being able to
> power the main processor chip on a arduino or
> sanguino board, so that the process can then
> control the larger power supply.

If I understand what you are getting at, yea that would be neat. Jack into the main board via USB, and tell it to power up the 3d printer. Except that most power supplies supply a trickle of power even when off to run such accessories. I haven't dived into main boards too far yet, but that's how I'd hook them up (except, I'd want ethernet, and "wake on LAN" (and robot arms and lasers...))

>
> Early firmware had pauses as it did not overlap
> receiving the next command; while executing the
> previous, that has gone away as the firmware gets
> more refinded.
>
> Speed would come into play for downloading large
> jobs onto a SD card, but still not critical.

Agreed, not critical.

BTW, I've looked at the Boarduino as a main board, and while attractive, the cable to program it cost more than the dang Boarduino kit. I think I can just breadboard up a MAX232 to do the rs232->TTL logic, and just use my serial port.
Re: USB vs serial - is speed an issue?
September 07, 2010 10:25PM
I've run my arduino at some fairly outrageous baud rates before, but the chip's ability to deal with incoming data makes really high baud rates impractical on the firmware side - Interrupt-driven buffers take a certain amount of time per character, and they simply may not have enough time to grab them all especially when other interrupts are firing, and running a tight loop makes other work fairly tricky to do, especially math and parsing.

If you had a chip which could take information and write it sensibly into a buffer of some sort, there would be nothing stopping you running it at megabits, but most modern chips with those sort of features have built-in usb device support and so you can just talk straight usb instead of downconverting to serial. Some mobile phones and other devices I've encountered (eg hokuyo urg rangers) implement usb stuff this way- basically appearing as a baud-less serial port that lets the usb handshake define the max baud rate.

Many possibilities lay this way, but arduino is quite adequate for the current stage of this project.


-----------------------------------------------
Wooden Mendel
Teacup Firmware
Sorry, only registered users may post in this forum.

Click here to login