An easy way could be to install a home switch signaling when the servo is "home". Then count the steps being taken and use as position.
A more andvanced way to go could be more advanced using a rotary endcoder that costs a lot more then the home switch.
mh95ncl:
For my project, I aim in using the servo motor to open and close a needle valve for fluid flow. Is there anyway I can implement a closed loop system?
You have not told us what you propose to measure to get the feedback data.
Essentially I want to achieve a flow rate in the nL/s range. I believe this is possible by connecting a needle valve to tubing and turning it x degrees and back to zero after x amount of time, which is what I plan on using the servo motor for. I understand this is simple and is an open loop system.
However, I would like the system to monitor the flow and speed up/down the motor accordingly.
As a newbie, I appreciate that a lot of you have years of experience in the field which is why I am asking for your help. Any pointers in the right direction would be highly appreciated.
Monitoring, as I undrstand, very small flow rates is very difficult. I believe it's better to calibrate the position of the needle and know what flow the needle position is giving. This calls for a well controlled preasure above the needle.
nL/s ? Is this for the sake of solving a problem most complicated or do you actually want a working solution? Anyway, look for "hose pump" or "peristaltic pump" Peristaltic pump - Wikipedia - if you cannot live with the pressure characteristics of these, you'll need to give more details.
I have looked at flow characteristics of a needle valve and have found one in theory that will achieve a flow rate of 6.95µL/s (set at 11.25 degrees). If I open the valve for a second and close it for approximately 200 seconds I can achieve the desired flow rate.
This is not much of a problem as I can fix the needle valve to the servo motor and rotate it. However, I would like an option for someone to set the desired angle and time without accessing the code. Is this possible?
I have avoided pumps as this system is supposed to rely on gravity fed fluid.
If you want to deliver nL/s reliably, then please use a pump with adjustable flowrate. That's why these things have been invented. You even find plans on thingieverse to print this stuff yourself.
zwieblum:
Aehm ... that's a simple RC servo, it is a closed loop system already
I suspect you are missing the point.
I believe the OP plans to have some device to measure the flow rate and wishes to use that data to alter the needle valve position (open or closed) as necessary to achieve the desired average flow rate.
What I don't know is how the OP plans to measure such a small flow (or if it is even possible) or whether using a servo to adjust the needle valve is a practical option.
Someone mentioned that hobby servos are not designed with a long life in mind, but the OP has not said how long this project needs to operate. Maybe it only needs to work for 5 or 10 minutes a few times a week and in a non-critical project where a failure would not matter if a spare servo is available.
Well thanks Robin for taking your time to reply (and others). I guess I underestimated the complexity of the issue and solution.
Essentially, I require a circuit/component I can attach to a needle valve to turn it off/on (to a specific angle) for a period of time. I was advised a servo motor by a professor which is why I pursued this option. I am open to any other suggestions of course.