Jump to content

USB to custom 25 pin RS232


bishbosh

Recommended Posts

Slightly off topic, but I thought this was my best chance of getting help!

I need to make up a 25 pin Rs232 cable with custom pin outs so I can drip feed G code to my CNC Mill. :D :D

I thought it would be as simple as get on RS's web site and order a bit of cable and a plug, fire up the soldering iron and away I go.

However, I cannot find "blank" plugs anywhere.

Can anyone point me in the right direction?

Thanks,

Bish.

Link to comment
Share on other sites

Link to comment
Share on other sites

That's fantastic guys, thanks!

Silly old me was searching for terms like "RS232 plug" or RS232 case" when obviously (?) I should have been searching for a "D-sub connector backshell" :unsure::wacko:

So it's the 25 way D-type plug you are after?

Yep :) Need a 25 pin male plug, a suitable cable and then I'll buy a USB to 9 pin and 9 pin to 25 pin converter... Unless someone knows how to wire a USB cable to an RS232?

CNC Mill - more info needed! What controller is it - Anilam?

Don't get too excited - it is only an 'icke Denford Triac with ATC running FANUC OM-C control :)

Link to comment
Share on other sites

RS232 is the specification for the type of signalling used. It can be carried by any connector - even cables in screw terminals in some cases.

It is true that one of the more common connectors is a 9-pin D-sub type connector, although it was the 25 pin D-sub type that was originally recommended. You should check the pinout of your 25 pin D-sub to ensure that it is actually a normal implementation.

The best USB-RS232 adapters use chips made by FTDI. Make sure you get one, you could save yourself a world of pain.

If you fancy some light reading material: https://en.wikipedia.org/wiki/RS-232

  • Like 1
Link to comment
Share on other sites

We use these, they have TTL, RS232 and RS485 options so cover most bases. As TRE says, only trust FTDI chips for a stress-free life.

http://www.ebay.co.uk/itm/260836648666

A quick scan of ebay reveals a hell of a lot of the claimed FT232 adapters are only TTL (5v) level and not actual RS232 output which probably isn't what you want.

Serial ports used to be 25-pin but I'd never trust a CNC machine to use a standard pinout so best to RTFM. Also check if it needs the extra pins like RTS/CTS.

If it does turn out to be standard, these are a bit more with the postage but could save the wiring job:

http://www.ebay.co.uk/itm//151295973028

Link to comment
Share on other sites

The device fridge has shown is a USB to rs232 converter, a USB lead connects at one end from your PC, magic happens in the ftdi chips, and it comes out of the 9 pin D shell as rs232 to allow your PC to connect using that protocol. It requires drivers to be installed but works very well. The Easysync stuff I use is probably almost identical inside. RS232 can work over just three wires depending on the implementation.

Link to comment
Share on other sites

Fridge, how does the "thing" :ph34r: you linked to work?

Pretty much as Jonnie R says. It can convert to 3 different standards, really just the same thing but at different voltages so beware! The 9-pin connector is an RS232 port, you need to move the two little black jumpers on the board over to make sure it's in RS232 mode. The 4 pins along one edge are 5v (also called TTL) level, and the screw terminals are RS485 which is a more robust/long distance version of RS232.

The chip talks USB and adds itself as an extra serial port on your PC, you can force it to a particular COM: port number etc. through device manager, but hopefully won't need to tinker too much. The nice thing about FTDI is their software is good and the driver recognises the chip every time & puts it back on the same COM port, whereas other types change to a new an unexpected COM port every time you plug them in or reboot the computer <_<

Link to comment
Share on other sites

In terms of leads, you would probably be best off just buying a 9 way to 25 way RS232, and get each end to match the gender, the 9 way would then plug into your USB converter and hopefully Bob's you uncle and Dick's a close relative. RS or Maplin would do these, or I suspect Fleabay.

The diagram on the last post of the thread you linked to gives you everything you need to make your own cable though

Link to comment
Share on other sites

OK, so I have ordered one of Fridge's gizmos and my shopping list at RS looks like this:

771-8275

771-8278

740-1185

740-1172

I have an old printer cable so I was going to pinch that for the cabling itself. I have loads of long USB cables so no need to shop for those. :)

Does my list look OK? :blink:

Anything else I should add to the order?

Link to comment
Share on other sites

Yep, that looks fine. I take it you have all the soldering gear that you need and a test meter to check it?

I don't know what you are like at soldering but if you aren't particularly experienced it can be helpful to have the opposite type plug as well. You can then plug the two together and it can stop the pins moving in the plastic if you take a bit too long with the soldering iron.

Not sure if I explained that properly....

Link to comment
Share on other sites

OK, so I have ordered one of Fridge's gizmos and my shopping list at RS looks like this:

771-8275

771-8278

740-1185

740-1172

I have an old printer cable so I was going to pinch that for the cabling itself. I have loads of long USB cables so no need to shop for those. :)

Does my list look OK? :blink:

Anything else I should add to the order?

Just make sure you have the right USB lead, it's not the standard type A rectangular on the serial converter by the looks of it, you would need a type A male to type B male. These leads are quite often used on printers and other USB accessories.

Link to comment
Share on other sites

OK, so heading out into the garage in the morning no all the bits have turned up..... watch this space!

On a separate note, all all contact cleaners equal? the machine has a keypad whose buttons are temperamental - I can clean them with contact cleaner and they work for a while, then they stop again (random buttons, not all at once)

The contact cleaner I use is this stuff:http://www.screwfix.com/p/wd-40-specialist-contact-cleaner-400ml/92716?kpid=92716&cm_mmc=Google-_-Product%20Listing%20Ads-_-Sales%20Tracking-_-sales%20tracking%20url&kpid=92716&cm_mmc=Google-_-Shopping%20-%20Auto%20and%20Cleaning-_-Shopping%20-%20Auto%20and%20Cleaning&gclid=CjwKEAjwyYCgBRCMmbWl5beV_RQSJABESqHALNTsCqTNXaOm1vW3YxoILABb0ZICOA7-4cM87LafkhoCWQrw_wcB

Is it any good? Anything better? Any tips for keeping the buttons working?

Link to comment
Share on other sites

So helpful Mr Hell :P

So I tried a bit of soldering yesterday and have decided I am too ham fisted and also do not have the right tools. Ended up with about 4 pins soldered together and the one wire I was trying to connect came out!

So, anyone interested in a small commission? Beer tokens waiting.......?

Link to comment
Share on other sites

  • 4 weeks later...

Well, exciting and yet frustrating times!

Got a lead made up by a local firm and one of the converters Fridge pointed me at.

Connected it all up and sent a one line programme from the laptop to the mill and nothing. :( Well, I say nothing but the machine new I was trying to send something as it exited DNC mode when I pressed send on the laptop.

Anyhow, a bit of head scratching later and I realised that FANUC is case sensitive. Bingo! one line program received and run perfectly.

However, here is where the frustration starts - i wrote a larger programme (8 lines). The machine receives a few lines and actions them but then pauses with the "BUF" warning lit on the screen. The DNC software on the laptop shows a partially sent programme - obviously waiting for the machine to say send some more. Anyhow, if I cancel on the laptop the mill then executes the next few lines of code - similar amount of bytes as the first portion.

So I think I need to disable the FIFO on the widget that Fridge pointed me at but there doesn't seem to be a setting for that? Any clues how I might do it? The FANUC control only has a 10 character buffer apparently and windows has more?

Can you tell I am out of my depth here? :hysterical: :hysterical:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We use cookies to ensure you get the best experience. By using our website you agree to our Cookie Policy