Shop OBEX P1 Docs P2 Docs Learn Events
Question from a newbie (HELP!! please) — Parallax Forums

Question from a newbie (HELP!! please)

jameskoo87jameskoo87 Posts: 10
edited 2011-06-17 11:12 in General Discussion
Hi guys,

I'm new to this forum and to the parallax controller(http://www.parallax.com/StoreSearchResults/tabid/768/txtSearch/28830/List/0/SortField/4/ProductID/595/Default.aspx). The servo controller has 16 channels ( 0 -15).

I'm trying to connect the controller to the RC toy truck I have. The truck has two steering motors and one speed control motor (called ESC). So I have two signal wires that control steering angle of the vehicle and one signal wire for controlling its speed(+/-). Three wires are connected to the channel 0,1,2 of the parallax servo controller and these motors have battery source. The controller is connected to the laptop through USB cable.

Due to my inexperience in this area, I have two questions for people who are kind enough to help newbies like myself.

1) If I want to turn the truck by 10 degrees, what command should I give? For instance let's say the servo has the range from 250 - 1750. If I give 750 the servo will come to its neutral position which is 0 degrees by default. But the relationship is not linear from what I heard. Is there a formula that I can use to calculate the range for the degrees I want (like 10 degrees for example). I can elaborate this more if my explanation is confusing to understand.

2) When I connect the servo wires (2 for steering, 1 for speed) to the truck and turn on the battery for the servos, the truck seems to rotate the wheels in random direction very fast, even though I'm not yet giving any signals to the servo controller. It seems to be receiving some garbage signals and this happens whenever I connect the speed signal wire along with steering signal wire(s). When I only connect the steering wires, nothing happens.

I tried to use PSCI software but it doesn't work. I opened the correct port and moved the sliders at channels that I connected these wires to, but nothing happens. The blue LED light comes on and off which indicates its receiving some signals, but the actual servos don't really move. Is this calibration issue? How can this be fixed?


I could really use your help on this. Help please!

-J

