Hi everyone. I'm completely new to this so ANY help greatly appreciated.
My project is this - I have a tank with water flowing into the top and a servo or stepper actuated valve at the base to allow the water to flow out. I have to hold the level at a given point +/- 2".
There is an ultrasonic sensor with programmable 1-5v or 1-10v output reading the surface level.
I've no experience with arduino so would appreciate any help getting started.
Many thanks
That's how I started but I could not get reliable actuation of the valve due to the design of the tank and the environment it's installed in. The output from the sensor is stable and accurate.
Also, I hope to add temperature sensors latter in the project.
My toilet does most of that without any electronics, but I do have to turn the handle to empty the tank. Perhaps you can use some toilet tank parts and your servo to turn the handle as it were?
GoForSmoke - Sorry if I've confused you; I,m not trying to empty the tank.
Quite the opposite- I need to maintain a level while the inflow rate varies and the outflow valve is modulated with a servo motor or stepper motor.
Can you setup an always-open outflow near the top, at the level you don't want to exceed? Drain this into the current outflow. Think of a bathroom sink, with the overflow slot near the top. Any excess water would simply take care of itself, if the outflow hole is large enough to keep up with the maximum inflow.
pbechard:
Can you setup an always-open outflow near the top, at the level you don't want to exceed? Drain this into the current outflow. Think of a bathroom sink, with the overflow slot near the top. Any excess water would simply take care of itself, if the outflow hole is large enough to keep up with the maximum inflow.
Even better, why didn't I think of that?
That will control to exactly the right level without any moving parts. What could be simpler?
The tank is part of a larger process that requires the surface to oscillate 2-4". By using a microcontroller and ultrasonic sensor, I expect to be able to control frequency of the oscillation.
Drain pipes, float valves etc. don't allow fine tuning. A programmable approach seem the way to go.
Ah, a new requirement. First thing then is to get the arduino reading the sensor. Hook the sensor 5V output up to an analog input (first verifying that it is indeed no more than 5V), connect the grounds together and see what the analogread of that pin tells you for different depths in the tank.
I haven't done it myself, but I've seen more experienced people here recommend that ultrasonic level sensing works better when the sensor is focussed on a float rather than directly on the surface of the fluid. I guess a flat hard surface gives a cleaner reflection than the rippled surface of the fluid.