Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Servo Control Using 16F628A Pic

Status
Not open for further replies.
What is the limit of the degree of servo movement you need from center then? The limits of the servo won't help you much if they're not within the movement range you need.
 
Last edited:
I think we're having a little trouble with discussing the metrics involved... Hobby servo travel is measured from it's center position, not from end to end. Center is 1.5ms 1.0 and 2.0ms are the far ends of the signal reach in either direction and generally don't hit physical stops, I have a couple older servos for RC cars that were tweaked for old school electrical brakes that are asymmetrical. Your original post of 180 degrees clockwise and counter clockwise is 360 degrees total... What you're actually talking about is the stock hobby servo travel of 90 degrees from center each way.

That CAN be fixed by adjusting your code.
 
Last edited:
OK...I'm having a hard time understanding what you're trying to do. I'm assuming that the starting point is "center" -

When you press and release the button once, the servo should rotate in one direction fully, then back to center.

When you press and release the button again, the servo should then rotate fully in the opposite direction, then back to center.

Am I correct?
 
Last edited:
pic to servo

Good morning guys back at it again. OK this is what I am trying to do. When power is first applied to the system I want the servo to travel to the 1.0ms position and wait for the momentary switch to be activated. When the momentary reset button is pushed I want the servo to travel to the 2.0ms position then return to the 1.0ms position and then go to sleep waiting til the momentary button is pushed again. Forget about the 1.5ms position. Can this be done with the coding.
 
Good morning guys back at it again. OK this is what I am trying to do. When power is first applied to the system I want the servo to travel to the 1.0ms position and wait for the momentary switch to be activated. When the momentary reset button is pushed I want the servo to travel to the 2.0ms position then return to the 1.0ms position and then go to sleep waiting til the momentary button is pushed again. Forget about the 1.5ms position. Can this be done with the coding.

Yes it can. I just needed to know exactly what you needed the servo to do prior to me rewriting the code. Now that we have the PIC doing something, give me a couple of hours and I'll have the new code posted up.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top