USB to RS485 and back to USB

Thread Starter

fattiereturns

Joined Feb 27, 2019
5
Evening all, hope you're well and enjoying the weather, however that may be in your particular post code!

I'm looking for a little assitance with remotely controlling a Sony camera through it's USB connection, but looping it all into existing RS485 architechture.

Essentially, a bunch of existing RS485 items are controlled and monitored remotely through a 300 metre cable. I could have run a USB cable alongside, which no, I couldn't, :( and hence the issue. There are two spare RS485 inputs on the slave side. I'd like to convert the Sony camera's USB data connection to RS485 in order that it can join this network through the spare connection and hence achieve full remote control of the camera, as if it we connected straight into a laptop.

At the master end, there is a spare connector where I can retrieve the RS485. Plan is to re-convert this to USB for plugging into laptop and hence mimic the remote control function for the camera was intended.

My time with the real unit will be limited to an extent, so I'm trying to mock it up to at least have the concept operating prior to approaching the real life system.

The mock-up / test spread I have is as follows.

Sony RX100V > USB CABLE > 1st RS485 CONVERTOR (LINK BELOW) > 3 way cable (A to A, B to B, GND to GND) > 2nd RS485 convertor > USB > LAPTOP (port software undetermined currently).

RS485 CONVERTOR

Some of the parts have arrived, just waiting for a cable that I can butcher to artificially feed the 5v that the camera is anticipating through USB, so it recognises that it's been plugged into something.

I'm not 100% green on such issues, played with modbus and RS232 at technician level but that was 20 years and many beers ago so really hoping for some guidance..! I'm back messing with such things so looking forward to getting back into it, with a little help.

Thanks for your help folks, much appreciated! :cool:
 

Ya’akov

Joined Jan 27, 2019
9,068
When the camera is plugged in directly, what does its interface look like? Is it a serial port, or does the software use a proprietary driver to talk to the camera?
 

dendad

Joined Feb 20, 2016
4,451
You may have to use an Arduino or PIC or some other micro to interface between the RS485 network and the camera USB. Probably the biggest problem will be the protocol the camera talks. Do you have any info about that?
It is not just a case on converting from RS485 serial to USB.
 

MrChips

Joined Oct 2, 2009
30,706
You cannot do that in any simple manner.
RS-485 is a physical protocol that defines the voltage levels. It does not describe how the data is packaged and encoded.

USB is both a physical protocol and a data encapsulation protocol. To convert from USB to RS-485 you would have to unpack the transmitted data, convert it to a data protocol, send it via RS-485, and do it all in reverse back to USB.
 

Thread Starter

fattiereturns

Joined Feb 27, 2019
5
When the camera is plugged in directly, what does its interface look like? Is it a serial port, or does the software use a proprietary driver to talk to the camera?
Sorry, this is above my pay-grade. I plug a USB micro into the camera and other end into the laptop, and I can control all aspects of the camera remotely. If there's a way I can find this out, I'd be glad to. Thanks for responding!
 

Thread Starter

fattiereturns

Joined Feb 27, 2019
5
You may have to use an Arduino or PIC or some other micro to interface between the RS485 network and the camera USB. Probably the biggest problem will be the protocol the camera talks. Do you have any info about that?
It is not just a case on converting from RS485 serial to USB.
Thanks for that. So what exactly is the USB to RS485 convertor doing, if not converting the data? Thanks for your help!
 

Thread Starter

fattiereturns

Joined Feb 27, 2019
5
You cannot do that in any simple manner.
RS-485 is a physical protocol that defines the voltage levels. It does not describe how the data is packaged and encoded.

USB is both a physical protocol and a data encapsulation protocol. To convert from USB to RS-485 you would have to unpack the transmitted data, convert it to a data protocol, send it via RS-485, and do it all in reverse back to USB.
Thanks. The project is quite important so we're open to looking at whatever it takes to get it working. What high level architecture would you suggest? Thanks again!
 

pmd34

Joined Feb 22, 2014
527
Hi fattiereturns, aside from actually how to carry out USB to rs485 interfacing, I would be surprised if RS485 has a high enough data rate to be able to cope with images. I think you would be better off looking at an alternative, like a USB RF transmitter or some such.
 

Ya’akov

Joined Jan 27, 2019
9,068
Sorry, this is above my pay-grade. I plug a USB micro into the camera and other end into the laptop, and I can control all aspects of the camera remotely. If there's a way I can find this out, I'd be glad to. Thanks for responding!
Here’s the reason I ask. The converter you are buying is most likely an FTDI chipset, or clone, offering a serial interface (COM port) which can communicate over RS-485. That is, most things using RS-485 on computers plug into serial ports and the application software that uses them expect that.

A USB to RS-232 adapter creates a virtual serial port on the computer that application software can talk to as if it was hardware. The other end is usually a DB9 connector, and it talks RS-232. An RS-485 adapter creates a virtual serial port as well, and software intended to talk to it doesn’t see some application specific interface, it sees a “COM” port, a serial interface.

If the camera uses a virtual serial interface, it might work. This is not impossible, but it is unlikely. I have a couple of Sony cameras (A6000, A6300) and the software doesn’t require selecting a COM port, which is a sign that it isn’t using one. In addition, the data rate of a COM port is on the low side.

I’m sorry to say this is probably NOT going to be a solution for you. The USB adapter plugged in the computer will set up a COM port, and the one on the camera side will do nothing. Running the software will fail to find the camera. Without some major development you will not be able to control the camera over RS-485.

In particular, developing simple controls for focus and shutter release would be reasonably easily. Adding zoom would be possible but very difficult, and adding live view would be practically impossible. I wish I had better news.
 

Thread Starter

fattiereturns

Joined Feb 27, 2019
5
Thanks for your responses folks, very much appreciated. We will contact the owner of the intervening cable to see if there are any spare twisted pairs in there, to free us up to use alternative method.

Really appreciate you taking the time to help!

Richard
 

Kjeldgaard

Joined Apr 7, 2016
476
The task sounds like some USB Extender over twisted-pair cables.

The twisted pair is likely to be almost any quality cable with 110 to 120Ω impedance (RS422, RS485 or Ethernet).

A very short search gave many hits, with up to 100 meters distance on Ethernet cables.
 

Ya’akov

Joined Jan 27, 2019
9,068
Thanks for your responses folks, very much appreciated. We will contact the owner of the intervening cable to see if there are any spare twisted pairs in there, to free us up to use alternative method.

Really appreciate you taking the time to help!

Richard
Depending on the type of cable, distance, and numbers of pairs available, you might be able to adapt one of the several USB via CAT5 extenders available for things like the A/V installation industry. This would be a kludge, though, and might not work reliably or at all.

Your problem is in two areas: the camera’s interface and the Sony software. The entire remote control mechanism is designed for a different purpose than you are proposing. Even if I could specify a new camera, I couldn’t get you live view without more cabling.

@MrChips recommendation of fiber is excellent and if you are going to run anything new, I would do that. It will work (with the proper transceivers) for almost anything you settle on from USB to Ethernet, it is immune to noise, and it is very low profile.
 
Top