Beginnings of my Arduino PAN/Tilt/Zoom camera controller

I have gotten through the second stage and have the Sony EVI-401 NTSC camera mounted a top the servo Pan/Tilt. We can now adjust (with fair repeatability) the camera angles. Videos to follow. The controls so far are 2 switches for zoom in/out and non centering joystick.

Next step is integrating IMU to stabilize it on a moving platform... Just showing off what I thought I could not do.

PTZ1.jpg

PTZ.jpg

where did you get that camera the zoom seems to be very good

I used to install CCTV cameras and have made a hobby of cameras as well. I probably have 2-3 more SIMILAR zoom cameras which can be zoomed with a button or Serial interface. The camera shown is a SONY EVI-401 (only 8X zoom) no digital zoom. I have a 230X zoom one for the final project.

Thanks for the comment.

It will be fun to try and get it stabilized. I'll be using the MiniIMU9

I love it! I am re-writing a a robotic video compression suite and I think this is exactly what I need. How did you interface the zoom functionality to the arduino? I have been looking at a lot of security cameras that use the Pelco-D protocol but they require an RS-458 serial connection to send the data across. The origional suite was written in player/Stage for a robotics competition last year.. Problem with player is that it was not meant for streaming video and drops frames which very bad for mpeg4 compression. Hence the re-write. Along with the rewrite, however, I am looking to add better PTZ functionality and higher resolution cameras; the last one used a logitech orbit which is not incredibly fancy.. the PT is easy using an arduino and a couple of servos but interfacing the zoom capability is what is tripping me up. Can you post your wiring schematic for the final camera and the final camera you used? Maybe the code as well?

I read the schematic for the EVI-401 did you send the commands to the camera via the RS-232c, the TTL, or the VISCA interface?

When I get around to writing the camera suite, I will be sure to let you know...

Any luck on this project? I'm looking to do the same thing for an exhibit at my science center. I'd like to create my own controller using kid-proof arcade joystick and buttons from Suzo Happ, then forward the input to the Sony PTZ camera using an Arduino and a 232 chip

Many thanks for any help you can provide, I hope to share the final code since it looks like other folks are trying the same thing...

how did you able to interface to zoom in and out?

I'm a total newb with Arduino, and want to control a VISCA camera from a CCTV surveilance system DVR. Need a lot of guidance and advice. At minimum I want to receive RS485 Pelco-D commands and control a Sony EVI-D30 using VISCA protocol over RS232 to the camera. I have serial cabling between my PC and the camera working with Sony's VISCA demo control program, so I've proven the communication and cabling to the camera works. Now I need help with the protocol conversion and the interfacing (MAX232 and MAX485?)

Much appreciate any help!

Blair

You post reminded me of an earlier thread I still had open in my browser. I see you're already aware of it.

I know the other thread has links to some documentation on these sorts of protocols, but it would probably be a good idea to add links here to the devices you want to use.

I'd think you'd want to use an Arduino with multiple UARTs such as a Mega. RS485 driver ships are pretty easy to come by. Converting RS485 to/from RS232 shouldn't be hard. It's just a matter of having the right chips.

What sort of input device were you thinking of?

I recently worked on some joystick/servo code and I used this joystick to control a little pan/tilt gizmo.

The code I used (and a links to a couple videos showing the code in action) can be found here.

Other control options were discussed in this thread.

I'm not sure what sort of option you have I think it's really nice to be able to use the joystick to control either the position of the camera or the speed of the camera.

Do you have an Arduino in mind for this project? As I mentioned earlier, I think you want an Arduino with multiple serial ports.

Here are the images attached to the top post.

079bf9b4d121d9f5175b10dfd2a4a2af47929f9a.jpg

7945818a7f77caa86df4bbc7c2c4b724ed9b1a17.jpg

How to insert uploaded images.

DuaneDegn:
You post reminded me of an earlier thread I still had open in my browser. I see you're already aware of it.

I know the other thread has links to some documentation on these sorts of protocols, but it would probably be a good idea to add links here to the devices you want to use.

I'd think you'd want to use an Arduino with multiple UARTs such as a Mega. RS485 driver ships are pretty easy to come by. Converting RS485 to/from RS232 shouldn't be hard. It's just a matter of having the right chips.

What sort of input device were you thinking of?

I recently worked on some joystick/servo code and I used this joystick to control a little pan/tilt gizmo.

The code I used (and a links to a couple videos showing the code in action) can be found here.

Other control options were discussed in this thread.

I'm not sure what sort of option you have I think it's really nice to be able to use the joystick to control either the position of the camera or the speed of the camera.

Do you have an Arduino in mind for this project? As I mentioned earlier, I think you want an Arduino with multiple serial ports.

For the input, I'm using a CCTV security DVR system which is designed to control PTZ security cameras via RS485 using the Pelco-D protocol. There is a web interface which has a menu that allows you to control the camera(s) via the computer keyboard.

I'm planning to use the Arduino Mega 2650, since it has 4 UARTs on board, which will allow me to use a MAX485 module to receive the Pelco protocol RS485 commands from the CCTV security DVR system on one UART, translate the Pelco commands to Sony's VISCA protocol and send that out a different UART via a MAX232 to control the Sony VISCA PTZ camera (EVI-D30).

Yes, I know that it would be simpler to just buy a camera that can understand Pelco over RS485, but I already own several of the Sony EVI-D30 VISCA PTZ cameras, and really want get them working. There is one user on the Blog called "Sathopper" who posted part of the code (just the part that decodes the Pelco commands), but he never got around to posting the full Arduino sketch with the code that controls the Sony VISCA cameras, and I have not been able to locate any e-mail address or other contact information for him.

Any help anyone can provide that gets me closer to the solution would be most sincerely appreciated, as I'm a hardware guy, who struggles with the programming part. :slight_smile:

Thanks!!