Shop OBEX P1 Docs P2 Docs Learn Events
Propeller and the servocontroller — Parallax Forums

Propeller and the servocontroller

lassethomsenlassethomsen Posts: 46
edited 2007-03-14 18:25 in Propeller 1
Hi.

The servocontroller in the HexCrawler kit is using a seriel interface of some sort, 0-5v.
But my Propeller is only capable of providing it with 3,3v, so i cant just use the Propeller directly into the servocontroller.

So how can i use my propeller to control the servocontroller, any hardware i need or?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-02-25 18:06
    There is a whole thread on using the Propeller with 5V devices - http://forums.parallax.com/showthread.php?p=585920. Many devices that have 5V inputs actually will work fine with the Propeller's output. Sometimes you need to use a protective series current limiting resistor (1K to 4.7K). Anyway, read the thread.
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2007-02-25 18:07
    The 3.3V is a high enough voltage to register as a digital high in most all cases, so not an issue typically. From 5V to the propeller (if needed) you'll want a 1K ohm resistor to limit current flow.

    -Martin

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    StampPlot - GUI and Plotting, and XBee Wireless Adapters
    Southern Illinois University Carbondale, Electronic Systems Technologies
  • lassethomsenlassethomsen Posts: 46
    edited 2007-02-28 12:57
    Hi thanks for the heads up on the 3.3v - 5v issue.

    Since i frankly dont know jack (expletive) about hardware(its a hard, but fun shift from application devel), wiring etc, I hope that someone can tell me how i can get the Propeller to interact with the Servo controller, do i need some kind of external seriel chip or can I just power the Servocontroller chip from a 5V source and send signals in/out one the io pin the servocontroller, using perhaps the seriel-spin-object?

    Hope some one can cut this out a little more.
  • CJCJ Posts: 470
    edited 2007-02-28 13:33
    you should be ok with a 1K resistor between the propeller IO pin and the serial pin on the servocontroller. for the serial software, you could use either simple_serial.spin, or fullduplex_serial.spin. the rest is just sending the data to the controller.

    if you need any help once it's wired up, just ask

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Who says you have to have knowledge to use it?

    I've killed a fly with my bare mind.
  • DufferDuffer Posts: 374
    edited 2007-03-01 01:00
    Current limiting is important, as has been said in most of the posts here and referenced here, with regard to interfacing devices with different voltage levels. One of the things not mentioned here and that I found very helpful (being very new to digital logic circuits) was when I read (I think it was in the BS2 docs) that the important point to remember that there is a logic low threshold. I think it said that the low threshold was 1.4 volts. i.e. voltage lower than 1.4v is logic low and anything above 1.4v is logic high. Before reading that I had it in my mind that if you were working with a 0-5v system, 0v was low and 5v was high. The same applied (in my mind) when working with a 0-3.3v device (0v low, 3.3v high). This notion made it difficult for me to understand how to interface devices that used different logic levels. In reality, both devices will work with voltages that are above and below their respective low thresholds. Given that both devices have a similar logic low threshold·(say 1.5v), the 3.3v device can interface very nicely with 5v device.

    I appologize if this is old news for everyone here, but it helped me to understand device interfacing much more clearly.

    Steve
  • lassethomsenlassethomsen Posts: 46
    edited 2007-03-01 12:57
    Hi.

    Im trying to build a powersupply for the servocontroller, but the datasheet on the servocontroller dosnt tell me anything about tolerance and how many amps there is required. Where can i get this information?
  • lassethomsenlassethomsen Posts: 46
    edited 2007-03-01 16:17
    nevermind, it seems to work perfectly directly from the proppeller 3.3v pin.
  • lassethomsenlassethomsen Posts: 46
    edited 2007-03-14 18:15
    So the next step is to get my propeller to talk with the Servo controller by the FullDuplex driver. So i have loadet the Full Duplex driver and tried to make one of the legs move. As far as i have understood this code should work.

    CON
      Pin = 29
    VAR
      word PW  
    OBJ
      FD : "FullDuplex"
    PUB Main
      FD.Start(29,29,38400)
      PW := 1250
      FD.Str(string("!SC"))
      FD.tx(03)
      FD.tx(7)
      FD.tx(PW)
    
    



    But the leg dosent move at all. Im trying to move the leg from center position to 180´ position and the leg is the one on channel 3. The jumper is not on the PSC board.
    What is that i have misunderstood?
  • lassethomsenlassethomsen Posts: 46
    edited 2007-03-14 18:25
    I could add that i drawing the power for the servocontroller chip from my 3.3 out put on the Propeller, and i have connected the servo signal to pin 29 on my Propeller and there is a 1k ohm resistor in between.

    The green light on the servocontroller is green for at very short while when im transmitting my command.

    I have also tried using a baud rate of 2400.
Sign In or Register to comment.