PDA

View Full Version : How to connect Servo motor(Futaba S3003) to my PIC16F84A



Bond
07-20-2005, 09:07 PM
can anyone help me on this?there are 3 wires from the servo motor.
i know one is to ground, one is for control and another is for 5Volt.
so how to connect to my microcontroller?
the ground just connect to ground, the 5 volt connect to Vdd?
and the control wire just connect to the output of my PIC, let say RB1?
or need any driver circuit just like the stepper motor?
pls anyone guide me please..thanx..

rao
07-21-2005, 12:01 PM
You can see three wires..

the red on is Vcc
The black is ground..

The yellow one is the PWM input..

you dont need any extra ciruitry...
All you gotta do is connect the yellow wire to any of the data pins

The servo expects to see a pulse every 20 milliseconds (.02 seconds). The length of the pulse will determine how far the motor turns. A 1.5 millisecond pulse, for example, will make the motor turn to the 90 degree position (often called the neutral position). If the pulse is shorter than 1.5 ms, then the motor will turn the shaft to closer to 0 degrees. If the pulse is longer than 1.5ms, the shaft turns closer to 180 degrees.

So all you gotta do is generate these pulses through proper coding...
I suggest.. that you first try to make a program in C that generates such pulses through the parallel port...

just connect the motor's ground to the parallel port ground... and the vcc to any 5V supply..and control to the data pin where you are generating the pulse... and you can control the servo using your computer.. once you get the hang of it.. you can note the angles where you wanna rotate the servos... and code such a program in assembly.. thats it..

Servo coding is pretty simple dude..

If you want more help.. ask for it

Rao

Bond
07-21-2005, 09:34 PM
brother Rao,
thanks for the help...u really expert in this field. i really really appreciate that. this project has been a really headache for me. just try my luck here and really bro u already help me..thankx thanks..
so u got the source code on how to program this PIC16F84A to control the movement of the servo motor?can do it in assembly straight away ar?coz wil be much easier rite?
another help i need. my project, i'm using 2 servo motor and alr built out to move the arm left right up down. it is to pick and place item. and i use magnet on the edge to maybe pick some minor thing.i'm using the GUI to control the movement. using visual basic. then parallel port interface.after all this done, then i wil be the happier man..i have added u into my msn messenger, do u mind? my mesenger is bihqui@hotmail.com
then the servo motor can support the magnet and the item to pick and place rite?
can provide me the source code ?for GUI as well?

Bond
07-28-2005, 11:29 AM
brother Rao,
so have brother write the source code?i send u the GUI and have take a look on them?
fr..bq

Sister
07-28-2005, 01:16 PM
Hi brother rao

:lol: :lol: :lol: :lol: :lol: :lol: :lol: