The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages - More
> Delphi Programming
|
RC Servo
Discuss RC Servo in the Delphi Programming forum on Dev Shed. RC Servo Delphi Programming forum discussing Delphi related topics including Kylix, C++ Builder, and more. Delphi is a high-performance language, originally based on the PASCAL language.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

October 2nd, 2012, 09:45 AM
|
|
Registered User
|
|
Join Date: Dec 2009
Posts: 22
Time spent in forums: 3 h 43 m
Reputation 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 
|

October 5th, 2012, 06:07 AM
|
|
Contributing User
|
|
Join Date: May 2012
Posts: 141
Time spent in forums: 1 Day 5 h 1 m 56 sec
Reputation Power: 2
|
|
Quote: | 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. 
|

October 5th, 2012, 09:32 AM
|
|
Registered User
|
|
Join Date: Dec 2009
Posts: 22
Time spent in forums: 3 h 43 m
Reputation 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
|

October 5th, 2012, 09:39 AM
|
|
Contributing User
|
|
Join Date: May 2012
Posts: 141
Time spent in forums: 1 Day 5 h 1 m 56 sec
Reputation Power: 2
|
|
|
Actually TComport can send binary data. Use its Write method, instead of WriteStr.
|

October 7th, 2012, 04:11 PM
|
|
Registered User
|
|
Join Date: Dec 2009
Posts: 22
Time spent in forums: 3 h 43 m
Reputation 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?
|

October 8th, 2012, 01:47 AM
|
|
Contributing User
|
|
Join Date: May 2012
Posts: 141
Time spent in forums: 1 Day 5 h 1 m 56 sec
Reputation Power: 2
|
|
|
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, 02:29 PM
|
|
Registered User
|
|
Join Date: Dec 2009
Posts: 22
Time spent in forums: 3 h 43 m
Reputation 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.
|

October 10th, 2012, 11:30 AM
|
|
Contributing User
|
|
Join Date: May 2012
Posts: 141
Time spent in forums: 1 Day 5 h 1 m 56 sec
Reputation Power: 2
|
|
|
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, 01:13 PM
|
|
Registered User
|
|
Join Date: Dec 2009
Posts: 22
Time spent in forums: 3 h 43 m
Reputation 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
|

October 10th, 2012, 02:15 PM
|
|
Contributing User
|
|
Join Date: May 2012
Posts: 141
Time spent in forums: 1 Day 5 h 1 m 56 sec
Reputation Power: 2
|
|
|
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.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|