I'm sure there are some EEs here, probably even working in the automotive sector. I need some help with a project.
I need to drive a servo (standard 3-wire RC stuff,) through 180 degrees of motion, with a tach signal as an input.
The tach signal is a square waveform, 12v pulse. Frequency is about 15hz at idle, up to about 220hz at redline.
I need to build a servo controller that can drive a servo with that input.
Suggestions or references?
How does the controller know when to pull the servo back? Are you basically trying to make a huge tach where a lot of cycles/second drive the servo to it's far end of the motion range, or how does this thing know when to move back towards its at rest position?
The first thing that comes to mind is a programmable logic controller like a PIC (only one I have any experience with) since it has input and output pins that can deal with this sort of thing. You'll also need an amplifier to actually deal with the PIC output because it cannot drive anything like a servo directly.
This is a controls question and not really automotive specific. Input square wave signal controls motion of servo, but what sort of change at the servo are you looking for, and what sort of torque do you need?
I can try to help maybe get some ideas together but I am not a programmer and my controls / PLC experience is from a couple classes in college. Framing your requirements can really help you get some results and right now the requirements are fairly incomplete.
Approach number 1:
Frequency to voltage converter driving a 555 timer servo controller. Fairly straight forward, but may require some fiddling to get the servo to use its entire range.
LM2907 F to V : Datasheet
Gratuitous hot link.
Approach number 2:
Cheat.
Learn the Arduino "map" function. You can process the input freq a few different ways, and then "map" the output to control the servo. See the following: Arduino
Thanks. I am basically building a huge tach. 20hz input is roughly 0deg. 120hz is 90deg. 220hz is 180deg.
Problem with F to V is that the servos are looking for PWM signal. I need F to PWM...and I don't have a spec on the servos.
Time for more research.
Edit: the Arduino would be the ticket, if I could build a circuit to give me variable resistance from a pulse input.
That 555 circuit I posted above outputs a suitable PWM to drive a common hobby servo. I've built variations of that circuit a few times before. Basically you feed the output of the F to V to the input side of the 555. Usable PWM comes off pin 3, everybody wins.
Here's my new $20 toy:
From Drop Box
We'll see how successful I am.
jhaas
Reader
3/7/11 9:43 p.m.
DAMN! this forum is awesome!
jpaturzo wrote:
Approach number 1:
Frequency to voltage converter driving a 555 timer servo controller. Fairly straight forward, but may require some fiddling to get the servo to use its entire range.
LM2907 F to V : Datasheet
Gratuitous hot link.
Approach number 2:
Cheat.
Learn the Arduino "map" function. You can process the input freq a few different ways, and then "map" the output to control the servo. See the following: Arduino
I ordered an Arduino, just because you can apparently do damn near anything with one. I have no idea how to program on one, but hopefully can figure it out.
It's a very good beginners micro controller. And there is a huge community supporting it, so 90% of what you want to do has already been done. That's a huge help coming into it.
If you work through a few of the examples, you'll have a handle on how the programming aspect of it works. If you have any prior programming knowledge it will make it all go faster, but starting from the bottom will give you some good perspective.
If you have any questions, between here and the Arduino forums you should be covered.