Welcome! Log In Create A New Profile

Advanced

How Can you Make a USB to TTL cable for Sanguino?

Posted by cheeswiz 
How Can you Make a USB to TTL cable for Sanguino?
January 24, 2009 11:51PM
Is it possible to Make a USB to TTL cable for Sanguino by Splicing the connector into an random USB Cable? Or is there another way to make it?

[reprap.org] [store.rrrf.org]
Re: How Can you Make a USB to TTL cable for Sanguino?
January 25, 2009 12:26AM
There's an FTDI chip embedded in the plastic on the USB end of that cable; you'd have to add that in to your cable to make it work.

This is the message I get when I plug my cable in:

FTDIUSBSerialDriver: 0 4036001 start - ok



Wade
Re: How Can you Make a USB to TTL cable for Sanguino?
January 25, 2009 07:58PM
Thank you Wade that is extremely helpful. One more question, how can i check to see what a given cable's message is when plugged in,.. also if I installed a different driver over top the one that cable is using would that work to make the cable?

i guess that was 2 questions lol >grinning smiley<
Re: How Can you Make a USB to TTL cable for Sanguino?
January 25, 2009 08:49PM
In Linux and Macs, at the console type "dmesg" right after you plug in the cable; the last message will probably be something about the cable. On Windows you can probably find some info in the Hardware Manager, but I don't use Windows much anymore.

There might be a way to hack the drivers to make USB do RS232 without an adapter, but I haven't heard of one yet. Doesn't mean it doesn't exist or can't be done. smiling smiley Not sure it's worth the effort though.

You could try cutting up a serial cable, but actual RS232 uses +- 15V, which will fry the Sanguino; you'd need a level converter at the very least.

Hope that helps!

Wade
Re: How Can you Make a USB to TTL cable for Sanguino?
January 25, 2009 11:30PM
if i did that it would be serial from the computer to the Sanguino, but i'm looking for a way to put it on different computer more easily, nowadays computers aren't built with Serial or Printer ports, usb and firewire are in, oh yeah, and Full Gig LAN lol. putting the serial would be easy just a power converter and a Capacitor would do the trick, but thats not what i'm looking for. I'll try looking in the hardware manager to see whats up there. But I bet theres a way to do the trick without a driver, just mess with some code and have the program run with the cable i find. Or is that impossible?
Re: How Can you Make a USB to TTL cable for Sanguino?
January 26, 2009 12:13PM
Wade Wrote:
-------------------------------------------------------
> There might be a way to hack the drivers to make
> USB do RS232 without an adapter, but I haven't
> heard of one yet. Doesn't mean it doesn't exist
> or can't be done. smiling smiley Not sure it's worth the
> effort though.

There isn't a way to do it. The physical layer of the USB port is much closer to RS-485 than it is to RS-232. That being said, all of the serdes operation of the USB port is done in hardware, so hacking it at the driver level isn't going to work well.

Brendan
Re: How Can you Make a USB to TTL cable for Sanguino?
January 26, 2009 03:10PM
Yeah, given the differences in the protocols and physical layers between USB and TTL-level serial it really isn't viable to do it without additional hardware. USB looks a lot more like networking than a straight serial link, and you can't really hack it unless you've got an extremely weird hub in your computer, and then you're less portable, not more. That said, the additional hardware that is needed to translate is on the same level of cost and complexity that a MAX232 was to do level translation of RS232 to TTL:
[www.sparkfun.com]
is a good example of such a chip, and quite possibly is the one used in the cable. It's probably easier to just get the cable, though.
Re: How Can you Make a USB to TTL cable for Sanguino?
January 27, 2009 01:40AM
wow i know a lot more now lol, i'm gonna check that cip out a bit more, i'll problably use that instead of the cable already made because this is all fun to make from skratch with improvisation and a half mile of duct tape, so to speak.
Re: How Can you Make a USB to TTL cable for Sanguino?
July 07, 2009 03:45AM
The Arduino board has a max232, no special cables are needed. I think the RepRap motherboard should include one as well. It will cost less than $1 and save people from buying a $20 cable.

I am going to make a version of the motherboard with this and share the files with everyone.
Re: How Can you Make a USB to TTL cable for Sanguino?
July 07, 2009 04:59AM
From reading about this on the Sanguino site, I thought this was an "expensive SMC component" which would be difficult for people to make?

Ive just bought an Sanguino, breakout shield and cable and I wish it had been possible to make one without buying a cable!
Re: How Can you Make a USB to TTL cable for Sanguino?
July 07, 2009 06:28AM
The FT232RL, is plenty big enough to solder, even by hand, and it sure would be far easier to just plug in a normal USB cable than a specialized cable
Re: How Can you Make a USB to TTL cable for Sanguino?
July 12, 2009 10:56AM
Greetings all,

