Shop OBEX P1 Docs P2 Docs Learn Events
Servo controller down — Parallax Forums

Servo controller down

Leticia ProjectLeticia Project Posts: 30
edited 2006-06-11 20:59 in BASIC Stamp
hello!

I`ve built a steering system using two servos, a servo controller unit and a BS2. Everything worked perfect yesterday, but nothing works today!!!

The problem is that I can`t control the servos anymore, By placing 5 volts at the BS pins. I know that I get power to the BS and the pins, and there is no connection problem between the servo unit and the BS.
What makes it even more strange is that one function still works, but no else function.

I`ve tried reloading the software, restarted both units, reseting them, checked connections and so on. Nothing helps and I don`t get it, how can it break without me even·touching it!?

·

Comments

  • Tristan TTristan T Posts: 31
    edited 2006-06-08 21:46
    Can you post a diagram of your circuit and the code that used to work? Which functions still work? Which are broken?
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-06-09 06:36
    Leticia -

    This is not intended to be a solution to your problem, but rather a method for a logical troubleshooting approach. When I'm suddenly faced with an all-of-a-sudden nothing works situation, the first things that come to mind are: 1) inactive power supply, and 2) loose or dropped/missing ground connection.

    Either of those conditions will pull the plug on the entire project in short order. Condition 2 also includes the case where there is supposed to be a common ground between two (or more) attached sources of power (Ex. Stamp power supply and servo power supply) and the common grounds have become disconnected for some reason.

    Second, I might consider the perpetual reset scenario. Here, the Stamp begins operation, performs a few menial tasks, something causes the Stamp to go into reset mode, the Stamp resets, and the process begins all over again with nothing productive being done. However, from the "outside" it looks like nothing at all is occuring, The way to detect that this situation is occuring, is to add the following as the FIRST line in the program:

    DEBUG "Program Starting"

    That should ONLY display ONCE during any given iteration of the program. If you see it appear more than once, the Stamp is being RESET!

    Let us know the results of checking those things, and we'll go on from there.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • Leticia ProjectLeticia Project Posts: 30
    edited 2006-06-09 09:12
    Tristan T said...
    Can you post a diagram of your circuit and the code that used to work? Which functions still work? Which are broken?
    There are five functions, it`s like a computer game, you can turn right or left and accelerate or slow down. The fifth functions is that when you drop the controlpanel, the veichle turns full and goes down to idle. This "drop" function is the only thing that still works.

    When I turn power on, the servos goes to there home positions (which they should), and then the throttle servo starts to turn as if I would pressing accelerate (which I don`t!), and there is no power·to this pin when this happens.

    I`ve attached my program, maybe it could help...
  • Tristan TTristan T Posts: 31
    edited 2006-06-09 14:53
    It looks like you are using the PSC servo controller. Have you checked to make sure it is working by getting the version number?
    '{$PBASIC 2.5}
    Sdat PIN 15 ' Serial Data I/O pin
    Baud CON 396 ' Constant for 2400 baud
    buff VAR Byte(3) ' temporary variable
    FindPSC: ' Find and get the version
    DEBUG "Finding PSC", CR ' number of the PSC.
    SEROUT Sdat, Baud+$8000, [noparse][[/noparse]"!SCVER?",CR]
    SERIN Sdat, Baud, 500, FindPSC, [noparse][[/noparse]STR buff\3]
    DEBUG "PSC ver: ", buff(0), buff(1), buff(2), CR
    STOP
    
    


    Have you checked to be sure that both of your switches are working?
    Other than that, like Bruce said, you should fill your program with debug statements so that you can see what is going on inside your loops.
    My money is on a loose switch connection.

    -Tristan
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-06-10 04:06
    Leticia Project said...(trimmed)
    The problem is that I can`t control the servos anymore, By placing 5 volts at the BS pins. I know that I get power to the BS and the pins, and there is no connection problem between the servo unit and the BS.
    Hello,

    ·· Are you trying to power the servos from a BASIC Stamp I/O pin?· Please post a wiring diagram of your circuit so we may try to help you troubleshoot it.· Thanks.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Leticia ProjectLeticia Project Posts: 30
    edited 2006-06-11 20:59
    Hey Tristan, Guess what?
    You won blush.gif It was a bad connection which gave a unclerar 0 to the BS!
    It´s all working again!

    Thank you for your help! cool.gif
Sign In or Register to comment.