Thread: RC Servo

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2009
    Posts
    25
    Rep Power
    0

    RC Servo


    Hi All
    I am designing a small robot and using standard rc servos an a serial servo controller board which can operate up to 32 servos. I am looking for some serial code or component/activeX which I could use to control these servos. All help will be appreciated
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Posts
    156
    Rep Power
    3
    Originally Posted by sihaam
    Hi All
    I am designing a small robot and using standard rc servos an a serial servo controller board which can operate up to 32 servos. I am looking for some serial code or component/activeX which I could use to control these servos. All help will be appreciated
    I had a project similar like this (controlling RC servos through serial comm). I successfully used TComport for this. And also a commercial one, which I forgot the name.

    Search TComport in sourceforge.net. It's free. Let me know if you want the commercial one, since I need to search trough my older projects files.

    EDIT:

    I did not mean to share you the commercial one. I just need some time to remember its name, should you need it.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2009
    Posts
    25
    Rep Power
    0

    RC Servos


    Thank you for your reply. I did try Tcomport but it did not work as it only sends strings to the port. I needed to send bytes and thankfully, I found CiaPort (also free). It works well. I can send bytes in the the form as eg: SendStr(#255#0#0)
    Tcomport does not allow this. Thank you for your time
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Posts
    156
    Rep Power
    3
    Actually TComport can send binary data. Use its Write method, instead of WriteStr.
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2009
    Posts
    25
    Rep Power
    0

    Servo only moving in Steps


    Yes I did try TcomPort and it works too. But my problem is that I can only move the servo in steps. It does not move to a set position. Eg, if I am at 0 and I need the servo to go to position 180 deg, it simply moves a small step only, whatever the position I type in. Any help here?
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Posts
    156
    Rep Power
    3
    If your servo motor is coupled with position encoder, it has the ability to report its current position (angle). Which, I believe, available through the same serial connection. So check your servo manual and see if it is able to provide feedback and in what form does it do that.
  12. #7
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2009
    Posts
    25
    Rep Power
    0

    Servo Position


    Though the servo has no set external position feedback, it has a built-in pot and I know how to wire the pot to send me the position info, that is not a problem. However, that signal does not affect the output signal through the serial port to move it to that specific position. In other words, even sending a "1" will simply step the servo randomly. I need to know how to send eg: sendbyte(26). It must always send it to a specific location and remain there. Currently, if I send this same command again, it steps the servo again to another location. And if I send it again it steps further until it reaches the end. I need it to remain in that position when the signal is sent only once and it must remain there even if I repeat the same value. Now if I change the byte value, it should move to that value. I have searched the net but to no avail.
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Posts
    156
    Rep Power
    3
    Sorry, never had such problem before. You really must get official datasheet of your servo system. If what you were saying is true, I believe either the system was defective or you have done something wrong. For the latter, maybe better to check if the serial settings was correct and the other end received what you've sent correctly.
  16. #9
  17. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2009
    Posts
    25
    Rep Power
    0

    Sample Code


    The servo is a simple RC servo which works quite well on other stand alone projects. However, could you please give a sample code of sending data to position a servo. I would like to compare your code. Maybe I am doing something wrong in my code. Will appreciate your help
  18. #10
  19. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Posts
    156
    Rep Power
    3
    Sorry, after recheck the old project, it turned out I did not control servo motor. I was controlling speed of two motors (through controlling their currents, I believe), through serial ports. It was Pololu TReX.

    On codes to send data, I think there was nothing special.

IMN logo majestic logo threadwatch logo seochat tools logo