Another option for USB-to-Sanguino connection is the "USB BUB" kit from [moderndevice.com]
This comes with the surface-mount chip already soldered to a PC board, and it's cheaper than the FTDI cable ($12.90 {USD} vs ~$20.)

I've had good luck with this Co. and products.


Larry Pfeffer,

My blog about building repstrap Cerberus:
[repstrap-cerberus.blogspot.com]
Re: How Can you Make a USB to TTL cable for Sanguino?
July 20, 2009 05:12PM
The price of $20 for the cable when the Sanguino kit is only $25 seems quite out of proportion. Can anyone confirm Larry's idea that the USB BUB board works with the Sanguino?

Jon
Re: How Can you Make a USB to TTL cable for Sanguino?
July 20, 2009 08:00PM
Technically there is no reason it shouldn't work, but to use it you would then have put a cable with a header socket to plug into the Sanguino on it. Just a matter of how much you value your time.

It's also easy to loose the difference by making orders from multiple vendors unless ordering multiples.

I would image a future Sanguino design in SMT would have the usb chip already mounted.

Since the design is transitioning to multiple controller boards the same cable can be used accross them.

You can also use the TLL cable as a direct chip programmer.
Re: How Can you Make a USB to TTL cable for Sanguino?
September 09, 2009 05:19PM
Guys

By far the cheapest way to make a USB to Serial cable is to buy in the cheapest USB mobile phone data cable that will do the job and crop off the phone end. Expose the wires and meter them back to the phone plug end. Once you know which pins they go to (google the pinouts for your phones connector) you know what each colour coded wire does.

The serial presentation to mobile phones is TTL, so no level shifting is necessary to connect to the Sanguino.

Minimum number of wires you will need to connect is 3, ie Gnd, TX and RX.

Nokia ones look to be doable and I have seen articles in electronics magazines doing this.

You may not get the DTR, RTS lines etc that are used for reset so may have to do this manually (not a problem really), you may also have to go through a couple of different cables until you get one that has power available from the USB side of things (Some are powered from the phone).

But at approx 3UKP or 6 USD a pop these are as cheap as chips. A puker FTDI cable will cost you that in postage

The FTDI devices etc are pretty good and depending on which one you go with give you access to more I/O and serial modem control lines but at a price.

If anyone buys one in and successfully chops it, it is probably worth posting the model of phone and cable back here.

I am looking at this as well at the moment and hope to get to a local market and see what I can find at the weekend.

Hope this helps

Cheers

aka47


Necessity hopefully becomes the absentee parent of successfully invented children.
Re: How Can you Make a USB to TTL cable for Sanguino?
September 11, 2009 07:20AM
A bit of web research later...

