Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Robotics Chat


Robotics Chat Specific to discussions about robots and the making of.

Reply
 
LinkBack Thread Tools Display Modes
Old 4th October 2006, 04:36 AM   (permalink)
Default Servo motion control with pic

Hello Electronics community:

I am new in here if you haven't noticed :P. I am building a line following robot as a project for one of my classes. I was using a simple DC motor and a pic18f452. I programmed it and everything, in the end found out that the motors did not have enough torque. Now i learned that i could use servo motors to do the job. I researched about the motors and found out that its not just +V and ground. There is a control wire where pulses are sent through. Now i have to modify the code that i already have to suit the servos, just wondering how i would be able to achieve the pulses that im supposed to send. I am programming it in assembly, although i do have a lil knowledge of c i would like to keep to code in assembly for now. If anyone could help me by showing a sample code or guide me to a direction that'd be great.

PS: I was searching through the forums, damn there is alot of people building line followers.
g_canoglu is offline  
Old 4th October 2006, 02:00 PM   (permalink)
Default

1.RC Servo DC motor is simpler than DC motor if you want to control its position (because RC servo is made for this appliance).
2. RC servo DC motor has 3 wire (isn't it?): VCC,GND,and SIGN. VCC and GND is connected directly to your power source, no more to talk about it.
3. SIGN wire: if you supply it with a pulse (by a PWM module), the motor's position is control by the frequency (or the period) of the PWM pulse.
4. Just make a search on Google about RC servo motor control, you will find all.
wonbinbk is offline  
Old 5th October 2006, 02:38 AM   (permalink)
Default

It is unclear whether you intend to use the model servo motors for drive or for control, this is, steering. For steering, they should work fine without modification, as wonbinbk suggests. For drive, you will need to be aware that their rotation is physically limited to about 100 to 120 degrees. The stop can be removed, but then you need to deal with the feedback pot, which also limits rotation. I believe you will find some references on using the motors as drive motors, for example by replacing the feedback pot with a fixed resistor. Good luck.
jpanhalt is online now  
Old 5th October 2006, 05:14 AM   (permalink)
Default

Yes, im intending on using it as a driving motor and im also aware of the limitations of the unmodified servo. I needed help with programming. Like if 1.5ms pulse is the centre position and 2 ms pulse makes the motor turn continuously forward, what is the code that would generate the 2ms pulse. I got a book on this pic but it really is not clear at all . Just the pulse itself i got the rest of the program pretty much.
g_canoglu is offline  
Old 5th October 2006, 12:58 PM   (permalink)
Default

I am not familiar with programming the 18F452. However, virtually every tutorial I have seen for assembly gives an example for coding a PWM and/or servo. It is usually done by setting a pin high (bsf), delay loop, set pin low (bcf), delay loop, and then looping continuously or until some other event. It can also be done with the PWM hardware in some devices, and that process is more device specific. If you do not have a tutorial for your specific chip, I suggest that you look for servo examples done on the 16F84 or 16F628 chips. Regards.
jpanhalt is online now  
Old 6th October 2006, 02:02 AM   (permalink)
Default

I think ur problem is about PIC programming rite..so I think u will consider the programming language that u wanna used..I think better u look to PIC BASIC langguage it is better and easy..for servo controller u only need to set the PWM or pulses to the servo..

for more info about PIC BASIC..try this
www.melabs.com
win_832001 is offline  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
Title Starter Forum Replies Latest
How do you control digital servo. haku87 Robotics Chat 5 1st July 2006 11:49 AM
Need some servo control application ideas for a project!!! lompa Electronic Projects Design/Ideas/Reviews 5 18th January 2005 01:06 AM
DC Motor Postion control help (servo) lompa Robotics Chat 6 24th October 2004 04:16 PM
varible resisitor to control a servo BCIcdrz Micro Controllers 3 26th November 2003 07:41 PM
Servo control Using PIC18F64 via Serial / Parallel port newbieterry Robotics Chat 1 15th December 2002 10:07 AM



All times are GMT. The time now is 04:20 PM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker