Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > General Electronics Chat


General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion?

Reply
 
Thread Tools Display Modes
Old 13th July 2008, 05:30 PM   (permalink)
Default Full Rotation Servo Motor

I bought a full rotational servo motor for my project but it doesn't have any datasheet... =.=

so i run through the web and find some examples, can i use tis code? what further modification do i need? and can anyone explain the code used for servo motor? pls and thank you!

define osc 20

trisa.0=0 ''LEFT MOTOR''
trisa.1=0 ''RIGHT MOTOR''

LM var porta.0
RM var porta.1

Forward:
PULSOUT 0, 170 ‘ Left wheel anti-clockwise
PULSOUT 1, 130 ‘ Right wheel clockwise
PAUSE 20 ‘ Wait 20 ms
GOTO Forward ‘ Repeat
surferdude89 is offline   Reply With Quote
Old 14th July 2008, 02:23 AM   (permalink)
Default

It depends on if the servo has been modified for simple motor usage (The onboard PWM circuit bypassed) or if the onboard controller is still available.
Nicksan is offline   Reply With Quote
Old 15th July 2008, 02:11 PM   (permalink)
Default

Basically a servo is a pulse stretcher fed into an h-bridge. It receives a 1-2ms pulse and at 1.5ms it does nothing, above or bellow 1.5ms and it will send a stretched out pulse of power proportionately related to the deviation from 1.5ms to the motor.

They're meant to be driven at around 20 times per second, that's what the above code does. It generates a pulse of 1.70ms for one servo and a pulse of 1.30ms for the other and then delays 20ms, .2ms above and .2ms bellow 'center' changing those numbers to 180 and 140 will likely increase the torque of the servo motors a bit but be careful when experimenting with pulse width vs pulse frequency. You could actually drive the motor with longer pulse widths less frequently for maximum torque but it depends on what point the pulse stretcher circuit of the servo will reset at. Send too long a pulse and the stretcher will reset before it ends resulting in lurching, send the pulse too frequently and there will be pseudo random interruptions to motor current and frequency feedback to the pulse stretcher that can cause random twitching.
__________________
"Because I be what I be. I would tell you what you want to know if I
could, mum, but I be a cat, and no cat anywhere ever gave anyone a
straight answer, har har."
Sceadwian is offline   Reply With Quote
Old 17th July 2008, 02:30 PM   (permalink)
Default

is there a difference in code if i use don't use a servo motor controller compare to one that uses a servo motor controller?
surferdude89 is offline   Reply With Quote
Old 18th July 2008, 04:05 AM   (permalink)
Default

I have never seen anyone completely gut a servo's electronics and drive the motor directly before, there's really no point, that's why servos are so nice, the drive electronics are already there, use them, I'm not sure what Nicksan was talking about; Modifying a servo for continuous rotation is as simple as detaching the feedback POT from it's drive train and using some hot glue to lock it in place. Then instead of the servo pulse relating to a proportional position it becomes a proportional velocity (torque) The further from center (whatever pulse position the feedback pot was locked at) the pulse gets the higher the torque pulses the motor gets.
What you've described is a servo modified for continuous rotation. The only bad thing about this is if the servo electronics are under extreme operating conditions (temperature or voltage) the normal servo 'center' signal will cause the motor to drift juuuuust every so slightly in one direction or another. Not an issue if you just don't send the servo a signal when you're not driving it, then the driven wheel will just float.
__________________
"Because I be what I be. I would tell you what you want to know if I
could, mum, but I be a cat, and no cat anywhere ever gave anyone a
straight answer, har har."

Last edited by Sceadwian; 18th July 2008 at 04:09 AM.
Sceadwian is offline   Reply With Quote
Old 21st July 2008, 03:31 PM   (permalink)
Default

i'm only using 2 servo motor and the motor controller is quite costly so i wana try it without the controller... but really cannot T.T not sure whether is my code wrong or what...
surferdude89 is offline   Reply With Quote
Old 22nd July 2008, 02:56 AM   (permalink)
Default

Did you try the code? It looks fine to me.
__________________
"Because I be what I be. I would tell you what you want to know if I
could, mum, but I be a cat, and no cat anywhere ever gave anyone a
straight answer, har har."

Last edited by Sceadwian; 22nd July 2008 at 02:56 AM.
Sceadwian is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
Motor Speed/Rotation counter discussion 3v0 Robotics Chat 1 5th January 2008 10:29 PM
Control 2 servo motors (continuous rotation) with PIC18F452 skyx Micro Controllers 2 22nd March 2006 09:52 PM
servo motor in full rotation Gundam82 Robotics Chat 1 3rd October 2004 04:46 AM
changing ac electric motor rotation mountnman Electronic Projects Design/Ideas/Reviews 5 20th August 2004 01:41 AM
reversing rotation on 110v ac motor kenhop General Electronics Chat 3 30th March 2004 10:24 PM



All times are GMT. The time now is 12:10 PM.


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