At least looking at Nokia cables anyway. (This seemed to be the best first call as Nokia's are so popular and the cables can be had for as little as 3 UKP on-line.)

The Nokia DKU-2 Cable and clones (the originals are hideously expensive) look to be straight through USB for the phone models that have USB capability inbuilt. SO are not suitable. I haven't tested one though to see for sure.

The DKU-5 soon to be superseded apparently by the CA-42 though are supposedly USB to serial. The CA-42 should be easily recognisable by the connectors being blue plastic instead of the usual black (DKU-5).

So these look to be good candidates for the chop job at the moment. Just on my way to the local market to see what I can find.

There did'nt seem to be any information on the web as to which USB-Serial chips the DKU-5 and CA-42 used, so it will be a case of plug them in and see.

Has anyone out there got either of these cables to hand ???

If you have and are running a linux variant, plug your cable in and then run dmesg from the command line. the last lines on the dmesg log should show linux trying to set the cable up and will often tell you what the chip set is.

To tryout any old data cables you have lying around to see if they are suitable, do the same trick with dmesg, and plug your cable in (without a phone attached). If the cable is suitable for the chop job you will see in dmesg the cable being recognised as a USB-Serial device and set up as a USBtty under linux.

On a non Nokia note:-

I have tried my Sony Erickson data cable and without a phone attached, dmesg and linux show no activity at all. It only springs into life when a phone is plugged in. This suggests my mobile phone and the cable are straight through USB, so not suitable.

Hope this helps.

Cheers

aka47


Necessity hopefully becomes the absentee parent of successfully invented children.
Re: How Can you Make a USB to TTL cable for Sanguino?
September 11, 2009 06:20PM
OK

Went to the local market, pricings for data cables varied between 8 UKP and 4.50 UKP.

I picked up 2 DKU-5 (Nokia Data Cable Clones) and they gave the following results after testing using dmesg on linux, with no phone connected.

Cable 1:

[ 128.519590] usb 6-1: new full speed USB device using uhci_hcd and address 2
[ 128.737682] usb 6-1: configuration #0 chosen from 1 choice
[ 128.737688] usb 6-1: config 0 descriptor??
[ 128.829553] usbcore: registered new interface driver usbserial
[ 128.830231] usbserial: USB Serial support registered for generic
[ 128.831294] usbcore: registered new interface driver usbserial_generic
[ 128.831298] usbserial: USB Serial Driver core
[ 128.843054] usbserial: USB Serial support registered for ark3116
[ 128.843080] ark3116 6-1:0.0: ark3116 converter detected
[ 128.870105] usb 6-1: ark3116 converter now attached to ttyUSB0
[ 128.870124] usbcore: registered new interface driver ark3116

Cable 2:

[ 240.642002] usb 6-1: new full speed USB device using uhci_hcd and address 3
[ 240.801745] usb 6-1: configuration #1 chosen from 1 choice
[ 240.882162] usbserial: USB Serial support registered for pl2303
[ 240.883878] pl2303 6-1:1.0: pl2303 converter detected
[ 240.895178] usb 6-1: pl2303 converter now attached to ttyUSB0
[ 240.895193] usbcore: registered new interface driver pl2303
[ 240.895196] pl2303: Prolific PL2303 USB to serial adaptor driver

So DKU-5 is good for the chop job, it is interesting to note though that different clone manufacturers are using different USB/Serial chip sets. The pl2303 is very common, I have not come across an ark3116 as yet though, until now.

Both of these cables will be getting the chop over the coming week. The DKU-5 is due to be replaced by the CA-42 (Blue connectors) so either should do.

N.B. The CA-42 was not available from anywhere at the local market (went to 4 stall holders) and only one had the DKU-5. So if you can get some from t'internet for 3ukp a pop do it.

Hope this has helped with the original question.

Cheers

aka47


Necessity hopefully becomes the absentee parent of successfully invented children.
Re: How Can you Make a USB to TTL cable for Sanguino?
November 12, 2009 05:25AM
A quick further update.

Something to watch for with the DKU5's. Apparently the CA42's don't have this variability (the ones with the blue ends) but I hve'nt tested this as I dont have any of these cables.

I have now chopped the two cables and found some interesting differences.

The Nokia phone connector has a v-out connection which was intended to power the logic drivers on the USB end of the cable with the 3.3v battery voltage that the phone uses. I guess this makes sure that the serial comms to the phone works at whatever the battery voltage is currently at.

Some cables use this as per spec, so you need to feed some voltage back into the cable from the board end towards the USB end to get the serial to talk properly. ie connect the vout wire to a voltage source.

Funnily enough a bunch of cables don't work as per spec and can feed your board 3.3v (There is a voltage regulator in the USB/Serial circuit at the USB end that converts the 5v to 3.3v).

I have one of each cable, so something to watch for.

Interestingly enough both cables power the USB to serial chip proper from the USB 5v feed which is why both show up on the Dbus logging as per above.

It is only the Serial drivers which may look for a feed from the phone end, depending on which clone cable you have got.

You can tell if you have one which needs feeding voltage on v-out by metering the wires after you have chopped them. Put your meter on a voltage range to read 3.3v and try all wires to all wires. If you have one which needs a feed they will all appear to be floating (little or no voltage). Where as one which powers the logic drivers will show 3.3v at a number of the wires.

If anyone has tried with another make/model of cheap data cable I would love to hear about it.

A useful reference site for the DKU5 is:-

[wiki.gnokii.org]

and

[buffalo.nas-central.org]

and

[www.elotrolado.net]


Necessity hopefully becomes the absentee parent of successfully invented children.
Re: How Can you Make a USB to TTL cable for Sanguino?
November 12, 2009 08:44AM
DKU-2's are straight USB cables, DKU-5's are usb to serial, one thing to note AKA in the DKU5's the chip is the 3.3v version

DKU-5 Pinout

Additionally, the RTS and CTS signals are not fed through
The fact that DKU-5 cables are 3 bucks but our friendly arduino/sanguino suppliers keep selling us the very same cables with very same parts at 500% profit is just absolutely obscene!

12 bucks for a complete arduino clone
17-35 bucks for a freakin cable.

There is something horribly wrong with this picture. I'm all for making money, but price gouging is un-acceptable.
Re: How Can you Make a USB to TTL cable for Sanguino?
February 13, 2010 06:35PM
All the more reason to vote with our feet and give our readys to those who are not contrary to the cause.

The power of activism should never be underestimated.

Aquiesence is the greater evil.

On the DKU5, yes I have found that the majority are like this, the 3.xV is provided by a voltage regulator built into the the USB/Serial Chip.

3.3v to 5v (tx from cable/adapter to microcontroler) is easy as the 5v inputs will accept anything above a low level as high.

5v to 3.3 v (rx from microcontroler to cable) is just a voltage divider away (two resistors)

On the power line, open up the USB connector case disconnect the +v wire from the cable and patch it to the 5v coming from the PC. Ground is common anyway.

The alternative is to find another manufacturers data cable that is as cheep and cheerful and use that.

This forum space is eagerly awaiting this solution and input form anyone who can identify a ready source of cables that need less tweaking.

Cheers

aka47


Necessity hopefully becomes the absentee parent of successfully invented children.
Re: How Can you Make a USB to TTL cable for Sanguino?
February 23, 2010 01:59AM
aka47 et al,

I have successfully modified the CA-42 Nokia 6101 USB data cable to power the reprap motherboard. How do I know it was successful? I managed to successfully program the motherboard via Arduino IDE. smiling smiley
Regarding the CA-42 cable mod;
1. When I opened the "little plastic box" that contains the level converter PCB, all the pinouts were clearly marked.
2. The 5V supply had to be fed from the USB-A connector, effectively bypassing the PCB.
3. Curiously, the USB-driver that was supplied with the cable, did not seem to work. Not sure of that is a potential windows7 issue. I resolved this issue by letting windows search the internet for the relevant driver.

Best regards
Marius Botha
Pretoria, South Africa
[mariushermanbotha.wordpress.com]
Re: How Can you Make a USB to TTL cable for Sanguino?
February 24, 2010 07:04PM
Most excellent that is good news.

I am glad it is working for you. I have done similar here. If you are woried about the 5v on the micro's tx line (tx to host from microcontroler) you can use a simple voltage divider to convert the 5v putput of the micro to 3.xv that your CA-42 would normaly see.

the other way around (TX from host to microcontroler) should normally fine 3.xv is high enough to be seen as a logic 1 when it is not in a low or logic 0 state.

Cheers

aka47


Necessity hopefully becomes the absentee parent of successfully invented children.
Re: How Can you Make a USB to TTL cable for Sanguino?
March 17, 2010 08:27AM
worked for me as well. Cheap ca-42 cable ($1,80) from ebay.

Pinouts are marked with numbers on the PCB that (seem to) match the prolific 2303 data sheet.

"Seem to", because I could not get auto-reset working, even though RTS/DTR and so on should be available, but as I don't have a scope I cannot see what is going on.

I used (sanguino) TXD ->R200-> RXD (2303) ->R220->GND to get TXD to 2.6V max level.
Connected Sanguino RXD directly to TXD of the 2303.

Works perfectly, so thx ;-)

