How can i control my Pan Tilt Pod 5 metres along from my PC

Hi bro,
I'm a beginneer in electronic design and i've just already build my tiny project with arduino :

Pan-Tilt Servo motor <---------> Arduino <----------> PC

My problem is like in this thread
http://arduino.cc/forum/index.php/topic,96227.0.html

So i want to remote control the Pan-Tilt Pod from my PC , with 5 metres length USB cable from my PC to Arduino board.
Could i use the USB cable to lengthen the Pan-Tilt Pod. Or is there any other solution ?

Please help me , thanks u so much :slight_smile:

So i want to remote control the Pan-Tilt Pod from my PC , with 5 metres length USB cable from my PC to Arduino board.

How can i control my Pan Tilt Pod 10 metres along from my PC

I'm not sure how a 5 meter cable is going to stretch to 10 meters...

PaulS:

So i want to remote control the Pan-Tilt Pod from my PC , with 5 metres length USB cable from my PC to Arduino board.

How can i control my Pan Tilt Pod 10 metres along from my PC

I'm not sure how a 5 meter cable is going to stretch to 10 meters...

Sorry bro,
really i'm using a 5m USB cable for my project, but each time i try to control my Pan Tilt Pod, the system has disconnected /dev/ttyACM0 and register a new /dev/ttyACM1 ...
the dmesg is looked like below:

Mar 13 16:37:36 Chicken kernel: usb 4-1: USB disconnect, address 66
Mar 13 16:37:37 Chicken kernel: usb 4-1: new full speed USB device using uhci_hcd and address 67
Mar 13 16:37:37 Chicken kernel: usb 4-1: New USB device found, idVendor=2341, idProduct=0043
Mar 13 16:37:37 Chicken kernel: usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=220
Mar 13 16:37:37 Chicken kernel: usb 4-1: Manufacturer: Arduino (www.arduino.cc)
Mar 13 16:37:37 Chicken kernel: usb 4-1: SerialNumber: 74937303936351512230
Mar 13 16:37:37 Chicken kernel: usb 4-1: configuration #1 chosen from 1 choice
Mar 13 16:37:37 Chicken kernel: cdc_acm 4-1:1.0: ttyACM1: USB ACM device

Could you tell me what is my problem here ?

Could you tell me what is my problem here ?

Must be the blue shirt you are wearing. Try a green one.

See, that answer makes as little sense as your question. Not that there is a problem with the question, but there is absolutely no context for it, and it is completely unrelated to how to use a 5 meter cable to stretch 10 meters.

What operating system are you using? Clearly, it isn't windows.
What application are you trying to use to talk to the serial port?

Instead of a long run of USB cable, you should try the long run of wire using regular wire between the arduino and servos. I've used cat3 four conductor wire to control servos at a distance. One conductor for common ground, one conductor for servo power, and the remaining two wires for the servo PPM control signals.

PaulS:

Could you tell me what is my problem here ?

Must be the blue shirt you are wearing. Try a green one.

See, that answer makes as little sense as your question. Not that there is a problem with the question, but there is absolutely no context for it, and it is completely unrelated to how to use a 5 meter cable to stretch 10 meters.

What operating system are you using? Clearly, it isn't windows.
What application are you trying to use to talk to the serial port?

Thanks Pauls, sorry for my missing,
i'm using CentOS 6 and using qextserialport class in Qt to talk to the serial port.

Here is a part of my code in Qt (just do as some guide on the internet)
void ControlWidget::initPanTilt()
{

  • port = new QextSerialPort("/dev/ttyACM0");*
  • port->setBaudRate(BAUD9600);*
  • port->setFlowControl(FLOW_OFF);*
  • port->setParity(PAR_NONE);*
  • port->setDataBits(DATA_8);*
  • port->setStopBits(STOP_2);*
  • if (port->open(QIODevice::ReadWrite))*
  • {*
  • cerr << "Opened ttyACM0" << endl;*
  • }*
    }
    void ControlWidget::PanLeft()
    {
    _ if (*panPos >= 0x05)_
  • {*
    _ *panPos = *panPos - 0x05;_
  • }*
  • else*
  • {*
    _ *panPos = 0x00;_
  • }*
  • writePanTilt();*
    }
    void ControlWidget::PanRight()
    {
    _ if (*panPos <= 0xaf)_
  • {*
    _ *panPos = *panPos + 0x05;_
  • }*
  • else*
  • {*
    _ *panPos = 0xb4;_
  • }*
  • writePanTilt();*
    }
    void ControlWidget::TiltDown()
    {
    _ if (*tiltPos >= 0xba)_
  • {*
    _ *tiltPos = *tiltPos - 0x05;_
  • }*
  • else*
  • {*
    _ *tiltPos = 0xb5;_
  • }*
  • writePanTilt();*
    }
    void ControlWidget::TiltUp()
    {
    _ if (*tiltPos <= 0xf5)_
  • {*
    _ *tiltPos = *tiltPos + 0x05;_
  • }*
  • else*
  • {*
    _ *tiltPos = 0xfa;_
  • }*
  • writePanTilt();*
    }
    void ControlWidget::writePanTilt()
    {
  • if (port->isOpen())*
  • {*
    port->write(reinterpret_cast < const char* >(panPos), 1);
    port->write(reinterpret_cast < const char* >(tiltPos), 1);
  • port->flush();*
  • }*
    }

everything work fines with the 1m usb cable but when i try to use 5m usb cable, the problem is same as i've describe before.
Is it the problem with length of the cable ?

zoomkat:
Instead of a long run of USB cable, you should try the long run of wire using regular wire between the arduino and servos. I've used cat3 four conductor wire to control servos at a distance. One conductor for common ground, one conductor for servo power, and the remaining two wires for the servo PPM control signals.

Hi zoomkat,
i also thinked as same as what you're thinking but my problem is:
this Pan-Tilt Pod is used for bear a USB camera. This camera i've used 5m cable to extend already.
And i want to anchor the Arduino with the Pan-Tilt Pod, finally i have to use 2 5m USB cable for my PTZ camera system :D.
If i use ethernet cable for extend the length between Servo and Arduino, my system becomes distributed, one end have Servo+USB Camera, one end have Arduino , also 2 cable type (USB + CAT)

I've just try to use 3m USB cable but the problem is still appear.. May be i have to try an anti-noise USB cable :frowning:

How are you powering everything?

dxw00d:
How are you powering everything?

The Arduino UNO is powered via USB cable only . I've check that the Vcc is about 7.5V. Is there a problem here

The Arduino UNO is powered via USB cable only . I've check that the Vcc is about 7.5V. Is there a problem here

The USB voltage is supposed to be 5.0. If you are getting more than that anywhere, yes, there is a problem.

PaulS:

The Arduino UNO is powered via USB cable only . I've check that the Vcc is about 7.5V. Is there a problem here

The USB voltage is supposed to be 5.0. If you are getting more than that anywhere, yes, there is a problem.

Thanks everybody,
i've found the solution for my problem:

I've check that the Vcc is about 7.5V

Sorry for my missing, it isn't 7.5V for my USB port, just because the error of the volt meter. Use anther voltmeter , it is 5V normally.

After that, i've used the 12V-2A external power for Arduino Uno board. and everythig work fine .

In conclusion, it is the Power problem