Shop OBEX P1 Docs P2 Docs Learn Events
Long USB cable to Propeller causes servo Jitter — Parallax Forums

Long USB cable to Propeller causes servo Jitter

theMoshitheMoshi Posts: 9
edited 2015-01-19 20:55 in Propeller 1
Hello folks,

I have an unusual problem. I have the Propeller Servo Controller 28830 connected to my Ubuntu PC via an approx 2 feet long USB cable. Everything works fine, my servos behave precisely as they are instructed to.

If I connect via 6 feet long USB cable (needed for my project), the servos start jittering randomly.

Any thoughts anyone?


Thanks,
Moshi

Comments

  • Clock LoopClock Loop Posts: 2,069
    edited 2015-01-17 01:15
    How are you powering the circuit?

    How many servos are you running?

    If its powered from the usb, are you using a laptop?
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2015-01-17 01:21
    theMoshi wrote: »
    Hello folks,

    I have an unusual problem. I have the Propeller Servo Controller 28830 connected to my Ubuntu PC via an approx 2 feet long USB cable. Everything works fine, my servos behave precisely as they are instructed to.

    If I connect via 6 feet long USB cable (needed for my project), the servos start jittering randomly.

    Any thoughts anyone?


    Thanks,
    Moshi

    Are you saying that the servos are powered from the USB cable because if that's so then you you should be aware that most USB cables are not rated as charger cables in that there is too much of a voltage drop when you start drawing a bit of current. I've had a whole consignment of cables that I've had to bin because they ended up dropping around 1V @200ma and there is no way to tell when you order them either. But the long and the short of it (excuse the pun) is that a short cable will have less voltage drop of course. I have a tester made up just for checking USB cable voltage drops.
    You can try compensating to a limited extent by placing a suitable capacitor of around 470uF across the 5V supply. Don't make the mistake of adding too much capacitance though.
  • theMoshitheMoshi Posts: 9
    edited 2015-01-17 08:53
    Clock Loop wrote: »
    How are you powering the circuit?

    How many servos are you running?

    If its powered from the usb, are you using a laptop?

    Servo power is coming from a 5v power adaptor (http://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?productId=1940571). One end is connected to a wall power socket, and the other end goes into the PSC's (Propeller Servo Controller) power port for servos (there's a + and - port on the device for power suply to servos http://media.digikey.com/Photos/Parallax%20Photos/28830.JPG).

    There 4 servos connected at the moment (I'd eventually like to connect more).

    The PSC is connected to the PC via USB for connectivity purposes only. Is it drawing current for the servos from ther as well?
  • theMoshitheMoshi Posts: 9
    edited 2015-01-17 08:58
    Are you saying that the servos are powered from the USB cable.

    No good sir, I have this power adaptor connected to the PSC (Propeller Servo Controller): http://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?productId=1940571 And the other end is connected to a wall power socket.
  • PublisonPublison Posts: 12,366
    edited 2015-01-17 09:47
    theMoshi wrote: »
    Servo power is coming from a 5v power adaptor (http://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?productId=1940571). One end is connected to a wall power socket, and the other end goes into the PSC's (Propeller Servo Controller) power port for servos (there's a + and - port on the device for power suply to servos http://media.digikey.com/Photos/Parallax%20Photos/28830.JPG).

    There 4 servos connected at the moment (I'd eventually like to connect more).

    The PSC is connected to the PC via USB for connectivity purposes only. Is it drawing current for the servos from ther as well?

    The USB connectoin does not supply power to the servos.

    I would try another cable, or another USB port.
  • theMoshitheMoshi Posts: 9
    edited 2015-01-17 10:29
    Publison wrote: »
    The USB connectoin does not supply power to the servos.

    I would try another cable, or another USB port.

    I treid USB cables of varying length and different ports. The shortest one is the only that doesn't result in servo jitter :(
  • theMoshitheMoshi Posts: 9
    edited 2015-01-17 10:33
    I've also tried placing the PC with a Raspberry Pi, connected to the PSC with a short (2ft) long USB cable, but still saw the jitter. This leads me to think there may be some disruption/disturnabce with varying USB lengths as well as the PC its connected to?

    Not sure if that helps, I'm just trying to provide as much info as possible. Please let me know if any additional details are needed. I can also provide pics/videos showing the setup and the issue.

    Greatly appreciate all the replies!
  • DomanikDomanik Posts: 233
    edited 2015-01-17 13:57
    You might check your grounds between boards, either with a DVM or connecting additional thicker ground wires.

    With a DVM measure DC voltage difference with Plus on your computer frame and Minus on your USB shell, and then to the grounds on all boards. This should be both DC and AC readings in the 100mv region.

    My concern is that the PC +5V does go over the USB cables to boards and connects with the wall socket +5V power supply you're using. This might force return currents over the small wires in the USB cables causing drops and thereby offsetting thresholds when a longer cable is used. Basically two +5V power supplies fighting each other.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2015-01-17 14:38
    Looking at the photo of the PSC, it appears that the USB connector's shell is connected to Vss. Since the shell is also connected to the cable shield when a cable is plugged in, connecting it to Vss is a definite no-no. What results is an ineffective cable shield, because it's carrying ground return currents. The shell on the USB slave end is supposed to be left floating.

    I'm not saying that this is the sole cause of your problems, but it could definitely be a contributing factor.

    -Phil
  • theMoshitheMoshi Posts: 9
    edited 2015-01-19 20:01
    Thanks everyone for the help.

    Through trial and error (and indication from Domanik that my power sources were fighting over each other), I was able to solve by providing dedicated 5v power to the Propeller Servo Controller, in addition to the power its drawing from the usb port of the PC (in addition to the power coming from the wall socket). I can't explain the electronics, but I'm guess the longer the usb cable, the more amps is sucked??

    Anyhow, no more jitter! Thanks again.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2015-01-19 20:55
    theMoshi wrote: »
    Thanks everyone for the help.

    Through trial and error (and indication from Domanik that my power sources were fighting over each other), I was able to solve by providing dedicated 5v power to the Propeller Servo Controller, in addition to the power its drawing from the usb port of the PC (in addition to the power coming from the wall socket). I can't explain the electronics, but I'm guess the longer the usb cable, the more amps is sucked??

    Anyhow, no more jitter! Thanks again.

    Thanks for getting back to us with the results. The longer the cable the less amps it is able to supply due to resistance which can also be due to the rating of the cable as most cables are flimsy foil (like earphones) rather than multistrand. As the USB supply which is normally a bit above 5V would drop voltage when under current then the main 5V regulator which was not supplying any current would start to kick in but that is what is characterized as a load transient and that is what your board was seeing more than likely. Isolating the USB 5V supply through a schottky would mean that the USB supply would appear to be a little less than 5V so then the main regulator would be working all the time and would not be subject to load transients. However the board could still be powered solely from the USB supply for programming and testing. Once again, a suitable electrolytic on-board across the 5V supply would help too as both 5V supplies are regulated more than a few inches from the load which means this affects the effectiveness of the regulator's ability to react as it is really monitoring its end, not the load.
Sign In or Register to comment.