October 2nd, 2012, 10:45 AM
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
October 5th, 2012, 07:07 AM
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.
Originally Posted by sihaam
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.
I did not mean to share you the commercial one. I just need some time to remember its name, should you need it.
October 5th, 2012, 10:32 AM
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
October 5th, 2012, 10:39 AM
Actually TComport can send binary data. Use its Write method, instead of WriteStr.
October 7th, 2012, 05:11 PM
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?
October 8th, 2012, 02:47 AM
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.
October 8th, 2012, 03:29 PM
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.
October 10th, 2012, 12:30 PM
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.
October 10th, 2012, 02:13 PM
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
October 10th, 2012, 03:15 PM
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.