Shop OBEX P1 Docs P2 Docs Learn Events
Servo pins on the proto board? — Parallax Forums

Servo pins on the proto board?

cavelambcavelamb Posts: 720
edited 2012-01-29 16:33 in Propeller 1
The Proto board has four connectors labeled "servo", but for the life of me, I can't find any reference to what pins are connected to them!
The schematic skips over that little detail,and I've not been able to figer it out from te code examples yet.

Is it a secret? Or have solar flares fried by brain? (should have worn my tin foil hat!)

Richard

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-01-29 08:50
    Hi Richard,

    The set of holes closest to the edge of the board are ground, the next row are either 5V or Vin depending on how the jumper is set. The next set of holes are the signal holes. The signal holes are electrically connected to the fourth row of holes. You solder a wire to this fourth hole with the other end of the wire soldered to one of the pin holes around the center of the board.

    You decide which of the Propeller's I/O pins you want to use with the servos. They are not already connected like some of the Stamp boards.

    On the other side of the large capacitor from the servo connections is a three hole row where you'd install a three pin header. The center hole is connected to the power row of the servo connection. By jumping this position to either the "5+" position or the "Vin" position you can choose how much voltage you want to send to your servos. If you don't use a jumper the servo connectors wont receive any power.

    Make sure to remember to move the Proto Board's switch all the way on to the "servo" position. The first "on" position doesn't turn on the power to the servos. This lets you leave your servo plugged in while programming without your robot walking away in the process.

    There is an example of using the object Servo32v7 in the demo folder in the library of the Propeller Tool v1.3.

    Post #15 of my QuickStart servo tester thread also has a very simple demo program using Servo32v7.
  • RobotWorkshopRobotWorkshop Posts: 2,307
    edited 2012-01-29 08:57
    When you connect one of the propeller pins to the header for the servo it is recommended to install a resistor (1K is common) between the Propeller I/O pin and the input of the servo. This helps protect the Propeller since the servo is running at 5V and the Propeller at 3.3V
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-01-29 09:07
    When you connect one of the propeller pins to the header for the servo it is recommended to install a resistor (1K is common) between the Propeller I/O pin and the input of the servo. This helps protect the Propeller since the servo is running at 5V and the Propeller at 3.3V

    Is this really needed? The servo isn't using the line as an output so the Prop should never see 5V on it. I personally don't use a resistor.

    Edit: I remember now one of the reasons I don't use resistors. I had a servo that wouldn't work with a 3.3V signal if there was a resistor in series but without the resistor it worked.
  • cavelambcavelamb Posts: 720
    edited 2012-01-29 13:28
    Duane Degn wrote: »
    Hi Richard,

    You decide which of the Propeller's I/O pins you want to use with the servos. They are not already connected like some of the Stamp boards.


    Thank you, Duane.

    That explains why I couldn't figure it out with a meter too...
    And the schematic was telling the truth after all!
  • Mike GreenMike Green Posts: 23,101
    edited 2012-01-29 13:48
    Yes, the servo control line is an input to the servo and should be a high impedance line without any voltage in excess of 3.3V applied to the Propeller output pin. On the other hand, there can be coupling of the noise from the 5V line to the servo as well as noise coupling inside the servo itself. Several others have suggested using a 1K series resistor in this line to help prevent this noise from getting into the I/O pin. It would also be prudent to include the 1K resistor to protect against wiring errors in case the 5V line gets accidentally connected to the servo control line. I have a BoeBot chassis with a Propeller Protoboard controller and use 1K resistors in all the servo control leads without problems.
  • RaymanRayman Posts: 14,845
    edited 2012-01-29 14:19
    I'm with Duane, there's absolutely no need for a resistor.
    In fact, I've dissected a servo and found that it already had a 4.7k resistor in series with the input pin.

    But, as Mike points out, it might protect you from user error, such as applying 5V to the pin yourself..

    On the other hand, adding resistance may make the servo not work...
    With the one I looked at the current through that 4.7k resistor went to the base of a transistor.
    So, the transistor was used as an input buffer. It's possible that adding resistance there could
    make it so the transistor doesn't turn on enough with 3.3V applied...
  • RobotWorkshopRobotWorkshop Posts: 2,307
    edited 2012-01-29 16:15
    Rayman wrote: »
    I'm with Duane, there's absolutely no need for a resistor.
    In fact, I've dissected a servo and found that it already had a 4.7k resistor in series with the input pin.

    But, as Mike points out, it might protect you from user error, such as applying 5V to the pin yourself..

    There are definitely different perspectives on this topic. If you're comfortable running without a resistor inline that is certainly a personal choice and may be fine for the particular servo you are using. However I wouldn't recommend that to people to start with. I don't think all the servos are created equal and all may not have the same input circuitry. There could very well be some off brands that lack protection and may end up hurting the Prop. For the pennies it costs for a resistor it is cheap insurance. It's my opinion and not everyone agrees with it. That's fine too.

    If you know for sure that the particular servo has the proper protection built in then I suppose it's ok.
    Rayman wrote: »
    On the other hand, adding resistance may make the servo not work...
    With the one I looked at the current through that 4.7k resistor went to the base of a transistor.
    So, the transistor was used as an input buffer. It's possible that adding resistance there could
    make it so the transistor doesn't turn on enough with 3.3V applied...

    That could definitely be one cause of that. I still probably start out with the resistor and if it isn't working then back down the value or see if it make sense to remove it.

    Most of the interfacing issues I've run into ended up being that the 3.3V wasn't just quite high enough. The last one was with a MAX7219. Some people said they were able to connect the propeller pins directly and they worked ok It didn't work for me. After looking at the datasheet it showed the min logic high was 3.5V. I guess some chips would accept 3.3V as a high and some don't. I used a 74HC14 with two inverters back to back which accepted the 3.3V as a high and then had something closer to 5V on the output. That took care of the issue.
  • RaymanRayman Posts: 14,845
    edited 2012-01-29 16:33
    Well, it's veru true that other servo's may be different. Mine was a HexTronix MX12K (digital, all-metal).
    I'd be interested to know what the input circuit of the Parallax Store servo's looks like...
Sign In or Register to comment.