Im SOO close! Need help communicating with Sony Visca PTZ camera over RS-232

I am working on a project to interface the Sony Visca protocol to control robotic cameras.

I am using a Teensy++ 2.0 with a AT90USB1286 chip http://www.pjrc.com/teensy/.

I am SOO close to getting the camera to move on command from Teensy. But have hit a brick wall. I have limited programming skills and this is my first REAL AVR project… Can anyone help me around this???

All I need to do is send byte commands over the Teensy++ UART HardwareSerial. I am using a MAX232 TTL logic converter. But, all the MAX232 boards come with a female RS-232… Seem odd since, with the Teensy++ being the DTE, shouldn’t it be wired with a male 9P Sub-D RS-232 port?

I just assumed I could just solder a male connector to the existing female solder pins.

here is where I am stuck… If I attach the device to a computer, using the female port, I am getting perfect readouts in serial terminal on computer and also receive responses from the computer to Teensy just fine. And, if I connect the camera (with female rs-232 cord) to the computer, I get full control and readouts from camera on computer. But, if I connect the camera directly to my “piggybacked” male RS-232 output, the camera ignores the Teensy completely.

I am so close! Yet, a total newb to AVR and so far away I have a lot riding on this project! HELP!!! TIA!

BTW: A very detailed manual for Visca commands and cables on a camera like mine here: http://www.lapsi.eletro.ufrgs.br/projetos/altavision/FCB-IX470.PDF

Here is the Visca cable pinout I am using now, except with a male 9P Sub-D
http://www.axis.com/techsup/cam_servers/ptz/img/sony_g20_vs.gif

TIA!!! I have a LOT riding on this project and many people waiting on me!

Is it possible that RX and TX are swapped?

Hmm, DB connectors, oh yes I remember them.

They used pins 2 and 3 for Rx and Tx but you never really knew which was used for which because some people wired the plug/socket as DTE and some as DCE, so with no documentation you had to either test the plug or just try both ways until it worked.

So I’d try swapping pins 2 and 3 (assuming the standard pinout was used).


Rob

Thanks for the tips. I am testing the pins now. Actually. I do have a very detailed manual and pics of the pinouts (see OP) but im still taking this slow and hardly understanding it. This is a $10k camera!! One thing I know is that it appears to use DTR/DSR handshaking. So how do I manage that with only a Tx and Rx pin? Should I just jump the pins or will the MAX232 take care of it?

An old sony group that might be of interest. If you want to use all the functions available to the cam, then you will probably have to implement the hardware hand shaking. If you want to just use a simplified subset, then you might get away with the tx/rx, and the hand shaking pins jumpered.

http://tech.groups.yahoo.com/group/EVI-D30/

Thanks for the group! I tried to join but the moderator has to review my application... Ugh... so hard somethimes. When connected to the computer, the camera send 3 bytes "90 03 FF" or something like that. I am just trying to get that to show on my Arduino serial monitor window. I have tried crossing wires and jumping the rts/cts. Now I will try jumping dtr/dsr?

If possible try to turn off hardware handshaking to start with and run at the lowest possible baudrate. In that situation you need 3 pins Tx Rx and Gnd. If its not working you reverse Tx and Rx. Once you have the system working without handshaking you can try introducing it and then increasing the baudrate.

You can get breakout boxes, some quite inexpensive, that allow you to easily patch pins and they have LEDs to show activity. The LEDs can be very informative especially at low baudrates. If you have a lot riding on this then a breakout box might be worth getting.

You are right that you are very close.