Shop OBEX P1 Docs P2 Docs Learn Events
2 different servos. One works, one doesn't?!? — Parallax Forums

2 different servos. One works, one doesn't?!?

BotdocterBotdocter Posts: 271
edited 2010-12-09 19:06 in Propeller 1
I have a cheap helicopter servo that works with the propeller. Allthough my better servo, with much more torque is not moving on the same pin with the same code.

Any suggestions? I know both servos are working!!

Comments

  • W9GFOW9GFO Posts: 4,010
    edited 2010-12-04 20:56
    I think some more details are called for here. I have not yet found a servo that does not work well with the Propeller.

    Describe exactly how you have them hooked up. How are the servos getting power, how are they grounded? How are they connected to the Propeller? Does the servo twitch at all or is it dead silent?

    What code are you using? Are you swapping out the servos while the code is running?

    Rich H
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2010-12-05 00:00
    R/C servos are generally very tolerant of input. But I wonder if the more expensive servo is a newer 'digital' servo. It may be that you got an early one that is a bit over-sensitive. Another issue may be that the more powerful device requires more amps than you are actually feeding it and suffering a brown out.

    About 5 years ago, there was a boom in new and better servos. Even Futaba created a new generation of higher cost, better servos. Many of these were more precise, more powerful, with metal gears, and other claims. But as with all leading edge innovation, some of the products never really delivered. I guess Google may help you to determine the true status of you have.

    Of course, it could always be something as simple as a bad connector that has been overlooked and all this research and thought is unnecessary.
  • BotdocterBotdocter Posts: 271
    edited 2010-12-05 07:21
    It is not a digital servo. It is a normal futaba s3003 type servo.
  • StefanL38StefanL38 Posts: 2,292
    edited 2010-12-05 13:54
    OK so the forum still needs some more details:

    what is the setup where BOTH servos work?

    Powersupply voltage and maximum current that the powersupply can deliver

    What are the voltage and current requirements of both servos?
    did you MEASURE the voltage and current in the original and working setup?

    Did you connect both servos to the SAME RC-receiver?

    If not did you compare the signal-output towards the servo with an oscilloscope?

    to state the obvious do the connectors have the same pinout?

    best regards

    Stefan
  • BotdocterBotdocter Posts: 271
    edited 2010-12-06 21:19
    Okay i finally found a topic that talked about using a resistor in series with the signal wire. That seems to work allthough one problem came up.

    The rotation of the servo with lineair upgoing value:

    0---80% OK, then it moves to 40% and goes up from there.

    Help!!!
  • CumQuaTCumQuaT Posts: 156
    edited 2010-12-07 16:57
    Perhaps try throwing rectifier diode on both the power in and the power out lines of the servo, or something like a 1000uF cap across the power feed for it?
  • hover1hover1 Posts: 1,929
    edited 2010-12-07 17:18
    Botdocter wrote: »
    Okay i finally found a topic that talked about using a resistor in series with the signal wire. That seems to work allthough one problem came up.

    The rotation of the servo with lineair upgoing value:

    0---80% OK, then it moves to 40% and goes up from there.

    Help!!!

    The only time I have a problem driving a servo, (mine being a digital servo), was with the new Parallax USB Propeller Servo Controller

    It requires a 5K to 10K resistor in line with the signal line, (because of the Level Translator).

    You have not shown what your hardware connections are or the the software that you are using that produces the errors. That would help a lot.

    Jim
  • BotdocterBotdocter Posts: 271
    edited 2010-12-08 13:28
    I indeed used the resistors and it maje the servos work but the problem still ensists.
    I think it is a problem in my code. I will post it as soon as possible. Mobile now...
  • RavenkallenRavenkallen Posts: 1,057
    edited 2010-12-08 15:58
    If you checked every power connection and you have installed proper filter capacitors AND tried another servo, I might suspect that it is toast. Did it cost much?
  • BotdocterBotdocter Posts: 271
    edited 2010-12-08 16:09
    yaha!! it is the propeller robot control board from Parallax. 100 bucks! lately it seems to have problems with timing. i used this board before but never had problems. havent used it for a few months and now problems keep coming up. like my serial connection has to be run in a seperate cog otherwise everything gets screwed up. and even now the serial line is very fragile.

    could it be a faulty crystal?
  • hover1hover1 Posts: 1,929
    edited 2010-12-08 17:01
    Botdocter wrote: »
    Okay i finally found a topic that talked about using a resistor in series with the signal wire. That seems to work allthough one problem came up.

    The rotation of the servo with lineair upgoing value:

    0---80% OK, then it moves to 40% and goes up from there.

    Help!!!

    I would be interested to see the code that produced this error.

    What hardware are you using? Demo Board, Servo Controller?

    Jim
  • BotdocterBotdocter Posts: 271
    edited 2010-12-08 18:23
    here is the code i used:
    CON
    _clkmode = xtal1 + pll16x
    _xinfreq = 5_000_000

    rxpin = 31 ' Receive on I/O pin 1 <- black from master black txpin p1
    txpin = 30 ' Transmit on I/O pin 0 -> red to master red rxpin p0
    ServoCh1 = 20 'Steering servo
    ServoCh2 = 16
    VAR

    LONG SerStack[32]
    LONG TransmitStack[32]
    LONG txVal_1, txVal_2, rtVal_3, txVal_4 ' transmit
    LONG rxVal_1, rxVal_2, rxVal_3, rxVal_4' receive from master and PST
    LONG rxVal
    LONG HeadingX
    LONG HeadingY

    {************************************************* *****************}
    OBJ

    serial : "Extended_FDSerial" '' "FullDuplexSerial"
    f : "Float32Full"
    SERVO : "Servo32v7.spin"

    PUB Main | DutyCycle ' new stuff DutyCycle

    SERVO.Start 'Start Servo handler
    SERVO.Ramp '<-OPTIONAL 'Start Background Ramping
    serial.start(rxpin,txpin,%0000, 38400) '- rxpin,txpin,mode,Baud
    cognew(SerCog, @SerStack)
    cognew(Transmitter, @TransmitStack)



    repeat
    SerCog
    Transmitter
    HeadingX := 1340 + rxVal_1
    HeadingY := 1380 + rxVal_2
    SERVO.SetRamp(ServoCh1,HeadingX,100)
    SERVO.SetRamp(ServoCh2,HeadingY,100)


    PUB SerCog

    rxVal_1 := serial.rx
    rxVal_2 := serial.rx
    rxVal_3 := serial.rx
    rxVal_4 := serial.rx

    rxVal := rxVal_1 | (rxVal_2<<8) | (rxVal_3<<16) | (rxVal_4<<24)

    PUB Transmitter

    serial.dec(rxVal_1 | (rxVal_2<<8) | (rxVal_3<<16) | (rxVal_4<<24))
    serial.tx(13)
  • hover1hover1 Posts: 1,929
    edited 2010-12-08 18:38
    Botdocter wrote: »
    here is the code i used:

    Doesn't help much as the indentation is not shown and the other objects are missing. In order for someone trying to run this, the other objects should be included. It's not fun trying to do a google on all the other objects and coming up with the same ones that you are running.

    Create an archive File > Archive > Project and post that.

    Also a hint on the hardware you are using. Breadboard, Protoboard, Demo Board?

    Jim

    Edit: OK you are using the Robot Controller Board.
  • hover1hover1 Posts: 1,929
    edited 2010-12-08 18:53
    Could you give us an idea on what you are expecting out of this program? It doesn't look finished.
  • BotdocterBotdocter Posts: 271
    edited 2010-12-09 04:51
    i commented the code and put all other files in the archive.

    RRSerial.zip
  • hover1hover1 Posts: 1,929
    edited 2010-12-09 17:16
    Botdocter wrote: »
    i commented the code and put all other files in the archive.

    RRSerial.zip

    I was able to download the code and send it to my PPDB.

    I see an initialization on the servos when you first type in data, (maybe 0 degrees to 90 degrees?)

    What kind of data is it looking for and what format? I see you are looking for RoboRealm input. What does that look like?

    I can open PST and type in random values, (numeric and alpha), and the servo signals are going from ~1.5ms to ~1.7ms randomly.

    Some more info on RoboRealm format would help.

    Jim
  • BotdocterBotdocter Posts: 271
    edited 2010-12-09 17:42
    I know what you mean with the initialization, but where it comes from i don't know. It shouldn't be doing that.

    The values are received by the propeller as:

    234 (rxVal_4)
    127 (rxVal_3)
    265 (rxVal_2)
    169 (rxVal_1)

    So only the numbers. Everything between () are comments.

    Wat is beeing send by roborealm is :

    \\value1\\value2\\value3\\value4

    Hope this helps..
  • hover1hover1 Posts: 1,929
    edited 2010-12-09 18:00
    So do you need RoboRealm running in order to run this program, or can you input data directly from PST to run your test?
  • BotdocterBotdocter Posts: 271
    edited 2010-12-09 19:06
    I believe that if you send a value between 0 and 320 you can do it with pst. It will work with rxval1 only. I don't know know how to send more var's at once!
Sign In or Register to comment.