PID, Servo, and Hall Effect Flow Meter

Hey all, I've been pretty diligent about trying to find my own way so far online but I'm stumped.

Ive managed to use the PID_V1.h and Servo.h libraries to get a servo to react accordingly to input from a potentiometer or a pressure transducer on the analog pins.

I am totally stumped how to code a hall effect flow meter to provide a similar input/signal for the PID.
Feel like im just beating my head against a wall. :confused: >:( :o

the flow meter is just one of those little cheapos with a 23Q.

Cheers, Im totally grateful for any help.

Did you want to control the flow rate? If so, the Input would be something like pulses per second or the inverse, milliseconds between pulses. Your Setpoint must be in the same units as your Input. Your Output is arbitrary and defaults to the range 0 to 255. If you are using the servo for output you will want to set the Output limits to 0 and 180 (for servo.write()) or 1000 to 2000 (for servo.writeMicroseconds()).

As said in #1... measure pulses per second or time per pulse. Heaps of esxamples out there for your kind of flow meter, it's indeed a very common way.

Note that in the first case the reading increases with increasing flow, and in the second case the reading decreases with increasing flow - set the PID accordingly.

Mich würde schon der genaue Sensor-Typ interessieren. Da gibt es Module mit Stromausgang, Spannungsausgang oder Impulsen, die müssen alle völlig anders angeschlossen und abgefragt werden.
Sorry for the wrong language.

The exact sensor type were interesting. I found modules with current, voltage and pulse output, which have to be connected and processed very differently.

Until we know what type of output the flowmeter has, it would be difficult to opine on how to get your system working the way you want.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.