Shop OBEX P1 Docs P2 Docs Learn Events
parallax servo controller — Parallax Forums

parallax servo controller

science_geekscience_geek Posts: 247
edited 2009-01-29 21:03 in Propeller 1
i am working on getting a parallax servo controller to work with the propellor. so far it does nothing. the following is the main code im using. im using the fullduplexserial. if anyone has any example code, can you please help me

repeat
··· uart.tx(string("!SC"))
··· uart.tx(0)
··· uart.tx(0)
··· uart.tx(500)
··· uart.tx($0D)

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-01-29 01:34
    I don't believe you can use the Parallax Servo Controller with the Propeller unless you disable the LED in the serial line. You need a protective resistor on the order of 1K between the Servo Controller and the Propeller I/O pin to protect the Propeller from the 5V signal from the Servo Controller (when it's transmitting to the Propeller). The drain from the LED will prevent the Propeller (with the resistor) from pulling the signal line to ground. There are some circuits that can be used to interface the 3.3V Propeller to the 5V Servo Controller. These are discussed in one of the "sticky threads" on this forum (Propeller Hardware Stickies).
  • CarnibusCarnibus Posts: 4
    edited 2009-01-29 13:38
    As far as just sending a position to the servo controller, this worked for me:


    PRI servoSend(channel,pos)
      servoSerial.str(string("!SC")) 'preamble
      servoSerial.tx(channel) 'servo number
      servoSerial.tx(0)     'no ramping       
      servoSerial.tx(pos.byte[noparse][[/noparse]0])
      servoSerial.tx(pos.byte)
      servoSerial.tx($0D)
    
    

    Post Edited (Carnibus) : 1/29/2009 1:43:58 PM GMT
  • dbpagedbpage Posts: 217
    edited 2009-01-29 15:32
    I have successfully interfaced the Propeller to Parallax Servo Controllers. All details are at http://www.parallax.com/tabid/722/Default.aspx

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dennis B. Page, Page Radio Company
  • science_geekscience_geek Posts: 247
    edited 2009-01-29 20:19
    did you have to use any special circuitry, i am trying to run it on pin 27
  • dbpagedbpage Posts: 217
    edited 2009-01-29 21:03
    I don't have a way to upload a schematic right now.· The connection details are·at the link I provided in the zip archive in·file Fountain 2008-10-20.spin

    I connect the signal line directly to·the Propeller pin and power the PSC with 3.3V via the 3-pin cable.· My PSCs operate reliably with 3.3V.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dennis B. Page, Page Radio Company
Sign In or Register to comment.