View previous topic :: View next topic |
Author |
Message |
z3ngew
Joined: 20 Apr 2013 Posts: 50
|
control 4 servo motor |
Posted: Wed May 15, 2013 9:39 am |
|
|
Hello everyone,
I'm designing the software of project that will let me control a robotic arm,
the robotic arm actuators are servo motors, the robotic arm consists of 4 servo motors, My question is
How can i control all of the 4 motors at once?
Thanks in advance,
z3ngew |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9269 Location: Greensville,Ontario
|
|
Posted: Wed May 15, 2013 9:55 am |
|
|
You should specify what type of 'servo' motor you're planning to use.
While some consider the Radio Controlled (RC) style servos to be 'servo motors', there are lots of 'servo motors'.
Also please tell us which PIC you're using. Depending on the PIC and overall program you can use internal timers instead of hard coded delays.
As well, do you need access via 'RS-232' to a PC, perhaps an LCD, keypad,etc?
A simple 12F683 8 pin PIC will handle the 'control 4 servos' but something bigger 16F887, 18F46K22 is probably better suited. It all depends on what you reallly need to do.
The more information you supply, the better we can help you.
hth
jay |
|
|
z3ngew
Joined: 20 Apr 2013 Posts: 50
|
|
Posted: Wed May 15, 2013 11:56 am |
|
|
i am using RC servo (both analog and digital),
I'm using PIC18F452, an RS232 is already implemented.
Note: I need to control these servos at the same time(if possible) they will be have according to an inverse kinematics algorithm
Thanks in advance |
|
|
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
|
Posted: Wed May 15, 2013 12:16 pm |
|
|
ok cheap pulse position servos - got it.
now....
whats the hardware schematic?
and what have you coded to start the ball rolling ? |
|
|
z3ngew
Joined: 20 Apr 2013 Posts: 50
|
|
Posted: Wed May 15, 2013 12:57 pm |
|
|
Well, the circuit is a bit complicated, but, about the servo motor part, the 4 servo are connected to b0 => b3, i know i am not using ccp module for pwm, i am willing to drive the servos using software pwm.
Thanks in advance, |
|
|
Gabriel
Joined: 03 Aug 2009 Posts: 1067 Location: Panama
|
|
Posted: Wed May 15, 2013 1:30 pm |
|
|
Just to get it out of the way, and make sure you are not just fishing for code, which by the way, there are several examples on the library, i have to ask:
(i'm paraphrasing the internet)
Quote: | Bro, do you even blink? |
G. _________________ CCS PCM 5.078 & CCS PCH 5.093 |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed May 15, 2013 2:02 pm |
|
|
Use the forum's search page:
http://www.ccsinfo.com/forum/search.php
Do two searches:
1. Search for:
Make sure you set it to: Search for All Terms
2. Search for:
Set forum to be searched as: Code Library
With these two searches you will most of the threads in the forum
archives on using multiple servos. They will probably answer most
of your questions. The archives will give you a better chance than
present day answers. (Yes, based on the current forum, that is a fact). |
|
|
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
|
Posted: Wed May 15, 2013 2:37 pm |
|
|
Code: |
drive the servos using software pwm.
|
let me save you some time.
I am far from the brightest member of this forum, but
there is no way i can imagine to get useful control
over an RC pulse position servo with soft or hard PWM.
my creative imagination is too weak, so
i am eager to see the code you propose..... |
|
|
|