I have a question about this for a personal project that I'm working on.
How do you keep track of the position of the servo? When running a valve, I don't see how you could implement limit switches. I also have questions in my mind about how accurate position tracking can be if you're just keeping track of time that power is applied in each direction.
OK, the one in his link only has 3 wires (red, black, white). I assumed red and black for power and the white for the PWM. I take it these have a special protocol that makes the white wire bi-directional for reading and writing?
Wow, after seeing your posts in other forums here, you really should quit patting yourself on the back. Save it for Halloween and don't forget to say trick or treat next time. You contributed absolutely nothing useful with your responses. Why you spend so much effort patting yourself on the back is mind boggling.
Participants are required to do a bit of their homework here. Are you expecting someone to Google the answer for you because you donāt want to use Google ?
If itās not a 360° servo - You tell the servo where to go (the PWM signal indicates the position). So your code knows what has been askedā¦
If youāll study the Arduino Servo Library documentation a little bit, Iām confident that if that doesnāt answer your questions then at least youāll be prepared to ask some intelligent questions.
You should be aware that there are (at least) two meanings of the word "servo". In Arduino-ese it is often taken to mean the type of servo that was originally designed for radio controlled models. These have a motor and a gear train and a potentiometer for internal position feedback, and a chip that does the control. You feed them power and a pulse train, usually pulses from say 1 - 2ms, and they take up an output position that depends on the pulse length. Internally they generate a pulse of a length controlled by the pot and compare it with the input pulse. Made by the million and very cheap. Output shaft rotation usually limited to about 270 degrees by the pot. There are also versions that used to be called "sail winches" that have several turns of output to control model yacht sails (originally) but could potentially be used to drive a valve needing several turns - say a needle valve. In such a case there could be a further gear reduction from the output to the potentiometer, or a multi-turn pot (though they are usually expensive).
Generically a servo is a system with an actuator (usually a motor), a sensor to measure the actuator position, and a controller that compares the actual position with a demanded position and drives the actuator to force the error to zero. So you could have a gear motor to drive your needle valve and a suitable sensor on the valve, such as a pot. But from my memory of needle valve, usually as you close the valve the required torque gets very large as you tighten a screw, so you might also need a torque sensor to see when the valve closes and stop the motor - or you could just let it stall. Quite a tricky problem to combine proportional movement with properly closing the valve I should think.
Modern "servos" though, such as used extensively in CNC machines, generally use optical or magnetic encoders to sense position, which are much more precise and don't wear out.
Iām guessing this topic arose from OPās interest in this topic:
where it was discussed how a needle valve could be operated to control the cooling water flow in a distillation column.
That discussion prompted the interest in this topic:
where the use of a multi turn servo was proposed to operate the needle valve.
OP then asked how servos were controlled, hence this topic.
The distillation topic OP suggested that controlling a water pump via PWM and as the discussion progressed it was suggested that perhaps controlling a valve might be a better approach. The topic is ongoing.
The topic that spawned this topic centered around using a multi turn servo to operate a needle valve. That topic is also ongoing.
My thought is: if the needle valve can be operated in its middle range and it is not necessary for it to be full on or full off, then a multi turn servo with the torque available to turn the valve stem might be the solution. If however it is necessary to completely close or open the valve to get the flow control needed then another approach that included a way to sense the stalled positions at the extremes would be required.
The correct design for operating a needle valve with a motor, is to use a spline coupling that can slide and follow the needle valve shaft up and down. That way the valve is fixed in position and the controlling motor is fixed in position.
I guess if I was doing the project Iād use a stepper motor with an L6470 type controller chip that is capable of sensing the stalled condition automatically.
A short search didnāt find a splined shaft assembly that would adapt easily for this solution. With stem travel on the order of 5-10mm, a timing belt drive might allow for the misalignment.