Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: Truckstop on August 28, 2009, 07:35:05 PM

Title: Servo Mirroring question..
Post by: Truckstop on August 28, 2009, 07:35:05 PM
Ok i know that 2 servos can share a pwn output and will run the same.  what i want to do is make two servos mirror each other with only 1 pwm signal. i believe that if i desolder the motor in one servo and turn it 180 deg* re solder it so that the contacts are back wards (+ is now - and - is now +) and then switch the two outer wires on the potentiometer then everything should run backwards... now if i run this srevo with another servo on one pwm cable, when i send a signal one servo will run CW and the other will run CCW. but keep position relitiv to each other. Right?

the plan is to use the two servos in a torso weist joint to allow it to bend forward and backwards. but i only want to use 1 i/o pin to do it, the two servos together will have enough torque to lift the torso with a little to spare.

Idea's comments i would like to know before i hack apart the servo as it was rather expensive for each of them.

Thanks in advance

Truckstop
Title: Re: Servo Mirroring question..
Post by: Razor Concepts on August 28, 2009, 09:19:30 PM
Can you just flip the one servo around? It is basically the same thing, one is going CW and the other CCW.
Title: Re: Servo Mirroring question..
Post by: Truckstop on August 28, 2009, 09:27:37 PM
i could and that would work. however i would like to conceal both servos within the lower torso for astethics..  ("aka looks")

Truckstop
Title: Re: Servo Mirroring question..
Post by: Ro-Bot-X on August 29, 2009, 06:10:09 AM
Ok i know that 2 servos can share a pwn output and will run the same.  what i want to do is make two servos mirror each other with only 1 pwm signal. i believe that if i desolder the motor in one servo and turn it 180 deg* re solder it so that the contacts are back wards (+ is now - and - is now +) and then switch the two outer wires on the potentiometer then everything should run backwards... now if i run this srevo with another servo on one pwm cable, when i send a signal one servo will run CW and the other will run CCW. but keep position relitiv to each other. Right?

the plan is to use the two servos in a torso weist joint to allow it to bend forward and backwards. but i only want to use 1 i/o pin to do it, the two servos together will have enough torque to lift the torso with a little to spare.

Idea's comments i would like to know before i hack apart the servo as it was rather expensive for each of them.

Thanks in advance

Truckstop

It will work perfectly. You will also need a Y cable harness to be able to use only one pin on your microcontroller board.

Cheers!
Title: Re: Servo Mirroring question..
Post by: Truckstop on August 29, 2009, 02:44:06 PM
Awesome thank you you. + 1 point
Title: Re: Servo Mirroring question..
Post by: airman00 on August 29, 2009, 03:22:24 PM
I should mention that it will work, unless you push the servo to extremes - thats where you'll start to have problems. On some servos the leftmost extreme and the rightmost extreme are not the same range from center. e.g. Leftmost would be 1000, center would be 500, and rightmost would be 2200. So one servo would keep on turning while the other one(which is turning in the opposite manner) would be mechanically limitied.
Title: Re: Servo Mirroring question..
Post by: Truckstop on August 29, 2009, 06:10:53 PM
Oh, i diddent think about the extreams... thanks for pointing that out. the bend is roughly only 45 degrees, i think i will incorparate mechanical limit switches to ensure that it stops.

Truckstop
Title: Re: Servo Mirroring question..
Post by: airman00 on August 29, 2009, 06:55:21 PM
the bend is roughly only 45 degrees, i think i will incorparate mechanical limit switches to ensure that it stops.
Limits in the code would probably be easier. Something like this:
Code: [Select]
if (servo_pulse > 1800) {
   servo_pulse = 1800;
}
Title: Re: Servo Mirroring question..
Post by: Truckstop on August 29, 2009, 07:06:51 PM
the bend is roughly only 45 degrees, i think i will incorparate mechanical limit switches to ensure that it stops.
Limits in the code would probably be easier. Something like this:
Code: [Select]
if (servo_pulse > 1800) {
   servo_pulse = 1800;
}

Diddent think about that... i apparently still have lots to learn yeah and the code will allow me to still stick with 1 pin for control too...

Thanks

Truckstop