Edited 1 time(s). Last edit at 03/17/2010 08:28AM by icsmoke.
Re: How Can you Make a USB to TTL cable for Sanguino?
March 17, 2010 02:30PM
see this thread

and this photograph:

For the Sanguino, the Max232 is not needed. It helped that I ordered a bunch of FT232 chips a few months back. I made the PCB becouse I needed something to mount the tiny pins onto.

-julie
Re: How Can you Make a USB to TTL cable for Sanguino?
March 31, 2010 08:09PM
i have the CA 42 cable.
was wondering if i needed to feed the power from the usb to the MB, or should i feed from the PCB to the MB.

if i need to get power to the MB at all.

Can i just use the TX, RX and GND to the MB
Re: How Can you Make a USB to TTL cable for Sanguino?
March 31, 2010 08:45PM
For pure serial comms, Gnd RX and TX IS enough.

If you want to power your board from the Host you need Vcc (whatever Vcc is for your board ie 5v or 3.6v etc)

Depends what you want.


Necessity hopefully becomes the absentee parent of successfully invented children.
A cool thing to do too is to put two LEDs on two of the pins. One will tell you transmitting and the other receiving. I use blue and red LED's to differentiate. This way I know who's talking to who visually (albeit it is fast).

Pin 22 to the red led through a 500 ohm resistor to Vdc.
Pin 23 to the blue led through a 500 ohm resister to Vdc.

Outside of that it is only a couple of capacitors to ground and two series resistor to Txd and Rxd. I have a schematic but have no way to show it here if anyone is interested.

email me at parky36@covad.net if you want more information. Mine works very well and have had no problems with it at all.

You also need the RTS# to go out to pin 6 of the connector. Reason is your board will not be recognized if a return is sent and the ATMega does not do anything. I know, could not burn a boot loader because a scratched trace on my extruder board that kept the Arduino software issuing a -rc error.Run that RTS# pin 3 from the FT232R through a .1 ufarad capacitor to the reset pin on your ATMega processor. That series capacitor should already be on your motherboard and yhe extruder board too. Just make sure it is there it only needs to be a short pulse.
we supply this cable, www.sunider.com
Sorry, only registered users may post in this forum.

Click here to login