Comments

  • $WMc%$WMc% Posts: 1,884
    edited 2011-06-14 13:39
    I don't think your wiring the servos correctly.
    '
    Black wire is Neg.
    Red wire is Pos.
    White Wire is signal (1msec far left 1.5msec. centered 2msec far right)
    '
    The steering servo's are not full rotation servo's.
    '
    The rear (drive) servo's are full rotation. So stoped = 1.5 ms _ full forward = 2.0ms _and full revese = 1.0ms
  • jameskoo87jameskoo87 Posts: 10
    edited 2011-06-14 13:58
    Hi WMc,

    I think I connected the wires correctly.
    The black wires always go outside of controller and this matches with how schematic diagrams describe wiring connection to the controller.
    I managed to get rear drive servo work. I had to calibrate it and it now works fine.

    The problem is with two steering servos.
    When I connect the steering servo wires to the micro-controller, it moves left and right constantly as soon as the battery power is turned on.
    Should each steering motor be calibrated ? I'm using PSCI software (parallax servo controller interface) and I know I'm looking at correct channels (although the choice
    of which channels to use doesn't really matter)

    Any suggestions please?

    -J
  • Daniel HarrisDaniel Harris Posts: 207
    edited 2011-06-14 14:06
    Hi Jameskoo87,

    One other thing, you need to supply the servos with power by wiring some regulated power supply to the green terminal block just to the left of the power switch. The computer's USB port cannot supply enough power alone to power a servo, so external power is required.

    If you have an extra servo laying around that you know works, try hooking it up to the PSCU to establish a "known working operation" mode. This way you can learn exactly how the servo controller board works. Then you can get more complex by attaching the board to your RC truck.

    Finally, if you can, try posting a picture of how you have things set up - around here, a picture really is worth a thousand words.

    -Daniel
  • Daniel HarrisDaniel Harris Posts: 207
    edited 2011-06-14 14:07
    Actually, it sounds like you are supplying external power, so ignore that part... :D
  • jameskoo87jameskoo87 Posts: 10
    edited 2011-06-14 14:19
    CIMG3467.jpg
    CIMG3468.jpg
    1024 x 768 - 100K
    1024 x 768 - 92K
  • jameskoo87jameskoo87 Posts: 10
    edited 2011-06-14 14:25
    Hello Daniel,

    First, thank you for the post.

    I have uploaded two pictures above. As you can see, I connected two steering wires in Channel 8 and 9 (next to each other) and connected the speed control wire to channel 2.
    The speed control wire is actually connected to the battery power. So the power for the steering motors is delivered through by the speed control wire itself (if I'm right).

    Now, when I only connect the speed control wire to the board and use PSCI(parallax servo controller interface) it works fine. But when I connect the steering servo wires along with
    speed control wire, the random-looking motion takes place. I can't connect only the steering wires because it needs power, that is why I always have speed wire connected to the board.

    However I noticed that channel 9 doesn't do anything. When I connected the speed wire to channel two and only one of the steering motor wire to channel 9, there is no random motion.
    But it also doesn't respond to servo signal, if I move the servo position using PSCI software, nothing happens.

    -J
  • Spiral_72Spiral_72 Posts: 791
    edited 2011-06-15 07:01
    jameskoo87 wrote: »
    1) If I want to turn the truck by 10 degrees, what command should I give? For instance let's say the servo has the range from 250 - 1750. If I give 750 the servo will come to its neutral position which is 0 degrees by default. But the relationship is not linear from what I heard. Is there a formula that I can use to calculate the range for the degrees I want (like 10 degrees for example). I can elaborate this more if my explanation is confusing to understand.
    -J

    The servo SHOULD be linear actually, the linkages may not be however so for example if every 10 on the pulse width were one degree oof rotation, 250 might be zero degrees, 260 would be +1, 270 +20...... and 950 would be +70 degrees etc

    From there "Calibration" or figuring out a reference point and change in angle divided by pulse width would give you a repeatable number to use.




    How are you powering the board? a 9V battery? The USB port? the NiMh pack through a voltage regulator? EDIT: Oh, you said USB.... nevermind.
  • jameskoo87jameskoo87 Posts: 10
    edited 2011-06-15 07:28
    Hey Sprial_72

    Yeah the servo is linear but the linkage is not.

    The board is powered through USB cable which is connected to a laptop.
    The speed control signal is connected to the battery and the board, so it provides power for steering motors as well (when steering wires are connected the board).

    Any suggestions please?

    -J
  • schillschill Posts: 741
    edited 2011-06-15 08:01
    I am running into a similar issue with the Propeller Servo Controller and one particular type of servo. All of the other servos I've tested work fine. I've tested it with three or four different examples of the same type of servo and they all behave the same way.

    I get some occasional jitter or no motion at all. Changing the signal from the controller does not have any effect.

    Unfortunately, I haven't tracked down the problem yet.

    I suggest you remove the ESC connection for now and connect servo power to the input terminals - just to rule out that the ESC isn't doing anything funny. Try connecting 4.8v to 6v and see if there is any difference.

    In my case, these servos work fine with other controllers (an RC receiver and a different servo controller board connected to the PC). I have viewed the signals from the controllers using a PropScope and the waveforms look good coming out of the PSC. They are similar to the ones coming out of another controller that works with these servos. The pulse widths and frequency are both good. The magnitude of the signal is slightly lower with the PSC - about 4.5v instead of 4.8v - but this shouldn't make a difference. I tested the servos with the other controller using a potentiometer to drop the signal voltage down. The servos still work when the magnitude of the signal is just under 2.0v. All of this is with 6v servo power.

    This is as far as I've gotten in debugging this issue.

    I'm sorry this doesn't help you very much, but I wanted to let you know that you're not the only one seeing some strange behavior. What we are seeing may or may not be related.
  • schillschill Posts: 741
    edited 2011-06-16 08:21
    This discussion seems to be being continued in another thread (I can't seem to force it back to this one :) ).

    The other thread is here:
    http://forums.parallax.com/showthread.php?132307-Quick-Question-about-parallax-servo-controller
    It does not contain the initial discussion of the problem, however.

    This quote is from the other thread. It looks like it might have the solution but I have not tested it yet with my servos.
    Publison wrote: »
    Try a 5K resistor in line with the servo signal (white wire on you servo). There have been problems running some Digital Servos with the new PSC board because of the on-board level translators.

    Here are a couple threads about the problem:

    http://forums.parallax.com/showthread.php?118121-Digital-servo-s-on-USB-servocontroller&p=862005

    http://forums.parallax.com/showthread.php?119982-propeller-servo-controller-problem&p=881474
  • StefanL38StefanL38 Posts: 2,292
    edited 2011-06-16 09:14
    servos depending on te size a single servo can have a current to 3A. So if the board is only powered through USB there is a maximum of 0,5A.

    You must connect your accumlator-pack to the green screwterminal. Without this powersupply the voltage brakes down if more than one servo are "calling" for current.
    and this might cause the strange behaviour

    best regards

    Stefan
    400 x 390 - 15K
  • jameskoo87jameskoo87 Posts: 10
    edited 2011-06-16 09:25
    Dear StephanL38,

    I did try that. I connected external power supply (applied 5.7 V) instead of battery. No response from servos.
    The board is powered through by USB cable but servos should get power from the external battery power which in my case is simply a power supply device.
    I think the servo controller is designed to work with analog motors, but need some hardware or software tweaks to work with digital motors.

    I don't feel really comfortable with the idea of tweaking...
  • PublisonPublison Posts: 12,366
    edited 2011-06-16 09:30
    StefanL38 wrote: »
    servos depending on te size a single servo can have a current to 3A. So if the board is only powered through USB there is a maximum of 0,5A.

    You must connect your accumlator-pack to the green screwterminal. Without this powersupply the voltage brakes down if more than one servo are "calling" for current.
    and this might cause the strange behaviour

    best regards

    Stefan

    Stefan,

    I though the same thing when I saw the first pictures from the OP, but the servo power is being supplied by the ESC-Battery combination, (I believe), to the servo headers. This is the same as supplying power to the Green Headers (Vsvo).
  • schillschill Posts: 741
    edited 2011-06-16 09:39
    jameskoo87 wrote: »
    Dear StephanL38,

    I did try that. I connected external power supply (applied 5.7 V) instead of battery. No response from servos.
    The board is powered through by USB cable but servos should get power from the external battery power which in my case is simply a power supply device.
    I think the servo controller is designed to work with analog motors, but need some hardware or software tweaks to work with digital motors.

    I don't feel really comfortable with the idea of tweaking...

    There is not necessarily any difference between analog and digital servos from the outside. They both take exactly the same input signal (although some digital servos may have more leeway in what the signal looks like, so do some analog servos). The "digital" in digital servos can mean at least two things. One, that the circuitry inside the servo updates the motor more often than the analog servos. The servo input signal for both is typically sent at 50Hz. In an analog servo, the actual motor control signal is usually only updated at the same rate. In the first kind of digital servo, the motor control may be updated more often than the control signal is.

    The other type of "digital" refers to whether the servos can be programmed or not. With some servos, you can set things like maximum speed, positive and negative rotation limits, etc. This is usually done with a separate programmer (a device between the servo and computer, for example, and a program running on the computer). The servo position is still controlled by the same pulse width-based signal that analog servos are.

    Both of these types of "digital" can be combined in the same servo. I don't know if you'd ever find the second without the first but it's possible.

    Take a look at the links that Publison posted and I quoted above. It looks like there are issues with some servos (in those examples, with digital servos) where there is something in the electronics of the servo that have a bad interaction with the electronics in the PSC. Note that it is only with some servos. The servos that I am having a problem with are analog servos. I have both analog and digital servos that work fine with the PSC - it's only a specific model of analog servo that is failing for me.

    The suggestion in the referenced threads is to add a resistor inline with the servo control signal (you can read the details in the first referenced post). I will try this with my servos as soon as I get a chance.
  • schillschill Posts: 741
    edited 2011-06-16 09:44
    Publison wrote: »
    Stefan,

    I though the same thing when I saw the first pictures from the OP, but the servo power is being supplied by the ESC-Battery combination, (I believe), to the servo headers. This is the same as supplying power to the Green Headers (Vsvo).

    That's a pretty standard way to get power for servos and receivers in RC applications like cars, planes, etc. This may or may not be exactly the same as connecting the battery directly to the green headers.

    The ESC probably includes a voltage regulator that is limiting the voltage to something between 4.8v and 6.0v. It should be providing enough current for a few servos but probably not enough if you wanted to fill up the PSC with all 16. In that case, you'd want to use a separate battery or a much more robust voltage converter of some sort (there are a number of these available specifically for RC). If you try to draw too much from the ESC, you can burn it out (at least the regulator part). I don't expect there will be any problems in this case if it's only two servos since the ESC is probably made to handle that.
  • schillschill Posts: 741
    edited 2011-06-16 20:27
    I added a 10K resistor inline with the signal line going from the PSC to my servo and it solved my problem. The servo now responds correctly to commands send from the PSCI application. I used 10K because it happened to be sitting there loose on my workbench.

    jameskoo87, you should try a resistor and see what happens. If it works, it's a really easy fix.
  • jameskoo87jameskoo87 Posts: 10
    edited 2011-06-17 10:30
    Hey Schill,

    Thanks for your post.
    Was your servo 6V ?
  • jameskoo87jameskoo87 Posts: 10
    edited 2011-06-17 10:40
    It works!!

    I tried using 1K resistor instead

    Thanks Schill

    You are the man
  • schillschill Posts: 741
    edited 2011-06-17 10:50
    jameskoo87 wrote: »
    It works!!

    I tried using 1K resistor instead

    Thanks Schill

    You are the man

    Glad it worked. It really came from the people in the threads linked above.

    By the way, I'm running my servos at a nominal 6v (5 x 1.2 NiMH, measured 6.4v during the resistor test). I had tested with 4.8v (without the resistor) as well.
  • PublisonPublison Posts: 12,366
    edited 2011-06-17 11:12
    jameskoo87 wrote: »
    It works!!

    I tried using 1K resistor instead

    Thanks Schill

    You are the man

    1K is at the low end. I have found resistors between 10K and 5K work better. The closer the 5K, (the impedance of the voltage translator), the better.
Sign In or Register to comment.