Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: izua on February 23, 2008, 12:55:40 PM

Title: considering a custom servo power stage - suggestions, ideas, yay, nay?
Post by: izua on February 23, 2008, 12:55:40 PM
I'm experiencing problems with hacking a servo. I wasn't really glad with the idea of hacking a device for another purpose, since I know hacks won't always work. And they didn't. As you read (or haven't :P) in my other post, I couldn't glue the pot right (or maybe i did), nor could get a center with the resistors and with a trimpot, well, same happens. So I believe that since the servo IC is heating, a resistance gets altered, and with it, the control signal. And that's why I can't get a fixed center - so after a bit of work, the 1.5 ms center (or any other value, for that reason) drifts away, making control unreliable. Done with the intro  :-X

So, I'm considering building a custom power level. That's an H-Bridge (4 transistors), a small pic (12f675 or 629), a quartz and probably a voltage stabilisier. The problem is, the pic won't work with more than 5 volts, and the source won't work under 6. So i don't want to add more accus, but I don't want to risk burning the PIC, either.

Now, here's a design problem: should it be inside the servo, or out? Or maybe, just the h-bridge should be in? I'm thinking PCB here, but testboard (vero) should do it, or even soldering components in the air (though it's a bit unsafe). What control method would you use? Would you do it?

Thoughts, suggestions, ideas, let me know.
Title: Re: considering a custom servo power stage - suggestions, ideas, yay, nay?
Post by: airman00 on February 23, 2008, 07:48:06 PM
PICs work up to 6 volts

If you are making your own H bridge for the servo then it should be outside it since it might not work, and it'll be easier to debug when it's outside.
Title: Re: considering a custom servo power stage - suggestions, ideas, yay, nay?
Post by: izua on February 24, 2008, 03:53:56 AM
yes, i was thinking that way, but more wires will be involved and dangling around.. :P

what about control? How would you send data to the motors?
I was thinking i2c, but it's hard to implement on some small PICs. serial might be ok, but it only between two devices, and will have to be adapted if i add more stuff, or i'll have to make several serial ports on the master.
sending a pulse width (like servos do) might be interesting, but i want it to control both motors.
Title: Re: considering a custom servo power stage - suggestions, ideas, yay, nay?
Post by: Ro-Bot-X on February 24, 2008, 06:33:45 AM
You can use a dual H-bridge circuit like the L293D or the more powerfull SN754410 (1 Amp per motor). In fact, you may be able to use both H bridges in paralel to controll one motor and install everything inside the servo. There is a device like this called "The secret motor driver" from Solarbotics. Check out the docs from here (http://downloads.solarbotics.net/pdf/kit10.pdf). If you look at the last schematic you will see that with the addition of a tranzistor to invert the logic you can use only one pin from the microcontroller. If you make a small PCB that will go inside the servo, add this tranzistor and a 7805L voltage regulator, you may keep the original 3 wire cable for the servo. And most importantly, you may use Locked Antiphase PWM on the command pin. This works like this: when the PWM duty cyle is 50%, the motor will be braked; when the PWM duty cycle is 0%, the motor will spin full speed in one direction and when the duty cycle is 100% the motor will spin full speed in the other direction.

Another important hack for your servo would be adding an encoder inside the servo. Check out this link (http://www.portlandrobotics.org/index.php?id=77) and this link (http://www.geocities.com/rameses32/servo_mod.html?) to see how can be done.
Title: Re: considering a custom servo power stage - suggestions, ideas, yay, nay?
Post by: gamefreak on February 24, 2008, 11:30:06 AM
What exactly is the purpose of that motor driver? You still have to open up and modify the servo.

Is it for more current flow? I see that they cut the 4 outputs into 2 in order to double the power output.

Title: Re: considering a custom servo power stage - suggestions, ideas, yay, nay?
Post by: izua on February 24, 2008, 02:14:34 PM
i've opened the servous at least 15 times now :P
yes, the purpose of the power stage is to eliminate the crappy mass produced one.
Title: Re: considering a custom servo power stage - suggestions, ideas, yay, nay?
Post by: Admin on February 27, 2008, 08:06:19 PM
seen this yet?
http://www.openservo.com/
Title: Re: considering a custom servo power stage - suggestions, ideas, yay, nay?
Post by: izua on February 28, 2008, 01:37:25 AM
that's very cool!
but for the moment, i'm trying to build a simple moving box..
i think that's way too advanced for now - although i can see some uses in CNC robotic arms, with that kind of resolution
Title: Re: considering a custom servo power stage - suggestions, ideas, yay, nay?
Post by: paulstreats on February 28, 2008, 07:16:17 AM
Quote
What exactly is the purpose of that motor driver?

Its most likely an h-bridge that is tried and tested and works so you dont have to make your own and mess about too much
Title: Re: considering a custom servo power stage - suggestions, ideas, yay, nay?
Post by: izua on February 28, 2008, 09:40:27 AM
exactly. i initially wanted to make it with 4 pwm-optimised mosfets, but that's why there are chips like l293D or l298